User Guide for Beijer ELECTRONICS models including: SER0015 X2 Control Communication, X2 Control Communication, SER0015 Communication, Communication, X2 Control, SER0015 X2

SER0015 – X2 control communication with BFI-P2/E3/H3 by Modbus RTU V1.02

SER0015 QS X2 BFI ModbusRTU V1.0.2-EN

BFI-E3-12-0043-1F12 - Beijer Electronics

Beijer Electronics SmartStore


File Info : application/pdf, 22 Pages, 1.00MB

PDF preview unavailable. Download the PDF instead.

SER0015 QS X2 BFI ModbusRTU V1.0.2-EN
Quick start guide
Modbus RTU communication to BFI
SER0015 ­ X2 control communication with BFI-P2/ E3/ H3 by Modbus RTU

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

1 Function and area of use
This document provides guidelines when working with X2/BoX2 control as Modbus RTU master in CODESYS or BCS Tools, communicating with Beijer Frequency Inverter, BFI-E3, BFI-P2 or BFI-H3.

· Note, it's not possible to run CANopen or any other bus at the same time as Modbus RTU. · Note, this project contains four BFI of any type.
2 About this document
This quick start document should not be considered as a complete manual. It is an aid to be able to start up a normal application quickly and easily.
Copyright © Beijer Electronics, 2022 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.

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: · BCS Tools 3.33 / CODESYS V3.5 SP13 Patch3 · iX Developer 2.40 SP5 / SP6 · BFI-Tools 2.8.0.0
Hardware: · X2 control (marine / extreme) or BoX2 pro SC / motion · BFI-P2 and BFI-H3 with at least firmware 2.40 · BFI-E3 with at least firmware 3.00
For further information refer to · BFI-E3 / BFI-P2 / BFI-H3 User Guides · BFI-P2 Start-Up Manual KI00306C · BFI-H3 Start-Up Manual KI00363D · 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 the address support.europe@beijerelectronics.com for feedback.

Normal.dotm, 2020-07-01

2 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

3 Table of Cont ents
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 RTU of X2 cont r ol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 IP addr ess set t ing of X2 cont r ol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Modbus RTU por t of BFI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 The pin conf igur at ion of t he RJ-45 in BFI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Dr awing CAB113. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6 Function Block X2_BFI_ModbusRTU. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7 Program example CODESYS, BCS Tools and iX Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Expl anat ion of t he CODESYS/ BCS Tool s pr oj ect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 How t o add an addit ional BFI in t he net wor k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 How t o r emove BFI in t he net wor k. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Enabl e/ Disabl e Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Modbus RTU set t i ng i n CODESYS/ BCS Tool s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 iX-pr oj ect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Par amet er set t ings f or Modbus RTU BFI-P2/ E3/ H3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Communi cat ion t imeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
8 Troubleshooting Communication problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
9 BFI-P2/ H3/ E3 Modbus Register Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 MODBUS RTU Pr ot ocol Specif icat ion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Modbus Tel egr am St r uct ur e: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Par amet er Access Over view BFI-P2, BFI-H3 and BFI-E3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10 About Beij er Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Cont act us . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Global offices and distributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Normal.dotm, 2020-07-01

3 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

4 System set up
Here comes a short description of what needs to be done and tools to be used to make X2 control work together with one or several BFI-P2/E3/H3 in a Modbus RTU network:

1. Set up of Station number address and communication speed in each BFI 2. Either set them up on the display of BFI, PC software BFI-Tools or a device with BFI-Tools
Mobile. See chapter 7.7 3. Set up other parameters in BFI-E3/P2/H3
Either set them up on the display of BFI-E3, PC software BFI-Tools or a device with BFI-Tools Mobile. See chapter 7.8 4. Software enable needs to be activated by a jumper between terminal 1 and 2 of BFI 5. If BFI-P2 or BFI-H3: STO inputs need to be properly connected. Either to a Safety system or jumpers between terminal 1 to 12 and terminal 9 to 13 of BFI- P2 and BFI-H3. 6. Set up the IP address of X2 control. See chapter 5.2 7. Connect the serial cable from X2 control, CAB113, to serial port of BFI 8. Termination of network CAB113 has built in 120-ohm termination resistor. Make sure that the slave in the other end of network has another 120-ohm resistance. For BFI, see chapter 5.3. 9. Download the PLC-project to X2 control. Adjust the device "X2 control" to fit the used hardware. Size and Powerfail or cyclic must be correct. Default is X2 control 4 Power Fail. Use BCS Tools or CODESYS for the PLC-project. 10. Download the iX-project to X2 control. Set up type of HMI in project/settings. Default is X2 control 4. Use iX Developer.
4 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

