Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vison Builder and TCP

I have running an inspection on a SmartCam 17xx. The first step of the inspection is to wait for a command from a host.
I configured a communication device as master listening on port 502 resp. 20000. As first step the inspection has a TCP I/O step for that device waiting to receive three characters with a timeout of 10 sec.
On my development machine I created a VI which connects to the SmartCam. On a button click it will send the three characters and then will wait for receiving a string.
First I start the VI and it will connect to the SmartCam. Next I start the inspection in VBAI. The TCP I/O step will fall through without waiting the 10 seconds, does the inspection and at the end will go through another TCP I/O step which will send the result back to the host. This will happen even when I click on "Run state in loop".
When I click on the button in the VI the VI will run without an error but will not receive any result.
 
Why does the first TCP I/O step not wait?
How can I configure this step to wait for an infinite amount of time?
 
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 1 of 3
(3,236 Views)

You need to use a state diagram and setup a transition that goes to an inspection state and that triggers only when you receive the 3 characters asked.

Let me know if you need an example.

Christophe

0 Kudos
Message 2 of 3
(3,218 Views)
Hello Christophe,
there is a diffferent behaviour in the interfaces. In the Configuration Interface the TCP I/O step does not wait. In the Inspection Interface the TCP I/O step is waiting. This way the inspection is working fine on the SmartCam. This different behaviour is not descriped in the help.
Normally functions have a -1 value indicating to wait indefinitly. This value is not accepted in the timeout field of the TCP I/O step. It is no poblem in our demo application.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 3 of 3
(3,204 Views)