This tutorial provides guidelines and procedures for communicating the main measurements taken by the PH3500 to a Nexto Xpress series PLC using the Modbus TCP/IP protocol
Components
Software: MasterTool IEC XE v3.34
PLC: XP340
Multimeter: PH3500
Tutorial Sections
1. ARCHITECTURE
2. PH3500
2.1. Modbus Table
3. CONFIGURATIONS IN MASTERTOOL
4. VIDEO
1. ARCHITECTURE
In the architecture of this tutorial, the Ethernet ports of the XP340, PH3500, and the computer were connected to the switch using network cables. The computer to be used must have the MasterTool software installed. All products must have IP addresses within the same range of the Ethernet network.
Pay special attention to the electrical connection of the PH3500; refer to the PH3500 User Manual (pp. 9 - 14). The connection will be as follows:
NOTE: All devices must be connected to a power supply compatible with their input voltage.
2. PH3500
Communication will be via the Modbus TCP/IP protocol. The mappings for the variables are already predefined; you only need to configure the IP, data transmission format, and swap. These can be configured in the multimeter's interface itself (Main Menu > CFG (Config Menu) > COM (Communication)). To do this, follow the steps below:
Press the "back" key, indicated by the rotate symbol, twice to enable the main menu.
Continue pressing the arrow buttons until the selector on the display points to the “CFG” option, that is, settings, and then press "Enter".
Keep pressing the navigation buttons until the selector on the display points to the “COM” option, that is, communication, and then press "Enter".
After these procedures, you should check the information about address, format, and swap.
The format refers to how the Modbus registers (coils, inputs, and data holdings) will be sent, either as Short (16 bits) or Long (32 bits). This is due to the precision required for sending the measured quantities. The more bits, the more decimal places. In this tutorial, the short format will be used.
Swap is used in situations where it is necessary to change the order of bytes or words during communication. In this case, it will not be used and will remain as "None".
Press the up arrow once and the Serial port parameters will appear; press again to view the "COM Modbus TCP" screen. If modification is needed, click "Enter" and increase or decrease the number with the arrows; both left and right change the value.
Press the up arrow again and the IP configuration will appear. To change the IP, press "Enter", then to switch between numbers press the left or right key. To increase or decrease the number, press the up or down keys. To switch between octets, press "Enter".
Remember that all equipment must be on the same subnet with only the last octet being different. For example:
- XP340 - 192.168.15.1;
- PH3500 - 192.168.15.5;
- PC - 192.168.15.10.
2.1. Modbus Table
According to the multimeter (PH3500) user manual, in the instantaneous measurements field you can see all the variable configuration parameters.
In this application, we will use the short address column as a reference since the variable format was set in step 6.
In the table for this multimeter, we can see that the addresses start from 0, whereas in Xpress they start from 1. Therefore, whenever you select an address, you must add “+1” so that it is correctly read in MasterTool.
The addresses for the Modbus variables can be found in a table in the PH3500 User Manual. Our goal will be to communicate Phase Voltage [A], Instantaneous Frequency [Hz], and the UI - Device Language.
3. CONFIGURATIONS IN MASTERTOOL
In MasterTool IEC XE, we will make the configurations to read the variable values indicated in section 2.1.
The communication variables were declared in a global variable list, as shown below:
Some variables are defined with the REAL type because it is equivalent to FLOAT as seen in the PH3500 User Manual.
3.1. Modbus Configurations
For Modbus TCP/IP communication, we need to configure it as shown below.
Right-click on "NET1" then click on "Add Device". Another window will appear, click on the "+" symbol to the left of the word MODBUS, then do the same for MODBUS Client; double-click on MODBUS symbol Client.
Right-click on the device previously added. Another window will appear; double-click on MODBUS Device.
Close the device window. Open the MODBUS Device tab and declare the variables that were declared in the GVL.
You can do this by adding the path and the variables we created in our GVL, as shown in the example below. In Value Variable it is "PH3500.TENSAO_A" for the voltage variable. The Data Type will be according to the information we are requesting; since frequency and voltage are REAL type data, the most suitable is "Input Register".
Still in the Modbus Device tab under "Requests", request two Input Register Read variables since both frequency and voltage are 16-bit readings. Set the initial address of the variables, the same as in the mapping, and change the read data size. The Language variable should be of type Holding Register to select the multimeter language.
In general parameters, enter the device's IP, in this case the PH3500, and the Modbus port being used by the multimeter, which in this case is port 502.
All Modbus TCP/IP communication configuration is complete. Log in with the XP340 and set it to RUN mode. Enter the GVL you created and check the incoming values. Note that the voltage and frequency values are as expected and the language value is 0. As previously seen, "0" in the PH3500 Modbus table means it is set to "PT-BR". If 1 or 2 were written to this variable, the multimeter would switch to another language.
4. VIDEO
Comments
0 comments
Please sign in to leave a comment.