Skip to content

User-defined enum type works in editor area, but variables created in variable table are not recognized in main program Bug Reports #720

@Beau28713

Description

@Beau28713

Expected Behavior

I expected variables created in the variable table and assigned a custom enum type to be usable the same way as variables created directly in the editor area.

Current Behavior

  • Variable created in variable table with type HOA_MODE:
    • editor area does not recognize it properly
    • seems like the type or variable is not available where it should be
  • Variable created in editor area with type HOA_MODE:
    • works as expected

Steps to Reproduce

  1. Create a custom enum data type called HOA_MODE
  2. Add enum values such as:
  • HOA_HAND
  • HOA_AUTO
  • HOA_OFF
  1. Go to the variable table
  2. Create a variable and set its type to HOA_MODE
  3. Try to use that variable in the main program editor
  4. Observe that the editor does not recognize it properly
  5. Then create a similar variable directly in the editor area
  6. Observe that this version works

Context

If I create a variable in the variable table and assign it the HOA_MODE data type, then try to use that variable in my main program editor area, the editor cannot find it or does not recognize the type correctly.
However, if I create the variable directly in the editor area, the program can find and use the HOA_MODE data type without a problem.

I’m seeing what looks like a bug with user-defined enumerated data types in OpenPLC Editor.
I created a custom enum data type named HOA_MODE and defined these values:
HOA_HAND
HOA_AUTO
HOA_OFF
The data type itself appears to be created correctly.

Your Environment

  • OpenPLC Editor 4.1.4
  • Release: 2026-02-27
  • runtime version 4
  • Operating System : Windows 11 Home
  • OS build: 26200.8117

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions