Professional Documents
Culture Documents
PLC Board
Controlador Programable
Tarjeta PLC
Controlador Programável
Cartão PLC
User´s
guide
Guia del
usuario
Manual
do usuário
MANUAL
PLC1.01 BOARD
BY WLP SOFTWARE
04/2004
0899.4794 E/2
Summary of Revisions
CHAPTER 1
Introduction
CHAPTER 2
Safety Notices
CHAPTER 3
General Information
CHAPTER 4
General Characteristics of the PLC1
CHAPTER 5
Connector Description
CHAPTER 6
Configuration of the CFW-09 Converter
with PLC Board
CHAPTER 7
Board Installation into the Converter
CHAPTER 8
Detailed Parameter Description
CHAPTER 9
WLP
CHAPTER 10
WLP Blocks
CHAPTER 11
RTU - Modbus Protocol in the PLC1
PLC - QUCIK PARAMETER REFERENCE
Software: V1.4X
Application:
Model:
Serial Number:
Responsible:
Date: / / .
The parameter range starts from 750 up to 899, totalizing 150 parameters. The first 50 parameters are predefined
by the system or are reserved parameters. The 100 remaining parameters are for general use and may be set by the
user.
4
PLC - QUCIK PARAMETER REFERENCE
Factory
Parameter Function Adjustable Range Setting Unit Page
0=1Mbit/s
1=Reserved
2=500 Kbit/s
P772 CAN Baudrate 3=250 Kbit/s 0 bits/second
4=125 Kbit/s
5=100 Kbit/s
6=50 Kbit/s
7=20 Kbit/s
8=10 Kbit/s
0=Manual
P773 Bus off recovery
1=Automatic
P775 CAN Status Read
Counter of received Read
P776
telegrams
Counter of trasmitted Read
P777
telegrams
P778 Counter of detected erros Read
5
PLC - QUCIK PARAMETER REFERENCE
Note: In fatal erros, E50 and E58, the inverter is disabled and need restart.
6
CHAPTER 1
INTRODUCTION
The PLC1 board adds important PLC (Programmable Logical Controller)
functions to the CFW-09, enabling the execution of complex linkage
program by using the digital board inputs and outputs as well as the
digital and analog inputs and outputs of the own inverter which can be
accessed by the user´s program.
Other important functions are the PID blocks, high-pass and low-pass
filters, saturation, comparison. All these functions operate with floating
point.
Besides the functions mentioned above, the PLC1 provides blocks for
motor speed and motor position control, that is a trapezoidal-profile
positioning and a S-profile positioning, speed reference generation with
trapezoidal acceleration ramp, etc. (Note: when positioning functions
used, the coupling of an encoder on motor shaft is required).
All functions can interact with the user through the 100 programmable
parameters that can be acessed directly through the inverter HMI. The
texts and user units of the programmable parameters can be customized
by the WLP.
ATTENTION!
The CFW-09 inverter software version should be the version V2.40 or
later.
7
CHAPTER 2
SAFETY NOTICES
This Manual contains all necessary information for the correct installation
and operation of the PLC1 with the CFW-09 Variable Frequency Drive.
The PLC1 Manual has been written for qualified personnel with suitable
training of technical qualifications to operate this type of equipment
The personnel must follow all safety instructions included in this Manual
and/or defined by the local regulations.
NOTE!
In this Manual, qualified personnel are defined as people that are trained
to:
1. Install, ground, power up and operate the CFW-09, as well as the PLC1
board, according to this Manual and the local safety procedures;
2. Use the safety equipment according to the local regulations;
3. Give first aid.
DANGER!
Always disconnect the supply voltage before touching any electrical
component inside the inverter.
Many components are charged with high voltages, even after the incoming
AC power supply has been disconnected or switched OFF. Wait at least
10 minutes for the total discharge of the power capacitors.
Always connect the frame of the equipment to the ground (PE) at the
suitable connection point.
ATTENTION!
All electronic boards have components that are sensitive to electrostatic
discharges. Never touch any of the electrical components or connectors
without following proper grounding procedures. If necessary to do so, touch
the properly grounded metallic frame or use a suitable ground strap.
NOTE!
Read this entire Manual carefully and completely before installing or
operating PLC1 board with the CFW-09.
8
CHAPTER 3
GENERAL INFORMATION
This chapter defines the contents and purpose of this manual
3.1 ABOUT THIS MANUAL This manual describes the basic procedures required for the WLP
installation, the creation of projects and provides a general view on the
block existing in the PLC1.
Chapter 1- Introduction
Chapter 2 - Safety Notices;
Chapter 3 -General Information;
Chapter 4 - General characteristics of the PLC1;
Chapter 5 -Description of the Connectors;
Chapter 6 - Configuration of the CFW-09 converter with PLC board;
Chapter 7 - Installation of the board into the converter;
Chapter 8 - Detailed Parameter description;
Chapter 9 - WLP blocks;
Chapter 10 - WLP;
Chapter 11 - RTU - Modbus Protocol in the PLC1.
This Manual provides information required for the correct use of the PLC1.
As the PLC1 is very flexible, it allows many different operation modes as
described in this Manual. As the PLC1 can be applied in several ways, it
is impossible to describe here all application possibilities of this board.
WEG does not assume any responsibility when the PLC1 is not used
according to this manual.
9
CHAPTER 4
4.2 Software The Parameter Range comprises the parameter from 750 to 899, totaling
150 parameters. The 50 first parameters are predefined by the system
or are reserved parameters. The other 100 remaining parameters are
for general use, i. e., they may be programmed by the user and can be
used for the most different functions, as contactors, timers, speed,
acceleration and position references, etc.
BIT and volatile WORD type Markers (initialized at zero) and retentive
and volatile FLOAT type markers.
The board programming is performed through the WLP 3.3 program or
later, in Ladder language.
10
CHAPTER 5
CONNECTOR DESCRIPTION
11
CONNECTOR DESCRIPTION
23 CAN L CANL
24 GND ENC 24VDC encoder reference
25 CAN H CANH
26 NC Not connected
27 CAN Network supply 18..26VDC
24Vcc CANopen 50mA @ 24VDC
28 NC Not connected
12
CONNECTOR DESCRIPTION
Board PLC1
Encoder
NOTE!
The max. permitted encoder frequency is 100kHz.
13
CONNECTOR DESCRIPTION
B t
A t
Motor is running clockwise
Jumper XC10
Open Normal Operation
Closed Firmware download
Jumper XC11
Open Enables encoder error generation
Closed Does not generate encoder error
14
CHAPTER 6
For the blocks that generate speed reference (JOG and SETSPEED),
you can use the converter in ‘Sensorless’ (P202=3) mode. Please consider
that in this operation mode there is no high precision at low speed. In
addition, the position gain Kp (P760) should be reset to zero to prevent
instability when the motor is disabled. For the position blocks (TCURVE
and SCURVE), the inverter must be operated in vector mode with encoder
(P202 = 4).
Important notes:
always when possible, use the vector mode with encoder;
avoid scalar mode operation (V/F), if the PLC will generate speed
reference;
Check the correct setting of the P161 and P162 parameters that are the
proportional speed gain and the integral speed gain, respectively. The
correct setting of these parameters are very important for a good inverter
performance.
When the PLC is used as movement generator, this option must be set to
‘Always Local’ (P220=0).
When the PLC is used as movement generator, this option must be set
to ‘PLC’ (P221=11), i. e., the speed reference will be given by the PLC
board.
To enable the PLC to control the converter through the run/stop options
and also enable the PLC to disable the drive, this option must be set to
‘PLC’ (P224=4).
To enable the PLC to control the analog inverter output 1 (AO1), set
P251=12. Note that P252 is the gain of the analog output 1.
To enable the PLC to control the analog inverter output 2 (AO2), set
P253=12. Note that P254 is the gain of the analog output 2.
15
CONFIGURATION OF THE CFW-09 CONVERTER WITH PLC BOARD
16
CHAPTER 7
PLC Board
CC9 Board
Screw M3 x 8
Torque 1Nm CFW-09 - Size 1 and 2
CFW-09 - Size 3 to 10
NOTE!
When size 1 is used, remove the plastic side cover to insert the PLC
correctly.
17
CHAPTER 8
Range
[Factory Setting]
Parameter Unit Description / Notes
P750 - Read parameter.
Firmware Version [-] Example: version 1.30. At the parameter you can read 130.
of the PLC board -
P752 0...1 It reset the retentive markers, both bit type and word type.
Resets retentive [0] Set the parameter to 1 (one) and restart the system. The value of
markers - this parameter returns to 0 (zero) automatically.
P753 0...65535 It loads the factory setting to the system parameters (750...P799).
Loads default [0] Set this parameter to 1234 and reset the system.
settings, if =1234 -
P756 - Signal of the real position shown at Parameters P757 and P758.
Position signal [-] 1 = positive and 0 = negative.
-
P758 - It shows the fraction of revolution of the real position in tenth of degree.
Real position [-]
(fraction of turn) degrees/10
P760 0...200 Increase this gain to speed up the answer to a position error and
Proportional position [ 50 ] decrease this gain when system vibrates or becomes unstable.
gain (Kp) -
P761 0...200 It has the function to reset eventual position errors. In general, this
Integral position [0] gain is zero and may cause a position overshoot, i.e. to go beyoud
gain (Ki) - the desired position and return.
18
DETAILED PARAMETER DESCRIPTION
Range
[Factory Setting]
Parameter Unit Description / Notes
P762 0...65535 This is the max. permitted positioning error, i. e., the max. permitted
Max. lag error [0] difference between reference position and the real position, in degrees.
degrees/10 The parameter and the lag values are divided by 10. For instance 10
at P762 means that the max. following error is 1 degree. When
P762 = 0 (default setting), the lag error will not be checked.
P763 0...1 When this Parameter is set to 1, it disables the user program. This
Desables user [0] setting should be used in any abnormal condition only, where the
program, if=1 - program is causing some error type, for instance, when it prevents
the communication with the serial interface. In this case, disable the
program and install the new corrected version and then enable it
again.
P764 1...247 When, for instance, the MODBUS network connection is used through
PLC adrres [1] serial interface RS 485 (inverter RS232-RS485), this parameter defi-
at network - nes the address at the network board.
P766 - It shows the status of the 15 digital inputs: 9 digital inputs of the
Satus of the [-] PLC1 and 6 digital inputs of the inverter.
Digital Inputs - The read number should be converted to binary value, thus obtaining
a direct read of the status of each input.
The DI101 to DI106 represents the status of the 6 digital inputs of the
drive and the DI1 to DI9 represents the status of the 9 digital inputs of
the PLC1.
P767 0...10000 For instance, a 4 pole motor - 50 Hz, has a synchronous speed of
Synchronous motor [ 1800 ] 1500RPM.
speed rpm
P769 0...3599 The input value should be in tenth of degree. This value can be used
Position of the encoder [0] to search for the machine zero and so set the zero position.
zero pulse degrees/10
19
DETAILED PARAMETER DESCRIPTION
Range
[Factory Setting]
Parameter Unit Description / Notes
P772 0...8 Adjust CAN baudrate. Accept Values:
CAN Baudrate [0]
P772 Description Maximum
bit/second
Cable Length
0 1 Mbit/s 25 m
1 Reservado -
2 500 Kbit/s 100 m
3 250 Kbit/s 250 m
4 125 Kbit/s 500 m
5 100 Kbit/s 600 m
6 50 Kbit/s 1000 m
7 20 Kbit/s 1000 m
8 10 Kbit/s 1000 m
P773 0...1 This parameter allows the PLC1 action selection when a bus off
Bus off Recovery [0] error occurs. The permitted values are:
-
P773 Description Note
0 Manual After the bus off error has been detected,
the device displays E61, the CAN
communication will be disabled and the
device must be reset manually to return
to network operation.
1 Automatic The communication will be restart
automatically after bus off error has been
detected.
20
CHAPTER 9
WLP
WLP is a software for Windows ambient used to program the PLC1 board
in Ladder language. Its installation and programming in a PC is
very easy.
This Manual describes the basic procedures required for the WLP
installation and for the creation of new projects and gives a general view of
the blocks existing in the PLC1.
These parameters give to the user good flexibility to implement new projects,
9.3 Parameter settable by user since they are readily accessed through the CFW-09 HMI.
Consequently, the respective name of the parameter function and its unit
may be editted in the WLP through the parameter editor (Alt+G), and
afterwards transmitted to the PLC1 board.
Signal:
Depending on the data type that has been chosen, the signal comprises
a data type and an address or a constant value,
Number of Revolutions:
Depending on the chosen data type, the number of revolutions consists in
a data type and an address or a constant value.
For the constant data type, the value must be programmed according to
the unit that has been configured in the project, and the configuration of
the field “Fraction of Revolution” is not required.
For the user parameters and the word markers, should be considered for
this field the number of revolutions.
Fraction of Revolution:
The fraction of revolution consists only in an address, since it shares the
same data type of the field “Number of Revolutions”.
When the data type is constant, this value is ignored and only the constant
configured in the field "Number of Revolutions" is valid.
For the user parameters and the word markers, the considered unit for
this field is the pulse number, which may vary between 0 to 65535 pulses,
and is equivalent to a range from 0 to 359,9945068359375º.
9.4.2 Velocidade - INBWG, Depending on the chosen data type, the speed consists in a data type
SCURVE, TCURVE, and an address or a constant value.
HOME, JOG, The speed data type may be:
SETSPEED: constant
user parameter
word marker
For the constant data type, the value should be programmed according to
the unit configured in the project.
For the user parameters and the word marker, the unit to be considered
for this field is the RPM (rotation per minute).
9.4.3 Acceleration/ Depending on the chosen data type, the acceleration/deceleration consists
Deceleration - in a data type and an address or constant value.
SCURVE, TCURVE,
The acceleration data type may be:
HOME, STOP, JOG, constant
SETSPEED: user parameter
word marker
For the constant data type, the value should be programmed according to
the unit configured in the project.
For the user parameters and the word marker, the unit to be considered
for this field is the RPM/s (rotation per minute per second).
9.4.4 Jerk - SCURVE: Depending on the chosen data type, the jerk consists in a data type and
an address or constant value.
22
WLP
For the constant data type, the value should be programmed according to
the unit configured in the project.
For the user parameters and the word marker, the unit to be considered
for this field is the RPM/s² (rotation per minute per second to the square).
In the relative mode it refers to a positioning, starting from its last position.
In this case, the direction of rotation of this positioning is given by the
signal, i. e., clocwise direction of rotation when positive and counter-
clockwise direction of rotation, when negative.
The aboslute mode refers to the machine zero position, but this zero
position may be used only when a zero search has been effected previously.
9.4.7 Total Part - INT2FL, Depending on the chosen data type, the total part consists in a data type
FL2INT: and an address or constant value.
ATTENTION!
When the total part refers to an output result of any block, the constant
data type is not allowed.
ATTENTION!
When the fractional part refers to an output result of any block, the constant
data type is not allowed.
23
WLP
9.4.9 Float - INT2FL, FL2INT, The float comprises a data type and an address.
MATH, COMP, PID, SAT,
FUNC, FILTER: The float data type may be:
float constant
float marker
ATTENTION!
When the float refers to an output result of any block, the loat constant
data type is not allowed.
24
CHAPTER 10
WLP BLOCKS
Description:
It consists of 1 input, 1 output and 1 argument.
NOTE!
In the user parameter option, the even values correspond to 0, while the
odd values correspond to 1.
Operation:
When its argument value is 1, it transfers the signal contained in its input
to its output. Otherwise it transfers 0 to its output.
Chart:
NO CONTACT
Example:
If the bit marker 2000 and the digital input 1 is 1, write 1 in the bit marker
1000. Otherwise, write 0.
25
WLP Blocks
NOTE!
In the user parameter option, the even values correspond to 0, while the
odd values correspond to 1.
Operation:
When its argument value is 0, it transfers the signal contained in its input
to its output. Otherwise it transfers 0 to its output.
Chart:
NC CONTACT
Example:
If the bit marker 2000 and the digital input 1 is 0, write 1 in the bit marker
1000. Otherwise, write 0.
26
WLP Blocks
Description:
It consists of 1 input and 1 argument.
NOTE!
In the user parameter option, the current value is not saved in the E2PROM
memory, i. e. the last value is not recovered. In addition, the even values
correspond to 0 and the odd values correspond to 1.
Operation:
It transfers the signal contained in its input to its argument.
Chart:
COIL
Example:
If the bit marker 2000 or the digital input 1 is 1, write 1 in the bit marker
1000. Otherwise, write 0.
27
WLP Blocks
Description:
It consists of 1 input and 1 argument.
NOTE!
In the user parameter option, the current value is not saved in the E2PROM
memory, i. e. the last value is not restored. In addition, the even values
correspond to 0 and the odd values correspond to 1.
Operation:
It transfers the reverse signal contained in its input to its argument.
Chart:
NEGATED COIL
Example:
If the bit marker 2000 or the digital input 1 is 1, and the user parameter
800 is 0, write 1 to the digital output. Otherwise, write 1.
28
WLP Blocks
Description:
It consists of 1 input and 1 argument.
NOTE!
In the user parameter option, the current value is not saved in the E2PROM
memory, i. e. the last value is not recovered. In addition, the even values
correspond to 0 and the odd values correspond to 1.
Operation:
The argument is set, when the input signal is 1.The argument will be reset
only when one component "resets coil" is activated.
Chart:
SETS COIL
Example:
If the user parameter 801 and the digital output 1 of the drive are 1, or the
digital input 1 is 1 and the user parameter 800 is 0, it sets the digital
output 1. Otherwise, the output value is maintained.
29
WLP Blocks
Description:
It consists of 1 input and 1 argument.
NOTE!
In the user parameter option, the current value is not saved in the E2PROM
memory, i. e., the last value is not recovered. In addition, the even values
correspond to 0 and the odd values correspond to 1.
Operation:
When the input signal is 1, the argument is reset. The argument will be
set only when one componente "resets coil" is activated.
Chart:
RESETS COIL
Example:
If the digital input 1 is 1, its resets the user parameter 800. Otherwise, the
parameter value is maintained.
30
WLP Blocks
Description:
It consists of 1 input and 1 argument.
NOTE!
In the user parameter option, the current value is not saved in the E2PROM
memory, i. e., the last value is not recovered. In addition, the even values
correspond to 0 and the odd values correspond to 1.
Operation:
When there is a transition from 0 to 1 at the input signal, the argument is
set during the scan cycle. Then the argument is reset, even if its input
remains at 1.
Chart:
1 SCAN CYCLE
Example:
When the digital input 1 commutates from 0 to 1, write 1 for 1 scan cycle
into the bit marker 2000.
31
WLP Blocks
Description:
It consists of 1 input and 1 argument.
NOTE!
In the user parameter option, the current value is not saved in the E2PROM
memory, i. e., the last value is not restored. In addition, the even values
correspond to 0 and the odd values correspond to 1.
Operation:
When there is a transition from 1 to 0 at the input signal, the argument is
set during the scan cycle. Then the argument is reset, even if its input
remains at 0.
Chart:
1 SCAN CYCLE
Example:
When the digital input 1 commutates from 1 to 0, write 1 for 1 scan cycle
into the bit marker 2000.
32
WLP Blocks
Description:
It consists of 1 EN input, 1 ENO output and 2 arguments, being:
speed (see item 9.4.2)
direction of rotation (see item 9.4.6)
The ENO output informs if the direction of rotation is the same as the
programmed one and if the motor speed is higher or equal to the
programmed value.
Operation:
If the EN input is 0, the block will not be executed and the ENO output
commutates to 0.
If the EN input is 1, the block compares the speed and the motor direction
of rotation with the programmed speed arguments an the direction of
rotation.
Flow chart:
direction of rotation =
programmed direction of
rotation ?
speed >=
programmed speed?
33
WLP Blocks
Chart:
INBWG
PROGRAMMED SPEED
EFFECTIVE SPEED
Example:
The INBWG block will be activated, while the digital input 1 is 1. In this
case, if the motor is running clockwise and its speed is higher or equal to
1500 rpm, it writes 1 to the digital output 1. Otherwise, it writes 0.
Description:
It is formed by 1 EN input, 1 ENO output and 5 arguments, being:
position (signal, number of revolutions, fraction fo revolution) (see 9.4.1)
speed (see item 9.4.2)
acceleration (see item 9.4.3)
jerk (see item 9.4.4)
mode (see item 9.4.5)
34
WLP Blocks
The ENO output informs the moment when the block is finished.
Operation:
If the EN input is 0, the block will not be executed and the ENO output
changes to 0.
If there is at least one pulse at the EN input during the scan cycle and
there is no other active block, a positioning with S-profile will be exectued,
based on the argumet programmed characteristics.
When the positioning is finished, the ENO input changes from 1 during
the scan cycle and later returns to 0.
Important: This block operates with position loop, and and it remains in
this function even after the process has been ended.
Flowchart:
is there one
positioning active?
35
WLP Blocks
Chart:
EN
SCURVE
ACCELERATION
JERK
ENO
1 SCAN CYCLE
- x = end position
- x0 = start position
- v = end speed
- v0 = start speed
- a = end acceleration
- a0 = start acceleration
- J = jerk
36
WLP Blocks
Example:
Remember that the jerk is the derivative from the acceleration as time
function. Thus we can conclude that the max. acceleration will be reached
at 50000 rpm/s / 230000 rpm/s² = 0.22 seconds.
Description:
It is formed by 1 EN input, 1 ENO ouput and 4 arguments, being:
position (signal, number os revolutions, fraction of revolution) (see 9.4.1)
speed (see item 9.4.2)
acceleration (see item 9.4.3)
mode (see item 9.4.5)
The ENO output informs the moment as the block has been finished.
Operation:
If the EN input is 0, the block will not be executed and the ENO output
changes to 0.
If there is at least one pulse during one scan cycle at the EN input, and if
there is no other positioning block active, a positioning with trapezoidal
profile will be exceuted, based on the arguments programmed
characteristics.
After the positioning has been ended, the ENO input changes to 1 during
one scan cycle and then returns to 0 again.
37
WLP Blocks
Flowchart:
is there one
positioning active?
is positioning
finished?
Chart:
EN
TCURVE
ACCELERATION
ENO
1 SCAN CYCLE
38
WLP Blocks
where:
- x = end position
- x0 = start position
- v = end speed
- v0 = start speed
- a = end acceleration
Example:
Description:
It is formed by 1 EN input, 1 ZEROSW input, 1 ENO output and
4 arguments, being:
direction of rotation (see item 9.4.6)
speed (see item 9.4.2)
acceleration (see item 9.4.3)
offset (signal, number of revolutions, fraction of revolution) (see 9.4.1)
The ZEROSW input is responsible for informing the block that the zero
machine position has been reached.
The ENO output informs the moment when the block has been finished.
39
WLP Blocks
Operation:
If the EN input is 0, the block is not executed and the ENO output remains
at 0.
If there is less than one pulse during a scan cycle at the EN input, and no
other positioning block is active, the zero search is enabled with trapezoidal
profile based on the characteristics of the programmed arguments.
At the moment when there is at minimum one pulse during one scan
cycle at the ZEROSW input, the search for the zero pulse is started. As
soon as the zero pulse is found, the stop process is started and then the
return to the position of the zero pulse is executed.
Now the block is finished and the ENO output changes to 1 during one
scan cycle and then returns to 0.
NOTE!
Assuming that this block is enabled and the ZEROSW input is 1, the
search is started in the opposite direction as programmed until the
ZEROSW input changes to 0. At this moment, the block reverses the
direction of rotation and repeats the step described in the item above.
NOTE!
Depending on the value of the Parameter 769, the position may show an
offset that causes a position advance relating to the zero pulse.
In this case, the stop will be the value of the tenth degrees of parameter
P769 before the zero pulse.
ATTENTION!
After the machine zero search, the control remains in position loop.
40
WLP Blocks
Flowchart:
is there one
positioning active?
position is positioning
finished
Chart:
Normal condition - ZEROSW = 0
HOME
ZERO PULSE
SPEED
Depends on the
value of P769
1 SCAN CYCLE
41
WLP Blocks
Excepting - ZEROSW = 1
HOME
ZERO PULSE
SPEED
1 SCAN CYCLE
Example:
Considering that the drive has been reset recently or switched OFF,
the digital input 1, during the transition from 0 to 1, activates the machine
zero search, since the marker of the bit 2001 is enabled at 0. The search
for the zero pulse is started, when the input 2 changes to 1. The motor
decelerates and returns to the found zero pulse position plus the value of
P769, as soon as the zero pulse is found. The marker 2001 is set as soon
as the positioning process has been concluded and now a new search is
enabled.
42
WLP Blocks
Description:
It is formed by 1 EN input, 1 ENO output and 2 arguments, being:
deceleration (see item 9.4.3)
mode
The ENO output informs the moment when the block is terminated.
Mode:
The mode is always a constant.
Operation:
If the EN input is 0, this block is not active, the ENO output remains at 0.
If the EN input is 1, even when this occurs only during one scan cycle, a
stop with trapezoidal profile is executed, based on the characteristics
programmed at the arguments.
As the stop has been concluded, the ENO output changes to 1 during one
scan cycle and then returns to 0.
After started, the stop block is not more cancelled until its total stop,
even if the EN input changes to 0 before the termination on its stop.
The interrupt mode causes the block stop while the EN input is 1. As
soon as the input EN changes to 0, the previous active positioning block
is restored, provided the current position is not higher or equal to the
desired position by the previous active positioning. This can occur if the
deceleration of the stop block is too slow.
The cancel mode does not restore the previous positioning when the EN
input is 0.
Note: If use to stop the machine zero search, the stop mode will be always
cancelled, even when programming has been set to interrupt.
Important: This block does not change the control way, indifferent if it is in
position loop or in speed loop.
43
WLP Blocks
Flowchart:
restore positioning
stopped
Chart:
STOP - INTERRUPT
1 SCAN CYCLE
44
WLP Blocks
Please note that in this case, after the EN input changes to 0, a S-curve
is started, since this S-curve was being executed before the stop command
was given.
STOP - CANCELL
1 SCAN CYCLE
Example:
45
WLP Blocks
Description:
Operation:
If the EN input is 0, this block is not executed, the ENO output remains at
0.
When the EN input is 0, a stop command is started and after it has been
finished, the ENO output changes to 1 during one scan cycle ant then
returns to 0.
NOTE!
The JOG speed is not used online, i.e., even when the programmed speed
is changed, the speed of this block will not be changed.
Important: This block work in speed loop, and remains in this status even
after the block has been finished.
46
WLP Blocks
Flowchart:
is there one
positioning active?
CHART:
JOG
1 SCAN CYCLE
47
WLP Blocks
Example:
When the digital input 1 of the drive is 1, the digital output 1 is set and at
the same time JOG is enabled at a speed of 0,3 rps. When the input 1
returns to 0, at the moment when the block ends, i. e., when it stops
completely, the output 1 is reset.
Description:
The output ENO informs when the motor speed reaches the programmed
speed.
Operation:
If the EN input is 0, the block is not executed and the ENO output remains
at 0.
The ENO output changes to 1 only during one scan cycle, as the block
reaches the programmed speed. Otherwise it is always 0.
Important: This block works in speed loop and remains in this status even
after it has been concluded.
48
WLP Blocks
Flowchart:
initialize the
block
Chart:
SETSPEED
1 SCAN CYCLE
49
WLP Blocks
Example:
During the transition from 0 to 1 of the digital input 1 of the drive, the block
with speed of 500 rpm in clockwise direction of rotation is triggered. As
soon as this speed is reached, the digital output 1 is set.
During the transition from 0 to 1 of the digital input 2 of the drive, the block
with speed of 1000 rpm in counter-clockwise direction of rotation is triggered
and the digital output 1 is reset. If the digital input 1 is driven any one of
the two previous movements that is active is cancelled and the motor
stops and both outputs 1 and 2 are reset.
Description:
This block is formed by 1 IN input, 1 Q input and 2 arguments, being:
PT – preset time
ET – elapsed time
The Q input informs if the elapsed time reached the programmed time.
PT (Preset Time):
The desired time is formed by a data type and one address or a constant
value, depending on the chosen data type.
For the constant data type, the max. permitted value is 30.000 ms.
50
WLP Blocks
ET (elapsed time):
NOTE!
In the option User Parameter, the current value is not saved in the E2PROM
memory, i. e., this last value is not restored.
Operation:
If the IN input is 0, the elapsed time argument is reset and the Q output
changes to 0.
If the IN input is 1, the elapsed time is incremented till the value on the
argument of the preset time is reached. After this value has been reached,
the Q output changes to 1 and remains at this status till the IN input
changes to 0.
Flowchart:
Initialize
51
WLP Blocks
Chart:
TON
Example:
When the digital input 1 of the drive is 1, a positioning based on the user
parameter 800 to 803 is enabled. After this positioning has been concluded,
the digital output 1 is set and the timer is enabled. After the programmed
2000 ms have been elapsed, the digital output 1 is reset.
52
WLP Blocks
Description:
PV – desired counting
CV – elapsed counting
The Q output informs if the programmed counting value has been reached.
Depending on the chosen data type, the preset value is formed by a data
type and an address or a constant value.
For the constant data type, the max. allowed value is 30.000.
NOTE!
In the User Parameter option, the current value is not saved in the E2PROM
memory, i. e., this last value is not restored.
Operation:
When the counter value reaches the preset value, output Q changes to 1,
and remains at this status till R output changes to 1. Otherwise, Q output
is 0.
While R input is 1, the counter value is reset and the counting is not
incremented.
53
WLP Blocks
Flowchart:
increment
previous CU = 0 ?
counter value
reset counter
value
Chart :
54
WLP Blocks
Example:
If there is a transition from 0 to 1 at the digital input, or the bit 100 marker
is 1, and the digital output 1 is 0, a TCURVE positioning is enabled.
After conclusion, marker 1000 changes to 1, thus enabling the CTU block
to make a counting and starting again the positioning, provided the digital
input 1 is 0. After the counter has detected 50 positive transitions in the
marker 1000, i.e., it has realized 50 positionings, the digital output 1
changes to 1, and makes impossible a new positioning before the digital
input 2 is 1, thus resetting the output 1.
Figure:
10.18 Transfer Block
(TRANSFER)
Description:
Depending on the selected data type, the source data may formed by a
data type and an address or a constant value:
55
WLP Blocks
The destination data is formed by data type and an address and it is the
local where is saved the source data value.
NOTE!
In the option User Parameter , the current value is not saved in the E2PROM
memory, i. e., the last value is not restored.
Operation:
When the EN input is active, the value contained in the source data is
transferred to the destination data. Otherwise no operation is realized.
Please consider the compatibility of the source data type and the
destination data.
Example:
The digital input 1 set to 1, enables the TRANSFER. Thus the value
contained in the analog input 1 is shown at the user parameter 800.
An useful application of the TRANSFER block is its use for enabling the
motor start, for instance, through a digital input. So SRC will have a digital
input as value, and DST a %SW0 system marker. Please consider that
the motor is enabled only if it has been already enabled in the CFW-09
inverter. This may be programmed, for instance, at the digital input 1 of the
drive.
56
WLP Blocks
Description:
Operation:
While the EN input is 1, the values contained in the entire word and fractional
word are transferred to the float marker.
The entire word and fractional word represent a number in 16.16 format.
An entire word represents a whole number between -32768 and 32767. A
fractional word represents a decimal number always positive between
0.0 to 0.9999847.
Example:
It converts the value of the user parameter 800 and 801 to the float marker
9000. Please consider that the parameter 800 represents the entire part
and the parameter 801 represents the fractional part.
Description:
This block is formed by 1 EN input, 1 ENO output and 3 arguments,
being:
float (see item 9.4.9)
entire part – word (see item 9.4.7)
fractional part – word (see item 9.4.8)
57
WLP Blocks
Operation:
The entire word and to the fractional word represent a number in 16.16
format. The entire word represents an integer number and may vary
between -32768 and 32767. The fractional word represents a decimal
number, always active, and may vary between 0.0 to 0.9999847.
Example: The -5.5 float conversion results in an entire word equal to 5 and
a fractional word equal to 32768 that represents 32768 / 65536 = 0.5.
If the float value is higher than 32767, its value is saturated in the conversion,
resulting in an entire word equal to 32767 in a fractional word = 65535,
that represents 65535 / 65536 = 0.9999847.
If the float value is lower than -32768, its value is saturated in the conversion,
resulting in an entire word equal to -32768 in a fractional word = 65535,
that represents 65535 / 65536 = 0.9999847.
Example:
When the digital input 1 is 1, the value of ..... is converted to the user
parameters 800 and 801, where the parameter 800 will be 3, and the
parameter 801 will be 9175, that represents 0,14.
Description:
As all data type of this block are float constant or float marker, we
recommend to use the blocks INT2FL and FL2INT.
58
WLP Blocks
Operator:
Operation:
Example:
At every pulse given at the digital input 1, the value of the user parameter
800 and 801 is incremented by 1.5. Please remember that the value of the
parameter 800 represents the entire part and the value of the parameter
801 represents the fractional part.
59
WLP Blocks
Description:
This block is formed by 1 EN input, 1 ENO output and 4 arguments,
being:
operator
float 1 (see item 9.4.9)
float 2 (see item 9.4.9)
As all data type of this block are float constant or float marker, we
recommend to use the blocks INT2FL and FL2INT.
Operator:
Operation:
When EN input is 0, the block is not executed and the ENO output changes
to 0.
60
WLP Blocks
Example:
In this example, if the value contained in the analog input 1 of the drive is
higher or equal to the value contained in the analog input 2 of the drive,
the digital output is switched ON. Otherwise the digital output 1 is switched
OFF.
10.24 PID Block (PID) Figure:
Description:
As all data type of this block are float constant or float marker, we
recommend to use the blocks INT2FL and FL2INT.
61
WLP Blocks
Signals:
Gains:
Operation:
The block is executed while the EN input 1. Otherwise the arguments are
reset.
ATTENTION!
At maximum, two PID blocks may be active simultaneously. When a third
block is present, no one will be executed, even when they are active at the
EN input.
Blockdiagram:
Kd.s
Reference + + +
Control
Kp SAT
- +
Ki
Feedback s
Example:
62
WLP Blocks
As explanation one can say that the reference value is given by the user
parameter 800 and then converted to the float marker 9000. The value of
the feedback signal is given by the value contained at the analog input 1
of the drive, which is transferred to the word marker 6000 and converted
to the float marker 9001. The control output of the of the PID block is the
marker 9002 which is converted to the word markers 6001 and 6002. The
value contained in the word marker 6002 is transferred to the analog output
2 of the drive.
Description:
As all data types of this block are float constant or float marker, we
recommend to use the blocks INT2FL e FL2INT.
Operation:
If the EN input is 0, the block is not executed and the ENO output changes
to 0.
While the EN input is 1, the block is executed. The ENO output changes
to 1 only, if there is any saturation. Otherwise the ENO output remains
at 0.
The function of this block is to transfer the input data to the output, provided
they are within the programmed limits. When these values are higher or
lower that the maximum and the minimum programmed ones, the output
value is saturated with these values.
Example:
63
WLP Blocks
The value contained at the analog inout of the drive is transferred to the
word marker 6000 which is then converted to the float marker 9000.
The value read at the analog input is a value between 0 and 32767. The
SAT block causes that on the float marker 9001 is read a value only
between 10000 e 20000.
Description
As all data type of this block are float constant or float marker, we
recommend to use the blocks INT2FL and FL2INT.
Function:
Operation:
64
WLP Blocks
Example:
During the transition from 0 to 1 at the digital input 1, the user parameters
800 and 801 are converted to the float marker 9000. Then the square root
is calculated from the value contained in the float marker 9000 and the
result is saved in the float marker 9001. Then the value of the float marker
9001 is converted to the user parameter 802 and 803.
Description:
As all data type of this block are float constant or float marker, we
recommend to use the blocks INT2FL and FL2INT.
Type:
Operation:
65
WLP Blocks
NOTE!
The time constant is given in seconds.
ATTENTION!
At maximum 2 filter blocks may be active each time. When three filter
blocks are present, no one will be executed, even they are active at its EN
input.
Block Diagram:
Low-pass filter
Input 1 Output
τ.s + 1
High-pass filter
Example:
The value contained at the analog input of the drive 1 is transferred to the
word marker 6000 which is then converted to the float marker 9000.
The float marker 9000 is the filter input, which time constant is 0.1s, resulting
into the floar marker 9001.
66
WLP Blocks
Description:
The EN input enables the Slave to follow the Master according to the data
received by the CAN network.
Synchronization Ratio
The addresses or constants are destined for the master relation or slave
relation.
Operation:
If the Master Drive is sending the data via CAN Network and the EM input
of the Follower block is active, the slave motor follows the master motor
according to the values of the speed loop synchronism ratio
The ENO output will be set only after the salve motor reaches the specific
ratio of the master motor.
Example:
If the Master is sending the data via CAN network, the slave motor runs at
50% of the master motor speed.
67
WLP Blocks
Description:
The EN Input is responsible for maintaining the master sending the speed
and position references via CAN network to the slave.
The ENO output informs if the CAN netowk has been enabled or not.
Operation:
When this block has been enabled, the PLC1 starts to send the speed
reference and position via CAN network.
NOTE!
If this block has not been enabled in the master design, the slave will not
follow the master.
Example:
The CAN communication is enabled automatically and the PLC board starts
the transmission of the speed and the position reference to the slave.
68
CHAPTER 11
The baud rate is defined at the parameter 765. Following transfer rates are
possible:
1 – 1200bps
2 – 2400bps
3 – 4800bps
4 – 9600bps (Factory Setting)
5 – 19200bps
The PLC address in the network is defined at the Parameter 764 and can
be set between 1 and 247 (0 is the broadcast address). The factory setting
is 1.
69
RTU - Modbus Protocol in the PLC1
11.1 MODBUS-RTU
11.1.1 Introduction to Modbus- The Modbus protocol has been developed in 1979. Currently this protocol
RTU Protocol is a disclosed protocol and used widely by several equipment
manufacturers. The RTU-Modbus communication for the PLC1 board has
been developed according to the following documents:
In these documents are defined the message format used by the elements
that are part of the Modbus network, as well as the services (or functions)
that are available via network and how these elements exchange the data
via network.
11.1.1.1 Trasmission Mode During the protocol specification you can chose between two transmission
modes: ASCII or RTU. These modes define how the message bytes are
transmitted. You can not use the two transmission modes in the same
network.
In the RTU transmission mode, each transmitted word has 1 start bit,
eight data bits, 1 parity bit (optional) and 1 stop bit (2 stop bits, when
parity bit is not used). Thus the bit sequence for the transmission of one
byte is following:
11.1.1.2 Message Structure in The RTU-Modbus network operates in the Master-Slave system, where
the RTU-Mode can be available up to 247 slaves, but only one master can be connected.
Every communication starts with the master requesting the salve and the
slave answering to the master what has been requested. The structure is
the same in both telegrams (request and answer): address, Function Code,
Data and CRC. Depending on the request, only the data field may have
variable length.
70
RTU - Modbus Protocol in the PLC1
11.1.1.2.1 Address Master starts the communication by sending a byte with the slave address
to which the message should be sent. For the response, the salve also
starts the message with its own address. The Master can also send a
message to the address 0 (zero), which means that this message is
destined to all slaves of the network (broadcast). However in this case no
slave will answer to the master.
11.1.1.2.2 Function Code This filed also contains an only byte, where the master specifies the
service of function requested from the slave (read. write, etc.). According
to the protocol, each function is used for accessing one specific data
type.
11.1.1.2.3 Data Field Field with variable length. The format and content depend on the used
function and on the transmitted values. This field is described in the
function description (see Item 8.14.3).
11.1.1.2.4 CRC The last part of the message is the field for checking the transmission
errors. The used Method is the CRC-16 (Cycling Redundancy Check).
This field is formed by two bytes. The least significant byte (CRC-) is
transmitted first, only then is transmitted the most significant byte (CRC+).
The CRC calculation is started by loading a 16 bit variable (referenced
from now on as CRC variable) with the value FFFFh. After that, proceed
according to the following routine:
1. Submit the first message byte (only the data bits - start bit, parity bit
and stop bit are not used) to a XOR logic (OR exclusive) with the 8
least significant bits of the CRC variable, by returning the result to the
own CRC variable.
2. Then the CRC variable is displace by on position to right, in the
direction to the least significant bit and so the position of the most
significant bit is filled out with 0 (zero).
3. After the displacement, the flag bit (the bit that has been displaced
outside the CRC variable) is analyzed as follows:
If the bit value is 0 (zero), no calculation is carried out.
If the bit value is 1, the CRC variable content is submitted to a XOR
logic with a A001h constant value and the result is returned to the
CRC variable.
4. Repeat the step 2 and 3 until the eight displacements have been carried
out.
5. Repeat the steps 1 to 4, by using the next message byte until the
whole message has been processed.
The end content of the CRC variable is the value of the CRC field that is
transmitted at the end of the telegram. The least significant part is
transmitted first (CRC-). Then is transmitted the most significant part
(CRC+).
71
RTU - Modbus Protocol in the PLC1
11.1.1.2.5 Time Between There is no specific character in the RTU-mode that indicates the begin
Messages or the end of a telegram. The interruption of the data transmission during
a time longer than 3,5 times required for transmitting a data word (11
bits) is the only indication of the begin or the end of the message. Thus if
a telegram transmission is started only after this minimum time has
been elapsed, the network elements assume that the received character
represents the begin of a new telegram. In the same way, the network
elements will assume that the telegram transmission has ended after
this time has elapsed again.
If during the transmission of a telegram , the time between the byte
transmission is longer that this minimum established time, the telegram
will be considered as a invalid telegram, this the PLC will disregard the
already received bytes and will assemble a new telegram with the bytes
that are being transmitted.
The table below shows the times for three different communication rates.
Transmition
Signal T3.5 x Tbetween bytes T3.5 x
Telegram
11.1.2 PLC1 Operation in the The PLC boards operate as Slaves at the Modbus-RTU network. The
Modbus-RTU communication starts with the Master in the network requesting any service
to a network address. If the PLC has been configured for the corresponding
address, it processes the request and responses to the master as
requested.
11.1.2.1 Interfaces Description The PLC boards use a serial interface for the Modbus-RTU network
communication. There are two possibilities for the physical connection
between the master in the network an a LPC:
72
RTU - Modbus Protocol in the PLC1
11.1.2.1.1 RS-232 This interface is used for the point-to-point connection (between an
only slave and the master).
Maximum distance: 10 meters.
Signal levels meet the EIA STANDARD RS-232C.
Three wires: transmission (TX), reception (RX) and return (0V).
The RS-232 Serial Interface module must be used.
11.1.2.1.2 RS-485 This interface is available through the MIW-02 converter connected to
the PLC RS-232.
This interface is used for the multipoint connection (several salves and
one master).
Maximum distance: 1000 meters (it uses shielded cables).
Signal levels meet the EIA STANDARD RS-485.
11.1.2.1.3 Configuration at the To enable the PLC for a correct communication in the network, you must,
in addition to the physical connection, configure its address in the network
Modbus-RTU
and the respective transfer rate.
11.1.2.1.4 PLC Address at the This address is defined through Parameter 764.
Each slave in the network must have its own address.
Network
The network master has no address.
Even if the connection is made point-to-point, you must know the slave
address in the network.
11.1.2.1.5 Transfer Rate The Transfer Rate is defined in the Parameter 765.
Transfer Rate: 1200, 2400, 4800, 9600 or 19200 kbits/sec.
Parity: No.
All slaves, including the network master, must use the same transfer
rate and the same parity.
11.1.2.2 Access to the PLC All PLC and inverter parameters, as well as the PLC digital inputs and
and Inverter Data outputs, can be accessed through the network
11.1.2.2.1 Available Functions The parameters have been defined In the PLC as holding type registers. In
and Response Times addition to these registers, you can also access the digital board inputs
and outputs directly by using the bit type functions of the Modbus. Following
services (or functions) have been made available for accessing these bits
and registers). In addition to these registers, you can also access directly
the digital inputs and outputs of the board by using the bit type function of
the Modbus. Following services (or functions) are available for accessing
these bits and register:
Read Coils
Description: read of the internal bit blocks or coils.
Function: it reds the PLC digital outputs
Function code: 01.
Broadcast: not supported.
Response time: 5 to 10 ms.
73
RTU - Modbus Protocol in the PLC1
11.1.2.2.2 Data Addressing The addressing of the PLC data is made with an offset equal to zero,
which means that the address number is equal to the data number. The
parameters, as well as the digital inputs/outputs are made available from
the address 0 (zero) on.
Parameters
Modbus Address
Parameter Number
Decimal Hexadecimal
P000 0 00h
P100 100 064h
...
...
...
...
...
74
RTU - Modbus Protocol in the PLC1
Digital Inputs
Number of the Modbus Address
Digital Input Decimal Hexadecimal
IX1 0 0h
IX2 1 1h
...
...
...
IX9 8 8h
Digital Outputs
Modbus Address
Bit Number
Decimal Hexadecimal
QX1 0 0h
QX2 1 1h
...
...
...
QX6 5 5h
11.1.3 Detailed Description of This item presents a detailed description of the functions that are available
the Functions in the PLC for the Modbus-RTU communication. For the telegram
preparation, please note following:
The values are always transmitted as hexadecimal values.
The data address, the data number and the register value are always
represented in 16 bits. Thus it is required for transmitting these fields
by using two bytes (high and low). The bit accessing and the form to
represent a bit depend on the used function.
The telegrams, both the request telegrams and the answer telegrams
cannot be longer than 128 bytes.
This function read the content of a digital output group of the PLC, which
11.1.3.1 Function 01 - Read
must be in numerical sequence. Please note that the output 1 must have
Coils the address 0, and so on up to output 6, which address is 5. This function
has the following structure for the read and response telegrams (the values
are always hexadecimal, and each field represents one byte):
Every answer bit is put in a position of the data bytes sent by the slave.
The first byte, bits 0 to 7, receives the first 8 bits by starting with the initial
address indicated by the master.
The other bytes (when the number of read bits is higher than 8) remains in
sequence. If the number of the read bits is not multiple of 8, the remaining
bits of the last byte must be filled out with 0 (zero).
Example: reading of the digital outputs, DO1 to DO6 at the address 1:
75
RTU - Modbus Protocol in the PLC1
11.1.3.2 Function 02 - Read This function reads the content of a digital input group of the PLC that
Inputs Status must be in a numerical sequence. Please note that the input 1 has the
address 0, and so on up to input 9 that must have address 8. This function
has following structure for the read and response telegrams (the values
are always hexadecimal values, and each field represents a byte):
Every answer bit is put in a position of the data bytes sent by the slave.
The first byte, bits 0 to 7, receives the first 8 bits by starting with the initial
address indicated by the master. The other bytes (when the number of
read bits is higher than 8) remains in sequence. If the number of the read
bits is not multiple of 8, the remaining bits of the last byte must be filled
out with 0 (zero).
Example: reading of the digital inputs, DI2 to DI7 at the address 1:
As in the example the number of the read bits is lower the 8, the slave
needed only 1 byte for the response. The value of the byte was 15 h,
where the binary has the form of 0001 0101. As the number of the read
bits is equal to 6, only the 6 least significant bits which have the values
of the digital inputs 2 to 7 are of interest, The other bits, as they did not
have been requested are filled out with 0 (zero).
76
RTU - Modbus Protocol in the PLC1
11.1.3.3 Function 03 - Read This function reads the content of a parameter group that must be in a
Holding Register e numerical sequence. This function has following structure for the read
and response telegrams (the values are always hexadecimal values, and
Function 04 - Read
each field represents a byte):
Input Register
Each register is formed by two (high e low). In our example we have P002
= 0384h, which in decimal is equal ton 900. As this parameter does not
have decimal point for the indication, the effective read value is 900 rpm.
Similarly the current value is P003 = 0035h, which is equal to 53 decimal.
As the current does not have decimal resolution , the read value will be
5,3 A.
11.1.3.4 Function 05 - Write This function is used to write a value to an only digital output. The output
value is represented by two bytes, where FF00h represents the bit equal
Single Coil to 1, and 0000h represents the equal to 0 (zero). Please note that the
output 1 has the address 0, and so on up to output 6, which address is 5.
This function has following structure (the values are always hexadecimal
values, and every field represents one byte):
77
RTU - Modbus Protocol in the PLC1
In this function, the slave response is copy identical to the request mad
by the master.
11.1.3.5 Function 06 - Write This function is used to write a value to an only parameter. This function
Single Register has the following structure (the values are always hexadecimal values,
and each field represents one byte):
Request (Master) Response (Slave)
Slave address Slave address
Function Function
Parameter address (byte high) Parameter address (byte high)
Parameter address (byte low) Parameter address (byte low)
Parameter value (byte high) Parameter value (byte high)
Parameter value (byte low) Parameter value (byte low)
CRC- CRC-
CRC+ CRC+
In this function, the slave response is again an identical copy of the maste4r
request. The parameters are addressed directly to its number, in the
example above P800 = 0320h.
11.1.3.6 Function 15 - Write This function allows writing values to a digital output group of the PLC.
This values must be in numerical sequence. This function can also be
Multiple Coils
used for writing to an only output (the values are always hexadecimal,
values and each field represents one byte).
78
RTU - Modbus Protocol in the PLC1
Every bit value that is being written is put in a position of the data bytes
sent by the slave. The first byte, bits 0 to 7, receives the first 8 bits by
starting with the initial address indicated by the master.
The other bytes (when the number of read bits is higher than 8) remains in
sequence. If the number of the written is higher than 8, remain in sequence.
If the number of the written bits is not multiple of 8, the remaining bits of
the last byte must be filled out with 0 (zero).
Example: connecting the digital outputs 4 and 5 to the PLC, in address 1:
As only two bits are being written, the master needed only 1 byte for the
data transfer. The transmitted values are in the least significant bits of the
byte that contains the values for the bits. The other bits of this byte have
the values 0 (zero).
11.1.3.7 Function 16 - Write This function allows writing values to a parameter group that must be in
numerical sequence. This function may be also used for writing one only
Multiple Registers parameter (the values are hexadecimal values an each field represents
one byte).
79
RTU - Modbus Protocol in the PLC1
As both parameters have a decimal resolution for writing 1.0 and 2.0
seconds, so must be transmitted the respective values 10 (000Ah) e 20
(0014h).
11.1.3.8 Function 43 - Read This auxiliary function allows reading of the product manufacturer, model,
Device Identification and firmware version. This function has following structure:
80
RTU - Modbus Protocol in the PLC1
81
RTU - Modbus Protocol in the PLC1
In this example, the object value has not been represented as hexadecimal
value, but it has been represented by using corresponding ASCII
characters. For instance, for the object 00, ‘WEG’ value, has been
transmitted by means of three ASCII characters, which in hexadecimal
values are 57h (W), 45h (E) and 47h (G).
Errors may occur during the telegram transmission through the network.
11.1.4 Comunnication Erros
These errors may also be already present in the received telegram
contents. Depending on the error type, the PLC may or not answer to the
Master. When the master sends a message to a board configured at
determined address, this board will not answer to the master when:
An Error occurs in the CRC.
When Time out between the transmitted bytes has been detected
(3.5X the time required for transmitting a 11 bit word).
If the reception has been successful during the telegram processing, the
PLC can still detect any problem and so send an error s=message,
indicating the detected problem:
Function is not valid (error code = 1): the requested function has not
bee implemented or the PLC.
Data address is not valid (error code = 2): the data address (parameter
or digital I/O) does not exist.
The data value is not valid (error code = 3): this error occurs in the
following situations:
Value is out of allowed range
Writing attempt in data that cannot be changed (read-only register,
register does not allow data changing with enabled inverter, or bits
in logic status).
Write has been made as function of the logic command function
that has not been enabled via serial.
Then the slave must return a message, indicating the occurred error type.
11.1.4.1 Error Messages Errors that occur during the message processing for the PLC, are errors
of non-valid function (Code 01), non-valid data address (Code 2) and no-
valid data value (Code 03). TThe messages sent by the slave have following
structure;
Response (Slave)
Slave Address
Function Code(with the most significant
bit set to 1)
Error Code
CRC-
CRC+
82