Preface: Delta PLC is an excellent domestically produced programmable controller widely used in the field of industrial control. It is a high-performance and stable controller. This time, we will connect the Delta DVP-ES series PLC to the EMCP IoT cloud platform (referred to as EMCP) through Modbus driver, enabling remote monitoring of Delta PLC (D0/D1/Y0/Y2) registers and remote reading and writing of D100 and Y20 through computer web pages, mobile apps, and WeChat.
1) One Delta PLC (with COM2 or 3 communication serial port) and its own programming cable.
2) One EG20 gateway, antenna, and power adapter from Hebei Blue Bee Technology (using EG20 as an example below).
3) One SIM card with data, large card (China Mobile, China Unicom or China Telecom card).
4) One networked computer (WinXP/Win7/Win8/Win10 operating system).
5) Several electrical tools and wires.
The technical parameters and usage instructions related to the gateway can refer to the EG20 User Manual.
1. Ensure that the gateway can be connected to the internet normally, either through a 4G card (China Mobile/China Unicom/Telecom data card, large card) (with the antenna attached to the gateway) or through a network cable (with the router's network cable connected to the gateway's WAN port);
2. Connect the gateway to a 12V or 24V DC power supply and power it on. (Note that the positive and negative terminals of the power supply should not be reversed).
Connect the PLC to the power supply (note whether the power supply is 24VDC or 220VAC), plug the programming cable into the PLC's COM1 port, and connect the other end to the computer's COM port (or USB-232 cable). Connect the PLC's 485 serial port (COM2+/- terminal) to the EG20's 485A and 485B terminal blocks (COM3 can also be used, which will be explained as COM2 port here). As shown in the figure below:
Open the Delta WPLSoft programming software, open the program, select your PLC model and COM1 programming communication parameters. Then set the RS485 communication parameters for COM2. This article uses the DVP-60ES model for explanation, and the operation of other models in the same series is basically the same.
In the ladder diagram editing window, select a blank row, click on "Wizard" in the menu bar, and choose "Communication Program", as shown below.
Enter the COM port parameter selection interface (some models will ask you to select the set COM port and choose the PLC serial port you want to connect to EG20, here we choose COM2). After selecting the COM port, click "Next". Set the COM2 serial port parameters as shown in the following figure. After ensuring that the settings are correct, click "Next",
Then select "MODBUS Data Transmission/MODRD/MODWR/MODRW Instructions" from the communication application and keep clicking "Next". Keep the default settings in the new window and click 'Finish'.
Automatically generate communication parameter program in ladder diagram, as shown below:
The Delta PLC integrates the MODBUS-RTU function internally, and the communication settings for the COM2 port as described above complete the establishment of the Delta PLC MODBUS slave station.
Log in to the EMCP platform with an administrator account (it is recommended to use 360 Browser Speed Mode, Chrome browser, or a browser that supports Chromium kernel), and set up the EMCP cloud platform. Please refer to the "EMCP IoT Cloud Platform User Manual" for specific operations. After logging into EMCP, the first step is to enter the device list display page. As we have not created any devices, it is an empty page. We need to follow the steps below to proceed.
Step: Click on (only management accounts have this permission) → → [EG Device Management] → [+Add] → Fill in device information → Click [Save]. Among them, is required, and all other options can be optional.
The two main areas that need to be configured in the EG device management gateway configuration are configuring network serial communication parameters and creating Modbus drivers. The following will explain this function step by step. Note: The gateway can only be remotely configured after it is online.
Step: Click on [Step 2: Gateway and Instrument Management] → → Fill in and → [Confirm].
The SN and verification code are on the chassis label of the gateway. The SN is a 12 digit pure Arabic numeral, and the verification code is a 6-digit English letter. [Note] can be filled in according to the requirements. After editing, click [OK].
(with * required fields)
At this point, in the "Gateway Basic Information" section, you can see whether the bound gateway is connected to the platform (if you successfully log in to the platform, you can see the green word "Online"; if not, the gray word "Offline" will be displayed. Please check the network or network signal at this time).
To use serial port RS485 communication, RS485 communication parameters need to be set.
Each device connected to the gateway needs to establish a corresponding device driver. Just like inserting a mouse into a computer, only when the driver for this mouse is installed in the computer system can the computer recognize it. Add drivers to the communication port through which the device is connected to the gateway. As shown in the figure, click on "Add Driver" after "RS485" to display the basic configuration table on the right for configuration.
Note: After configuration is complete, click save.
Basic configuration introduction:
: Required field, customizable, differentiate when there are multiple drivers.
【 Brand 】: Required field, select 'Universal Modbus Device'.
[Model]: Required field, select "Modbus RTU".
: Required field. The equipment address is filled in according to the slave station number set by Delta PLC. In this case, the PLC slave station number is "1", so "1" is filled in here.
【 Minimum Collection Cycle 】: It is the time interval for the gateway to collect device data, measured in milliseconds. If set to 1000ms, the gateway will collect device data once every 1 second.
[Communication waiting time]: The waiting time for the gateway to receive communication data. Adjustments can be made as needed, with a default of 1000ms.
[16 bit integer], [32-bit integer], [32-bit floating-point type]: Refers to the decoding order of the corresponding data type. Default settings are sufficient
[Block Collection Method]: 0- Block by Maximum Length: The collection block is processed according to the maximum block length, and multiple blocks with discontinuous but similar addresses are divided into one block and read at once to optimize the collection efficiency; 1- Block by continuous address: Collect blocks based on address continuity, and for multiple blocks with discontinuous addresses, only collect continuous addresses at a time without optimization processing. Simply select the default option.
[4-zone 16 digit write function code]: Select the function code when writing single characters in zone 4. Simply select the default option.
Step: Click on [Step 3: Variable Management] ->[+Add Variable] ->Fill in variable information ->[Save].
Variable introduction:
【 Instrumentation, PLC 】: Required, select the driver just created. Choose according to the actual situation.
: Required, customizable. Be careful not to have duplicate names. Coil (0x)
[Unit]: Not required, can be customized. When displaying in a list, variables will be displayed with units.
【 Register Type 】: Required, in Delta PLC, 0XXXXX corresponds to 【 Coil (0x) 】; 1XXXXX corresponds to [discrete quantity (1x)]; 4XXXXX corresponds to [hold register (4x)].
: Required, the address should be filled in without the storage area identifier. Please refer to the image below for specific settings.
: Required, select according to actual needs.
[Number of decimal places]: Not required, fill in according to requirements.
[Dead Zone Setting]: Not required, default is sufficient. Fill in as needed. For a more detailed explanation, please refer to the "?" help section later.
: Not required. Numerical values can be directly mapped to text. If the value is "10" and the mapping field is "device failure", then when the value of the collected variable is "10", "device failure" will be directly displayed in the device monitoring and historical reports.
: Not required. The collected data can be calculated according to the formula filled in. For more detailed instructions, please refer to the "?" help section below.
[Read/Write Method]: You can modify the read/write method of this register according to your needs, and it defaults to read-only.
The correspondence between PLC internal registers and MODBUS addresses is detailed in Delta PLC Communication Protocol v1.1, as shown in the following figure:
The example of adding and filling in variables for each storage area of PLC on the platform is shown in the following figure:
Note: Set according to the correspondence table between Delta PLC register addresses and Modbus addresses.
After adding, the 'Variable Management' is shown in the following figure. At this point, you can click the 'Data Testing' button to check whether the variable values can be collected or whether the values are correct.
You can set alarms for variables as needed. When an alarm is generated, it will be displayed on the computer web page and pushed through the mobile app and WeChat. Setting steps: Click on "Alarm" ->"Add" ->Fill in the alarm information and conditions ->"OK" after the variable that needs to be alarmed. As shown in the following figure:
3.5 Report Management
After creating the variables, you can click on "④ Historical Report Management" to create historical reports according to your own needs. Historical reports can meet different application scenarios to record historical data. Historical curves are generated based on reports, making it convenient for customers to view variable trends in curve form.
Periodic storage: Record data storage at fixed time intervals.
Conditional storage: When a variable reaches a certain condition, partial data is stored in "interval storage" or "single storage".
Change storage: When a variable changes beyond a certain range (high and low limits), partial data is recorded once (such as recording associated data after a data alarm).
Click on 【 ⑤ Configuration Management 】 to enter the configuration management interface, where you can set the display mode in data monitoring (configuration display or list display, default is configuration display). You can choose to use the configuration display format here to display the corresponding data rules.
Click on the 'Edit' option behind the configuration interface list in the middle of the interface to enter the editing page. Through the configuration editing page, we can freely draw images, text, digital display boxes, buttons, indicator lights, pipelines, equipment and other controls. For detailed functions, please refer to the "EG Equipment Configuration Editing User Manual".
4 experimental results
After the WPLSoft programming software is connected to the PLC, click on the online monitoring device table to monitor the actual values of the data to be read. An example is shown in the following figure;
Users can log in to the EMCP platform, click on the image or device name of the "Delta PLC" device, and enter the EG device to view and modify relevant data.