LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout problems

Solved!
Go to solution

 Dear friends, I'm working on an motor controller application that uses state machines to schedule the tasks to be done. I need to control 2 motors and each one is managed by one state machine. These state machines were transformed in a sub VI, once they have exactly the same functionality. Everything is running perfectly, except by the fact that, by a reason I can not understand, one estate machine behaviors differently from the other.

 To let things clearer, let's name one motor as the X motor and the other as Y motor.

 I used "Elapsed Time" VIs to build timeout structures into the state machine. Motor X's state machine acts as planned, but Y's one just ignores one of the timeouts implemented. As both of them are the same sub VI, I see no way they could present different results once they're submitted to the same conditions.

 It is important to say that these state machine VIs share an RS232 VISA resource. In the sub VI I used  an input and output connector so the VISA line can be connected to the first VI and it's output goes direct to the input of the second one.

 I noticed that changing the order os the VIs changes witch VI ignores the timout. The second VI is always the problematic one. I could clearly understand if there was a time delay between the execution of the first state machine and the second one, once there's a shared resource. But it does not sounds normal  to have one specific timeout ignored.

 

 I hope someone could help me on this.

 

 Thanks so much

 

 Leonardo

0 Kudos
Message 1 of 3
(2,492 Views)
Solution
Accepted by topic author leonardolt
Is the subVI execution is set to 'Reenterant'?  If not the the second call will wait until the first execution is complete.  Go to File->VI properties, select the Execution tab and check the box the 'Reentrant execution'.  This will clone different instances of the VI when called
0 Kudos
Message 2 of 3
(2,488 Views)
Thanks Jack! That was the problem! Things are prefect now!
0 Kudos
Message 3 of 3
(2,477 Views)