Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Builder check ethernet connection and check firewire camera

Hello,
 
Two questions regarding Vision Builder.
 
First question: Check ethernet connection
 
I want to communicate via TCP with a PLC (no Modbus). I didn't find the information on how to set this up properly in Vision Builder. Now I have configured my system as a TCP server listening to port 5150.
In my program I want to have a step called "Check ethernet connection" that checks to see if the CVS is indeed connected to the PLC.
As you can imagine during development I don't have this PLC connection available and via this "Check ethernet connection" step I want to determine if a connection is available with the PLC.
How can I best check to see if there is an ethernet connection?
 
Second question: Check CVS system and camera connection
 
This question is a bit similar to the above question but now related to my firewire camera and Compact Vision System.
During development I don't always have access to the CVS system or the FireWire camera.
Is it possible to request something like the device identifier of the camera and based on the returned result I now if I'm running in simulation mode (no access to the camera - function fails or returns 0 or ...) or in live mode (I get the actual device id of the camera - not zero)?
 
Thanks for all the help!
noxus

Message Edited by noxus on 07-24-2007 03:58 AM

0 Kudos
Message 1 of 3
(3,261 Views)
Hi,
 
> First question: Check ethernet connection
>
> I want to communicate via TCP with a PLC (no Modbus). I didn't find the information on how to set this up properly in Vision Builder.
 
To be able to use the TCP step, you first need to define a TCP device in the Communication Device Manager (Tools>>Communication Device Manager).
Click New Device. Select TCP/IP for the protocol. The choice of the Device Type depends on who is initiating the communication. Remember: you're declaring the device you're connecting to.
If you want the Vision Builder AI system to be slave (server), waiting for incoming TCP connections, you must declare a Master device.
If the VBAI system is the one opening the TCP connection to the PLC (PLC waiting for incoming TCP connections), then the PLC is a slave device. Choose Slave.
If the PLC is the master, the only other parameter you need to configure is on which port VBAI is going to be listening.
If VBAI is the master, you also need to specify the IP address of the PLC.
If you define a Master device, you need to start the server in VBAI that will listen for incoming TCP connections. Click Start Server.
 
It seems you configured the VBAI system to be a slave, listening to port 5150.
 
> How can I best check to see if there is an ethernet connection?
 
There is not really a good way to verify if the PLC has connected to the CVS unless trying to send an empty string. If there is no connection, you'll get an error.
You can have the step fail in case of error or timeout. Thanks for the feedback.
 
> This question is a bit similar to the above question but now related to my firewire camera and Compact Vision System.
> During development I don't always have access to the CVS system or the FireWire camera.
> Is it possible to request something like the device identifier of the camera and based on the returned result I now if I'm running in simulation mode (no access to the camera - function fails or returns 0 or ...) or in live mode (I get the actual device id of the camera - not zero)?
 
In the next version, we're adding a couple features that will make develoment without hardware more friendly: a simulation mode, that will simulate a CVS, without actually being connected to it, and the possibility to disable steps. For now, the only option you have is to use the Simulate Acquisition step.
 
-Christophe
0 Kudos
Message 2 of 3
(3,253 Views)

Thanks for the answer Christophe. I like the suggestion you did about sending an empty string. That could solve my problem with the ethernet detection.

I'm also looking forward to the next version of VBAI with the possibilityto have a simulated CVS. I really like that! I've ran into some other things that also would be nice for a future version. I'll send you the list once I have some more experience with the VBAI. (I only started using VBAI last week)

 

0 Kudos
Message 3 of 3
(3,244 Views)