
14
PROGRAMMER'S GUIDE FOR v02.00.46
3.1 Establishing a connection with a LiveCore™
3.1.1 Usage
This example gives you the proper way to establish the connection with a LiveCore™ device. It is made
of four recommended steps: socket opening, device type checking, command set version checking and
LiveCore™ registers read back.
3.1.2 Summary of the commands sequence
socket opening initial step, TCP/IP connection.
device type checking verifying that the expected device is connected.
command set version checking verifying of the matching between controller and machine.
LiveCore™ registers read back retrieval of the machine current state.
3.1.3 Detailed commands sequence
socket opening : As indicated in §CONTROLING LIVECORE chapter, TCP/IP must be used to
control LiveCore™. The device acts as a server, and accepts connections as soon as it is ready.
Once the connection established, the device sends the TPP_CONNECTED_CONTROLLERS status,
giving the number of connected controllers.
Answer : TPcon0,<value>
C
R
L
F
The first value should be 0, meaning
that you address the master device in a single or additive
configuration. The numerical <value> gives the connected device
number.
device type checking : This read only command gives the device type.
Syntax : ?
L
F
Answer : DEV<value>
C
R
L
F
The numerical <value> gives the
connected device type. Other values match other Analog Way
devices.
command set version checking : This read only command gives the
“command set version” number. When a new firmware version is
issued, if machine functionality is modified, then the “command set
version” is increased.
It is recommended to check that this value matches the one expected by the controller. Note
that the index value must always be 0, meaning that the controller must always control only the
master device, even in an “additive” configuration.
Syntax : 0,TPverLF
Answer : TPver0,2
C
R
L
F
The current value is 3 for this firmware version.
LiveCore™ registers read back : This step is recommended to initialize the controller. Various
method exists depending on controller software architecture.
Commentaires sur ces manuels