5 Hardware
The following chapter describes the Modbus RTU connections of X2 control and BFI-P2/E3/H3.

Modbus RTU of X2 control
The program example uses the RS485 port called COM2 on pin1 and pin6.

IP address setting of 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.
5 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

Modbus RTU port of BFI
Modbus RTU port in BFI depends on model. It has either one or two RJ45 connector with pin configuration as in figure below. All BFI IP66 has two RJ45 connectors for incoming and outgoing network cabling. All BFI IP20 and IP55 has one RJ45 for Modbus RTU connection.

Twin RJ-45 port of IP66
No spl it t er needed

Split t er
2 f emal e RJ45 f or bus and one mal e f or BFI IP20 and IP55

Cab 113 D-sub f or X2-
panel , RJ45 f or BFI

St andard CAT 6 pat ch cable

Bus t erminat ion
OPT-2-RJTRM-BFI, one per net work

Name

Item

Explanation

number

CAB113

660000290 3m cable with 9-pole D-sub and RJ-45 between X2 control, BFI-

P2/H3/E3 for Modbus RTU communication including 120-ohm

termination resistor.

Splitter:

63148 RS485 Serial communication Data Cable 2-port Splitter for BFI-P2,

OPT-2-J45SP-BFI

BFI-H3, BFI-E3 for Modbus RTU and CANopen.

Bus termination:

63202 RJ-45 with End termination, 120 ohms, RJ45 plug for CANopen and

OPT-2-RJTRM-BFI

Modbus RTU communication to BFI.

All BFI IP66 up to 22 kW has 2 serial ports in parallel which means that the splitter is not necessary.

The pin configuration of the RJ-45 in BFI

1: See manual for each BFI 2: See manual for each BFI 3: 0 Volt 4: Optibus / Remote keypad / PC Connection 5: Optibus / Remote keypad / PC Connection + 6: +24 Volt Remote keypad Power Supply 7: RS 485- Modbus RTU 8 : RS 485+ Modbus RTU Warning: This is not an Ethernet connection.

6 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3
Drawing CAB113

SER0015_V1. 0. 2 2022-01

3m cable with 9-pole D-sub and RJ-45 between X2 control, BFI-P2/H3/E3 for Modbus RTU communication including 120-ohm termination resistor.

Normal.dotm, 2020-07-01

7 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3
6 Function Block X2_BFI_ModbusRTU

SER0015_V1. 0. 2 2022-01

Information Library Versions of CODESYS
and BCS Tools
Function Block Functionality PLC Types Version

Description X2 BFI Modbus RTU CODESYS runtime 3.5.13.30.7 Compiler: 3.5.13.30 Device (Beijer X2 control x -xxxxx) 3.5.13.30 iX image 775 or later Modbus_Com: 3.5.11.20 Modbus Master: 3.5.13.10 Modbus_RTU_Slave: 3.5.10.30 Baud rate: 115,2 kbits/sec X2_BFI_ModbusRTU This function block is used to control and Read/Write Data with a BFI-E3/P2/H3 by Modbus RTU. X2 control (marine / extreme) or BoX2 pro (SC / motion) 1.0.2

Normal.dotm, 2020-07-01

Input_Output

Type

Function

io_Drive

strDRIVE_REF_BFI

Reference to variables connected to BFI by Modbus RTU.

io_BFI

IoDrvModbus.ModbusSla Connection to Modbus slave (Name of the Modbus Slave) veComPort_Diag

io_BEHMI strBFIDrvBEHMI

Reference to variables from/to HMI

8 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

Input i_EnableComm i_Start
i_FastStop
i_CoastingStop i_SetFrequency
i_AccDecTime
i_AnalogOutput1 i_Reset i_PrmReadExecute i_PrmWriteExecute i_PrmNumber Input_Output io_PrmValue
Output o_ComOk o_CommunicationState
o_BEHMIEnabled o_ReadyToRun o_SafetyOff o_Run o_Auto o_MotorCurrent o_OutputFrequency o_RunningHours o_Alarm o_AlarmCode o_PrmDone o_DriveInfo o_PrmError o_OtherError o_ErrorDescription o_CommErrorCounter

