GW PL FF/MODBUS Configuration
Using NI Configurator with GW PL FF/MODBUS
Quick Reference Guide
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx
© PHOENIX CONTACT 2020-11-19
Pos. Qty. Order-No. Type-Description Description
01 1 2316363 GW PL FF/MODBUS MODBUS/RTU to FOUNDATION Fieldbus protocol
converter
02 NI USB-8486 & NI-FBUS The USB‑8486 is a FOUNDATION fieldbus device for
Configurator/Monitor developing applications with the NI‑FBUS driver, NI‑FBUS
Configurator, and NI‑FBUS Monitor.
1 Overview
This document describes the configuration of the GW PL FF/MODBUS device, using the NI Configurator tool.
This document shows the steps necessary to configure the GW PL/FF/MODBUS as a FF device. In general, NI Configurator is a tool
for developing FF products, and not used in a typical DCS application, however the process is similar for all FF Host configuration
tools. Refer to Figure 1: System overview for an example configuration.
Figure 1: System overview
Make sure you always use the latest documentation.
It can be downloaded at: www.phoenixcontact.net/products
GW PL FF/MODBUS Configuration
2 Hardware and Physical Setup
The GW PL FF/MODBUS converter is a FF device commissioned like similar FF devices.
Note: Do not use the DIP switches on the device, as seen in callout number 8 of Figure 2: GW PL FF/MODBUS hardware.
Figure 2: GW PL FF/MODBUS hardware
3 Download and Install Necessary Files
The DD file used for configuring the gateway in the H1 Host system is the only necessary file for installation. The DD file is on the
Phoenix Contact Downloads page for the GW PL FF/MODBUS. Refer to Figure 3: DD File Download.
Figure 3: DD File Download
3.1 Import DD File into NI Configurator
Insert the NI USB-8486 device and ensure successful installation of the USB drivers. Refer to Figure 4: Successful driver installation.
Figure 4: Successful driver installation
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 2
GW PL FF/MODBUS Configuration
Navigate to the “Device Manager” to confirm the installation of the National Instruments Fieldbus Interfaces driver. Refer to Figure
5: Device Manager confirmation.
Figure 5: Device Manager confirmation
Next, navigate to the “NI-FBUS Interface Configuration Utility” and select the USB board. Then select “Import DD/CFF” to import
the corresponding DD file downloaded from the Phoenix Contact website. Refer to Figure 6: Import DD file.
Figure 6: Import DD file
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 3
GW PL FF/MODBUS Configuration
In the “Import DD/CFF” pop-up window, click “Browse” and choose the DD file from the appropriate saved location. Refer to Figure
7: Browse for DD file.
Figure 7: Browse for DD file
Next, run the “NI-FBUS Communications Manager”. Open the “NI-FBUS Configurator” after the NI-FBUS Communications Manager
shows that the USB interface initialization was successful. Refer to Figure 8: Run NI-FBUS Communications Manager.
Figure 8: Run NI-FBUS Communications Manager
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 4
GW PL FF/MODBUS Configuration
4 GW PL FF/MODBUS Configuration
Select the active interface associated with the NI USB-8486 and select “OK”. This will automatically load and commission all FF
devices connected to the USB interface device. Refer to Figure 9: Active interface.
Figure 9: Active interface
In this guide, both the GW PL FF/MODBUS device and a PR Electronics 5350 device connect to the NI USB-8486. Refer to Figure 10:
Connected devices.
Figure 10: Connected devices
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 5
GW PL FF/MODBUS Configuration
4.1 NI Configurator- How to Configure Parameters
To change the configuration of the GW PL FF/MODBUS converter using NI Configurator, consider the following steps to send down
parameters:
1. Set the block in question to OSS (Out of Service)
2. Make changes to the parameter values
3. Select Write Changes
4. Set the block in question to Auto
4.2 Resource Block Configuration
The Resource Block of the gateway is primarily to read the identification parameters and diagnostics in the GW PL FF/MODBUS. The
most important feature to note in the Resource Block is the MODE_BLK, or the mode of the Resource Block. The Mode options are
Auto and OSS. To set the Resource Block in OSS or Auto mode, select OSS or Auto respectively. Refer to Figure 11: Resource block
configuration.
Auto is for normal operation of the device, after configuration is complete. OSS is for configuring and making changes to the
gateway. These terms also apply to the Transducer and Analog Input Blocks.
Note: OSS mode is mandatory to make changes to the GW PL FF/MODBUS
Note: Setting the Resource Block in OSS will set the Transducer and all Analog Input Blocks into OSS as well.
Figure 11: Resource block configuration
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 6
GW PL FF/MODBUS Configuration
4.3 Transducer Block Configuration
The Transducer Block contains the configuration settings for Modbus RTU in the GW PL FF/MODBUS. Navigate to “Others” to find
the available Modbus configuration. Refer to Figure 12: Transducer block configuration.
Figure 12: Transducer block configuration
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 7
GW PL FF/MODBUS Configuration
4.4 Modbus Communication (MODBUS_COM_SETUP)
Configure the GW PL FF/MODBUS to communicate properly with Modbus RTU devices. The transmission mode and serial
parameters must be the same for all devices connected to a MODBUS RTU network. Refer to Figure 13: Modbus communication.
Note: The Transducer Block must be in OSS mode to make any changes.
Figure 13: Modbus communication
A Poll is a request for data issued by the gateway. Configure the Poll settings under the “Others” tab. Each of the four channels can
issue 2 polls, but it is not necessary to use all four channels.
The two channel parameters that can affect a poll are PV and Status Register. There can be up to six Polls per Poll cycle (4 channels
x 2 polls). Any unused poll parameters or channels should be set to disabled by writing a value of 65535 to the respective
…REG_ADDRESS. This removes them from the poll cycle to avoid conflicts.
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 8
GW PL FF/MODBUS Configuration
Refer to Table 1: MODBUS Configuration Fields, to see the fields to edit within MODBUS_COM_SETUP…
Table 1: MODBUS Configuration Fields
Parameter Value
BAUDRATE The rate at which information is transferred on the MODBUS network. This value must match
the baud rate of the MODBUS slave devices that are connected to a GW.
POLLING_TIME The total amount of time (in milliseconds) that one cycle should take.
MEASURED_POLLING_TIME The actual total amount of time (in milliseconds) that one cycle takes, give the active
configuration.
STOP_BITS Indicates the end of a frame. The Stop Bits parameter of a GW should be the same as the other
MODBUS devices that are connected.
DV_TIMEOUT How long (in milliseconds) a GW will wait after sending a MODBUS read request for Dynamic
variables without receiving a valid response, before moving on in the cycle sequence.
SETUP_TIMEOUT How long (in milliseconds) a GW will wait after sending a MODBUS write request for setup data
without receiving a valid response, before moving on in the cycle sequence.
PARITY Used for simple error checking, and can be configured to Even, Odd, or None. The parity bit in a
MODBUS frame ensures that the total number of bits in a frame is even or odd. If None is
chosen, the GW will not check parity. Parity must be the same for all devices connected to the
MODBUS network.
CRC_ORDER Two bytes added to the end of every MODBUS frame for error detection. CRC Byte Order tells
the GW from which end of the MODBUS message CRC should be calculated from. CRC Byte
Order must be the same for all devices connected to the MODBUS network.
MIN_INT_PDU_DELAY The amount of time (in milliseconds) that a GW will wait between the previous read request
and the next read request in the cycle.
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 9
GW PL FF/MODBUS Configuration
4.5 Channel Setup (MODBUS_REG_SETUP_1-4)
The GW PL FF/MODBUS allows the user to connect to up to 4 channels in the gateway. Each channel can poll a Modbus PV cyclically
and read/mask Modbus status registers. The channels also allow the customer to acyclically read and write to Modbus RTU
registers for setup and configuration.
The GW PL FF/MODBUS can handle a maximum of 4 different MODBUS RTU devices; 1 device per channel. Instead of connecting 4
different devices, 1, 2, or 3 Modbus RTU devices can utilize more than 1 channel per Modbus RTU device. For example, 1 Modbus
RTU device can connect to up 4 channels on the gateway, utilizing more than just 1 channel on the gateway per Modbus RTU
device.
To modify the parameters of a channel, the Transducer Block must be Out of Service. Changing the mode of one channel does not
affect the mode of the GW or the other channels. Refer to Figure 14: Modbus register setup.
Figure 14: Modbus register setup
Refer to Table 2: Modbus register configuration fields for an explanation of each field.
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 10
GW PL FF/MODBUS Configuration
Table 2: Modbus register configuration fields
Parameter Value
MODBUS_ADDRESS MODBUS ID of the MODBUS slave device.
PV_REG_ADDRESS The address of the first register at which the desired data is located. This value is an
offset within the MODBUS register block. For FC3 the first holding register is located
at address 40001 so the actual MODBUS register address accessed is 40001 + PV
MODBUS Register. For FC4 the first input register is located at address 30001 so the
actual MODBUS register address accessed is 30001 + PV MODBUS Register.
Used to choose where to read PV data from. FC3 reads data from the MODBUS
PV_REG_FUNCTION_CODE
holding registers and FC4 reads data from the MODBUS input registers.
PV_TYPE_BYTEORDER Used to select the data type and byte order of the data read. This can also change
the number of consecutive registers read.
Used to scale the data read from the MODBUS device by a desired amount. A scaling
PV_SCALING_FACTOR
factor of 0 or 1 is used by default and do not scale the PV.
PV Offset Used to offset the data read from the MODBUS device by a desired amount.
STATUS_REG_ADDRESS The address of the MODBUS status register. It is an offset within the MODBUS
holding register or input register block, so the actual MODBUS register address
accessed for FC3 will be 40001 + Status Register Address, and for FC4 will be 30001 +
Status Register Address.
STATUS_REG_MASK Used to mask specific bits of the status register. The mask will be bitwise ANDed
with the status register, to allow for the extraction of individual bits from the status
register. This field must be a hexadecimal value.
STATUS_REG_FUNCTION_CODE Used to choose which MODBUS register block the status register is located; either
FC3 – holding register, or FC4 – input register.
MODBUS_RW_REGS_START_ADDRESS An offset within the MODBUS holding register block so the actual MODBUS register
address accessed will be 40001 + R/W Block Start Register.
MODBUS_RW_REGS_NUM_OF Used to select the number of registers read from or written to, from zero to ten.
MODBUS_RW_REGS_BYTE_ORDER Used to select the data type and byte order of the data read. This can also change
the number of consecutive registers read.
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 11
GW PL FF/MODBUS Configuration
4.6 Channel Diagnostics (MODBUS_STATISTICS_1-4)
Each channel contains diagnostic information about the Modbus RTU signals connected to the respective channel. These read-only
fields diagnose problems with the Modbus configuration on each channel. Refer to Figure 15: Modbus statistics.
Figure 15: Modbus statistics
Refer to Table 3: Modbus statistics fields for an explanation of the configurable fields under MODBUS_STATISTICS.
Table 3: Modbus statistics fields
Parameter Value
NUM_OF_CORRECT_FRAMES The number of successfully received Modbus frames
NUM_OF_ERROR FRAMES The number of MODBUS sent messages that received an error or invalid
response.
NUM_OF_MODBUS_TIMEOUTS The number of read request messages that received no response.
NUM_OF_CRC_ERRORS The number of MODBUS frames with cyclic redundancy check errors.
NUM_OF_CONS_MISSING_RESPONSES The number of consecutive missing Modbus frames
LAST_EXCEPTION_CODE The error code that corresponds to the type of error response the GW receives
from an error frame.
SLAVE_STATUS The Diagnostic Status of the Modbus slave
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 12
GW PL FF/MODBUS Configuration
4.7 Measured Value (PV_1-4, MODBUS_STATUS_REG_1-4, MODBUS_RW_REGS_1-4)
After configuration of the Modbus Communication and Channels, the values from the Modbus RTU device can be seen via the
Measured Value parameters of the GW PL FF/MODBUS.
The PV for channels 1-4 shows not only the value from the Modbus RTU device, but the quality and units of the primary value.
Refer to Figure 16: PV.
Figure 16: PV
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 13
GW PL FF/MODBUS Configuration
The MODBUS_STATUS_REG values show which bits are masked based on the status register being read from the Modbus RTU
device. Refer to Figure 17: Modbus status register.
Figure 17: Modbus status register
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 14
GW PL FF/MODBUS Configuration
It is only possible to read from or write to the MODBUS_RW_REGS parameters when the Transducer Block is in OSS mode. Refer to
Figure 18: Modbus read/write registers.
Figure 18: Modbus read/write registers
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 15
GW PL FF/MODBUS Configuration
It is possible to manually change the values in registers 1-10 and write them to the Modbus device while in OSS mode. This allows
to read/write data to the Modbus registers of the connected devices. Refer to Figure 19: Read/write data to Modbus registers of
connected devices.
Figure 19: Read/write data to Modbus registers of connected devices
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 16
GW PL FF/MODBUS Configuration
5 Analog Input Block Configuration (1-4)
The configuration of the Analog Input block in the GW PL FF/MODBUS converter is like other FF AI blocks. It maps data from the
Transducer Block in the gateway to the FF Host or DCS. Refer to Figure 20: Analog Input Block.
Figure 20: Analog Input Block
5.1 Mapping AI Block to Transducer Configuration
Take the following actions when configuring the AI block to get the Modbus data into the FF Host or DCS properly…
- Configuration of the AI block must occur in OSS mode.
- The parameters in the AI block must match the Transducer block, or the data will have a “Bad” quality. These parameters
are:
o UNITS_INDEX
o CHANNEL
o L_TYPE
- Add the AI block to the Function Block Application (FBAP) and download to the FF Host or DCS after configuration. Ensure
proper mapping.
Note: In the image above, Figure 20: Analog Input Block, the status of the OUT field will remain “Bad” until proper configuration of
the AI block and until a download to the HOST system.
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 17
GW PL FF/MODBUS Configuration
In the 4 AI blocks, there are 4 possible PV values to map. The PV channel, initially set up in the Transducer block, maps to the
desired AI block. Lastly, under XD_SCALE, the units must match those in the Transducer block. Refer to Figure 21: XD_SCALE field.
Figure 21: XD_SCALE field
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 18
GW PL FF/MODBUS Configuration
5.2 Downloading AI Block to Host
It is necessary to download the AI Block to the Host or DCS. To do this, drag the AI Block from the Interface section of the project
over to the FBAP. Refer to Figure 22: Add AI Block to FBAP.
Figure 22: Add AI Block to FBAP
Download the configuration. Select “Configure” then “Download Configuration…” In the “Download Configuration” pop-up window
click “Download”. Refer to Figure 23: Download configuration.
Figure 23: Download configuration
QRG_927_EN_01_GW-FF-Modbus-NI-Integration.docx PHOENIX CONTACT 19
GW PL FF/MODBUS Configuration
Once the download is complete, the AI block PV and OUT status will change from “Bad” to “Good”. The GW PL FF/MODBUS will now
properly bring data from the Modbus RTU device and provide that data to the FF Host or DCS. Refer to Figure 24: Proper configuration
download.
Figure 24: Proper configuration download
PHOENIX CONTACT GmbH & Co. KG • 32825 Blomberg • Germany 20
www.phoenixcontact.com