Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

M_Fieldbus_00_A, Last update : 04/2021

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

D. Process control and status......................................................................................................................6


1. IO tables.................................................................................................................................................. 6
2. Logical states.......................................................................................................................................... 8

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 :

• For laser, TL07 version 3.84

• For XCOM, T08 version 2.50

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.

4. Code and examples

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

Our equipment is seen as a 136 Byte IO device, using a specific 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

The input bits table:

XCOM UC Laser Logical


Bit 0 Stop marking Stop marking 0 = Stop
Bit 1 Start marking Start marking 1 = start
Bit 2 Fault acknowledgment Fault acknowledgment 1 = acknowledge
Bit 3 Do not use Not used (RFU)
Bit 4 Do not use Not used (RFU)
Bit 5 Do not use Not used (RFU)
Bit 6 Not used (RFU) Not used (RFU)
Bit 7 Not used (RFU) Not used (RFU)
Bit 8 Not used (RFU) Not used (RFU)
Bit 9 Not used (RFU) Not used (RFU)
Bit 10 Not used (RFU) Not used (RFU)
Bit 11 Not used (RFU) Not used (RFU)
Bit 12 Not used (RFU) Not used (RFU)
Bit 13 Not used (RFU) Not used (RFU)
Bit 14 Not used (RFU) Not used (RFU)
Bit 15 Not used (RFU) Not used (RFU)
Bit 16 Not used (RFU) Not used (RFU)
Bit 17 Not used (RFU) Not used (RFU)
Bit 18 Not used (RFU) Not used (RFU)
Bit 19 Not used (RFU) Not used (RFU)
Bit 20 Not used (RFU) Not used (RFU)
Bit 21 Not used (RFU) Not used (RFU)
Bit 22 Not used (RFU) Not used (RFU)
Bit 23 Not used (RFU) Not used (RFU)
Bit 24 Not used (RFU) Not used (RFU)
Bit 25 Not used (RFU) Not used (RFU)
Bit 26 Not used (RFU) Not used (RFU)
Bit 27 Not used (RFU) Not used (RFU)
Bit 28 Not used (RFU) Not used (RFU)
Bit 29 Not used (RFU) Not used (RFU)
Bit 30 Not used (RFU) Not used (RFU)
Bit 31 Not used (RFU) Not used (RFU)

RFU: Reserved for Future Use

M_Fieldbus_EN_A 6
Process control and status
The output bits table:

XCOM UC Laser Logical


Bit 0 Fault Fault 1 = FAULT
Bit 1 Marking ready Marking ready 1 = READY
Bit 2 Marking in progress Marking in progress 1 = MARKING
Bit 3 Not used (reserved) Shutter state 1 = shutter is open
Bit 4 Not used (reserved) Laser Emission 1 = emission
Bit 5 Emergency Stop state Emergency Stop state 1 = ES Open or Error
Bit 6 Controller is initializing Controller is initializing 1 = INIT
Bit 7 Do not use Do not use
Bit 8 Marking paused Marking paused 1 = PAUSE
Bit 9 Controller is alive Controller and laser are alive 1 = ALIVE
Bit 10 Do not use Not used (reserved)
Bit 11 Do not use Not used (reserved)
Bit 12 Control mode Not used (reserved) 1 is mandatory for remote use
Bit 13 Not used (RFU) Not used (RFU)
Bit 14 Not used (RFU) Not used (RFU)
Bit 15 Heartbeat (1Hz) Not used (reserved)
Bit 16 Error code Error code
Bit 17 Error code Error code
Bit 18 Error code Error code
Bit 19 Error code Error code
Bit 20 Error code Error code
Bit 21 Error code Error code
Bit 22 Error code Error code
Bit 23 Error code Error code
Bit 24 Error code Error code
Bit 25 Error code Error code
Bit 26 Error code Error code
Bit 27 Error code Error code
Bit 28 Error code Error code
Bit 29 Error code Error code
Bit 30 Error code Error code
Bit 31 Error code Error code

• 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).

RFU : Reserved for Future Use

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.

The following output bits indicate which state is active:

Bit STATE
Bit 0 FAULT
Bit 1 READY
Bit 2 MARKING
Bit 6 INIT
Bit 8 PAUSE
Bit 9 ALIVE

The following input bits can change the state:

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.)

Text data use and syntax are detailed in part 4.

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.

Example: EX command with parameters 12 and A

Text:

EX12A<CR><LF>

Decimal:

69 88 32 49 50 32 65 13

Hexadecimal:

0x45 0x58 0x20 0x31 0x32 0x20 0x41 0x0D

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

Selects a marking file and specifies the number of markings.

Syntax:

LDfilenamenumber_of_markingsmarking_mode<CR><LF>

Parameter Type Description Values

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

Answer from machine (success):

LD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.

M_Fieldbus_EN_A 12
Text commands

„„ VG

Asks for the text string stored inside a marking controller variable.

VG■variable<CR><LF>

Parameter Type Description Values

variable Integer in text format Variable number 0 ≤... ≤ 9

Answer from machine (success):

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

Sends a text string to be stored in a marking controller variable.

Syntax:

VS■variable■text<CR><LF>

Parameter Type Description Values

variable Integer in text format Variable number 0 ≤... ≤ 9


text UTF-8 text between Text to store in variable -
quotes

Answer from machine (success):

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>

a Meaning b Meaning (XCOM) Meaning (Laser)

1 Syntax error 0 Reserved Reserved


1 Unknown command Unknown command
2 Not enough parameters Not enough parameters
3 Too many parameters Too many parameters
4 Wrong parameter type Wrong parameter
5 Cannot open file Cannot open file
6 Unknown parameter Unknown parameter
7 Wrong parameter value Wrong parameter value
8 File size exceeded File size exceeded
9 Parameter is not a text string Parameter is not a text string
2 Context error 0 Reserved Reserved
1 Marking paused Marking paused
2 Fault detected Fault detected
3 Marking already in progress Marking already in progress
4 No marking loaded No marking loaded
5 Only in Ethernet mode File already loaded
6 - Machine is initialising
14 Marking ready -
15 Stop marking activated -
3 Process error Not documented Not documented

M_Fieldbus_EN_A 15

You might also like