LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

initialize control values ​​during execution with the state machine

Solved!
Go to solution

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

0 Kudos
Message 1 of 8
(1,401 Views)
Solution
Accepted by topic author ameletudiante99

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(1,382 Views)

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?

0 Kudos
Message 3 of 8
(1,347 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(1,331 Views)

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?

 

 

0 Kudos
Message 5 of 8
(1,327 Views)

How about uploading your VI for us to see?

0 Kudos
Message 6 of 8
(1,318 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(1,316 Views)
Solution
Accepted by topic author ameletudiante99

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

0 Kudos
Message 8 of 8
(1,315 Views)