Type

Function

BOOL Activate the communication between BFI and CODESYS channels.

BOOL Start of Drive. 0=>Stop 1=>Running.

Direction decided by sign of Set frequency.

BOOL 1 => Fast stop of motor with ramp in P2-25 for BFI-P2/H3 and P-24 for BFI-E3.

BOOL 1=> Coasting stop of motor. No output frequency.

REAL Set frequency for motor, 50.0=50.0 Hz. Positive value => Rotation clockwise. Negative value=> Rotation counter clockwise.

REAL Used if P5-07=Disabled in BFI-P2/H3 or P-12=4 in BFI-E3. If so,

Acceleration and Deceleration time [0.1 sec].

INT Value 0-1000 sets Analog output to 0-10 VDC or 4-20 mA.

BOOL Reset an alarm or error message from BFI.

BOOL Read a value from a Parameter in BFI.

BOOL Write a value to a Parameter in BFI.

INT Specifies parameter number to be read or written.

Type Function

INT Value to be written to a parameter or read value from a parameter.

Type

Function

BOOL True=Communication up running without any errors.

UINT 0=Communication succeeded, 1-8=Command Error, 9-254=Some kind of Communication error, 255=Noting sent on bus

BOOL BeHMI override enabled.

BOOL BFI Ready to run. Power ON, Enabled, Safety ok.

BOOL Safe Torque off, False if STO wires is not connected. Not BFI-E3.

BOOL Start signal received by BFI.

BOOL Only for BFI-H3. 1=Auto, 0= Hand.

REAL Motor current / A.

REAL Output frequency / Hz.

INT Total Running Hours / Hours.

BOOL Alarm in inverter.

STRING Error code of the alarm, read automatically.

BOOL Read or Write of parameter has been done.

STRING Drive ID, Type, Voltage, Firmware version, serial number.

BOOL Parameter operation error or not allowed message was sent to BFI.

BOOL Summary error bit.

STRING Error and status description.

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.

Normal.dotm, 2020-07-01

9 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

7 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. 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 proj ect

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 Power fail 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 Modbus RTU. Contain everything necessary for Modbus RTU 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 (ModbusGenericSerialSlave I/O Mapping).
10 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-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_ ModbusRTU Containing Function blocks, one FB for each BFI.
7. Library Manager
One of the libraries is X2_BFI_Modbus RTU. Contains the FB to control BFI by Modbus RTU.
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 5 BFI constant should be 5.
· Enter GVL called gvlBFI. Adjust the global array variable gvlBFI.g_aDrive[]. Set the array to [1..Number of BFI in the network]. If 5 BFI constant should be 5.
· Enter GVL called gvlBFI . Adjust the global array variable gvlBFI.g_aDriveBEHMI[]. Set the array to [1..Number of BFI in the network]. If 5 BFI constant should be 5.
· Enter GVL called gvlBFI. If more than 8 BFI. Add variables for BFI9, Drive9 of type strDRIVE_REF_BFI. And for BFI10...
· Add BFI into Modbus RTU network - Chose Modbus_Master_COM_port (Modbus Master, COM PORT) - Right click and ADD Device - Chose Modbus RTU Slave - Rename it. If it is BFI number 5, refactoring it to BFI5. -
11 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

· Choose the new BFI - In Folder General, set Slave address of the BFI. Must correspond with setting in BFI. - In Folder General, keep Response Timeout(ms): 50 - In Folder Modbus Slave Channel, Copy all data from an existing BFI to new BFI. - In Folder MobusGenericSerialSlave I/OMapping, 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_ModbusRTU. 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[]. Set the array to [1..Number of BFI in the network].
· Enter GVL called gvlBFI . Adjust the global array variable gvlBFI.g_aDriveBEHMI[]. Set the array to [1..Number of BFI in the network].
· Remove not used BFI in Modbus_RTU_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. This can either be done in configuration or by a tag in the PLC-program. Go Offline, chose the Slave and then Disable Device. When to enable a device chose Enable Device instead.

Normal.dotm, 2020-07-01

It is also possible to control it in the plc-program by the red marked variable 12 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

Modbus RTU setting in CODESYS/ BCS Tools
The setting of Modbus RTU ports must also be done in CODESYS/BCS Tools, both for the Master and for all Slaves.

