01-13-2010 11:58 AM
I'm making calls to the UDP Send.vi and UDP Receive.vi that ships w Labview 8.5 in Teststand 4.0. I mod the vi by removing the loop, so that it only executed once. It also had the send and recv in the same vi. The vi open,sent the data, closed, then opend the recv, recvd the data and closed all in the same vi. In my 1st rev of a TS Seq I used this vi prototype mulitple times in the same seq. After many months of error free running I stopped getting data back. Nothing showed up in the recv window. If I ran the vi outside of TS, as a stand alone , it worked. The guys at National said that was bad. Open and closeing the UDP port multiple times. I should open it 1x and close it at the end of the seq. Any suggestions how I would do this if I had a "Main" seq with subseq calls in the same file?? How do I pass the connection id into the subseq then back out again when the subseq is done??? Is there a better way?
Does this sound like the reason I'm not getting data back all of a sudden??
Thanks
01-13-2010 03:38 PM - edited 01-13-2010 03:39 PM
According to this thread, TestStand can accept a connection id as an output of a VI and store it as a U32 local/global in TestStand. You would pass the TestStand U32 back into LabVIEW as connection ID and LabVIEW will convert it back.
Just be sure to close the reference with LabVIEW at the end of your sequence.
01-14-2010 04:39 AM
So call the vi in my "Main" Seq, pass the "connection id" (locals.connection_id) to the subseqs using Parameters, then close it in say... Clean up at the end of my Main Seq?? If I chg the value of the connection id in my subseq will it chg it in the main calling seq??? If I use pass by reference?
I have to do this for both the send and recv vis, correct?? I wouldn't use the same connection id value for both would I ??? I think one opens an id to ( a port?) send the data and one to ( a port) to rec'v the data back.
Thanks!
01-15-2010 12:42 PM
Hey Clint,
It really depends on what you are trying to do. You can easily pass the "connection id" to and from TestStand by just using the numeric datatype. If you are doing something similar to the code in UDP Sender.vi and UDP Receiver.vi then you will most likely have a different Connection ID for your sending operation and your receiving operation. If you do not use the UDP Close function to close out your ID and you pass it back to TestStand instead, then you will need to make sure to close this reference either in a later step or in your Cleanup section.
Hope this helps,
Lars