NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP Send and receive

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

0 Kudos
Message 1 of 4
(3,604 Views)

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.

Message Edited by Phillip Brooks on 01-13-2010 04:39 PM

Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 4
(3,590 Views)

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!

0 Kudos
Message 3 of 4
(3,578 Views)

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

0 Kudos
Message 4 of 4
(3,547 Views)