02 - Software Manual - EN
02 - Software Manual - EN
For safety instructions, please read the Instructions Manual carefully. For general
information about the 4020 we refer to the separate User Manual. For detailed information
regarding installation and service of the 4020 we refer to the separate Book for Service
Engineers.
1.1 Conditions
Markem-Imaje reserves the right to change specifications in both text and illustrations
without prior notice. The contents of the publication may not be copied, either wholly or in
part, without permission from Markem-Imaje.
Markem-Imaje is not responsible for any direct, indirect, specific, accidental or resultant
injuries caused by a fault with the printer or software, or by an error in the accompanying
documentation. In particular, Markem-Imaje cannot be held responsible for any program
or data stored or used with Markem-Imaje’s products, including the cost of recovering
such programs or data.
3
2. 4020 IO Box
2.1 General Description
The IO box is an accessory to 4020. It provides access to binary input signals and relay
outputs. Various functions in the 4020 controller can be executed upon simple binary
inputs. Relay outputs can be set to signals from the 4020 controller reflecting different
states of the controller. The IO box has 8 digital inputs named in 0 to in 7 and 5 relay
outputs named out 0 to out 4.
It is possible to use the Markem-Imaje IO box as a provider of digital inputs and outputs to
an external host computer. The controller can be set up to tunnel all binary input signals
via XCL commands to a host, letting the host decide what is to be done. The host can also
set the binary outputs via XCL commands.
It is always the changing of an input bit that triggers a bit change event. The event can
then carry out functions in the controller or be tunneled to a host.
If input signals are going to carry out functions within the 4020 controller, there is a built in
set of functions that can be used, separately or in combinations, at any valid bit change
event.
The behavior of the IO box is easily and quickly set up with straightforward menus. No
complicated programming of the IO box is necessary. The result of the IO box behavior
set-up is saved in the controller. All actions occur inside the controller. The IO box is thus
simply a supplier of binary bit change events to the 4020 controller, via a fast LVDS
interface.
The simple yet powerful capabilities of the IO box make the use of a PLC unnecessary in
most cases.
Binary signals
LVDS XCL
4
2. 4020 IO Box
2.1 General Description
2.1.1 Definitions and Abbreviations
These definitions and abbreviations are commonly used in the manual:
Bit change events Any input bits changing from one bit state to another.
The possible binary states a bit or a group of bits can assume. If one bit
Bit state
there are only states 0 or 1.
Bit use types Input bits can be used in different ways: SBA, MBA or PCC.
Predefined printer functions that can be assigned to an input bit state to be
Functions
executed when this state occurs.
Input bits The eight binary signals of the IO box dedicated to serve as inputs.
Low-voltage differential signaling – an electrical signaling system that can
LVDS
run at high speed over twisted-pair copper cables.
MBA Multi Bit Actions – several bits together control the actions taken.
Output bits The five binary relays of the IO Box dedicated to serve as outputs.
PCC PC Control – an external host controls the inputs and outputs.
SBA Single Bit Actions – one bit controls the actions taken.
Events in the controller reflecting the printer status that can be assigned to
Signals
alter relay outputs.
Commands that are used to make communication between host and
XCL commands
controller possible.
5
2. 4020 IO Box
2.2 Installation
2.2.1 Connect the IO Box
Caution: Imaje 4020 IO-Box should, in order to maintain its protection level by the meaning of the
safety standard UL60950-1, only be connected to a SELV circuit. A SELV circuits is a secondary
circuit which is so designed and protected that under normal operating conditions and single fault
conditions, its voltage do not exceed 42,4V peak or 60V DC.
6
2. 4020 IO Box
2.2 Installation
3. Connect the cable. The pin configuration is printed on the circuit board.
A dialog window will appear in the 4020 display when the IO box is connected.
This dialog serves only as a confirmation of successful connection. No
eventual functions are taking effect.
To set up the IO box functions, see chapter 3.5.1 Getting Started. Before
taking the programmed functions into use, it is possible to verify that they are
run correctly, see chapter 3.4.2 Debug Window.
8. Enable the IO box in the 4020 controller via the menu Control panel/IO box
settings/Enable/Disable IO box.
Note! When enabled, the programmed functions are taking effect.
7
2. 4020 IO Box
2.2 Installation
2.2.2 Disconnect the IO Box
1. Disable the IO box in the 4020 controller via the menu Control panel/IO box
settings/Enable/Disable IO box. When the IO box is disconnected, a dialog is
displayed as a confirmation.
8
2. 4020 IO Box
2.3 Operation
2.3.1 Input Signals
There are three bit use types for the input bits in 0 to in 7. These types are:
SBA – Single bit actions
MBA – Multi bit actions
PCC – PC (external host) control
Example:
In 3 is defined as an SBA. Bit state 0 has no functions attached, bit state 1 has one
function attached; JobSel (“TestPrint”).
Function
When bit in 3 changes from 1 to 0 nothing happens. When the bit changes from 0 to 1 the
job TestPrint will be selected and activated.
Example of SBA
This section explains how to read the display of the input bits set up menus.
In this example only bit in 0 has any functions assigned. The rest of the bits have none.
Furthermore we see that the bit in 0 is defined as an SBA – single bit actions.
Since this is an SBA only two bit states are possible: 0 or 1. Each one of them has
apparently 1 function assigned.
Pressing enter on a bit state will show the list of assigned functions:
9
2. 4020 IO Box
2.3 Operation
In this example there is only one function – Active (false). Below that function is an item
to select more functions called new->. Pressing enter on new-> lets us assign more
function to the bit state. Pressing enter on Active (false) allows editing of the parameters
of the function. For this function we can only choose between true and false.
An MBA can be set from two bits to seven bits of data. One bit data makes no sense; it is
the same as an SBA. Seven bits data plus the mandatory selector bit use all eight
available input bits. The case of seven data bits offers a range of 128 combinations.
Example
Three sensors build a binary “word” and a fourth sensor serves as the selector.
In 0 is the selector bit and in 1 to in 3 are the data bits of the binary “word”. When the
selector becomes active, the data bits will be read and we get eight possible bit
combinations to which any combinations of functions can be attached.
000 - functions
001 - functions
010 - functions
011 - functions
100 - functions
101 - functions
110 - functions
111 - functions
Function
Upon bit changes of the three data bits in 1 to in 3 no action is ever taken to avoid
inconsistent data. When the selector is active, all data bits are read and together their
binary “word” points out the function or function group to be carried out.
10
2. 4020 IO Box
2.3 Operation
Example of MBA
This section explains how to read the display of the input bits set up menus. In this
example the MBA has been set to three data bits.
The MBA controls four bits. They are called MBA-S – which is the selector bit, and MBA-
0 to MBA-2 , which are the three data bits where MBA-0 is the least significant. Thus all
bits from in 0 to in 3 are part of the same MBA definition.
Press enter on any of the bits in the MBA definition to enter its definition.
As shown in the header; bit in 3 is the leftmost bit in the bit states table and bit in 1 the
rightmost. The table shows each bit state made out of the three data bits, and we can see
that only the bit state 001 has a function assigned. The other bit states have none in this
example.
Bit state 001 is made up of the bits in 3 (0), in 2 (0) and in 1 (1).
There is one single function attached to this bit state– JobSel (“TestPrint”). The function
will select a job called TestPrint when executed. Below that function is the item new-
>.which allows us to select more functions. Pressing enter on new-> lets us assign more
function to the bit state. Pressing enter on JobSel (“TestPrint”) lets us alter the
parameter to the function: the job to be selected.
11
2. 4020 IO Box
2.3 Operation
List of available functions
The list below contains all functions that can be carried out upon an input bit change
event. The functions are listed in execution priority order. They can be used in
combination with each other upon the same bit change event, thus being carried out
“simultaneously”. The exact order of execution is defined by Markem-Imaje and has no
connection to the order in which they are put via the menus.
As indicated by the list above the function Trig is always carried out last in a group of
functions. For example, if a bit change event is programmed for looking like this:
Trig ()
JobSel (“TestPrint”)
Abort ()
This is to ensure a predictable functionality of the group of functions. The first example
makes no sense in terms of execution order. The expected result of the group of functions
above must be:
Abort, stop any eventual ongoing printout. Select and activate the job TestPrint and
finally trigger a printout of the job TestPrint.
12
2. 4020 IO Box
2.3 Operation
PCC – PC (external host) control
No functions can be attached when a bit is dedicated to the bit use type PCC. The PCC
setting tunnels binary bit changes from the IO box to an external host system via XCL
commands. The printer will take no actions, except from informing the host system. When
using this setting the printer’s IO box serves as an IO box to the external host.
The default value for the minimum pulse length of the input signal is set to 1 ms. Any
incoming pulses with shorter length will be filtered and regarded as invalid signals. 4020
can set the minimum pulse length from 1ms to 20 ms.
13
2. 4020 IO Box
2.3 Operation
2.3.2 Relay Outputs
List of Available Signals
The list below contains the selectable signals from the 4020 controller that can be set up
to alter the state of the relays outputs.
Function Description
Active True if the printer is active, false if it is inactive
Printing True if a printout is ongoing, false if idle
LowInk True if low ink status is detected, false if there is enough ink
NoInk True if no ink status detected, false otherwise
Heads hot True if the heads maximum temperature is passed, false if in valid
temperature range
Controller hot True if the controller’s maximum temperature is passed, false if in
valid temperature range
Power dip True if a 24 V power dip occurs, false otherwise
Heads disconnected True if the heads connections are altered, false otherwise
Warning True if any warning has occurred, false otherwise
Error True if any error has occurred, false otherwise
System OK True if the printer is active and no errors have occurred, false
otherwise
PCC The relay output is controlled by a host computer
14
2. 4020 IO Box
2.3 Operation
There are three signals which are generated by the status of other signals. These are
Warning, Error and System OK. The table below describes their relationship.
No ink Error
OR Heads
disconnected
OR IO box alarm
If any of the signals defined as warnings are true, the Warning signal will be true. If all
warning signals are false, Warning will be false.
If any of the signals defined as errors are true, the Error signal will be true. If all error
signals are false, Error will be false.
If there are no errors, thus the signal Error is false and the printer is active, the System
OK signal will be true. If there are any errors or the printer is inactive the System OK
signal will be false.
15
2. 4020 IO Box
2.4 Troubleshooting
2.4.1 LED Indicators
For all the eight input bits a well as the five output bits there are visible LED indicators on
the IO box circuit board.
The LEDs of the input bits will lighten when voltage is applied, bit state 1, and darken
when there is no voltage, bit state 0.
The LEDs of the output bits will lighten upon closed relay, and darken upon open relay.
This window is a tool to verify the bit change events and that previously programmed
functions are run correctly. Any signal change on the input bits will trigger a bit change
event in the printer that is shown in the window. Any function or list of functions attached
to a certain input bit change event will not be carried out but is redirected to the debug
window.
The header shows that the debug window is recording and reacting on bit change events.
In the scrollable list, all the recorded events and the functions that would have been
executed are shown.
16
2. 4020 IO Box
2.4 Troubleshooting
The indented next line: CntRes (G) is the programmed function for this event and would
have performed a counter reset upon the global counter, if not run in the debug window.
The next recorded event shows that the bit in 1 has changed to 1 and that the function
JobSel (“TestPrint”) would have been carried out selecting job TestPrint for printout.
The events of bit changes appear on the screen also if they have no programming and
thus would not carry out any actions.
In the case of no existing programming, the bit change event is followed by the word
none.
As the events occur, they are added at the end of the list.
Earlier events, which are no longer visible in the list, can be viewed by using the up/down
arrows. In this case any incoming events will not be visible and the window header will
indicate this by showing locked instead of recording.
Press the esc key to bring the window back to recording mode. The end of the list is
shown again and thus the latest incoming event.
Clear the list of recorded and displayed events by pressing the backspace key. The list
will be emptied and ready to receive bit change events.
Exit the debug window by pressing the esc key. All recorded data will remain but no new
events will be recoded when the debug window is closed.
17
2. 4020 IO Box
2.4 Tutorials
2.5.1 Getting Started
This is a step-by-step example showing how to set up a simple function in the IO box.
An external binary signal is going to control the printer in the same way as the play key. If
the signal is high, the printer is going to be active. If the signal is low, the printer is going
to be inactive.
Connect the IO box. A confirmation dialog will appear in the 4020 controller.
18
2. 4020 IO Box
2.4 Tutorials
All input bits and their programming status
is shown in a list. In this case none since
nothing has been programmed yet. The
current bit state is shown within brackets.
This information is dynamically updated.
Press enter.
19
2. 4020 IO Box
2.4 Tutorials
20
2. 4020 IO Box
2.4 Tutorials
We can test our programming of the input bit in 0: When there is voltage on in 0, the
printer is going to be active and the green LED lightened. When there is no voltage the
printer is going to be inactive, disabled, and the yellow LED lightened.
21
2. 4020 IO Box
2.4 Tutorials
2.5.2 Dedicating IO Box Bits to Host Computer
All input and output bits or individual bits can be host controlled. Choose PCC (PC
Control) in the IO box menus to select which bits that are supposed to be controlled by an
external host. Input bits that are not set to PCC will not send any notifications to the host.
Output bits that are not set to PCC will not respond to relay setting XCL commands.
Input bits that are set to PCC will notify the host with the following XCL command:
!!m.io.Bit!State
Examples:
!!m.io.1!0 signals bit in 1 has become 0 (no voltage).
!!m.io.3!1 signals bit in 3 has become 1 (voltage).
The host will use the following XCL commands to set relay outputs:
!!signal.activate.output.Bit!State
Examples:
!!signal.activate.output.1!0 sets the relay output out 1 to 0 (open relay)
!!signal.activate.output.3!1 sets the relay output out 3 to 1 (closed relay)
22
2. 4020 IO Box
2.4 Tutorials
2.5.3 MBA versus SBA
The following example illustrates the advantage of using an MBA instead of an SBA
solution in specific cases. In this example different jobs are going to be selected
depending on the height of the object. The height is detected by three sensors. Small
objects are marked with one head while another size demands two heads. A third height
needs all four heads.
Height sensors
IO box
The disadvantage of using an SBA solution in this case is that each sensor would trigger
their own bit events and attached functions. Due to this, the sensors cannot be mounted
on a vertical line, since they would be active at the same time. The sensors would trigger
a function and select a job at the same time. It is not possible to know which objects
comes first or last. We would get ambiguous results.
Therefore, if solved with an SBA solution the sensors would have to be mounted offset
from each other also in the horizontal direction.
Height sensors
IO box
When the lowest object passes, the lowest sensor is activated and the function for small
objects is selected. This case will work since the other sensors are inactive, due to the
definition of an individual action for each signal. On the other hand, if the largest object
23
2. 4020 IO Box
2.4 Tutorials
passes, all three sensors are activated and all three functions are selected. Two
unnecessary and time consuming job-selecting functions will be triggered.
In the MBA case, a binary combination of the three signals will trigger the correct job
selecting function. We could define it like this:
000 - No action
001 - Select job for small objects
010 - No action
011 - Select job for medium objects
100 - No action
101 - No action
110 - No action
111 - Select job for large objects
In this case, the sensors can be vertically mounted reading a whole “word” of three bits.
Height sensors
Selection sensor
IO box
To make the selection consistent there is always a selector bit, which is a signal that
triggers the reading of the combination of the three sensors.
In this example, the bit combination list above can be altered to cover the case of missing
sensor functionality:
000 - No action
001 - Select job for small object
010 - Select job for medium object – missing lowest sensor
011 - Select job for medium object
100 - Select job for large object – missing two sensors
101 - Select job for large object – missing mid sensor
110 - Select job for large object – missing low sensor
111 - Select job for large object
24
2. 4020 IO Box
2.4 Tutorials
2.5.4 Use case 1 – Alert on Warning Message
In this case the conveyor will stop and the status beacon will alert when there is a
warning. When the problem is solved, the conveyor will re-start and the status beacon will
indicate System OK.
The solution is to let the IO box handle the warning signals from the 4020 controller. Set
up the relay outputs in the IO box to alter the state when there is a low ink, no ink, heads
disconnected or system OK signal.
25
2. 4020 IO Box
2.4 Tutorials
2.5.5 Use Case 2 - Converging Conveyor Lines
In this case production lines are converging to one common line that includes the print
station with an 4020 controller.
Trig
IO box
Different products arrive at the print station via different conveyor lines. Each product is
marked by a product specific job. The jobs are written and stored in the printer.
Sensors on the supplier conveyors select a specific job when they are activated by a
passing object. When the object reaches the print station the proper job is selected and
the trigger signal will start the execution of the printout.
The solution is to set up three different input bits as SBA (single bit action). Each of these
bits is set up to select a specific job when changing to bit state 1 and to do nothing when
changing to bit state 0.
26
2. 4020 IO Box
2.4 Tutorials
2.5.6 Use Case 3 – Height Detection
In this case objects of different sizes are going to be marked by one print station. The
height of the object determines which job that is going to be used. For example: small
objects are marked with one head, while another size demands two heads. A third height
uses all four heads.
Height sensors
Selection sensor
IO box
The jobs are written and stored in the printer. The case is to select the proper job due to
detected object height.
The solution is to set up an MBA (multi bit action) of three bits. Four bits are used: three
are data bits giving eight different bit states, one is the selector bit which performs the
reading of the three data bits.
Assigning the proper job selection functions to the proper bit combinations does the
selection of the jobs.
27
2. 4020 IO Box
2.4 Tutorials
2.5.7 Use Case 4 – Detection of Print Direction
In this case the print direction changes depending on whether the objects are coming from
left to right or right to left.
IO box
We have a case where multiple actions are required; depending on which sensor that is
active, the printer’s direction must be changed, the margins may be modified and the
printout is to start.
The solution is to use two independent sensors connected to two input bits, each one of
them set up as SBA (single bit actions). Each input bit are set to do nothing when
changing to 0 and to execute a set of functions when changing to 1. The function is to set
print direction, set margin and to trigger.
28
2. 4020 IO Box
2.4 Tutorials
2.5.8 Use Case 5 – Detection of Object Orientation
In this case the objects to be marked are approaching the print station in an undefined
orientation. The objects may be positioned upright or upside down.
up
up
IO box
The case is to determine the object’s orientation via a sensor and set up the printer for the
proper scenario. The normal / upside down printing option must be set for the heads,
maybe in combination with other print parameters.
The solution may be one single sensor detecting a mark on the object. The sensor may
give the signal 1 if mark detected and 0 if not. One single binary signal is connected to
one single input bit and set up as an SBA (single bit actions). To ensure time to change
the printout parameters, the sensor is mounted prior to the triggering photocell in the
object’s direction. On both bit states 0 and 1 there are functions that alter the upside down
setting, or maybe selects a different job.
29
2. 4020 IO Box
2.4 Tutorials
2.5.9 Use Case 6 – Automated Tilt Change
In this case the tilt (resolution, text height) must change due to a detected situation, for
example object type. This is a more complex solution, since altering the tilt parameter in
the printer is insufficient. The heads must also be physically tilted, for example via a step
motor arrangement.
Height sensors
Step motor
The step motor which is rotating the head between predefined steps is driven from a PLC
or similar, due to input from sensors detecting the size or type of the objects. The PLC
may then want to control the printer: either by commands via printer ports or by binary
signals using an IO box. In either case, the tilt setting of the printer must be changed and
perhaps also the margins.
One solution is to leave it all to the PLC, programmed to control the tilting of the heads
and set the proper parameters to the controller via XCL commands.
30
2. 4020 IO Box
2.4 Tutorials
2.5.10 Use Case 7 – PC Software Controls the I/O box
In this case a PC software is controlling the I/O box: reading inputs and setting outputs by
using software commands. This replaces the need for a separate I/O box connected to the
PC. A PC cannot be connected directly to the 4020 IO box but it can communicate via the
4020 controller which communicates with the IO box via LVDS. XCL commands read
input bits and set output bits.
Binary signals
LVDS XCL
31
2. 4020 IO Box
2.4 Tutorials
2.5.11 Use Case 8 – Increase/Decrease Counters
There are options for the functions quick counter reset and counters rewind, also
referred to as back-step or trigger-undo, via the menus in the 4020 controller.
A typical case for counters rewind is the situation when two counters are used together
and perform a batch counting operation, where a printout fails. The object is removed but
the counters have already been increased. In this case there is a need of a counter-
rewind of all counters to make the failed printout undone.
These functions are also available via the IO box functions. It is thus possible to reset
counters or rewind counters via a single binary signal.
32
the team to trust
26501 Bourg-lès-Valence Cedex - France
Tél. : +33 (0) 4 75 75 55 00
Fax : +33 (0) 4 75 82 98 10
005054-02 Götaverksgatan 6A
SE-4617 55 Göteborg
Sweden
Tel.: +46 (0) 31 721 46 00
www.markem-imaje.com Fax: +46 (0) 31 721 48 99