Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP\IP Comms to XE2 C++ Builder Application

I am having trouble sending data (anything!) out of vision builder AI 2011.  All I want to do is send a message to another application to indiate that an inspection is complete.  I can transmitt data from the application and receive in VBAI ok but not the other way around.  Is there some sort of specific setup to do this using TCP/IP?

0 Kudos
Message 1 of 3
(3,111 Views)

Who is the Server/Slave in your application (the software waiting for an incoming TCP connection): your aookucation or VBAI?

From what you're describing, it seems like it needs to be your application.

If this is the case, you need to define a Server TCP/IP device in Vision Builder AI. Go to Tool>>Communication Device Manager.

Click New Device. Select TCP/IP as the protocol. Select Slave as the Device Type.

Enter the IP address and port that your application will be listening to.

Then simply use a TCP I/O step to send a message to your application.

 

If your application is the one initiating the communication, your application is considered a Master device. Create a Master Device instead of a Slave device instead. In this case, the only parameter you need to enter is the port VBAI needs to be listening to. For this setup to work, your application needs to first open a TCP connection to VBAI on the port you specify before VBAI can send anything to your app. If your application does not initiate the communication, no socket will be open and the TCP step will time out.

 

Whoever you chose to be the master or the slave, I would recommend you implement some type of handshaking communication between VBAI and your application, so that they stay in sync.

 

Hope this helps.

 

Best regards,

 

-Christophe

0 Kudos
Message 2 of 3
(3,108 Views)

Sorry. I meant your application or VBAI...

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