1. 2 is the name of the Modbus RTU port on Pin 1 and 6 of the Com port. 2. Baud rate [bits per second] for transmitting data on the bus.
Maximum working baud rate is decided by limitations of Modbus RTU Slaves, required bandwidth, network cable length and cross-area. Try to keep baud rate as low as possible to avoid communication interruption due to noise. 115200 is default in BFI. 3. Parity "NONE" is default in BFI. 4. Data Bits 8 is default in BFI. 5. Stop Bits 1 is default in BFI.
6: Transmission Mode Must be set to RTU. 7: Response Timeout The time from a message sent until a reply must have been received. 50 msec is a large value. 8: Time between Frames Time that master is quiet, time between one message arriving until next message being sent. 9: Auto-restart Communication The master is automatically trying to establish communication with a slave. If not used this must be done by plc-code.
13 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

The time how often the Modbus master is to access the slaves are controlled by setting of a Task in Task Configuration. In this case a task called "BusTask" has been created and control how often the Modbus master access the network.
10: Slave Addresses Slave Address of the BFI. Must correspond to the settings in BFI. 11: Response Timeout Response Timeout[ms] 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.
Communication with a slave is defined as channels. Each channel is defined as Read or Write, how to read or write, time interval, Modbus address and amount of data. Following data are used in this example:
14 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

Channel 0: Cyclic Read of Digital status, Error codes, Output frequency and Motor current. Channel 1: Cyclic Read of Total Running Hours once every minute. Channel 2: Write of Command bits Channel 3: Write of Frquency setpoint Channel 4: Write of Acceleration and Deceleration time Channel 5: Read of BFI data. Channel 6: Read of serial number every time communication is established. Channel 7: Write parameter number to access when required. Channel 8: Read Parameter value when required. Channel 9: Write parameter value when required. Channel 10: Write to Analog Output.

Data read from or written to a channel is copied to plc-variables in ModbusGenericSerialSlaveI/OMapping. Below is variables for BFI number1:

Digital control bits from BFI => Application.Drive1.PlcToFromDrv.iStatusWord.

Output frequency from BFI => Application.Drive1.PlcToFromDrv.iOutputFrequency

Motor current from BFI =>

Application.Drive1.PlcToFromDrv.iMotorCurrent.

Running Hours from BFI =>

Application.Drive1.PlcToFromDrv.iRunningHours

Digital control bits to BFI =>

Application.Drive1.PlcToFromDrv.iCommandWord

Set frequency to BFI=>

Application.Drive1.PlcToFromDrv.iSetFrequency

Acceleration and Dec.time to BFI =>Application.Drive1.PlcToFromDrv.iSetFrequency

Detailed Drive info from BFI => Application.Drive1.PlcToFromDrv.awDriveInfo

Serial number from BFI =>

Application.Drive1.PlcToFromDrv.awDriveSerialnumber

Parameter number to/from BFI => Application.Drive1.PlcToFromDrv.iPrmNumber

Read parameter value from BFI => Application.Drive1.PlcToFromDrv.iPrmValueRead

Parameter value to be written => Application.Drive1.PlcToFromDrv.iPrmValueWrite

Control of Analog Output =>

Application.Drive1.PlcToFromDrv.iAnalogOutput1

15 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

iX-proj ect
CODESYS/BCS Tools project, X2Control_BFI_Modbus RTU, 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 code 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-P2/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.
16 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

Parameter settings for Modbus RTU BFI-P2/ E3/ H3
Set following parameters in BFI-E3 - P12=3: Modbus RTU control with Acceleration in P-03 and Deceleration time in P-04. - P12=4: Modbus RTU control with Acceleration and Deceleration time sent by Modbus RTU. - P14=201 to make all parameters available. - P25=13 Analog Output of BFI-E3 controlled by bus. - P36 = Node ID number. Default=1. - P36 = 115,2 Kbits/sec. Setting depending of network size, network length and how slaves are to be connected/disconnected. Set following parameters in BFI-P2 and BFI-H3 - P1-12=4: Modbus RTU control. - P1-14=201 to make all parameters available. - P5-01=Node ID number. Default=1. - P5-02=115,2 Kbits/sec. Setting depending of network size, network length and how slaves are to be connected/disconnected. - P5-07: Disable=Acceleration and Deceleration time set in parameter P1-03 and P1-04 - P5-07: Enable= Acceleration and Deceleration time ramp sent by Modbus RTU. - P9-33=2 Analog Output1 on terminal 8 of BFI-P2/H3 will be controllable from PLC.

