LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP VIs multi threaded?

I want to use the TCP Vis in multiple parallel threads.  Will they block each other or are they reentrant?

What about using the VISA VIs instead?  Are they reentrant?

 

I am trying to talk over TCP to many different machines from my app all at the same time and don't want to have a chock point in the TCP interface.

 

thanks,

 

-John

-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 1 of 6
(2,731 Views)

John,

 

I don't see why either would be a problem.  I frequently communicate to instruments and computers in different parts of the code, all executing simultaneously, and have not had a problem.  Not quite what you have, but pretty close.  The communication should just go where it is directed.

 

I'd give it a try and let us know if there are any problems.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 2 of 6
(2,728 Views)

Is there any reason to belive one method would have more or less CPU load over another one?  I am trying to reduce my CPU usage because I am tyring to talk to 48 different IPs all at the same time and I am seeing a heavy load on the CPU.  I need to implement the leanest communication method possible.

 

So, which is the most efficient?  The stock TCP VIs or the VISA VIs?

-John
------------------------
Certified LabVIEW Architect
0 Kudos
Message 3 of 6
(2,724 Views)

My gut feeling would be that the TCP vi's would use less CPU time.  Can't prove it, though.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 4 of 6
(2,722 Views)

I believe you can't compare the two. TCP is a connection-oriented, reliable protocol whereas VISA is a standard for configuring, programming, and troubleshooting instrumentation systems comprising GPIB, VXI, PXI, Serial, Ethernet, and/or USB interfaces. It provides the programming interface between the hardware and development environments.

 

You shouldn't have a choke in your system unless you conflict your resources. I am not sure why you are seeing a heavy load on your CPU; it must depend on how you have programmed your application and what's going on in it. You could post an isolated portion of your code and we could suggest improvements if there is a potential to improve the efficiency of your application.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 5 of 6
(2,703 Views)

Hai,

 

TPC/IP is a communication protocol where as VISA is generalized driver platform that unites various instruments like PXI,GPIB,VXI under one roof.

 

TCP/IP functions in LabVIEW do not arbitrate within itself when there are multiple calls.  They form seperate buffers from where date is written to and read from.  One rule of thumb i would follow in TCP/IP communication is "Do not write too many Bytes of data in single TCP Write".  Coz when huge block of data is written in single TCP write execution loop will take more time to dump the data into buffer.  So if there is huge data fragments you are writing in single TCP write break them into fragments and write in two or more writes.

 

Hope this might help you in some means.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 6 of 6
(2,689 Views)