08-04-2020 11:14 PM
Dear community,
I'm adding TCP functionality into this example: Switch - Scanning with a DMM - Handshaking (NI-SWITCH).
I added a TCP client into this example (TCP listen, etc). The TCP server was taken from an example. However, in reality, the TCP server is another program that does the same job.
The programs can do the following: server sending "OK", client receiving "OK", DMM is then triggered to measure devices specified by the switch.
The problem is: when my client (Client+DMM+Switch) finished one cycle (receive, trigger, measure all devices), it will go into error when TCP server is sending the "OK" message again! I had to mannually disconnect, re-connect, re-send the "OK" from the real TCP server. So, the client does not run "continuously". By continuously I mean to receive message for second time, thrid time, etc...without needing to reset the TCP server!
So, how to bring the client back to wait/listen mode, after one full cycle (receive, trigger, measure)?
Please help!
08-06-2020 12:38 PM
Hi, @ylflex,
The problem is: when my client (Client+DMM+Switch) finished one cycle (receive, trigger, measure all devices), it will go into error when TCP server is sending the "OK" message again! I had to mannually disconnect, re-connect, re-send the "OK" from the real TCP server. So, the client does not run "continuously". By continuously I mean to receive message for second time, thrid time, etc...without needing to reset the TCP server!
So, how to bring the client back to wait/listen mode, after one full cycle (receive, trigger, measure)?
Disclaimer, I have never used the niDMM functions, nor have I used TCP. So this is purely based on looking at your VIs and trying to figure it out.
First, to make sure I understand:
Second, here are a couple more questions regarding the Switch...vi. These are more out of ignorance than anything.
Hope this helps you keep moving forward...
-joeorbob
08-06-2020 08:34 PM
Thanks for the answers!
1. For TCP part, it's the other TPC server (written in unknown language, unknown framework) that has to disconnect/reconnect, before sending another command. My LabView TCP client can run continuously, and take a second command, without any errors and stops.
So, is there anything I can do to this TCP client, so that it can continuously listen??? I can't change the TCP server because it's controlled by our partner.
2. Regarding backlog, I'm not totally sure. I only need to measure 4 resistors, therefore I put 4 in "number of samples to fetch".
08-07-2020 10:44 AM
@ylflex wrote:
Thanks for the answers!
1. For TCP part, it's the other TPC server (written in unknown language, unknown framework) that has to disconnect/reconnect, before sending another command. My LabView TCP client can run continuously, and take a second command, without any errors and stops.
So, is there anything I can do to this TCP client, so that it can continuously listen??? I can't change the TCP server because it's controlled by our partner.
2. Regarding backlog, I'm not totally sure. I only need to measure 4 resistors, therefore I put 4 in "number of samples to fetch".
...Am I understanding the workflow properly? Here's what I've understood:
*By still running, I mean that the LabVIEW TCP client has not had an error, you have not pressed the Stop button, and it has not been aborted. It's still running its While loop.
Do I understand correctly?
-joeorbob