LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execution highlight problem

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.

 

Untitled.jpg

0 Kudos
Message 1 of 5
(2,724 Views)

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

 

 

Regards,
Yogesh Redemptor
0 Kudos
Message 2 of 5
(2,711 Views)

@vickiyi:

Could you post a snippet of your code? That way it would be easier to find out the problem in your code.

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 3 of 5
(2,706 Views)

Hi Fragger Fox,

 

u may need some driver pre-installed to open the whole code. My problem occurs at state 'Start'.

 

Thanks!

0 Kudos
Message 4 of 5
(2,696 Views)

attached code

0 Kudos
Message 5 of 5
(2,694 Views)