Beckhoff Twincat Connecting to Cognex In-Sight

DT1

Member
Join Date
Apr 2017
Location
Germany
Posts
4
Hello there,

I am having a project for image processing using Cognex camera system and i want to trigger it with plc, the plc I use is Beckhoff Twincat 3 2013 and the camera is the 7000 series. is there any recomendation to connect between the PLC to the camera to trigger it?

I have tried to connect it using OPC but it failed. I tried to use the function block inside the twincat plc but I don't know how to use the function block. I tried to use ADS connection but I was so confused with it, I want to try to trigger it using digital connection but I don't know if it's possible or not. I have little knowledge in ethernet connection so if anyone could help me solve this problem that would be great.
 
Cognex cameras support a number of standard communication protocols: ModbusTCP, Ethernet/IP, Profinet, as well as a native communications. We have had good results utilizing Profinet connection: it was relatively easy to set up, provided all the necessary functionality and worked reliably. You will need a Profinet master in your TwinCAT system for that, like EL6631.
 
Cognex cameras support a number of standard communication protocols: ModbusTCP, Ethernet/IP, Profinet, as well as a native communications. We have had good results utilizing Profinet connection: it was relatively easy to set up, provided all the necessary functionality and worked reliably. You will need a Profinet master in your TwinCAT system for that, like EL6631.

is there any other solution without adding another hardware to connect between this two?
 
I'm not familiar with the Cognex product, but if if supports Modbus TCP as LadderLogic mentioned, the Beckhoff can do this without additional hardware. You need to install the TwinCAT Modbus TCP function (TS6250 I think) and it uses the built-in LAN port (not EtherCAT). There is a cost for the extra license.
 
There is a cost for the extra license.

Yes, as well as for the additional Profinet (or Ethernet/IP if one chooses so) module (about $450 list price). However, if one compares the time needed to develop the communications using Cognex native protocol, the additional hardware may be well justified.

Unless your time is free, of course.
 
Something else to keep in mind: with ModbusTCP, one can only read from and write data to the cells of the Cognex spreadsheet. With a real-time protocol, like Profinet and Ethernet/IP, the camera can be controlled completely: you can change the vision jobs, trigger, go online and offline, get the status back... in other words you will get the complete virtual I/O interface.
 
For now I will try to use Modbus/tcp, is there any specific that I need to follow? Like the ip adress setup, or maybe there are specific command that I need to write inside the cognex spreadsheet or inside the twincat?
 
For now I will try to use Modbus/tcp, is there any specific that I need to follow? Like the ip adress setup, or maybe there are specific command that I need to write inside the cognex spreadsheet or inside the twincat?

Cognex cameras support ModbusTCP by default, out of the box. The port number is hardcoded to be 502 and no special functions have to be placed in the spreadsheet to read data from it. To write data to a spereadsheet cell, it has to contain an EditInt fucntion; that makes it writable.

In TwinCAT, you would have to get ModbusTCP library. Reading a range of cells from Cognex spreadsheet uses Modbus function code 03H and writing to a range of cells - function code 0AH. You cannot read and write more than 125 cells at a time - this is the limitation of Modbus protocol. How to convert an address of a Cognex spreasheet cell (like A15, column-row format) to a mumeric Modbus address is described in detail in Modbus section of Cognex In-Sight Help file.
 

Similar Topics

I am newbie in using the Twincat software. I have tried to connect between Beckhoff BX9000 and Twincat. But I was not successful. In the Twincat...
Replies
3
Views
5,601
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
754
Hello, I was wondering if anyone know how to upload a PLC program to the Beckhoff TwinCAT 3 from a file? i.e. without having the development pc...
Replies
0
Views
668
Hi anyone got any tips and tricks?? I'm at a stage wherei need to tidy up my hmi project and give all objects sensible names, I did start this...
Replies
0
Views
928
Hello, I have a System running a beckhoff IPC with twincat 2 software on it, Also i have no original source code. Is it possible with the...
Replies
1
Views
1,249
Back
Top Bottom