From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Statechart module - timing in asynchronous statechart

Hallo folks,

 

I am wondering if it is possible to internally time an asynchronous statechart in the current statechart odule. To explain, I would like to automatically switch between states (Wait, Generate) in an asychronous statechart. For example a simple application where when the statecharts starts running it enters init mode. If the user activates a "Start" control it generates a number than goes to the wait state for a defined period of time .After this time elapses it again generates a new number. So it repeats the process of waiting and generating as long as the user does not press a stop button which sends a stop trigger.  The reason I want to use the timing within the statechart is because i want to have various timings for different tasks and wnat to avoid the classic too many parralel loops with a queue message handler. Therefore, I can not use a timeout external trigger from within the UI loop because essentially there is only one trigger I can send from the timeout state of the UI loop. I neeed it asynchronous since various parts of the application have to execute at different timing. Does anyone have any hint for such task ? Any suggestions are greatly appreciated.


Karel

0 Kudos
Message 1 of 2
(2,143 Views)

Hi Karlito,

 

Thank You for posting this question. If I understand your description the "genereate" and the "wait" states would always follow one another. I was wondering if it is ok for you to create only one state in which the number is generated and the application waits for a defined period of time.

 

Good luck with your application,

 

Tamas

0 Kudos
Message 2 of 2
(2,078 Views)