Sick Ccom CLV RFH Eip V1 10 en
Sick Ccom CLV RFH Eip V1 10 en
Sick Ccom CLV RFH Eip V1 10 en
SICK
CoLa Communication Function Block
(Only for CLV62x / 65x and RFH6xx devices)
Version history
Version Date Remarks
V1.0 07.12.2012 Initial version
V1.1 07.11.2013 Fix arithmetic error every 32768 incoming reading results
Table of Contents
1 About this document........................................................................................................ 3
1.1 Function of this document ............................................................................................ 3
1.2 Target group ................................................................................................................ 3
2 General information ......................................................................................................... 4
2.1 Specification of the function block ................................................................................ 4
3 Embedding of AOI in RSLogix5000................................................................................. 5
3.1 SOPAS device configuration........................................................................................ 5
3.2 Hardware configuration ................................................................................................ 6
3.3 AOI Import ................................................................................................................... 8
3.4 Mode of operation ........................................................................................................ 8
3.4.1 Receipt of read results (Read) ............................................................................... 9
3.4.2 Device communication via CoLa commands (Req)................................................ 9
3.4.3 Behaviour in the case of an error........................................................................... 9
4 Parameter.........................................................................................................................10
5 Error Codes .....................................................................................................................13
6 Examples .........................................................................................................................14
6.1 Output of the read results (Read only) ........................................................................14
6.2 Sending of a CoLa command......................................................................................17
Date: 07.11.2013 2
CoLa EtherNet/IP
Technical Information Add-On Instruction
Date: 07.11.2013 3
CoLa EtherNet/IP
Technical Information Add-On Instruction
2 General information
The Add-On Instruction (AOI) is used for the communication between a Rockwell control and
a SICK AutoIdent EtherNet/IP sensor. The sensor has to be embedded into the EtherNet/IP
surrounding of the control. The communication is done cyclically via process data (implies
communication).
Please note:
If you need a PLC solution for a SICK Lector or a RFU device, please use the
SICK_CCOM_EIP AOI.
i
The command language (CoLa) is a SICK internal protocol for the communication with SOPAS devices
ii
SOPAS-ET is an engineering tool for the configuration of SICK sensors
Date: 07.11.2013 4
CoLa EtherNet/IP
Technical Information Add-On Instruction
The AOI communicates via process data with the SICK Sensor (implicit EtherNet/IP commu-
nication). The Input-Assembly and the Output-Assembly contain the process data of the sen-
sor. The length of the assemblies indicates how much data can be transferred in one bus
cycle. At the CLV62x /65x and RFH6xx devices, the assembly sizes are fixed 200 Byte. If the
content of the reading result exceed 200 Byte, the telegram will be fragmented automatically.
The fragments are reassembled by the AOI.
Date: 07.11.2013 5
CoLa EtherNet/IP
Technical Information Add-On Instruction
Click with the right mouse button the symbol Ethernet and choose the selection New Mod-
ule….
Select the module ETHERNET-MODULE (Generic Ethernet Module) in the dialogue Select
Module and then click Create in order to add the module to the hardware configuration.
Date: 07.11.2013 6
CoLa EtherNet/IP
Technical Information Add-On Instruction
In the dialogue New Module please insert the settings for Input, Output, and Configura-
tion.
Example:
- Name: SICK_DEVICE (name can be selected arbitrarily)
- Comm Format: Data – SINT
- IP Address: 192.168.10.12 (IP-Address of the SICK sensor)
- Input Assembly Instance: 101
- Input Assembly Size: 200
- Output Assembly Instance: 100
- Input Assembly Size: 200
- Configuration Assembly Instance: 1
- Configuration Assembly Size: 0
The status display (Run Mode, Controller OK and I/O) signalises if the connection to the sen-
sor has been done successfully.
Date: 07.11.2013 7
CoLa EtherNet/IP
Technical Information Add-On Instruction
arrRecord: Reference to the Record-Array. Here, the telegrams sent from the device are
stored. The array from data type SINT has to be set up in the user program and is then trans-
ferred to the AOI. The length of the array depends on the maximal data length. If, e.g. data
with a max. length of 200 Bytes is received, the Record-Array has to be set up with a min.
length of 200 Bytes.
arrCommand: Reference to the command array which contains the CoLa command that has
to be transferred.
iCommandLength: Length of the CoLa command which has to be transferred (e.g. ’sRI0’ =
length 4)
Date: 07.11.2013 8
CoLa EtherNet/IP
Technical Information Add-On Instruction
The transfer is started by triggering the parameter bReq with a positive edge. If no valid an-
swer to the sent CoLa command has been received, this is signalised by the parameter
bReqBusy. If no answer has been received within the Timeout (iTimeout), the handling will
be cancelled with a Timeout error. The output parameter bReqDone = TRUE indicates that
an answer to the CoLa command has been received.
Date: 07.11.2013 9
CoLa EtherNet/IP
Technical Information Add-On Instruction
4 Parameter
Parameter Declara- Type of Description
tion data
arrInputAssembly INPUT SINT[1] Reference to the Input Assembly Array, which
is created automatically in the controller tags
during the configuration. The Array must have a
size of 200 Byte.
Example:
arrInputAssembly:= SICK_DEVICE:I.Data
arrOutputAssembly INPUT SINT[1] Reference to the Output Assembly Array, which
is created automatically in the controller tags
during the configuration. . The Array must have
a size of 200 Byte.
Example:
arrOutputAssembly:= SICK_DEVICE:O.Data
arrRecord INPUT SINT[1] Reference to the Record Array. Here, the tele-
grams sent from the device are stored. The
length of the array depends on the max. data
length.
Example:
The sensor sends max. 50 Byte data (read re-
sult or CoLa telegram answer). In this case the
record has to have a minimal length of 50
bytes.
Date: 07.11.2013 10
CoLa EtherNet/IP
Technical Information Add-On Instruction
Example:
In order to trigger the sensor via field bus, the
Bit arrControl[0].0 has to be set. In order to do
so, the trigger source in SOPAS has to be set
to „fieldbus trigger“.
Example:
If the command ’sRI0’ is sent, the iCom-
mandLength has to have the value 4.
bReadDone OUTPUT BOOL Positive edge: A from the device sent read re-
sult has been received (formatting can be seen
in the SOPAS output format).
Date: 07.11.2013 11
CoLa EtherNet/IP
Technical Information Add-On Instruction
FALSE: No error
TRUE: Interruption with error
iErrorcode OUTPUT DINT Error status (see error codes).
Date: 07.11.2013 12
CoLa EtherNet/IP
Technical Information Add-On Instruction
5 Error Codes
The parameter iErrorcode contains the following error information:
Date: 07.11.2013 13
CoLa EtherNet/IP
Technical Information Add-On Instruction
6 Examples
6.1 Output of the read results (Read only)
Image 10 shows how to receive a read result with SICK_CCOM_CLV_RFH_EIP AOI. This
example can be used for all SICK AutoIdent sensors.
The sensor (in this case CLV620) is directly triggered via the control byte (arrControl[0].0).
The function block can be operated independent from the trigger source.
Date: 07.11.2013 14
CoLa EtherNet/IP
Technical Information Add-On Instruction
As soon as the variable bReadDone signalises TRUE, the content of the record (arrRecord)
will be copied into the result string (sReadingResult). The direct use of the record as read
result is not recommended since it only contains valid values during bReadDone = TRUE.
Image 11 shows the read result of the CLV. The content of the read result can be configured
via the SOPAS output format (see Image 12).
Date: 07.11.2013 15
CoLa EtherNet/IP
Technical Information Add-On Instruction
Date: 07.11.2013 16
CoLa EtherNet/IP
Technical Information Add-On Instruction
As soon as the record contains valid data (bReadDone = TRUE / bReqDone = increasing
edge) the content of the records will be copied into the variables sReadingResult or sCom-
mandResult.
Date: 07.11.2013 17
CoLa EtherNet/IP
Technical Information Add-On Instruction
Image 14 shows how to send a CoLa command to a device (here CLV620) via AOI. In this
example the CoLa command ’sRI0’ (device identification) is sent to CLV. In this case the
following parameters have to be set:
sCommand: ’sRI0’
iCommandLength: 4 (can be taken from the string variable sCommand.LEN)
The command is carried out as soon as the variable bReq is triggered with a positive edge.
As soon as the output bit bReqDone signalises a positive edge, the record can be copied
and used.
Parallel to the sending, the AOI can also receive and show read results sent from device.
Date: 07.11.2013 18