06-05-2025 09:15 AM
So far we are able to change ring value dynamically with LabVIEW but not for enum with .ctl files. Is there any effective method to dynamically edit the contain of the enum using LabVIEW?
06-05-2025 09:24 AM
Hi skykong,
@skykong wrote:
So far we are able to change ring value dynamically with LabVIEW
Yes.
@skykong wrote:
Is there any effective method to dynamically edit the contain of the enum using LabVIEW?
Nope.
Enums are defined at edit time (as they define the datatype).
Changing them requires to recompile your executable - which isn't possible at runtime…
06-05-2025 09:36 AM
You can, but the Enum must not be reserved for execution.
This example works as long as no running vi uses the ctl:
Of course, the file MyEnum.ctl must exist already.
06-05-2025 09:50 AM
Great! Can you provide the vi for references? Thanks.
06-05-2025 09:59 AM
@skykong ha scritto:
Great! Can you provide the vi for references? Thanks.
It's a snippet. Save it as a picture (.png) and then drag it into a Block Diagram.
Of course, you need LV>=2021
06-05-2025 10:16 AM
@pincpanter wrote:
You can, but the Enum must not be reserved for execution.
This example works as long as no running vi uses the ctl:
Of course, the file MyEnum.ctl must exist already.
Maybe we should take a step back and ask why updating a ring is not sufficient?
06-22-2025 12:18 AM
This method won’t work because this only workable if execution is stop. Is there any method that work with executable is continue running?
06-22-2025 07:46 AM
@skykong wrote:
This method won’t work because this only workable if execution is stop.
This is what others were meaning when they said:
@GerdW: "Enums are defined at edit time (as they define the datatype).
Changing them requires to recompile your executable - which isn't possible at runtime…"
and
@pincpanter: "the Enum must not be reserved for execution.
This example works as long as no running vi uses the ctl"
@skykong wrote:
Is there any method that work with executable is continue running?
Enums by definition are not editable at runtime. If you want a drop-down list with items settable at runtime, you have to use either a Ring (numeric data type) or a Combo Box (string data type).
Regards,
Raphaël.