NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to share notification step with LabView (Execute "Set" operation from LabView)

Hi,
 
Attached sequence file shows an example of the notification step. How can I execute the "Set" operation from LabView instead (Replace the "Set" step with an LabView vi)?
 
I want to do this in order to build my own "Identify UUT" in the parallel model using LabView. It seems that in the PreUUT of the ParallelModel file, the CVI dialog sets this operation.
 
(I use TS 4.0)
 
Thanks
Regards
Tom Andres Lomsdalen, CTD
0 Kudos
Message 1 of 17
(5,218 Views)

You need to use the SyncManager.  Try this VI.  Pass the Runstate.engine to the vi allong with the name of the notification and it will set the notifier.

 

Message 2 of 17
(5,209 Views)

Paul, thank you for the VI.

I implemented it in TS and it worked great if I use text for referance. Do you know if this will work using "Object Reference" as in the paralell model and the attached seq file? It seems that the referance name must be a text using the syncmanager API?

Regards
Tom Andres Lomsdalen, CTD
0 Kudos
Message 3 of 17
(5,180 Views)
If you are using references then pass the notifer reference into the VI and operate on it.  You won't have to get it from the engine.  Try this VI.  All I did was remove the part of the code that pick out the reference from the sync manager and made the notifier reference an input control.
 
 
Message 4 of 17
(5,152 Views)
Hi Paul,

I'm starting 20 testsockets, and they are all waiting for the notifier. Is there a way to select which testsocket to start (using LabVIEW)?
This is what I tried:
In the pre-uut, I added each notifier into an array.
To start a testsocket, ex socket5, I used notifier ref stored in notifier array index5. Then I passed the ref into your code "NotSet2.vi". That didn't work 😞
Then I noticed that the notifier ref change continuously, so I guess it is wrong to store the notifier refs into an array.
Do you know how to solve this?

Regards
Richard Pettersen




0 Kudos
Message 5 of 17
(5,095 Views)
Richard,
I am not quite sure what you are trying.  Are you using the parallel process model?  Are you referring to the WaitForControllerNotification notification wich is part of the parallel process model or do you have your own notification set up?
 


Then I noticed that the notifier ref change continuously, so I guess it is wrong to store the notifier refs into an array.

I am sure that by putting the notifier references in an array is not going to cause them to change.  The WaitForControllerNotification that I refered to is also in an array, one for each testsocket, and it has been working fine (see ModelData.TestSockets[].WaitForControllerNotification {granted it is an array of containers, one of wich is a notifier ref})
Give a bit more detail on your notifier (where it is initialized, set, read; and the mechanism that passes the reference, i.e. global, parameters ect) and I will try to help.
 
Paul
0 Kudos
Message 6 of 17
(5,080 Views)
Hi Paul,

I'm using the parallel process model.
Take a look at the attached seq example.

- In the ProcessSetup Callback, I init the ref array
- In the PreUUT Callback, I insert notifier ref into the array
- The SystemView sequence is a new thread. This is where I open the Status window (where I will start the selected test sockets)

I really appreciate your help!

Regards
Richard
0 Kudos
Message 7 of 17
(5,076 Views)

Richard,

In your example you do not create a notification.  The part where you "init the ref array" only creates an array of empty references.  You sould create a notification either with a teststand step or with the synchronization manager.  Create X notifications, one for each socket, and put the references returned from the create step into an array.

Also, I realize that this is just an example, but if you don't plan on using the same notification for both teststand and labview I would stick to using the labview synchronization step alone.

Paul

0 Kudos
Message 8 of 17
(5,064 Views)
Hi Paul,

Regarding the "init the ref array", it's true that I just init an array of empty refs. It is in the PreUUT callback I put refs in the array. If you use a probe in the GetNot.vi (in the "Insert" case), you will see that I put non-empty refs into the array. These refs has been created in the "Initialize TestSocket" sequence (in the ParallelModel.seq).
I have managed to make this work using X notifications, but I hoped that I could use the notifications that was already created in the
"Initialize TestSocket" sequence.

regards
Richard


0 Kudos
Message 9 of 17
(5,055 Views)

Richard,

Yes I missed that part.  I do see that you are using the WaitForControllerNotification and inserting that into the array.  I actually tried running it this time and I was getting an error on when I would set the notification with the statuswindow.vi.  I did trace through, and the reference that was put into the array was the same one that I got back when read.  I don't know why the set didn't work.  I actually only tried the solution I gave above the first time when the original question was posted(the "then pass the notifier reference into the VI and operate on it" one).  This was in TS 3.0.  I had to get TS4.0 eval version to test out your example.

My eval period for the day is up.  I would like to try my original test that I performed in TS3.0 when I gave the solution above but it looks like I will have to wait for tomorrow.  It was just a simple create notification by reference, pass the reference to a LV sequence (the one posted), and then wait on the notification.  If the wait-step doesn't wait I determined it was set.  To "prove" this I re-ran and skipped the set step and the wait-step did wait.  Maybe you can give this a try...

I'll see if I can figure out the problem, but from what I could tell (now that I looked at it much closer) I didn't see immediately what was wrong.

Paul

 

0 Kudos
Message 10 of 17
(5,025 Views)