Communication timeout
The reaction when communication interruption between Modbus RTU master and BFI is set in parameters of BFI. Set following parameters in BFI-E3 Time until a reaction and how to react are to be set in P-36 0: No reaction and drive continue with latest speed t 30: Drive trips within 30 msec, t 100: Drive trips within 100 msec t 1000: Drive trips within 1 sec t 3000: Drive trips within 1 sec r 30: Coast to stop without trip within 30 msec, r 100: Coast to stop without trip within 100 msec r 1000: Coast to stop without trip within 1 sec, r 3000: Coast to stop without trip within 3 sec. Set following parameters in BFI-P2 and BFI-H3 - P5-05=Timeout until BFI trip due to lost communication. If 0 then no trip. - P5-06=Drive behaviour if communication is lost. 0: Alarm and trip 1: Ramp to stop and trip 2: Ramp to stop and no trip 3: Preset speed 8 (P2-08)

Normal.dotm, 2020-07-01

17 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3
8 Troubleshooting Communication problems
CODESYS/BCS Tools is the tool to check status of Modbus RTU communication.

SER0015_V1. 0. 2 2022-01

CODESYS in RUN with communication with Slaves

CODESYS is in STOP

Example of communication when no Slave is replying could look like:

Check following items if one or several slaves are not answering properly: Hardware
- If cable CAB113 is used, the setting in Modbus_COM(Modbus COM)/General COM Port must be set to 2.
- Check cabling of the network and splitters. - COM Port 2 of X2 control means RS-485 TX+/RX+ on Pin1 and RS-485 TX-/RX- - is Pin6. - Termination resistor applied correctly in both end of network? CAB 113 has termination built
in. And then another 120-ohm resistor needs to be applied. When all system is powered off the resistance between RS-485 TX+/RX+ on Pin1 and RS-485 TX-/RX- on Pin6 should be 60 ohms. If not check termination. - Power on to X2 Control?
18 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

- Power turned on to BFI? - If slaves are disconnected/reconnected randomly there might be an EMC-problem with noise.
Try to see if problems occur when a specific BFI is started or any other pattern.

Software or settings - Control of BFI by Modbus is set by P1-12=4 in BFI-P2/H3 and P-12=3 or 4 in BFI-E3 - Communication speed setting in each slave corresponding to Master setting in CODESYS, P36 in BFI-E3 or P5-03 in BFI-P2/H3? - No overlapping Station numbers, P-36 in BFI-E3 or P5-01 in BFI-P2/H3? - Station numbers of slaves corresponding with settings in CODESYS? - If using iX, make sure Com 2 setting is RS-485.

Power failure in BFI-P2 or BFI-E3 Power 1*230 or 3*400 VAC Turned off to BFI-P2 =>
- Communication is still working with BFI-P2 due to 24 VDC supply from network cables and the other BFI in network.
- Diagnostic Message in CODESYS "EMCY Code 3207, Register 05 - BFI is tripped showing Undervoltage alarm - Alarm can't be reseted, disappears when power Turned on again.
Power 1*230 or 3*400 VAC Turned off to BFI-E3 => - BFI-E3 turns black. - Module not found in CODESYS "Diag String "Polling for Object 0x1000
Communication is working but BFI-P2/E3 doesn't run the motor correct: - Inhibit in display? Safe Torque Off signals are missing to BFI-P2/H3, terminal 12 and 13. Terminal 12 must be connected to a 24 VDC and terminal 13 to 0 VDC. - BFI-H3, is the Drive in Auto Mode? If not push Auto on keypad. - Software enable on terminal 2 in place? Must be connected to 24 VDC. - BFI-P2/H3/E3 is powered up? - No alarm in BFI-P2/E3/H3? - Parameter P1-12 = 4 in BFI-P2/H3 and P-12=3 or 4 in BFI-E3? - Variable Ready to Run must be 1 to run the BFI-P2/E3/H3. Check o if not, Software Enable signal on terminal 2=24VDC? o if not, Safe Torque Off terminals are properly connected on BFI-P2/H3? o if not, 3x400 or 1x230 VAC connected to BFI? o BFI-H3, Drive in "Hand mode" - Stop in display? o Start signal by bus is missing. As soon as BFI receives a start signal a value between 0 and Maximum speed is displayed instead of Stop.
19 (22)

