LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about run 2 state machine dependently. Attached VI and picture. Thank you.

Dear friends, 

I need some help here, I tried many ways, but I can not find out how to do it.  Please help.  

My target:  1st LED (in 1st state machine) Blinking all the time (never stop) with very slow speed(1000ms), 2nd LED(in 2nd state machine) will blink kinda slow (500ms) if 1st LED is off OR will blink kinda fast(50ms) if 1st LED is on.  

 

Important notes: 

1. I do need to KEEP those 2 state machine(SM). Especially, do NOT change the Enum of both SM. I am doing this for much much bigger project, in that project, there are 2 SM. That's why I make 2 SM in here.  2nd SM will be updated again and again (by T or F) from 1st SM (1st SM will give out T or F again and again to 2nd). 

2. Both SM should be keep running all the time. In other words, 2 LED should be blinking all the time, just 2nd one with different blinking speed under condition of 1st one one or off. 

 

Please check the attached VI. Could you please just modify this VI and upload it for me? I know it sounds I am asking solution for a homework. But this is not homework and I already spent almost 2 day on this 😞

 

The VI is ok to run, but 2nd LED will not be blinking in different speed, because the green wire cannot be updated until 1st LED stop (I do need both SM keep running).

 

Thank you so much for your time and kindness.  Thank you.  

11.png

Download All
0 Kudos
Message 1 of 5
(2,967 Views)

Move that boolean and case structure inside the loop so that it can be read every iteration.

0 Kudos
Message 2 of 5
(2,959 Views)

I think I tried before, it wont work:( Could you try that for me?  Thank you in advance

 

0 Kudos
Message 3 of 5
(2,938 Views)

It worked for me.  Boolean 2  blinks superfast when Boolean 1 is on,  much slower when Boolean 1 is off.

 

Try again.  If you still have a problem, attach your modified VI.

0 Kudos
Message 4 of 5
(2,930 Views)

oh, it works. I do think I tried this....... but how comes it was not working. Thank you again for your help.

0 Kudos
Message 5 of 5
(2,895 Views)