LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP multi device connection

Hello,

 

case description:

I have a lot of devices connected to the TCP / IP network. Devices can be connected and disconnected without my knowledge. 

 

problem to be solved:

When device disconnects, 'TCP Write' Vi wait timeout. In this time all outgoing communication is blocked. How to do to poll another device when one timeout is waiting? 

 

I'm sorry for my English

0 Kudos
Message 1 of 18
(3,661 Views)
Run reentrant VI for every device.
0 Kudos
Message 2 of 18
(3,644 Views)

And/or use low timeout values with retry for a few times.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 18
(3,637 Views)

I never worked with reentrant VI. Thank you for the tip, I will check what possibilities give.

0 Kudos
Message 4 of 18
(3,612 Views)

I cant use low timeout because network delay can get big. 

Thank you for your response

0 Kudos
Message 5 of 18
(3,611 Views)

As i unerstand reentrancy Vi allows me to repeatedly execute a piece of code at the same time. Every vi has own data space etc. 

 

Is there any mechanism to open them so that they do not block the rest of the code?

I mean dynamic mechanism. So that I can open an undefined number of reentrancy Vi.

 

 

0 Kudos
Message 6 of 18
(3,595 Views)

Look examples in LabVIEW,

one of them: National Instruments\LabVIEWxxx\examples\Application Control\VI Server\Asynchronous Call By Reference\Asynchronous Call and Collect (Using Option 0x40).vi

Message 7 of 18
(3,593 Views)

Unfortunately I use labview 2010. I think there are no Start Asynchronous Call, Wait On Asynchronous Call blocks.

 

I think i can use recursive mechanism with shared reentrancy to make as many comunication as needed in same time. Unfortunately, the results are received only when the slowest device responds.

 

0 Kudos
Message 8 of 18
(3,583 Views)
0 Kudos
Message 9 of 18
(3,578 Views)

@Artem.SPb wrote:

Try Invoke Node


https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LgUSAU&l=de-DE

 

LabVIEW 2011 and later:
In LabVIEW 2011, you can use the Start Asynchronous Call and Wait On Asynchronous Call nodes to easily run subVIs in parallel with the main VI. Refer to the Asynchronously Calling VIs for additional details and examples. 

LabVIEW 2010 and earlier:
In LabVIEW 2010 and earlier, to dynamically load and run a second VI in parallel to the main VI, you must call the VI using an Invoke Node with the Run method. You must set the Wait until done option to FALSE to eliminate the data dependencies of this VI as shown in the Community Examples linked below. If you want to display the front panel of the called VI, you must use a Property Node with the property Front Panel Open. This will allow the main VI to continue to run in parallel after the pop-up VI is running.

0 Kudos
Message 10 of 18
(3,555 Views)