12-18-2018 05:11 AM
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
12-18-2018 05:47 AM
12-18-2018 06:26 AM
And/or use low timeout values with retry for a few times.
12-18-2018 02:02 PM
I never worked with reentrant VI. Thank you for the tip, I will check what possibilities give.
12-18-2018 02:03 PM
I cant use low timeout because network delay can get big.
Thank you for your response
12-19-2018 12:57 AM
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.
12-19-2018 02:11 AM
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
12-19-2018 07:05 AM - edited 12-19-2018 07:17 AM
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.
12-19-2018 07:27 AM
Try Invoke Node
12-20-2018 10:08 AM
@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.