03-21-2012 04:25 AM
Hi,
I have an execution highlight problem. When highlight execution on, the code works fine and off otherwise.
There's one motor, PXIAWG and PXIScope in my system. When the motor start moving, AWG and Scope start also, the scope will recording the data,here I use producer/consumer loop for AWG and Scope. The motor keep moving and will stop at certain distance. I used notifier to pass the 'Moving Complete' to notify AWG and Scope to stop. Now in highlight execution mode, the code works fine. In normal mode, the 'Moving Complete' change to True while the motor still in running mode. I've tried to add time delay, but it won't help.
03-21-2012 05:37 AM
In your code, multiple loops are running in parallel. Also you have used 'Local/Global Variable'.
It seems to be "Race Condition" is occuring.
Suggestions:
1. Check which function/variable should execute first and place 'Sequence Structure' occordingly,
2. Minimuze the 'Locals/Globals' and replace with 'functional globals'/LV2G (Also use the synchronize techniques - You are already designed good)
3. Check the timeout values of the functions & Monitor Error in each loop.
Reagrds,
Yogesh Redemptor
03-21-2012 06:45 AM
@vickiyi:
Could you post a snippet of your code? That way it would be easier to find out the problem in your code.
03-21-2012 09:20 AM
Hi Fragger Fox,
u may need some driver pre-installed to open the whole code. My problem occurs at state 'Start'.
Thanks!
03-21-2012 09:35 AM
attached code