Normal.dotm, 2020-07-01

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3

SER0015_V1. 0. 2 2022-01

- H 0.0 in display? Start signal arrived but no speed setpoint o Speed sent to BFI-P2/E3/H3 must be a value between parameter value P1-01 and P102. o Speed into Function block is a REAL. Value 50.0 Hz means value 500 being sent to BFI-P2/E3 o Check that sent speed by bus corresponds with value in P0-07 in BFI-P2/H3 and P003 in BFI-E3. o Check parameter P0-52:2 (word2 of the 4 cyclic words) in BFI-P2 and BFI-H3. This is the speed value send in cyclic data word2. The value is Hexadecimal. Mean if 50.0 Hz is sent(Value 500) P0-52:2 should be 01F4 in Hexadecimal. Corresponding register in BFI-E3 is P0-22:2.

Normal.dotm, 2020-07-01

20 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3
9 BFI-P2/ H3/ E3 Modbus Regist er Mapping

SER0015_V1. 0. 2 2022-01

MODBUS RTU Protocol Specification
The following table highlights the specification for the Modbus RTU implementation in BFI-P2/E3/H3.

Protocol Error check Baud rate Data format
Physical signal

Modbus RTU CRC 9600bps, 19200bps, 38400bps, 57600bps, 115200bps (default) 1 start bit, 8 data bits, 1 stop bits, no parity. 1 start bit, 8 data bits, 2 stop bits, no parity. 1 start bit, 8 data bits, 1 stop bits, even parity. 1 start bit, 8 data bits, 1 stop bits, odd parity. RS 485 (3-wire)

Setting
Adjustable in Parameter P5-03 in BFIP2/H3 and P-36 in BFI-E3 Adjustable in Parameter P5-04 in BFIP2/H3 and but not in BFI-E3

Modbus Telegram Structure:
The following Modbus Commands are supported · 03 Read Holding Registers · 06 Write Single Holding Register · 16 Write Multiple Holding Register (only register 1-4)
The telegram structure is as follow

Command 03 ­ Read Holding Registers

Master Telegram

Length

Slave Address

1

Byte

Function Code (03) 1

Byte

1st Register Address 2

Bytes

No. Of Registers

2

Bytes

CRC Checksum

2

Bytes

Slave Response Slave Address Function Code (03) Byte Count 1st Register Value 2nd Register Value Etc... CRC Checksum

Length

1

Byte

1

Byte

1

Byte

2

Bytes

2

Bytes

2

Bytes

Command 06 ­ Write Single Holding Register

Master Telegram

Length

Slave Response

Slave Address

1

Byte

Slave Address

Function Code (06) 1

Byte

Function Code 06

Register Address

2

Bytes

Register Address

Value

2

Bytes

Register Value

CRC Checksum

2

Bytes

CRC Checksum

Length

1

Byte

1

Byte

2

Bytes

2

Bytes

2

Bytes

Parameter Access Overview BFI-P2, BFI-H3 and BFI-E3
Modbus addresses for control, parameters and Actual status is to be found in Application note or Manuals for BFI-H3, BFI-E3 and BFI-P2.

Normal.dotm, 2020-07-01

21 (22)

Modbus RTU communication to BFI-E3, BFI-P2 or BFI-H3
10 About Beij er Electronics

SER0015_V1. 0. 2 2022-01

Beijer Electronics is a multinational, cross-industry innovator that connects people and technologies to optimize processes for business-critical applications. Our offer includes operator communication, automation solutions, digitalization, display solutions and support. As experts in user-friendly software, hardware and services for the Industrial Internet of Things, we empower you to meet your challenges through leading-edge solutions. Beijer Electronics is a Beijer Group company.
Since its start-up in 1981, BEIJER GROUP has evolved into a multinational group with sales of 1.4 billion SEK 2020. BEIJER GROUP is listed on the NASDAQ Stockholm Main Market under the ticker BELE. www.beijergroup.com

China

Denmark

France

Germany

India

Norway

South Korea

Sweden HQ

Taiwan

Turkey

United Kingdom

USA

BeNeLux

Contact us
Global offices and distributors

Normal.dotm, 2020-07-01

22 (22)



References

Adobe PDF Library 11.0