7.4 Appendix D: Examples of communication via CoLa2
7.4.1 Example 1: Activating continuous data output via UDP
This chapter describes how the connection to the device is established via the network
(TCP/IP) and the NavData_ChangeCommSettings method is called up to activate con‐
tinuous data output via UDP.
It is strongly recommended to familiarize yourself with CoLa2 communication in
advance, see "Appendix B: Communication via CoLa2", page 29.
1. Open TCP session to the sensor, port 2122.
2. Open CoLa2 session. To do so, send a CoLa2 telegram to establish a session
(Cmd = “O”, Mode = “X”)
--> 02020202 0000000d 00 00 00000000 0001 4f 58 1e0000 (OX,
Timeout=30sec)
✓
T
he device confirms the command (Cmd = “O”, Mode = “A”) and assigns a session
ID (SessionID.
<-- 02020202 0000000a 00 00 2d6c2733 0001 4f 41 (OA)
3. Call up method NavData_ChangeCommSettings (Inde
x = 0xB0) (Cmd = “M”,
Mode = “I”).
Data output is activated and configured with the transmitted parameters.
--> 02020202 00000028 00 00 2d6c2733 0003 4d 49
b00000000000010000003200a8c050c32800000080f
d000080023f000000 (MI)
✓
T
he device confirms the method call-up (Cmd = “A”, Mode = “I”).
<-- 02020202 00000010 00 00 2d6c2733 0003 41 49 b00000000000
(AI)
4. Close CoLa2 session (Cmd = “
C”, Mode = “X”).
--> 02020202 0000000a 00 00 2d6c2733 0005 43 58 (CX)
✓
T
he device confirms the command (Cmd = “C”, Mode = “A”).
<-- 02020202 0000000a 00 00 2d6c2733 0005 43 41 (CA)
5. Close the TCP session.
In t
he example, the CoLa2 and the TCP sessions are closed after activating data output.
Otherwise the device would close the TCP session after a timeout of 30 seconds. Data
output via UDP is independent from a CoLa2 session and also continues to run after
the end of a session. For configuration changes or to end data output, a new CoLa2
session can be established.
7.4.2 Example 2: Activating data output on request
The measurement data can only be called up when data output is activated. To do so,
pr
oceed exactly as in example 1 by calling up the NavData_ChangeCommSettings
method. If you enter 0.0.0.0 as the IPv4 address of the receiver and port 0, the UDP
output is suppressed. The data is however available to be called up via the channel.
Transmit the following parameters via the method NavData_ChangeCommSettings to
activate the send mode "on request":
oEnabled TRUE
eInterfaceType
(Device-specific interface)
tReceiverAddress 0.0.0.0
u16PortNumber 0
u16PublishingFreq 1
r10_22AngleStart
(can be selected by the customer)
7 ANNE
X
58
T E C H N I C A L I N F O R M A T I O N | microScan3, outdoorScan3 8022708/2019-04-15 | SICK
Subject to change without notice