Professional Documents
Culture Documents
M Fieldbus EN A
M Fieldbus EN A
AND
MARKING
FIELDBUSES
CONTROLLERS
A. Contents
A. Contents.....................................................................................................................................................2
B. Generalities................................................................................................................................................3
1. Hardware................................................................................................................................................. 3
2. Firmware................................................................................................................................................. 3
3. This document......................................................................................................................................... 3
4. Code and examples................................................................................................................................ 3
C. General principles.....................................................................................................................................4
1. Device mapping...................................................................................................................................... 4
2. Inputs...................................................................................................................................................... 5
3. Outputs.................................................................................................................................................... 5
4. Exchanges.............................................................................................................................................. 5
E. Text commands.......................................................................................................................................11
1. Generalities........................................................................................................................................... 11
2. Syntax................................................................................................................................................... 11
3. Available commands............................................................................................................................. 12
LD������������������������������������������������������������������������������������������������������������������������������������������������������� 12
VG������������������������������������������������������������������������������������������������������������������������������������������������������� 13
VS������������������������������������������������������������������������������������������������������������������������������������������������������� 14
4. Error codes............................................................................................................................................ 15
M_Fieldbus_EN_A 2
B. Generalities
1. Hardware
Our marking machines controllers (XCOM or UC Laser) are optionally equipped with a fieldbus interface. It can
be one of the following standards:
• Profinet
• Ethernet IP
The way our machines operate is not related to the chosen fieldbus. The following descriptions and principles
apply to all of them.
2. Firmware
This document, dated April 2021 in version A, refers to the following firmware versions :
3. This document
Fieldbus specific subjects are not covered by this manual, nor is the PLC programming. The reader is supposed
to know how to add a device in his fieldbus and program his PLC.
This document is not a guide on how to setup a specific PLC with a dedicated tool. It gives the general rules
of use for our machines.
We provide code and example for each of the fieldbuses we support. As we cannot cover all the existing
devices and standards, we provide them for a specific set of tools and hardware. A PLC programmer can use
them directly if they work. If not, they are written in a comprehensive manner, with comments, so that adapting
them is not a heavy burden for a PLC programmer.
You are free to use them as provided or to modify or copy them for your own needs. In this last case though,
we will not provide any support. Support is limited to the unmodified function blocs, used in the recommended
manner.
These codes and examples are not covered by this document. They have dedicated technical manuals.
M_Fieldbus_EN_A 3
C. General principles
1. Device mapping
First half (orange/red) is for input, second half (blue) is for output. In all this document we consider that inputs
and outputs refer to the marking controller side (so they are respectively outputs and inputs on the PLC side).
M_Fieldbus_EN_A 4
General principles
2. Inputs
The first 4 bytes (orange) are pure digital inputs, dedicated to process control. They are read on each cycle.
The rest of the inputs field (magenta) contains text data transmitted from PLC to marking controller. The last
byte, byte 67, (red) is the transmission flag: when its value changes (increases) the marking controller reads
all the data (63 bytes) in the inputs field (magenta) (bytes 4 to 66).
3. Outputs
The first 4 bytes (light blue) are pure outputs, providing marking controller state. They are written on each
cycle.
The rest of the inputs field (blue) contains text data transmitted to the PLC by the marking controller (answers).
The last byte, byte 135, (dark blue) is the transmission flag: when its value changes (increases) the PLC must
read all the data (63 bytes) in the outputs field (blue) (bytes 72 to 134).
4. Exchanges
The process control inputs, and the state outputs are updated on each cycle.
The text data is sent by the PLC and then, it implies at least one answer from the marking controller. The PLC
must wait for the answer(s) before sending another text data.
M_Fieldbus_EN_A 5
D. Process control and status
1. IO tables
M_Fieldbus_EN_A 6
Process control and status
The output bits table:
• Bit 16-31
16 bit unsigned integer containing the latest machine state code (this code is not synchronized with others
states and is available only for troubleshooting).
M_Fieldbus_EN_A 7
Process control and status
2. Logical states
The marking machine uses 6 different logical states. Only one of them can be active at a time.
Bit STATE
Bit 0 FAULT
Bit 1 READY
Bit 2 MARKING
Bit 6 INIT
Bit 8 PAUSE
Bit 9 ALIVE
Bit Action
Bit 0 Stop
Bit 1 Start
Bit 2 Acknowledge
Text data can also change the machine’s state, as well as contextual events (safety, failures, etc.)
The states changing rules are depicted on the following pages. Only the fieldbus control is considered. Any
other way of interacting with the machine (process IOs, for example) is not mentioned.
As a general rule, mixing control modes is not recommended. (for example, using fieldbus control and process
IOs can lead to synchronization problems if not managed properly)
M_Fieldbus_EN_A 8
Process control and status
States graph for laser:
M_Fieldbus_EN_A 9
Process control and status
States graph for XCOM:
M_Fieldbus_EN_A 10
E. Text commands
1. Generalities
Sending text data does not specify the marking layout. The marking controller must contain marking jobs which
can be designed with a PC software or directly on the controller screen (depending on the model). Refer to
your controller specifications and manual.
2. Syntax
Commands and their parameters are sent in text format (Unicode, UTF-8). UTF-8 allows the support for
international languages while keeping compatibility with 8-bit aligned systems. UTF-8 and ASCII are the same
for the 128 (0 to 127) first characters.
The command text string starts with the command name, ends with a carriage return character (0x0D or 13).
Carriage return is noted <CR> in the following chapters.
Command name and parameters are separated by a space (0x20 or 32). Space is noted in the following
pages.
Text:
EX12A<CR><LF>
Decimal:
69 88 32 49 50 32 65 13
Hexadecimal:
Always clean (set them to 0x00) all input and output data bytes before using them.
Effects of text commands on machine’s states are shown on the previous states graphs.
M_Fieldbus_EN_A 11
Text commands
3. Available commands
LD
Syntax:
LDfilenamenumber_of_markingsmarking_mode<CR><LF>
filename UTF-8 text between quotes Full marking file name (with Warning: case sensitive!
extension)
number_of_markings Integer in text format Number of markings to 0 ≤... ≤ 4 294 967 295
perform (0=infinite)
marking_mode Character Marking mode N = Normal
LD1<CR><LF>
In case of error, the machine answers with a text string starting with ER:
ER■a■b<CR><LF>
a and b being error codes. They are detailed at the end of this document.
M_Fieldbus_EN_A 12
Text commands
VG
Asks for the text string stored inside a marking controller variable.
VG■variable<CR><LF>
Variable_content<CR><LF>
In case of error, the machine answers with a text string starting with ER:
ER■a■b<CR><LF>
a and b being error codes. They are detailed at the end of this document.
Remarks :
Controller variables can be longer than the fieldbus buffer. You may need to split them. (see controller’s
software manual, using VarSet function block)
Controller variables can be used to store several fields, with a given separator, allowing to retrieve all parameters
with a single VG command (for example: marked text(s), IP address, serial number, …). It reduces fieldbus
communication overhead.
M_Fieldbus_EN_A 13
Text commands
VS
Syntax:
VS■variable■text<CR><LF>
VS■1<CR><LF>
In case of error, the machine answers with a text string starting with ER:
ER■a■b<CR><LF>
a and b being error codes. They are detailed at the end of this document.
Remarks :
Controller variables can be longer than the fieldbus buffer. You may need to send them as several variables
and concatenate them in the marking job. (see controller’s software manual, using VarSet function block)
Controller variables can be used to store several fields, with a given separator, allowing to send all parameters
with a single VS command (for example: X, Y coordinates, text(s) to be marked, etc.). It reduces fieldbus
communication overhead.
M_Fieldbus_EN_A 14
Text commands
4. Error codes
When a text command cannot be executed by the marking controller, error codes are returned.
Syntax:
ER■a■b<CR><LF>
M_Fieldbus_EN_A 15