Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 68935

What am I doing wrong with asynchronous call and forget?

$
0
0

I have a simple state machine program, where the first state (0) is an event case handling Front Panel controls. One of the events handles the movement of a Motorised stage, and inside, there's a case structure to determine if the button pressed was for a simple + - step movement in x,y,z, or a "move to absolute position case". If it's the latter, I want to call a subVi that iteratively moves to that position and compensates for backlash (a simple while loop that checks if the position has been reached by reading the encoders).

 

However, each time I call the subVi, the state machine halts until the subVi finishes. I want to implement it in such a way that the subVi is called, and the state machine goes back to the Timeout event (state 0) where I read the encoders every 50ms. I thought calling it with asynchronous call and forget would be a way for it to run in parallel with the main VI, which is what I want to achieve, but apparently I'm missing something.

 

I would like to do this without implementing a QMH, as I will be calling the subvi in the background while I'm in a new state collecting data from a potentiostat.

 

Screenshot 2024-03-26 192438.png

Any help is greatly appreciated.

 

 


Viewing all articles
Browse latest Browse all 68935

Trending Articles



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