Professional Documents
Culture Documents
Use the following hardware, software, drivers and utilities in order to obtain a stable application:
Software:
• CODESYS V3.5 SP13 Patch3
• BCS Tools 3.30
• iX Developer 2.40 SP5
• BFI-Tools 2.7.0.0
• Web Browser Chrome
Hardware:
• X2 control or BoX2 pro SC or X2 marine SC or X2 extreme SC
• BFI-E3-……….-MTP (MTP means built-in Modbus TCP), Firmware 3.09
This document and other quick start documents can be obtained from our homepage. Please use
the address support.europe@beijerelectronics.com for feedback.
Normal.dotm, 2020-07-01
2 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
3 Table of Contents
1 Function and area of use .........................................................................................2
2 About this document ..............................................................................................2
3 Table of Contents ..................................................................................................3
4 System set up ......................................................................................................4
5 Hardware ............................................................................................................5
Modbus TCP port of X2 control ........................................................................... 5
IP-address setting in X2 control .......................................................................... 5
Modbus TCP port of BFI-E3 ................................................................................ 6
Indication of status on LED of BFI-E3 .................................................................... 7
6 Web server in BFI-E3 ..............................................................................................8
Module Configuration ...................................................................................... 8
Network Statistic ........................................................................................... 8
Modbus Statistics ........................................................................................... 9
How to change IP-address and Network mask .......................................................... 9
7 Connect BFI-Tools to BFI-E3 through Ethernet ............................................................ 10
Parameter settings for Modbus TCP in BFI-E3 ........................................................ 11
Ethernet Cyber Security control ........................................................................ 11
8 Function Block X2_BFI_E3_ModbusTCP ..................................................................... 12
9 Program example CODESYS, BCS Tools and iX Developer ................................................ 14
Explanation of the CODESYS/BCS Tools project ...................................................... 14
Enable/Disable Devices .................................................................................. 16
Ethernet setting in CODESYS/BCS Tools ............................................................... 17
iX-project .................................................................................................. 20
10 Troubleshooting Communication problems ................................................................. 21
11 Modbus Register Mapping BFI-E3 ............................................................................. 23
Table 1: Control and status registers .................................................................. 23
Write registers ............................................................................................ 24
Read registers ............................................................................................. 25
Parameters ................................................................................................ 26
Modbus Exception Response Telegrams ............................................................... 29
Register Changes for Single Phase Output Drives .................................................... 30
12 About Beijer Electronics ....................................................................................... 31
Contact us ................................................................................................. 31
Global offices and distributors ........................................................................................... 31
Normal.dotm, 2020-07-01
3 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
4 System set up
Here comes a short description of what needs to be done and what tools are to be used to make X2
control work together with one or several BFI-E3-…..-MTP in a Modbus TCP network:
4 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
5 Hardware
The following chapter describes the ethernet connections of X2 control and BFI-E3.
5 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
The 2 Ethernet ports are marked P1 and P2 and have the same IP-address.
The 2 ports on the left side marked D1 and D2 are serial ports not intended for Ethernet. Faulty connection
of cables might cause damage to either BFI-E3 or other equipment.
Normal.dotm, 2020-07-01
6 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
7 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Module Configuration
Network Statistic
• 192.168.1.29 is the IP-address of the PC. Local port 80 with Socket type TCP is the web browser
Normal.dotm, 2020-07-01
8 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
• 192.168.1.29 is the IP-address of the PC. Local port 47850 with Socket type TCP is PC-program BFI-
Tools running on the PC.
Modbus Statistics
Correct working communication without any fault should look like below. Counter of Transmitted,
Received and Successful Transmissions are calculating upwards Error counters stays at 0.
9 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
And after connection BFI-Tools works in exactly the same way as when using other ways of communication.
Normal.dotm, 2020-07-01
10 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Adjust if necessary
- P14=201 to make all parameters available.
- P36 = Station number must be 1.
- P36 = Communication speed must be 115,2 Kbits/sec.
- P36 = Timeout.
t => BFI will trip when no communication
r => BFI will coast to stop
Function can either be disabled by setting 0 second or set to 30, 100, 1000 or 3000 milliseconds
11 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Information Description
Library X2 BFI-E3 Modbus TCP
Versions in CODESYS CODESYS runtime 3.5.13.30.7
and BCS Tools Compiler: 3.5.13.30
Device (Beijer X2 control) 3.5.13.30
iX image 775 or later
Ethernet: 3.5.13.0
Modbus_TCP_Master: 3.5.13.0
Modbus_TCP_Slave: 3.5.12.0
Function Block X2_BFI_E3_ModbusTCP
Functionality This function block is used to control and Read/Write Data
with a BFI-E3..-MTP by Modbus TCP
PLC Types X2 control or BoX2 pro SC or X2 marine SC or X2 extreme SC
Version 1.0.0
12 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
13 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
3. gvlBFI
Contain Structs for Variables connected on pins to/from FB, Variables to/from iX used inside FB and
Variables connecting each BFI with corresponding input/output data (ModbusTCPSlave I/O
Mapping).
Normal.dotm, 2020-07-01
14 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
4. gvlBFI_HMI
Contain variables to be used together with HMI. Important are the constant describing number of BFI
in network and Structure containing variables copied to/from HMI.
5. prgBeijerMain_BFI
Contain code for exchanging data between HMI and CODESYS/BCS Tools.
6. prgBFI_ModbusTCP
Containing Function blocks, one FB for each BFI.
7. Library Manager
One of the libraries is X2 control BFI Modbus TCP. Contains the FB to control BFI by Modbus TCP.
The FB is compiled and by that not possible to open up. Requires one FB per BFI.
8. BFI slaves
BFI slaves in the network. Important that each physical BFI has an individual IP-address in
CODESYS/BCS Tools corresponds with the setting in each BFI.
15 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Enable/Disable Devices
If a BFI is not to be used in the network during commissioning or other reasons it can be excluded, and
communication shut off. Go Offline, chose the slave and then Disable Device.
When to enable a device chose Enable Device instead.
Normal.dotm, 2020-07-01
16 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
1. Setting of Interface, LAN port A or B for Modbus TCP communication. If LAN B is used for
Modbus TCP either of the settings above can be used. Upper example with Adjust Operating
System Settings activated the X2 control detects automatically LAN B as Modbus TCP port. In
the other example LAN B is defined as Ethernet post and corresponding with setting in the HMI.
2. IP address of the Ethernet port. This IP address must be the same as, in this case LAN B, of the
X2 control.
17 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
3: Response Timeout
The response timeout sets the time interval that the master will wait for the answer from a slave node. If
the nodes do not answer within this time interval, then an error is recorded for the implicit slave function
block. The value entered for the time interval is also the default value for each node. For each node, you
can still set a specific value within its Modbus TCP slave configuration.
4: Socket Timeout
Maximum time to wait for incoming TCP/IP packages. The bus cycle task can be blocked during this
time, for example if a Modbus TCP slave is disconnected.
5: Auto-reconnect
When a slave is missing in the network the master tries to automatically reconnect.
6: IP Address of the BFI. Must correspond to the settings in the option module inside BFI set by software
IP Config.
7: Time interval for the master to wait for the response from the slave. This is especially configured for
this slave node and overwrites the general response timeout setting of the respective master.
18 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
19 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
iX-project
CODESYS/BCS Tools project, X2 control BFI-E3 Modbus TCP, has a corresponding iX project. The
project contains one Start_Screen and one BFI_Control Screen. Explanation of project:
1. Choose which BFI to be monitored. Either tap in the figure or use Increase/Decrease buttons
2. BFI data
a. Type of BFI
b. Input voltage and number of phases
c. Power
d. Physical size
e. Firmware version
f. Serial number
3. Description of Communication error or User error
4. Actual status of BFI
a. Ready to Run or not
b. Safety Status (STO) in BFI-H3 and BFI-P2
c. Total Running Hours
d. Motor in Run or Stop
e. Motor current
f. Output frequency
g. If Alarm in BFI it is shown
h. Explanation of what the alarm means
5. Take control of the BFI from this menu. PLC-program is neglected.
6. Start/stop- Coast- and Fast stop buttons
7. Frequency Setpoint
8. Acceleration/Deceleration Time to be used if P-12=4 in BFI-E3
9. Parameter handling
a. Parameter number to be either tapped in or Increase/Decrease buttons
b. Name/Explanation of parameter is shown
c. Read Parameter value or to be written
d. Button Read Parameter
e. Button Write Parameter
f. Status whether Read/Write of parameter Succeeded or not
Normal.dotm, 2020-07-01
It is possible to have a Sheet containing Data from several BFI. But this needs to be configured in Symbol
Manager of CODESYS/BCS Tools and then imported to iX Developer.
20 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Example of communication when for instance slave BFI_3 is not replying correct could look like:
Software or settings
- IP-address correct set in BFI-E3…-MTP and corresponding with CODESYS?
- P-12 set to 3 or 4 in BFI-E3…-MTP?
- P-36 not changed? Station number must be 1 and communication speed 115,2 bit/sec
- Setting of Modbus TCP Master and BFI according to chapter 9?
- No overlapping IP-addresses?
- LAN A or LAN B correct configured in X2Control?
- Possible to ping the BFI-E3…-MTP from PC
Normal.dotm, 2020-07-01
21 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
22 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
23 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Write registers
Write Register 1: Digital Control bits
Drive command
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
High byte Low byte
Bit 0: Run/Stop command: Set to 1 to enable the drive. Set to 0 to stop the drive.
Bit 1: Fast stop request. Set to 1 to enable drive to stop with 2nd deceleration ramp.
Bit 2: Reset request. Set to 1 in order to reset the drive if drive is under trip condition.
User must clear this bit when drive is under normal condition to prevent un-expected reset.
Bit 3: Coast stop request. Set to 1 to issue a coast stop command.
For normal operation, Bit 3 has the highest priority, bit 0 has the lowest priority (bit 3>bit 1>bit 0). For
example, if user set command as 0x0009, drive will do a coast stop rather than run. For normal run/start,
just set this register to 1.
Note that stat/stop(bit 0), fast stop(bit 1) and coast stop(bit 3) only works if P-31= 0 or 1. Otherwise,
start/stop function is controlled by drive control terminals. Reset function(bit 2) works all the time as long
as drive is operated under Modbus control mode (P-12=3 or 4).
24 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Read registers
Read Register 6: Drive status and error code
High byte gives drive error code. (Valid when the drive is tripped, see Appendix E – Drive Fault Code and
Information for further details). Low byte gives drive status information as follows :-
Bit 0: 0 =Drive Stopped, 1 = Drive Running
Bit 1: 0 = OK, 1 = Drive Tripped
Bit 5: 0 = OK, 1 = In Standby Mode
Bit 6: 0 = Not Ready, 1 = Drive Ready to Run (not tripped, hardware enabled and no mains loss condition)
returned.
25 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Parameters
Parameter Registers and Scaling
All user adjustable parameters within the drive are accessible by Modbus and can be Read or Written to. For
further information regarding the parameter functions and specific settings, please refer to the User Guide.
Para-
Register Description Format Min Max Data format
meter
129 01 Max speed limit U16 0 5*P-09 Internal value (3000 = 50.0Hz)
130 02 Min speed limit U16 0 P-01 Internal value (3000 = 50.0Hz)
131 03 Accel ramp time U16 0 60000 2dp, e.g. 300=3.00s
132 04 Decel ramp time U16 0 60000 2dp, e.g. 300=3.00s
0: Ramp to stop + Main Loss Ride Through
1: Coast to stop
133 05 Stop mode select U16 0 3
2: Ramp to stop + Fast Stop
3 : AC Flux Braking + Fast Stop
0: Disabled
134 06 Energy save U16 0 1
1: Enabled
135 07 Motor rated voltage U16 0 250 or 500 400 = 400 Volts
Drive
136 08 Motor rated current U16 0 1dp, e.g. 100 = 10.0A
Dependent
Motor rated
137 09 U16 25 500 Data unit is in Hz
frequency
Maximum value equals to the sync speed of
138 10 Motor rated speed U16 0 30000
a typical 2-pole motor
Drive
139 11 Boost voltage value U16 0 1dp, e.g. 100 = 10.0%
Dependent
0: Terminal Control
1: Keypad forward only
2: Keypad forward and reverse
3: Modbus control mode
4: Modbus control with ramp control
140 12 Control mode U16 0 9
5 : PID control
6 : PID control with analog speed sum
7 : CAN Open
8 : CAN Open + Ramp Control
9 : Slave Mode
0 : Industrial Mode
141 13 Application Mode U16 0 2 1 : Pump Mode
2 : Fan Mode
142 14 Access code U16 0 9999 No Scaling
143 15 Digital input function U16 0 17 See user guide for function details
0: 0…10V 1: b 0…10V
2: 0…20mA 3: t 4…20mA
144 16 Analog input format U16 0 7
4: r 4…20mA 5: t 20…4mA
6: r 20…4mA 7 : 10…0V
0 = 4kHz 1 = 8kHz
Effective switching
145 17 U16 0 Drive 2 = 12kHz 3 =16kHz
frequency
Dependent 4 = 24kHz 5 = 32kHz
Relay output
146 18 U16 0 9 See user guide for function details
function
147 19 Digital output limit U16 0 1000 100 = 10.0%
148 20 Preset speed 1 U16 -P-01 P-01 Internal value (3000 = 50.0Hz)
149 21 Preset speed 2 U16 -P-01 P-01 Internal value (3000 = 50.0Hz)
150 22 Preset speed 3 U16 -P-01 P-01 Internal value (3000 = 50.0Hz)
151 23 Preset speed 4 U16 -P-01 P-01 Internal value (3000 = 50.0Hz)
Normal.dotm, 2020-07-01
2nd deceleration
152 24 U16 0 2500 250 = 2.50s
ramp
26 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Para-
Register Description Format Min Max Data format
meter
Analog output
153 25 U16 0 10 See user guide for function details
function
154 26 Skip frequency U16 0 P-01 Internal value (3000 = 50.0Hz)
155 27 Skip freq band U16 0 P-01 Internal value (3000 = 50.0Hz)
156 28 V/F adjust voltage U16 0 P-07 100 = 100V
157 29 V/F adjust frequency U16 0 P-09 50 = 50Hz
0: Edgr-r 1: Auto_0
158 30 Start mode select U16 0 6
2…6: Auto_1 to Auto_5
159 31 Keypad restart mode U16 0 7 See user guide for details
160 32 DC injection enable U16 See Below
161 33 Spin start enable U16 0 2 See user guide for function details
162 34 Brake circuit enable U16 0 4 See user guide for function details
163 35 Analog input scaling U16 0 20000 1000 = 100%
Communication
164 36 WORD See Below
Settings
Access code
165 37 U16 0 9999
definition
166 38 Parameter lock U16 0 1 0: Unlock or 1: Locked
167 39 Analog input offset U16 -5000 5000 1dp, e.g. 300=30.0%
Display scaling
168 40 U16 See Below
factor
169 41 User PI P gain U16 1 300 1dp, e.g. 10 = 1.0
User PI I time
170 42 U16 0 300 1dp, e.g. 10 = 1.0s
constant
171 43 User PI mode select U16 0 1 See user guide for more information
User PI reference
172 44 U16 0 1 See user guide for more information
select
User PI digital
173 45 U16 0 1000 1dp, e.g. 100 =10.0%
reference
User PI feedback
174 46 U16 0 3 See user guide for more information
select
0: 0...10V 1: 0…20mA
2: t 4...20mA 3: r 4...20mA
175 47 2nd an input format U16 0 6
4: t 20...4mA 5: r 20...4mA
6: Ptc-th
176 48 Standby Mode Timer U16 0 250 1dp, e.g. 250 = 25.0s
PI Wake Up Error
177 49 U16 0 1000 1dp, e.g. 50 = 5.0%
Level
User Relay Output
178 50 U16 0 1000 1dp e.g. 100 = 10.0%
Hysteresis
0 : IM Vector 1 : V/F
2 : PM Motor 3 : BLDC
179 51 Motor Control Mode U16 0 4 Motor
4 : SynRM Motor 5 : LSPM
Motor
Motor Parameter
180 52 U16 0 1
Autotune
181 53 Vector Mode Gain U16 0 2000 1dp, e.g. 500 = 50.0%
Maximum Current
182 54 U16 0 1750 1dp, e.g. 1000 = 100.0%
Limit
Motor Stator
183 55 U16 0 65535 2dp, e.g. 100 = 1.00 ohm
Resistance
Motor Stator d-axis 1dp, e.g. 1000 = 100.0mH
184 56 U16 0 65535
Inductance (Lsd)
Normal.dotm, 2020-07-01
27 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Para-
Register Description Format Min Max Data format
meter
187 59 DC Injection Current U16 0 1000 1dp, e.g. 100 = 10.0%
Thermal Overload
188 60 U16 0 1
Retention
Additional Information
Register 160 which is Parameter P-32: DC Injection Configuration
The parameter value is stored as a combined 16-bit word which is constructed as follows:
28 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
Dataflow example:
Read data from register 6
Request:[01] [03] [00] [05] [00] [01] [94] [0B]
(Drive Addr) (Command) (Reg start addr) (No. of Registers) (Checksum)
Write start command to the register 1 (suppose P-12 = 3, P-15 =0 and digital input 1 is closed):
Request: [01] [06] [00] [00] [00] [01] [48] [0A]
(Drive Addr) (Command) (Reg addr) (Data value) (Checksum)
Reply can be error message depending on drive parameter settings and digital input status.
Normal.dotm, 2020-07-01
29 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
30 (31)
X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
GERMANY USA
Nürtingen Salt Lake City
Contact us
Global offices and distributors
Normal.dotm, 2020-07-01
31 (31)