07-16-2024 05:07 AM
Hi,
how I can program my state machine to initialize controls in my program when the program is running because it only takes the value it had before I ran my program
thanks in advance
Solved! Go to Solution.
07-16-2024 06:23 AM
Hi Amelie,
@ameletudiante99 wrote:
how I can program my state machine to initialize controls in my program when the program is running because it only takes the value it had before I ran my program
Create an "init controls" state and do whatever you need to do in this state…
Do you use a (typedefined) cluster in a shift register to hold statemachine-internal data: you better initialize this cluster instead of some controls on your frontpanel…
07-16-2024 08:56 AM
Hi
how I can do this; in my state machine, I have enums and controls, and I need to initialize all of this and I also need to display messages depending on the choice to use. I do how in this case, when I puts everything in the cluster I can no longer define the choice of each enum to display the messages,?
I can't send data outside the state machine?
07-16-2024 09:17 AM
Hi Amelie,
@ameletudiante99 wrote:
how I can do this; in my state machine, I have enums and controls, and I need to initialize all of this and I also need to display messages depending on the choice to use. I do how in this case, when I puts everything in the cluster I can no longer define the choice of each enum to display the messages,?
You can change anything inside the cluster in each state.
You can change indicator data inside or after each state.
I don't know why you cannot do this in your VI…
@ameletudiante99 wrote:
I can't send data outside the state machine?
Sure you can send data "outside the sate machine" to other loops/VIs…
07-16-2024 09:29 AM
Hi
Do you have an example of how I've ever worked on this?
when I put my control in a cluster it disappears from all the places where I call it, not only in the state machine?
I don't know how to resolve this problem?
07-16-2024 09:36 AM
How about uploading your VI for us to see?
07-16-2024 09:37 AM
Hi Amelie,
@ameletudiante99 wrote:
when I put my control in a cluster it disappears from all the places where I call it, not only in the state machine?
I didn't mention to place the control into a cluster, I wrote/asked to use a cluster to handle statemachine-internal data. One cluster to bundle them all, and you can write data from your control into this cluster…
07-16-2024 09:40 AM
@ameletudiante99 a écrit :
when I put my control in a cluster it disappears from all the places where I call it, not only in the state machine?
I don't know how to resolve this problem?
Hi,
You should take a look at this : Arrays and Clusters in LabVIEW.