12-04-2021 01:03 AM
Computer - server; Kawasaki robot- client. pick and place. The camera is on the robot. When taking pictures, the robot will send T1,1( the photographing command) to the vision software. Normally, when the robot reaches the photographing position, the robot immediately sends T1,1 to the software via tcp socket. Then take pictures, process, return the results, and write TCP. However, after a period of time, when it reaches the photographing position, the visual software receives T1,1 after a delay of 2 ~ 3 seconds. Very annoying.
When this happens, before taking pictures, stop the vi and then run it immediately, it will return to normal without any delay. But it reappeared after a while and I have to do the same again. The timing of the problem seems irregular. I don't know where the problem is?
12-04-2021 03:06 AM
Why are you using tcp listen vi for every iteration of while loop?
12-04-2021 09:13 AM - edited 12-04-2021 09:14 AM
Yes, you should only create a listener once, of course!
There are plenty more things wrong with your code that show a basic misunderstanding of logic and dataflow, such as:
12-05-2021 06:47 PM
Thankssss very much for pointing out my mistakesss in my vi, and I’m very appreciate ur and kartiknattar's help. I haven’t learn labview systematically yet, so what you seem plain silly and I totally don’t realize it. I wrote code without optimizing it.... --!
12-08-2021 06:31 PM
hello to you,
I today put the TCP Listen outside the while loop, nothing else changed. BUT the vi seems fail to receive the command from robot immediately... So I still remain unchanged and it works just fine, except for the random delay I describe before....--!