BeiJer X2 base 7 User manual

Quick start guide
Modbus TCP communication between X2
control and BFI-E3
SER0020 –X2 control communication with BFI-E3 by Modbus TCP

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
2 (31)
Normal.dotm, 2020-07-01
1Function and area of use
This document provides guidelines when working with X2 control as Modbus TCP master in
CODESYS/ BCS Tools communicating with Beijer Frequency Inverter, BFI-E3 or gateway
OPT-2-ETHG-IN. Please note:
•It does not work towards BFI-H3 or BFI-P2 with Modbus TCP option boards.
•It is not possible to run Modbus RTU and Modbus TCP at the same time.
•This project contains three BFI-E3 with built-in Ethernet, Modbus TCP.
2About this document
This quick start document should not be considered as a complete manual. It is an aid to be able
to startup a normal application quickly and easily.
Use the following hardware, software, drivers and utilities in order to obtain a stable application:
In this document we have used following software and hardware
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
For further information refer to
•BFI-E3 User Guide
•BFI-E3 Start-Up Manual KI00369B
•Installation Manual X2 pro, X2 marine, X2 control
•Beijer Electronics knowledge database, HelpOnline
This document and other quick start documents can be obtained from our homepage. Please use
Copyright © Beijer Electronics, 2020
This documentation (below referred to as ‘the material’) is the property of Beijer Electronics. The holder or user has a
non-exclusive right to use the material. The holder is not allowed to distribute the material to anyone outside his/her
organization except in cases where the material is part of a system that is supplied by the holder to his/her customer.
The material may only be used with products or software supplied by Beijer Electronics. Beijer Electronics assumes no
responsibility for any defects in the material, or for any consequences that might arise from the use of the material. It is
the responsibility of the holder to ensure that any systems, for whatever applications, which is based on or includes the
material (whether in its entirety or in parts), meets the expected properties or functional requirements. Beijer Electronics
has no obligation to supply the holder with updated versions.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
3 (31)
Normal.dotm, 2020-07-01
3Table of Contents
1Function and area of use.........................................................................................2
2About this document..............................................................................................2
3Table of Contents..................................................................................................3
4System set up ......................................................................................................4
5Hardware............................................................................................................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
6Web server in BFI-E3..............................................................................................8
Module Configuration ......................................................................................8
Network Statistic ...........................................................................................8
Modbus Statistics ...........................................................................................9
How to change IP-address and Network mask ..........................................................9
7Connect BFI-Tools to BFI-E3 through Ethernet ............................................................ 10
Parameter settings for Modbus TCP in BFI-E3 ........................................................ 11
Ethernet Cyber Security control........................................................................ 11
8Function Block X2_BFI_E3_ModbusTCP ..................................................................... 12
9Program 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

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
4 (31)
Normal.dotm, 2020-07-01
4System 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:
1. Set up of IP-address of BFI-E3-……-MTP.
Use the Web browser in BFI-E3 and IP address 192.168.1.253. Make sure IP-address
corresponds with the BFI-E3 setting in CODESYS/BCS Tools. See chapter 6.4
2. Set up parameters in BFI-E3….-MTP
Either set them up on the display of BFI-E3, PC software BFI-Tools or a device with BFI-Tools
Mobile. See chapter 7.1
3. Software enable needs to be activated by a jumper between terminal 1 and 2 of BFI-E3
4. Set up the IP-address of X2 control. See chapter 8.1
5. Connect the patch cable from X2 control, port LAN B, to ethernet port P1 of BFI-E3
6. Download the PLC-project to X2 control. Use BCS Tools 3.30 or later or CODESYS V3.5
SP13 Patch3 for the PLC-project.
7. Download the iX-project to X2 control. Use iX Developer 2.40 SP5 or later.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
5 (31)
Normal.dotm, 2020-07-01
5Hardware
The following chapter describes the ethernet connections of X2 control and BFI-E3.
Modbus TCP port of X2 control
X2 control has 2 ethernet ports to be used for Modbus TCP, either LAN A or LAN B.
This program example is using LAN B for Modbus TCP communication.
IP-address setting in X2 control
The setting of the Ethernet ports in X2 control is being done on the X2 control itself.
Turn Power on and keep your finger attached to the screen. After a while follow the instructions as in the
picture below.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
6 (31)
Normal.dotm, 2020-07-01
Modbus TCP port of BFI-E3
BFI-E3 of all voltages and current ratings exists in two versions, one with and one without built-in Modbus
TCP. Modbus TCP is available in all BFI-E3 with the extension -MTP. For example:
Without Ethernet ports:
BFI-E3-12-0023-1F1A, Item number 63510
General Purpose Inverter 0,37kW, 2,3A, Input 1x230 V AC, Output 3x230 V AC, IP66, No Brake
transistor, EMC, Size 1
With Ethernet ports:
BFI-E3-12-0023-1F1A-MTP, Item number 63510-MTP
General Purpose Inverter 0,37kW, 2,3A, Input 1x230 V AC, Output 3x230 V AC, IP66, 2 Ethernet Modbus
TCP ports, No Brake transistor, EMC, Size 1
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.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
7 (31)
Normal.dotm, 2020-07-01
Indication of status on LED of BFI-E3
Example of LED indication of ethernet ports in BFI-E3.
Communication working Communication interruption
Network Status Indicator, NS
State
Indication
Steady Off
BFI is not powered up or no IP address
Flashing Green
Online, no Modbus TCP connections active
Steady Green
Online, Modbus TCP connections active
Flashing Red
Connection Timeout after working Modbus TCP connection
Steady Red
Duplicate IP address

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
8 (31)
Normal.dotm, 2020-07-01
6Web server in BFI-E3
Default IP-address of BFI-E3 is 192.168.1.253 and Subnet: 255.255.255.0
Enter IP-address in the web browser. Username is Admin and Password is the serial number of the BFI.
Module Configuration
•OPT-3-MTPIG-BFI is the name for the internal Modbus TCP board .
•The serial number is the identification for the complete BFI.
•Hardware version is 0419
•Latest available firmware in October 2020 is V101 R003 S0168
Network Statistic
•192.168.1.29 is the IP-address of the PC. Local port 80 with Socket type TCP is the web browser
connection with BFI.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
9 (31)
Normal.dotm, 2020-07-01
•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.
•192.168.1.40 is the IP-address of one X2-Control.
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.
How to change IP-address and Network mask
•Enter new IP-address and/or Network Mask
•Push on Apply New Values

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
10 (31)
Normal.dotm, 2020-07-01
7Connect BFI-Tools to BFI-E3 through Ethernet
BFI-Tools can only communicate with one BFI-E3 at a time. How to set up the communication is:
-Choose way of communication with BFI.
1. Chose Ethernet Module.
2. Set the Local PC IP-adress to 192.168.1.x were 0 < x < 250
3. Re-Scan Network to find BFI-E3s in the network or tap in the IP-adress manually
4. All BFI-E3 available in the Network will appear.
5. Chose which BFI-E3 to communicate with. Then push connect to start up communication.
And after connection BFI-Tools works in exactly the same way as when using other ways of communication.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
11 (31)
Normal.dotm, 2020-07-01
Parameter settings for Modbus TCP in BFI-E3
Set following parameters in BFI-E3-….-MTP
- P12=3. Modbus TCP control with Acceleration and Deceleration time in parameter P-03/ P-04.
- P12=4. Modbus TCP control with Acceleration and Deceleration time sent by Modbus TCP.
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
Ethernet Cyber Security control
There are two parameters, P-61 and P-62, intended for cyber security control. By combining these two
parameters it is possible to restrict access to the Webserver of the drive. But Modbus TCP is working
properly. These two parameters are available in BFI-E3 with firmware version 3.09 and later. It works
according to table below.
P-61 is Cyber Security Access. 0 = Disable, 1=Enable All service
P-62 is Cyber Security Reset Timeout. 0 = No Cyber security, 1-60 minute
Function
P-61
P-62
[minutes]
Explanation
No Cyber Security control
Any Value
0
Always access to the ethernet port of BFI
No Cyber Security control
0
1-60
Always access to the ethernet port of BFI
Enable all service
0
changed to
1
1-60
All services are enabled from P-61 is set to 1
until time in P-62 has elapsed. After that there is
no access to the Web browser and parameter P-
61 is turned back to zero

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
12 (31)
Normal.dotm, 2020-07-01
8Function Block X2_BFI_E3_ModbusTCP
Information
Description
Library
X2 BFI-E3 Modbus TCP
Versions in CODESYS
and BCS Tools
CODESYS runtime 3.5.13.30.7
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
Input_Output
Type
Function
io_Drive
strDRIVE_REF_BFI
Reference to variables connected to BFI by Modbus TCP.
io_BFI
ModbusTCPSlave
Connection to Modbus slave (Name of the Modbus Slave)
io_BEHMI
strBFIDrvBEHMI
Reference to variables from/to HMI

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
13 (31)
Normal.dotm, 2020-07-01
Input
Type
Function
i_Start
BOOL
Start of Drive. 0=>Stop 1=>Running.
Direction decided by sign of Set frequency.
i_FastStop
BOOL
1=>Fast stop of motor with ramp in P2-25 for BFI-P2/H3.
i_CoastingStop
BOOL
1=> Coasting stop of motor. No output frequency.
i_SetFrequency
REAL
Set frequency for motor, 50.0=50.0 Hz. Positive value => Rotation
clockwise. Negative value=> Rotation counter clockwise.
i_AccDecTime
REAL
Used if P-12=4. If so, Acceleration and Deceleration time [0.1 sec].
i_Reset
BOOL
Reset an alarm or error message from BFI.
i_PrmReadExecute
BOOL
Read a value from a Parameter in BFI.
i_PrmWriteExecute
BOOL
Write a value to a Parameter in BFI.
i_PrmNumber
INT
Specifies parameter number to be read or written.
Input_Output
Type
Function
io_PrmValue
INT
Value to be written to a parameter or read value from a parameter.
Output
Type
Function
o_ComOk
BOOL
Status of Communication.
o_CommunicationStat
e
UINT
Status of Communication
0= No Slave
1=TCP connect request
2=TCP connection established
3=TCP connection aborted
4=TCP Socket error.
o_BEHMIEnabled
BOOL
BeHMI override enabled.
o_ReadyToRun
BOOL
FI Ready to run. Power ON, Enabled, Safety ok.
o_SafetyOff
BOOL
Not available for BFI-E3
o_Run
BOOL
Start signal received by BFI.
o_Auto
BOOL
Not available for BFI-E3
o_MotorCurrent
REAL
Motor current / A.
o_OutputFrequency
REAL
Output frequency / Hz.
o_RunningHours
INT
Total Running Hours / Hours.
o_Alarm
BOOL
Alarm in inverter.
o_AlarmCode
STRIN
G
Error code of the alarm, read automatically.
o_PrmDone
BOOL
Read or Write of parameter has been done.
o_DriveInfo
STRIN
G
Drive ID, Type, Voltage, Firmware version, serial number.
o_PrmError
BOOL
Parameter operation error or not allowed message was sent to BFI.
o_ErrorDescription
STRIN
G
Error and status description.
o_CommErrorCounter
UDINT
Total number of errors or interruptions of communication messages
on the bus since PLC was put into Run. Can’t be reseted by user.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
14 (31)
Normal.dotm, 2020-07-01
9 Program example CODESYS, BCS Tools and iX Developer
BFI and X2 control Start Up project is a very powerful tool providing a project starting point way beyond what
would otherwise be possible. It is tested to a great extent and its use is strongly recommended.
The project contains one HMI-screen to handle the BFI, start/stop, read/write parameters, read type of BFI,
handling alarms. The purpose of the screen is to keep them for future use by technicians and/or maintenance
personnel. In addition, the project contains a CODESYS/BCS Tools PLC-program correctly configured for
use with BFI with a function block comprising all standard drive functionality.
Explanation of the CODESYS/BCS Tools project
1. Device (X2 control 4 –Powerfail)
The X2 control hardware must be defined in detail due to allocation of memory. In this case a 4 inch.
How to handle Retain data at Power interruption must also be chosen. Either cyclic storage or when
power interruption occurs. With limited Retain data Powerfail is a sufficient choice. Should be at least
version 3.5.13.30. This or later versions are to be downloaded on www.beijerelectronics.com.
2. Folder Beijer BFI-E3 Modbus TCP
Contain everything necessary for Modbus TCP control of BFI.
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).

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
15 (31)
Normal.dotm, 2020-07-01
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.
How to add an additional BFI in the network
•Enter GVL called gvlBFI_HMI. Adjust the global constant gvlBFI_HMI.gc_iNrOfDrive to
number of BFI. If 4 pieces of BFI-E3 constant should be 4.
•Enter GVL called gvlBFI. Adjust the global array variable gvlBFI.g_aDrive[]. Set the
array to [1..Number of BFI in the network]. If 4 pieces of BFI-E3 constant should be 4.
•Enter GVL called gvlBFI . Adjust the global array variable gvlBFI.g_aDriveBEHMI[]. Set
the array to [1..Number of BFI in the network]. If 4 pieces of BFI-E3 constant should be 4.
•Add another BFI into Modbus TCP network
-Chose Modbus_TCP_Master (Modbus TCP Master)
-Right click and ADD Device
-Chose Modbus TCP Slave
-Rename it. If it is BFI number 5, Refactoring it to BFI_5.
•Chose the new BFI
-In Folder General, set Slave IP-address of the new BFI

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
16 (31)
Normal.dotm, 2020-07-01
-In Folder General, keep Unit-ID: 1
-In Folder General, keep Response Timeout(ms): 1000
-In Folder General, keep Port: 502
-In Folder Modbus Slave Channel, Copy all data from an existing BFI to new BFI.
-In Folder MobusTCPSlave I/O Mapping, Copy all variable names from BFI_1, to
the new BFI. If the new BFI will be BFI5 then: Rename
Application.Drive1.PlcToFromDrv.iRunningHours, to
Application.Drive5.PlcToFromDrv.iRunningHours,
•Add FB for a new BFI in prgBFI_ModbusTCP. Copy network 1 and paste. If new BFI is
to be number 5 then:
-Change name fbControlBFI1 to fbControlBFI5
-Change name Drive1 to Drive5
-Change name BFI_1 to BFI_5
-Change name for all [1] to [5] for all other variables in the network
How to remove BFI in the network
•Enter GVL called gvlBFI_HMI. Adjust the global constant gvlBFI_HMI.gc_iNrOfDrive to
number of BFI.
•Enter GVL called gvlBFI. Adjust the global array variable gvlBFI.g_aDrive[] to
[1..Number of BFI in the network].
•Enter GVL called gvlBFI . Adjust the global array variable gvlBFI.g_aDriveBEHMI[] to
[1..Number of BFI in the network].
•Remove not used BFI in Modbus_TCP_Master
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.

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
17 (31)
Normal.dotm, 2020-07-01
Ethernet setting in CODESYS/BCS Tools
The setting of ethernet ports must also be done in CODESYS/BCS Tools, both for the master and for all
slaves.
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.
Picture showing IP-address settings in X2 control duting start up

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
18 (31)
Normal.dotm, 2020-07-01
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.
8: Port number (TCP/IP) of the slave 502 is default for Modbus

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
19 (31)
Normal.dotm, 2020-07-01
9: Cyclic Read and Write of 4 words.
10: Cyclic Read of total running hours.
11: Read of Drive info every time communication is established.
12: Read of serial number every time communication is established.
13: Write parameter number to access when required.
14: Read Parameter value when required.
15: Write parameter value when required.
16: Digital control bits from BFI.
17: Output frequency from BFI.
20: Digital control bits to BFI.
21: Set frequency to BFI.
24: Running Hours
25: Detailed Drive info
26: Serial number
27: Parameter number
28: Read parameter value
29: Parameter value to be written

X2 Control communication with BFI-E3 by Modbus TCP
SER0020_V1.0.0 2020-11
20 (31)
Normal.dotm, 2020-07-01
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
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.
Other manuals for X2 base 7
1
Table of contents