Quantcast
Viewing all articles
Browse latest Browse all 69019

State Machine and Timing

Hi.
I want to realize an exercize to practice on the state machines in labview.
Attached there is the VI I made. It controls the movement of a Bus. I have two trafficlights, the first one allows the Bus to exit, the second one is for the normal traffic. So while the Bus is in the parking, his trafficlight is Red all the time, while the other one works normally shifting from green to red. Once the Bus starts to move, his trafficlight goes to Green and the other one goes to red.
My questions are:
1- if this VI could be consider a valid exercize for the state machines, in the way I have made it.
2- if in the "Bus Moving" of the Case structure is it possible to remove the "for cicle" in somehow with a timer that waits for a certain number of seconds. I tried with the "wait pattern" with the idea to do a comparison between his output and the reach of the input I gave to him.... but I saw that it will never give me the same output since it take in count the ms timer value, so as it is written in the help: if millisecond timer value is 112 ms and milliseconds to wait is 10 ms, the VI finishes when millisecond timer value equals 122 ms.
Any tips?
Thank you in advance

 


Viewing all articles
Browse latest Browse all 69019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>