01-27-2017 03:21 AM - edited 01-27-2017 03:22 AM
Hello,
Here I'm attaching a VI which is similar to my application with comments of each and every loop.
In consumer loop, if I get error code the loop will stop working and it will close the TCP connection. Similarly command & response loop also will stop working if error 66 occurs.
I want to start automatically closed TCP connection and closed loop.
Kindly help me to address the issue.
Regards,
S Nagaraju
01-27-2017 03:37 AM
Hi Sonti,
if I get error code the loop will stop working
Why do you stop the loops when you don't want to stop them???
Create a small state machine in each consumer loop: on INIT and in case of TCP errors you can open/close the TCP reference. Only stop the loops when you receive a STOP command from your queue…
01-27-2017 03:45 AM - edited 01-27-2017 03:47 AM
Just don't exit on an error then.
LOL - I guess I'm half asleep, being that Gerd had responded nearly ten minutes before I did - and I hand't noticed. 😄
01-27-2017 03:49 AM
Thank you for the replay.
If I initiate the TCP connection again in consumer loop, same reference (new connection ID) will not pass to command & response loop. Because initially I’m opening the TCP port outside of the loops.
How to pass the new TCP connection ID to other loop.
Regards,
S Nagaraju
01-27-2017 03:54 AM
Hello Bill,
Suppose client closes the connection, Server side (Present VI) should re-initiate for next connection.
How to do it automatically.
Regards,
S Nagaraju
01-27-2017 04:09 AM
01-27-2017 04:45 AM
Hello GerdW,
Sorry, I didn't get your point.
I have only one consumer loop in attached VI. Other loop is independent loop and the input is TCP connction for the command & response loop. If i move TCP listen VI into the consumer loop how to get the parallel connection ID for the other loop.
Regards,
S Nagaraju