beau28713
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.

Problem

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.

What I expected

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.

What actually happens

  • 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

Additional detail

I also noticed that in some places the editor displays the type name as HOA MODE instead of HOA_MODE, even though the actual type definition is named HOA_MODE. I am not sure if this is only display formatting or related to the issue.

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
  3. Go to the variable table
  4. Create a variable and set its type to HOA_MODE
  5. Try to use that variable in the main program editor
  6. Observe that the editor does not recognize it properly
  7. Then create a similar variable directly in the editor area
  8. Observe that this version works

Question

Has anyone else seen this behavior with:
  • custom enum data types
  • variables created in the variable table
  • differences between the variable table and editor area
I’m trying to figure out whether this is a known bug, a sync issue in the editor, or something specific to how custom data types are handled.
Reply 0 0
thiagoralves
This seems to be a bug. Can you please open an issue at https://github.com/autonomy-logic/openplc-editor/issues so that it can get tracked to be fixed?
Reply 0 0
beau28713
Yes sir, will do. Thank you
Reply 1 0
Write a reply...
Reply