LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing global from Events

Highlighted

I am developing a test program. I am using the full PID control, A test routine with 20 steps. It is a semi automatic test. The operator has

a panel for input when an event occures. I am having dificulty trying to pass the global data from the event case to the test sequence.

 

I am sure it is very basic. When I choose the start event. I tried to pass the boolean state & and I tried passing a 0 or a 1.

No luck.

 

Philip

0 Kudos
Message 1 of 4
(667 Views)
Highlighted

Hi,

 

I looked at your State Enum VI.  IT seems like you are trying to pass data through GV from a while loop at the top to the sequence structure at the bottom. 

 

1. The bottom sequence structure is going to execuate only once, so it is not going to get the value that you intended to get.  You can put a while loop around the sequence structure if you want, so that it will continue to poll for the GV. 

 

2. If you pass data that way, you are going to run into racing condition.  It is better to pass through between parallel section of code with a queue instead. 

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
Message 2 of 4
(651 Views)
Highlighted

Thanks,

 

 I did have a While loop around the test sequence. But I was afraid of a race condition. I will see how I can parrallel the two loops.

 

Thanks

 

Philip

0 Kudos
Message 3 of 4
(645 Views)

I took your suggestion and fixed my problem. I took my sequence and put it inside of the loop. Works great. I used the True/Fail variable to trigger the test sequence. Thanks allot. I just could not get out of the loop. I have a seperate VI for the PID controller. I have to pass globals to this VI later.

 

Problem solved

 

Thanks

 

Philip

0 Kudos
Message 4 of 4
(639 Views)