Please Contact Us if Necessary , Email : office@unimatautomation.com

Technology Sharing

[Technical Classroom] How to achieve remote maintenance with the combination of the powerful and the Internet of Things and SMART PLC?

[Technical Classroom] How to achieve remote maintenance with the combination of the powerful and the Internet of Things and SMART PLC?

foreword

With the deepening of the information age. Network port communication stands out due to its advantages of high speed, strong anti-interference, low price, and simple use, and has become more and more widely used in industrial environments. In recent years, the Internet of Things has been introduced, and the Internet of Things industry has developed vigorously.

This article will introduce the combination of SMART PLC and the Internet of Things to realize the use of remote maintenance, data management, etc., and provide you with ideas in this regard.

This article defaults to the prerequisite knowledge to understand IoT device registration.

Communication configuration

In this case, the Internet of Things screen of UniMAT UH510W-4G is used as an example, and its usage is similar to other products.

1. Configure the communication of the IoT screen

1.1 Enter Anyaccess and click the device to enter the communication configuration and add device connection information

1.2 Add SMART connection protocol 

a. Connection name: The connection name cannot be repeated. Special attention: When using the IoT screen, the connection name should be the same as the communication connection name on the Uniface.

b. Connection interface: Select Enternet/TCP, use the network port to connect with the IoT device.

c. Connect Service: Select SIMENS.

d. Select SIMENS_S7_SMART_TCPIP.

e. Remote IP: fill in the actual IP address of the PLC. Special attention: The default ip address of Siemens PLC is 192.168.2.1. The last 1 needs to be changed to an address other than 0, 1, 255 and the existing IP address in the network (such as 192.168.2.2) to avoid remote connection failure. .

2. SMART configuration

In this document, the S7-200 SMART is used as the server, which occupies the S7 passive connection resources of the S7-200 SMART CPU. There is no need to do any programming in the CPU. It is only necessary to set the IP address of the CPU to be the same as the remote IP address set in AnyAccess. (at e in 1.2).

data communication

1. Add monitoring data

a. Monitoring name: fill in according to your actual situation, support letters, Chinese characters and a few characters. Names within the same group cannot be repeated.

b. Grouping: Group the data, and different groups can have data with the same name.

c. Continuous information: Communication configuration connection name.

d. Data type: Select the data type according to your actual situation.

e. Memory block: select the direct addressing storage area.

f. Address: The address of the data.

2. Data exchange

A green dot is displayed in front of the device on anyaccess, and the data release status is successful. There is no communication error on the HMI, indicating that the device is connected normally. Remote data reading and writing can be performed to achieve the functions of controlling the start and stop of the equipment and modifying the parameters of the equipment.

By monitoring whether the two data are the same

In addition to real-time data, there are historical data with higher security, alarm data that can be notified to people by mobile phone in real time, etc. More functions are not the key content due to limited space. If you are interested, you can go to our official website or public account to get more information.

Remote upload and download

1. Open anyaccess, select the communication configuration of the IoT device, and click the remote download of the communication connection of the PLC. Displaying the virtual IP of the remote device indicates that the transparent transmission is successful. 

2. Anyaccess can be minimized (do not close), open SMART software, click communication, select virtual network card, add CPU (enter PLC actual IP). Click OK to connect to the PLC.

3. After the SMART software communicates with the PLC. You can upload and download programs and monitoring programs normally.

FAQ

Q: How can I get started faster as a new user?

A: Help Documentation in the upper right corner of Anyaccess → Quick Start. The whole process of device registration and data addition is introduced. Allow users to use it initially.

Q: Where can I get more usage guidance and cases?

A: You can pay attention to the WeChat public account "UniMAT Automation", or log in to the official website www.unimat.com.cn   to learn more about products and instructions for use.

 

Q: I am using Ubox and the IoT screen described in this document is used in the same way?

A: The IoT screen has an additional screen display function. This article describes the public part of Ubox usage and IoT.

Q: Why is my Anyaccess interface different from the documentation?

A: UniMAT Internet of Things is divided into two versions, 1.0 and 2.0, and the 1.0 version has stopped maintenance. Old users can freely switch between 1.0 or 2.0 devices by checking the switch IOT option when downloading the new version of Uniface software. If you have any questions, you can contact the local technical staff. New users or new projects are recommended to use version 2.0, which has more functions and a better experience.

Q: I got a new device and can't go online?

A: ① Power on the device first and then bind the device, you need to power on again after binding. ②In wired Internet mode, please ensure that there is no IP conflict in the network connected to the device, and dynamic host configuration can be enabled to avoid this problem. ③In 4G mode, please ensure that the antenna is installed in place, and the antenna cannot be placed in an iron box or other places that have a strong shielding effect on the signal. ④ Make sure your network mode selection is correct.

Q: Why do I keep reporting an error when I added a communication configuration device?

A: When using Uniface to configure the project, the name of the communication connection should be the same as the name of the communication configuration connection of Anyaccess. Ubox uses router mode. Note that the two network ports should not be in the same network segment.

Q: Why did I fail to enable transparent transmission?

A: The virtual network card needs to be activated for transparent transmission. You can check whether there is a network card named "TAP-Windows Adapter V9" in "Network and Internet > Network Connection". ①If there are multiple devices that may have been used in other homes before, please disable other virtual network cards and keep only one. ②If there is none, you can go to the installation directory of anyaccess to find "iphenlper" and run it with administrative rights to install it automatically. If it is unsuccessful, it needs to be installed manually, you can refer to Baidu experience. How to install a virtual network card in Win10 system, the connection is as follows. Win7 is the same as Win10 method.

https://jingyan.baidu.com/article/ce4366495d3ff43773afd3f5.html

Q: Why can't I ping the IP of the PLC after I enable transparent transmission?

A: You can ping the IP of the IoT device first. ①If it does not work, it may be the problem of the virtual network card. For the solution, please refer to the previous question. ② The IP of the IoT device can be pinged, that is, there is a problem with the connection between the IoT device and the PLC. First, confirm whether the IP of the PLC is in conflict in the local area network formed by the Internet of Things (commonly occurs when the PLC is connected to the Internet of Things device through a switch, and the switch is connected to multiple network devices), and whether the PLC and the Internet of Things device are in the same network segment. The IP address cannot be the special address 0, 1, 255. These special addresses have a special role in the WAN, which is different from the previous use of the industrial LAN. If there is no problem with the above, you need to check whether the on-site network cable is not plugged in properly and whether the network cable is damaged.

Q: Why can't I search for smartPLC?

A: IoT devices do not currently support finding CPUs, and you need to add CPUs.

Q: I added a virtual IP and can't connect to the PLC?

A: The actual IP address of the PLC is used for remote monitoring and uploading and downloading PLC programs, and virtual IP cannot be used.

Read more
【Technical class】S7 200 SMART high-speed counting introduction

【Technical class】S7 200 SMART high-speed counting introduction

1 Introduction

In actual process control, high-speed pulse signals are often encountered, such as incremental encoders, some flow meters, etc. To correctly count and process these high-speed pulse signals, the high-speed counter function of PLC needs to be used. High-speed counters can count high-speed events that standard counters cannot control.

2 Number and performance of high-speed counters

• The compact model supports a total of four HSC devices (HSC0, HSC1, HSC2 and HSC3).

· SR and ST models (firmware version V2.3 and above) support a total of six HSC devices (HSC0, HSC1, HSC2, HSC3, HSC4 and HSC5).

3 Assignment and functions of high-speed counters

HSC0, HSC2, HSC4 and HSC5 support eight count modes (modes 0, 1, 3, 4, 6, 7, 9 and 10)

HSC1 and HSC3 only support one counting mode (mode 0)

High-speed counter input connections (clock, direction, and reset) must use the CPU's integrated input channels, input channels on signal boards or expansion modules cannot be used for high-speed counters

All high-speed counter inputs are connected to an internal input filter circuit. The default input filter setting of the S7-200SMART is 6.4 ms, which limits the maximum count rate to 78 Hz. To count at higher frequencies, the filter settings must be changed. See below:

Input points that have been used for high-speed counting cannot be used for other purposes. For example, all counting modes of HSC0 always use I0.0, so when HSC0 is used, I0.0 cannot be used for other purposes.

The following table shows the maximum input frequency that can be detected by the high-speed counter for various input filtering configurations:

5 High-speed counter addressing

The following takes the control word of HSC0 (high-speed counter 0) as an example to introduce the actual function of each bit of the special function register.

6 Programming of high-speed counters

To use a high-speed counter, a program must perform the following basic tasks:

①Define the counter and mode (execute HDEF instruction once for each counter)

②Set control byte in SM memory

③Set the current value (start value) in the SM memory

④Set the preset value (target value) in SM memory

⑤ Allocate and enable the corresponding interrupt routine

⑥Activate high-speed counter (execute HSC instruction)

Instruction introduction:

HDEF, high-speed counter definition instruction. Defines the mode of the high-speed counter.

HSC, high-speed counter instruction. The high-speed counter is configured and controlled according to the state of the special memory bits of the high-speed counter.

While the above steps can be cumbersome and error-prone, the high-speed counter wizard can also be used to simplify the programming task. The process of wizard setting is the process of assigning addresses to control bytes.

After completing the wizard setting, a subprogram will be automatically generated, and the content of the subprogram is the creation of the basic tasks mentioned above.

1) In the menu bar, select Tools > Wizard > High Speed ​​Counter

3) Define the name of the high-speed counter

4) Select mode

5) Define the counting direction and other characteristics of the high-speed counter. The settings here will affect the default value of the control byte in the special register.

6) Configuration interrupt

A high-speed counter can have up to 3 interrupt events, fill in the interrupt service routine name in the white box or use the default name.

The interrupt is generated when the current value is equal to the preset value. Through the wizard, the parameters of the high-speed counter, such as preset value and current value, can be reset in the interrupt service routine. One such process is called 'one step', and up to 10 steps can be set.

The relevant interrupt events in high-speed counting are as follows:

7) Complete the wizard

8) call subroutine

HSC_INIT is an initialization subroutine, and the high-speed counter can work normally after calling this subroutine once using SM0.1 or an edge-triggered instruction in the main program block.

The interrupt service routines and subroutines generated by the wizard are not locked and can be modified according to their own control needs. 

7 Instruction introduction

8 Frequently Asked Questions

8.1 How to keep the current value of the high-speed counter after power off

The power-off data retention of the S7-200 SMART does not support the range setting of the high-speed counter, so the current value of the high-speed counter is reset to the value 0 every time the CPU is powered off. To keep the current value of the high-speed counter even after the CPU is powered off and restarted, it needs to be programmed. Ideas: First, in other cycles except the first scan cycle, the current value of the high-speed counter needs to be transferred to the V area register. Then, in the first cycle of power-on, the value stored in the V area register is transferred to the current value SMD of the high-speed counter to ensure that the high-speed counter starts counting with the value of the V area as the initial value, and the high-speed counter is initialized. Finally, the V area register is set as the power-off holding area at the power-off data holding place of the system block.

Taking high-speed counter 0 as an example, the programming is as follows:

8.2 How to reset the high-speed counter to 0?

Method 1: Select a high-speed counter with external reset mode. When the reset signal is valid, the high-speed counter is reset to 0.

Method 2: Reset the internal program, set the relevant bit of the update current value control byte of the high-speed counter to 1, and set 0

Assigned to special register SMD38, after executing HSC instruction, the high-speed counter is reset to 0.

Read more
【Technical Class】S7 200 SMART Serial Free Port Quick Application

【Technical Class】S7 200 SMART Serial Free Port Quick Application

1. Hardware connection

For third-party equipment, such as code scanners, printers, meters, etc., it is a non-standard bus protocol and a custom protocol, which is called a free port protocol. Before starting the programming, the serial port type of the third-party device must be identified first.

1. Communication interface

A. The serial port of the SMART CPU body of the third-party device whose serial port is 232 is RS-485. To communicate with the 232 device, a 232to485 converter needs to be added in the middle. Common connections are shown in Figure 1.

B. The serial port of the third-party device is 485

When both SMART CPU and third-party device serial ports are 485, they can be directly connected. Common connections are shown in Figure 2.

C. If the serial port of the
third-party device is 422, the serial port of the third-party device is 422, and the connection method of 422 should be 485. Common connections are shown in Figure 3.

2. Communication connector

In the case of complex industrial sites or long-distance communication, it is recommended to choose high-quality bus connectors and cables. The bus connector of UniMAT Automation has its own terminal resistance and bias resistance. In this case, it can improve the stability and anti-interference ability of communication.
Bus connectors and cables, order numbers are shown in Table 4.

3. Why choose bus connectors and bus cables

As we all know, the network cable is divided into Category 5 and Category 6. The transmission bandwidth of Category 5 can be as high as 1000Mb/s, but it is generally only used in 100Mb/s networks; Category 6 is mainly used in Gigabit networks. The performance is much higher than the super five network cable standard. The intuitive difference between Category 5 and Category 6 cables is that the diameter of the copper core of the cable is different, and the copper core of Category 6 is obviously thicker than Category 5.

In the same way, it is speculated that the bus cable of UniMAT Automation, the loop impedance: <150R/KM, is better than the general communication cable. The line resistance is small, the communication distance is long, and the anti-interference ability is strong.

The bus connector of UniMAT Automation has its own terminal resistance and bias resistance, which can also improve the quality of communication.

The recommended networking method is shown in Figure 5:

The termination and bias resistors are shown in Figure 6:

2. Communication Mechanism

 

To understand the communication mechanism clearly, to clarify the program ideas, in order to program smoothly. Common communication mechanisms are as follows:

A. The CPU only accepts but does not send, that is, the third-party device only sends and does not receive. Common such as scanning code gun.

B. The CPU only sends and does not receive, that is, the third-party device only receives but does not send. Common such as printers.

C. The CPU sends first, then receives, then sends, and then receives. The CPU communication mechanism is similar to the master mechanism, such as Modbus RTU Master.

D. The CPU receives first, then sends, then receives, and then sends. The CPU communication mechanism is similar to the slave mechanism, such as Modbus RTU Slave.

E. Communication logic customization.

 

3. Communication message

Communication message, that is, the format of data sent and received. Such as Modbus communication, the communication format is clearly defined. Both parties of the communication should send and receive the response data according to the agreed format and length.

The CPU acts as the master station. Taking the Modbus RTU master station message as an example, the data format sent by the CPU is as follows:

The third-party device, after receiving the CPU message, needs to respond to the data format as follows:

The main purpose of the above example is to understand the meaning represented by each byte of communication data agreed upon by both parties. Data can be read or packaged only when the meaning of the data is clearly understood.

 

4. PLC control word

 

Before writing the program, there is a preparatory work to understand the control word that defines the serial port/communication method.

A. Serial control word

The SMB30 and SMB130 configure communication ports 0 and 1, respectively, for Freeport operation and provide a choice of baud rate, parity, and number of data bits. The figure below shows the Freeport Control Byte. For all configurations, a stop bit is generated.

SMB30\SMB130 data bit format:

SMB30\SMB130 data definition:

B. Communication control word & status word

5. PLC only receives but does not send

A. The main program is powered on and the serial port is initialized

2#00 0 010 01 SMB30 8-N-1 9600 Free port

2#01110000 SMB87

The header bit of the received data is A5, and the end of the table is 5A

Receive length 10 bytes SMB94

B. Turn on the receive completion interrupt

C. Trigger the receive command, and the received data is placed in the register area starting from VB200.

D. In the reception completion interrupt program, open the reception.

In the control word, the length of the received data is set to 10, the received data is stored in the 10 bytes starting from VB201, and VB200 is the received byte counter.

 

6. PLC only sends and does not receive

A. Serial port initialization

B. Organizing the data to be sent

C. Trigger sending instructions

The starting byte is VB100 is the byte length sent

D. Packet monitoring

Sending messages with different lengths

The logic is similar to the Modbus master, and the free port mode can also be used to edit the Modbus communication.

A. Serial port initialization, generally to define the length of the received character, or the end character to judge the end of the reception.

During initialization, the connection is interrupted when sending and receiving are completed.

B. Organization to send data

In this example, the transmission length is 10 bytes, VB100=10, and VB100-VB110 is the transmitted data

C. Program logic

D. Send & timeout judgment

If it times out, close the reception, that is, reset SM87.7

On the falling edge of the timeout flag, the reception is reopened, that is, SM87.7 is set, and the transmission is triggered again.

E. Send complete, open receive

F. The reception is completed, and the transmission is triggered again

G. Packet Analysis

After the transmission is completed, the PLC does not receive the data, and continues to send after the timeout. Such as the first five lines of the message.

After the transmission is completed, the PLC receives the data and immediately triggers the next transmission. Such as the sixth and seventh lines of the message.

Eight, PLC first receive and then send

The logic is similar to the previous chapter, and the logic is similar to a Modbus slave.

 

Nine, receive character interrupt

Serial port initialization, can ignore the received character length, end character, etc., the programming is more flexible.

A. Serial port initialization

Connection receive character break

B. Organize the sending of messages and trigger sending instructions

The received character is interrupted, and the received data is stored in the target register

X. Troubleshooting

When the communication is abnormal, it is recommended to check from the following aspects:

A. Make sure the communication cable is connected correctly, refer to Chapter 1, and focus on Chapter 1.1.

B. Make sure the communication parameters are consistent.

C. Use the computer serial port assistant software to monitor the communication messages and locate whether the PLC has not sent data or the device has not responded to the data. Refer to Chapter 3.

Monitor communication messages: connect A and B of the computer 485 in parallel on the communication link, the software recommends serial port assistant.

Read more
【Technical Class】S7 200 SMART Open Ethernet Communication—TCP Free Port

【Technical Class】S7 200 SMART Open Ethernet Communication—TCP Free Port

1. Brief introduction

Compared with the previous 200, the Smart200 has many advantages. The most prominent one is the addition of an Ethernet port. Say goodbye to the troubles of the PPI cable. You only need a network cable to upload and download programs. You can also connect to the PLC through wifi. Do you think Is its network port limited to this? No, let's take a look at his TCP free port communication today.

The PUT/GET of Smart200 is believed to be used by everyone. It is very convenient, but it only supports the S7 protocol and cannot communicate with other devices via Ethernet. Therefore, smart has opened up Ethernet communication to make the communication between smart and third-party devices more efficient. Convenience and efficiency.

TCP free port communication belongs to bilateral communication, that is, both sides of the communication must write programs, and one is the active party. to actively send data, and one acts as the passive party. To passively receive data, here smart provides us with the library that PLC needs to use, which makes PLC programming much easier and faster.

2. Sample program

Today we use 2 smarts to understand the TCP free port, we need to use the above three commands: TCP_CONNECT, TCP_SEND and TCP_RECV.

First write the active program, first establish the connection, write the send and receive blocks:

Write a passive program, then create a connection in another PLC, write send and receive blocks:

The above is the program that needs to be written in the PLC for active sending and passive receiving. Remember to allocate the library storage area, and the addresses should not overlap. Active or passive connections can be added to form a complex network on either the active side or the passive side.

 

3. Examples of communication

1. Communication between PLC and PLC

Download the active program written above to the PLC of 192.168.1.124, and the passive program to the program of 192.168.1.22 to see the effect of communication, as shown in Figure 1 and Figure 2 below. In order to facilitate the viewing effect, the data sent by the two PLCs are 12 bytes starting from VW500, and the data received are 12 bytes starting from VW600. As can be seen from Figure 1 and Figure 2 below, the data sent and received by both parties One-to-one correspondence.

2. View data between PLC and computer through debugging assistant

Next, let's take a look at Freeport TCP from the perspective of a debugging assistant.

In Figure 3 below, you can see that the IP of the computer is 192.168.1.126, the IP of the PLC is 192.168.1.22, and the PLC is actively connected. Our debugging assistant selects TCPServer. After filling in the correct local and remote port numbers and IPs, we monitor the packets. It can be seen that the 12 bytes sent by the PLC starting from VW500 are received by the debugging assistant, and the debugging assistant sends the hexadecimal 00 11 00 12 00 13 00 14 00 15 00 16 message to the PLC, and the PLC starts from VW600 The 12 bytes of hexadecimal data are also received, corresponding to the data.

In Figure 4, you can see that the IP of the computer is 192.168.1.126, the IP of the PLC is 192.168.1.22, and the PLC is connected passively. Our debugging assistant selects TCPClient. After filling in the correct local and remote port numbers and IPs, we successfully connect to the PLC. Send the hexadecimal 00 09 00 08 00 07 00 06 00 05 00 04 data to the PLC through the debugging assistant, you can see that the PLC receives the data sent by the debugging assistant from the 12 bytes starting from VW600, and the VW500 sent by the PLC The first 12 bytes are also received by the debug assistant.

 

 

Read more
【Technical Class】S7 200 SMART Modbus RTU Quick Start

【Technical Class】S7 200 SMART Modbus RTU Quick Start

1. Hardware connection

1 Serial port

Modbus communication principle: Modbus communication is master-slave communication, that is, a question-and-answer method. The master station sends response data to a slave station, and the slave station responds; when the master station has no data to send, the slave station does not respond.

This communication mechanism is implemented into the programming idea, which will be discussed in the programming chapter later.

The Modbus protocol runs on the serial interface, and the common serial interfaces include RS-232, RS-485, and RS-422. Modbus commonly used RS-485 interface.

Generally, three communication lines of RS-232 can complete the communication link. As shown in Figure 1, the txd of the RS232 device 1 is connected to the rxd of the device 2, and the rxd is connected to the txd, which can be received or sent at the same time, which is full duplex mode. Due to the limitation of RS-232 characteristics, it can only be connected one-to-one, that is, one master station is connected to one slave station. Therefore, the RS-232 interface is rare in Modbus communication.

RS-485 two communication lines can complete the communication link. As shown in Figure 2, A of multiple devices is short-circuited to form one line, and B is short-circuited to another line. Only send or receive at the same time, this is half duplex. Multiple devices can be mounted on the same link, enabling communication between one master station and multiple slave stations. This application scenario is the most common.

The serial interface of S7 200 SMART is RS-485, and the schematic diagram of pins is shown in Table 3.

Note: The A\B signal line of RS-485 is commonly called A\B;485+\485-. S7 200 SMART DB9 pin No. 3, namely RS-485 signal B, is commonly called A or 485+; No. 8 pin, namely RS-485 signal A, is commonly called B or 485 -.

2. Bus connector

In the case of complex industrial sites or long-distance communication, it is recommended to choose high-quality bus connectors and cables. The bus connector has its own terminal resistance and bias resistance. In this case, the stability and anti-interference ability of communication can be improved.

Bus connectors and cables, order numbers are shown in Table 4.

3. Why choose bus connectors and bus cables

As we all know, the network cable is divided into Category 5 and Category 6. The transmission bandwidth of Category 5 can be as high as 1000Mb/s, but it is generally only used in 100Mb/s networks; Category 6 is mainly used in Gigabit networks. The performance is much higher than the super five network cable standard. The intuitive difference between Category 5 and Category 6 cables is that the diameter of the copper core of the cable is different, and the copper core of Category 6 is obviously thicker than Category 5.

In the same way, it is speculated that the bus cable, the loop impedance: <150R/KM, is better than the general communication cable. The line resistance is small, the communication distance is long, and the anti-interference ability is strong.

The bus connector, with its own terminal resistance and bias resistance, can also improve the quality of communication.

The recommended networking method is shown in Figure 5:

The termination and bias resistors are shown in Figure 6:

4. Communication distance

The higher the communication baud rate, the shorter the communication distance. In long-distance communication, appropriately reduce the communication rate. The maximum distance of 9600 baud rate is recommended to be 1200 meters.

 

2. Modbus address

 

The purpose of communication is to read and write registers, so it is necessary to understand the representation of Modbus addresses.

There are many ways of Modbus address representation, such as 40001, 4x0001, 0000H, these three addresses are actually the same address. If there are 4 marks in the address, it is in decimal notation, and the starting address is 1, that is, the actual start address is 40001; In SMART PLC, the address is represented as 40001;

In UniMAT HMI or common configuration software, the address is expressed as 4x1; in the inverter or instrument, the address is often expressed as 0000H.

S7 200 SMART is used as a slave station, and the corresponding addresses are as follows:

A Modbus address is usually written as a 5-character numeric value containing the data type and offset. The first character determines the data type, and the last four characters select the appropriate value in the data type. The Modbus master then maps the address to the correct function

The Modbus slave commands support the following addresses:

00001 to 00128 are discrete outputs mapped to Q0.0 - Q15.7

10001 to 10128 are discrete inputs mapped to I0.0 - I15.7

30001 to 30032 are analog input registers mapped to AIW0 to AIW62

40001 to 4xxxx are holding registers mapped to V memory.

All Modbus addresses are 1-based. The table below shows the Modbus addresses mapped to the S7-200 addresses.

Modbus address S7-200 address

00001 Q0.0

00002 Q0.1

00003 Q0.2

 …

00127     Q15.6

00128     Q15.7

10001 I0.0

10002 I0.1

10003 I0.2

 …

10127 I15.6

10128 I15.7

30001     AIW0

30002 AIW2

30003     AIW4

 …

30032 AIW62

40001     Hold Start

40002 HoldStart+2

40003 HoldStart+4

 …

4xxxx HoldStart+2 x (xxxx-1)

For UniMAT HMI, the address correspondence is shown in Table 7:

3. Message

 

To read or write different Modbus addresses, different function codes are required, as shown in Table 7 above.

Commonly used function codes are FC03 and FC06. Here, the function code 03 is used to describe the message.

Function code 03, read the three registers starting from register 006BH, the master station message example is as follows:

Table 8 Master station 03 message

The slave station message response message is as follows:

Other message formats are no longer specified, and those who are interested can check on the official website https://modbus.org/

 

4. S7 200 SMART Modbus

RTU slave programming

The function implemented by the above program: Set the 0 port of the CPU as a Modbus slave with a slave address of 1, a baud rate of 9600, and an even parity.

The number of IOs that allow the master station to operate is 128, the analog quantity is 32, and the 1000 registers starting with VW0. The VW0 of the CPU is the Modbus address 40001, the VW2 is 40002, and so on.

Parameter description:
The "Mode" input value is used to select the communication protocol: when the input value is 1, the Modbus protocol is assigned and enabled; when the input value is 0, the PPI protocol is assigned and the Modbus protocol is disabled.

The parameter "Addr" sets the address to a value between 1 and 247 inclusive.

The parameter "Baud" sets the baud rate to 1200, 2400, 4800, 9600, 19200, 38400, 57600 or 115200.

The parameter "Parity" should be set to match the parity of the Modbus master. All settings use one stop bit. Accepted values ​​are: 0 (no parity), 1 (odd parity), and 2 (even parity).

The parameter "Port" sets the physical communication port (0 = RS-485 integrated in the CPU, 1 = RS-485 or RS-232 on the optional signal board).

The parameter "Delay" delays the standard Modbus message end timeout condition by increasing the standard Modbus message timeout by the allocated number of milliseconds. A typical value for this parameter should be 0 when running on a wired network. If using a modem with error correction, set the delay to a value between 50 and 100 ms. If using spread spectrum wireless communication, set the delay to a value between 10 and 100 ms. The Delay value can be from 0 to 32767 ms.

The parameter MaxIQ is used to set the number of I and Q points available for Modbus addresses 0xxxx and 1xxxx, and the value range is 0 to 256. A value of 0 disables all reads and writes to input and output. It is recommended to set the MaxIQ value to 256.

The parameter MaxAI is used to set the number of word input (AI) registers available for Modbus address 3xxxx, the value range is 0 to 56. A value of 0 disables reading of the analog input.

The parameter MaxHold is used to set the number of word holding registers in V memory accessible by Modbus address 4xxxx or 4yyyyy. For example, if you want to allow a Modbus master to access 2000 bytes of V memory, set the value of MaxHold to 1000 words (holding registers).

The parameter HoldStart is the starting address of the holding registers in V memory. This value is normally set to VB0, so parameter HoldStart is set to &VB0 (address VB0). Other V memory addresses can also be specified as starting addresses for holding registers to use VB0 elsewhere in the project. The Modbus master can access the V memory whose starting address is HoldStart and the number of words is MaxHold.

When the MBUS_INIT instruction completes, the "Done" output turns on.

The Error output byte contains the result of the execution of the instruction. This output is only active when Done is on. If Done is off, the error parameter does not change.

 

Five, S7 200 SMART Modbus  RTU master programming

 

As mentioned above, the Modbus communication mechanism is mentioned above. The master device can only send or receive at the same time or at the current time. For multiple slave stations or multiple operations on the registers, it is recommended to use the polling mechanism, that is, only one MSG is allowed to be triggered at the same time. instruction. According to this programming idea, two polling operations are recommended .

1. Master initialization

Set the Modbus communication baud rate to 9600, even parity, 1000ms timeout, and use the main body DB9 communication.

2. Polling mode one

Idea: Use the value change of the C0 register to trigger the MSG instruction to ensure that only one MSG is executing at the same time.

 Program function: C0 is cleared after power-on; after the initial completion of the master station, C0 is 1; after each MSG instruction is completed, C0 is incremented by 1; after the third completion, execute the first MSG instruction

polling:

Network 3 program function: read the 5 registers starting from 412345 with the slave station address of 1, and store them in the 5 words starting from the master station CPU VW100.

Network 4 program function: read the 5 registers starting from 40001 with the slave station address of 2, and store them in the 5 words starting from the master station CPU VW110.

 

3. Polling Mode 2

Program function: read the 5 registers starting from 40001 with the slave station address of 1, and store them in the 5 words starting from the master station CPU VW100.

Write 5 words starting from CPU VW110 to 5 registers starting from 40001 with slave address 2.

There is also a habit of using the completion position of the MSG instruction to set an internal relay Mx.x, Mx.x triggers the next MSG instruction, and so on; or the triggering method of fixed time, and other different programming ideas. Regardless of the programming idea, make sure that only one MSG instruction is triggered at a time.

 

6. Precautions

 

A. After the Modbus master or slave initialization command is initialized, the PPI protocol is not available.

B. The same serial port can only be used as one of Modbus master station, slave station, PPI, etc. (except program control initialization).

C. When the CPU is the master station, only one MSG instruction can be triggered at the same time (the important thing is said N times).

A and B of DB9 RS485 of D.S7 200 SMART are different from A and B in popular saying.

E. Recognize the representation of the slave register address, whether it is decimal or hexadecimal.

F. If the communication goes well, you can skip the first four chapters.

 

7. Troubleshooting

 

When the communication is abnormal, it is recommended to check from the following aspects:

A. Make sure the communication cable is connected correctly. Refer to Chapter 1, focusing on Chapter 1.1.

B. Ensure that the master-slave communication parameters are consistent.

C. Confirm that the registers of the slave station can be read and written by the master station. The registers of some inverters or instruments are read-only or write-only, or readable and writable. Some drives have a limited length of data that can be read or written at one time.

D. The above is normal, monitor the PLC program to detect whether a certain MSG instruction has been triggered without jumping action.

E. Use the computer serial port assistant software to monitor the communication messages, and locate whether the master station does not send data, or the slave station does not respond to data, or the message responded by the slave station is wrong. Refer to Chapter 3.

Monitor communication messages: connect A and B of the computer 485 in parallel on the communication link.

8. Communication time limit

The more the number of slave stations, the more times the register is operated, and the longer the communication cycle is. For fast communication, batch read or write registers, or increase the communication baud rate. If any slave station is offline or abnormal, the communication cycle is uncontrollable.

Take remote conference as an example to illustrate the Modbus communication mechanism:

5 people are in a remote conference, and 5 people are talking at the same time. Everyone can't hear clearly, and information exchange cannot be achieved.

Introduce the moderator mechanism, the moderator is the master station, and the moderator ranks the other 4 people with serial numbers, 1, 2, 3, 4, that is, 4 slave stations.

When the host speaks, the master station sends a message. The message has a fixed format. The first byte is the slave station address, that is, the personnel number.

The host does not speak, and the other four are not allowed to speak, and even if they speak, they will be blocked by the host. That is, the slave station sends any message, and the master station accepts it as invalid information.

Only whoever the moderator points to can speak, and speak in the format specified by the moderator, that is, the message format is fixed.

The host said: No. 1 xxxx. 4 people can hear, but only 1 can respond and respond in the correct way. In response to an error, the moderator will also treat the information as invalid.

When the host called No. 1, No. 1 deserted, did not respond in time, and exceeded the predetermined timeout time, the host called again, and so on three times.

After three times, No. 1 still does not respond. The host gives up No. 1 and continues to call No. 2, No. 3, and No. 4. This is the polling mechanism.

Under normal circumstances, one question and one answer, the response is very fast. If one person deserts, the communication cycle is extended by 3 times the timeout period.

Therefore, when all staff are online, the communication cycle is related to the speech rate, that is, the baud rate, and the number of people, that is, the number of slave stations; when not online, the communication cycle is uncontrollable.

In this way, it is necessary to ensure that there is a high-quality communication link and a normal online slave station to ensure the stability of the communication cycle.

Read more
Edimensional IoT Getting Started Tutorial - How to configure configuration settings?

Edimensional IoT Getting Started Tutorial - How to configure configuration settings?

UniMAT Industrial Internet provides complete software platform services and automation on-site hardware products, providing customers with a complete set of industrial automation Internet comprehensive solutions. Help industrial enterprises to realize intelligent transformation, remote monitoring and integration of on-site data and remote maintenance of on-site automation equipment, improve enterprise operating efficiency and reduce enterprise operating costs.

For the convenience of everyone, the editor will take the Edimensional IoT gateway as an example to introduce a series of tutorials on how to connect a traditional UN120PLC to the Internet. By reading this tutorial and following the step-by-step setup, you can get a traditional PLC connected to the Internet.

This time, we will bring you the device configuration settings of the Edimensional IoT Quick Start Tutorial.

PART1. Required hardware and software

hardware:

①UniMAT UN124E

②UniMAT IoT Gateway UBOX-4G

③Network cable

software:

① Uniface configuration software - used for configuration engineering, that is, what device does the box communicate with, what data is sent to the Internet, how often to send it, and how to send it, 4G, WiFi, or wired network, etc. These contents should be in the group well defined in the state software.

②Google Chrome - used to log in to the cloud platform website, view the data that has occurred on the Internet, manage the devices connected to the Internet, etc.

③UniMAT cloud mobile client - used to view data and pictures on the mobile phone

④Computer client AnyAccess—used for remote upload and download programs, screen projection and other operations

PART2. Software acquisition entrance

①Uniface configuration software download address

http://www.unimat.com.cn/down-196.html

②Cloud platform website

http://www.unimatiot.com:8080/ywyun/login

③Apple mobile phone client: search for "UniMAT Cloud Platform" in the Apple App Store to download

Android mobile client: scan the QR code to install and download

④Computer client AnyAccess and configuration software: log in to UniMAT official website - data download, download

http://www.unimat.com.cn/down-196.html

PART3. Hardware connection

Note: The two network ports are in switch mode, and the same IP can be used for network access and communication.

From the above information: We want to communicate between UN124E and the box, just connect the power supply separately, and connect the network port of the PLC to the network port of the box with a network cable.

If serial communication is used, it is necessary to connect the 3+ 8- pins of the RS485 port on the PLC side to the 5+ 6- terminals of the box, that is, the COM1 port of the box.

At the same time, you need to put the 4G card in the box into the card slot at the top of the box. Note that this card can only be used in a box, and putting it in a mobile phone will make the card lock machine unusable.

PART4. Equipment configuration

What device will our box communicate with? Through what protocol, which communication port? Which addresses? These contents should be set in Uniface software. In this example, we use the box (UBOX-4G) to communicate with the UN120CPU, and send the DO point in the CPU and the first 5 words of the V area to the cloud platform through the Ethernet port.

New project in Uniface

②Make IoT settings

 

③Gateway settings: Set the box's own IP address and Internet access here

④Download configuration

After the download is complete, the box communicates with the PLC, and continuously sends the four variables we built to the cloud platform. Next, we go to the cloud platform to see if the data is received.

To view data on the platform, the premise is that there is a platform account and the device is bound to the account. Similar to the device sending you WeChat, you must register a WeChat account from Tencent, and then add the device as a WeChat friend before you can view the WeChat messages he sent you. This process of adding friends is the process of binding.

Thank you for your attention, and we will continue to bring you the cloud platform device binding of Edimensional IoT Quick Start in the next issue, please continue to pay attention!

Read more
What if there is no traffic? Let's take a look at the strategy of charging and paying for the Internet of Things

What if there is no traffic? Let's take a look at the strategy of charging and paying for the Internet of Things

Function Description

The recharge and payment function provides users with functions including self-service renewal, inquiring about IoT card and card number information, and current monthly data usage.

The recharge and payment function of the IoT card only supports the renewal of the IoT card purchased from UniMAT, and does not support the renewal operation of the card purchased from other channels.

Note: Due to the settlement of mobile operators at the beginning of the month and the end of the month, there may be problems such as delayed recharge of traffic and inaccurate traffic query.

Traffic card status query

Users can query the current status and remaining traffic of the traffic card in [Basic Configuration - Traffic Information].

Traffic card details query

The user can query the effective and expiry date of the traffic card, the current month's used traffic, and the remaining traffic information in [Basic Configuration - Traffic Information - Details].

Traffic card warning settings

Users can set traffic expiration reminders in [Basic Configuration - Traffic Information - Alert Settings].

Value type - percentage: 50%, 80% of the remaining data package (only two ratios can be set), push traffic warning messages;

Numerical type-absolute value: the remaining specific traffic (fixed value 500M, 1000M), push traffic early warning information.

 

recharge payment

1. Enter the basic configuration  

2. Click traffic information

3. Click to recharge

① Immediately effective: The recharge flow takes effect immediately.

② Package renewal: After the current data package expires, the recharged data will take effect!

4. Click submit order - payment, temporarily only supports Alipay recharge, the data card will be cancelled after three months of shutdown, please recharge before cancellation.

5. Use Alipay to scan the code to pay - the recharge is successful.

Device SMS and phone recharge

Text messages and phone calls are the second ways to push messages on the Internet of Things. Unlike WeChat official accounts and APPs, you need to pay in advance to use them.

SMS and phone calls are carried out on a device-by-device basis, not an account. If you share your device with others and set up SMS and phone calls, charges will also be incurred.

1. Click Global Settings - Configure Recharge

2. Select the device and click SMS recharge or phone recharge

 

3. Select a package - submit an order

4. Alipay scan code payment, recharge successfully

 

Read more
What if there is no traffic? Let's take a look at the strategy of charging and paying for the Internet of Things

What if there is no traffic? Let's take a look at the strategy of charging and paying for the Internet of Things

Function Description

The recharge and payment function provides users with functions including self-service renewal, inquiring about IoT card and card number information, and current monthly data usage.

The recharge and payment function of the IoT card only supports the renewal of the IoT card purchased from UniMAT, and does not support the renewal operation of the card purchased from other channels.

Note: Due to the settlement of mobile operators at the beginning of the month and the end of the month, there may be problems such as delayed recharge of traffic and inaccurate traffic query.

Traffic card status query

Users can query the current status and remaining traffic of the traffic card in [Basic Configuration - Traffic Information].

Traffic card details query

The user can query the effective and expiry date of the traffic card, the current month's used traffic, and the remaining traffic information in [Basic Configuration - Traffic Information - Details].

Traffic card warning settings

Users can set traffic expiration reminders in [Basic Configuration - Traffic Information - Alert Settings].

Value type - percentage: 50%, 80% of the remaining data package (only two ratios can be set), push traffic warning messages;

Numerical type-absolute value: the remaining specific traffic (fixed value 500M, 1000M), push traffic early warning information.

 

recharge payment

1. Enter the basic configuration  

2. Click traffic information

3. Click to recharge

① Immediately effective: The recharge flow takes effect immediately.

② Package renewal: After the current data package expires, the recharged data will take effect!

4. Click submit order - payment, temporarily only supports Alipay recharge, the data card will be cancelled after three months of shutdown, please recharge before cancellation.

5. Use Alipay to scan the code to pay - the recharge is successful.

Device SMS and phone recharge

Text messages and phone calls are the second ways to push messages on the Internet of Things. Unlike WeChat official accounts and APPs, you need to pay in advance to use them.

SMS and phone calls are carried out on a device-by-device basis, not an account. If you share your device with others and set up SMS and phone calls, charges will also be incurred.

1. Click Global Settings - Configure Recharge

2. Select the device and click SMS recharge or phone recharge

3. Select a package - submit an order

4. Alipay scan code payment, recharge successfully

Read more
【Technology Class】Protocol Interaction of Data Interaction of Evidence Internet of Things

【Technology Class】Protocol Interaction of Data Interaction of Evidence Internet of Things

usage scenarios

Have you encountered such a problem during the on-site debugging of the equipment?

Controllers of different brands want to achieve the needs of communication, but they encounter the following situations:

  • Controller protocols of different brands are inconsistent

  • Inconsistent communication interface

  • Communication Interface Hardware Limitations

  • Unified protocol programming is cumbersome

  • The controller has permission and cannot be programmed

  • After configuration and programming, it needs to be stopped to download, and the site cannot be stopped

  • The remote controller is already running, the client does not allow changes, etc...

Don't worry, UniMAT IoT Gateway can help you with one-stop solution!

UniMAT gateway can realize the communication between controllers of different brands and different interfaces through simple configuration, which perfectly solves the above problems.

 

UniMAT Internet of Things Gateway

0  Hardware interface

  • 2 Ethernet ports

  • 2 RS485 ports

  • 3 RS232 ports

0 2 Communication Protocol

SiemensSiemens
  _

S7-200(PPI)

serial port

S7-300(MPI)

serial port

S7-200 smart(PPI)

serial port

S7-200 smart TCP/IP client

network port

S7-300/400 Profinet

network port

S7-1200/1500 TCP client

network port

Mitsubishi
  _

Fx1S

serial port

Fx1N/2N

serial port

Fx3U/3G

serial port

Fx5U ASCIIMODE TCP

network port

Fx5U BINARYMODE TCP

network port

OMRON
  _

CJ/CS/CP(FINS)

serial port

CJ/CS/CP Ethernet/TCP(FINS)

network port

NJ/NX Ethernet/UDP

network port

host link

serial port

Delta
  _

DVP

serial port

AS Series Ethernet/IP

network port

LS
  power generation

LS_CNET

serial port

LS_CPU_DIRECT

serial port

LS_MASTER_K_CNET

serial port

LS_MASTER_K_CPU_DIRECT

serial port

LS_XBC_CNET

serial port

LS_XBC_CPU_DIRECT

serial port

Panasonic
  _

FP

serial port

Inovance
  _

H1U/H2U

serial port

H3U

serial port

H3U_Ethernet

network port

XINJE
  Xinjie

XC

serial port

XD

serial port

FATEK
  Yonghong

FBS

serial port

Modbus
  Modicon

Modbus_ascii_master

serial port

Modbus_ascii_slave

serial port

Modbus_rtu_master

serial port

Modbus_rtu_slave

serial port

Modbus_TCP/IP_CLIENT

network port

Modbus_TCP/IP_SERVER

network port

HollySys and Belize

LE/LM PLC

serial port

Simphoenix
  Quartet

E550

serial port

E580

serial port

EP_series

serial port

VS500

serial port

Trio

Trio Modbus-TCP/IP

network port

DL/T645 Electricity Meter

DL/T645-2007 standard

serial port

yudian

AIBUS

serial port

Hardware that meets the appeal interface and protocol can communicate directly with the gateway, and realize data exchange between devices through data transmission.

Application example 1 Instrument and PLC

The Siemens 1200PLC control system needs to communicate with multiple instruments on site. Since the 1200CPU does not have a 485 interface, or when the 485 interface is added, it needs to be shut down to download the configuration and the scene cannot be shut down. The gateway is used to realize the configuration process of transmitting instrument data to the 1200CPU. as follows:

0  Establish a connection with 2 devices in Uniface configuration software, among which 1200 Ethernet communication, instrument 485 interface modbus-RTU protocol.

When the serial port is connected to the device, the address mode can be selected from standard mode and extended mode. Standard mode is one-to-one communication, one master and one slave. The expansion mode is one-to-many communication, one master with multiple slaves. In the extended mode, the slave address is written in front of the address.

If the address 4x1 of the temperature meter is the temperature value, the temperature value needs to be transferred to DB1.DBW0 of Siemens 1200.

0  Configure output transfer

After this setting, the gateway transmits the data of the instrument to the Siemens 1200CPU. The maximum address length can be set to 100. The maximum number of data transfers is 100. Therefore, it is best to first assign the communication area to a continuous address during transmission, which can simplify the configuration.

After configuring the configuration, save and download the configuration to the gateway, so that the data of the instrument can be stored in the 1200CPU through the gateway. Only the data transmission function of the gateway is used here, and the networking function of the gateway is not required, so the gateway does not need to plug in the card or plug in the network cable to connect to the Internet. If the gateway needs to transmit data to the cloud platform, it can be added in real-time data, refer to the Internet of Things Quick Start Documentation, which is not described in this article.

Application example 2 PLC and DCS

There is a Siemens 312CPU on site, and now the data in the 312CPU needs to be displayed in the central control room of the factory. The central control system adopts a certain brand of DCS system, which provides an Ethernet port and supports the protocol modbusTCP client.

The gateway can be used to communicate with Siemens 312CPU through the MPI communication port, and the gateway can be configured as a modbusTCP server for the DCS system to read data.

0 1 Communication configuration
0 2 Configuration data transfer

When the gateway acts as a modbusTCP server, the internal address can be read and written by other clients. The corresponding relationship between the internal address and the modbus address is as follows:

internal address

Modbus address

LW0

4x1

LW1

4x2

LW2

4x3

After the configuration as shown in the figure below, the DB1.DBW0 in the Siemens 312CPU is associated with the 4x1 address. DCS reading and writing 4X1 is equivalent to reading and writing DB1.DBW0.

The IP address of the ModbusTCP server is the IP of the gateway, and the default is 192.168.1.100. It can also be modified in real time. The path is: Tools in the menu bar --> Gateway Settings à Open Network Configuration, and fill in the new IP.

After adding the output transmission configuration, save the project and download it to the gateway.

Read more
[Technical Classroom] How does UniMAT Internet of Things realize remote cloud interaction of data between devices?

[Technical Classroom] How does UniMAT Internet of Things realize remote cloud interaction of data between devices?

1 Function introduction

UniMAT IoT products, including IoT screens and IoT gateways. The function of data interaction between IoT products can be realized through the cloud platform. For example, such an application scenario: a control system is controlled by two controllers at the top of the mountain and at the foot of the mountain, and the two controllers need to be interlocked. But the top and bottom of the mountain are inconvenient for wiring. The data mapping function of UniMAT Internet of Things products can solve this demand very well. The IoT products (IoT screen or gateway) are arranged on both sides of the controller to communicate with the controller, read and write the controller data, and then realize the data exchange between the two controllers through the data mapping function of the UniMAT cloud platform .

2 Version information

The data mapping function requires device version 2.0 or higher to support. Device version information can be viewed in the portal shown below. If the version information is incorrect, please contact technical support to obtain the corresponding version.

3 Configuration steps

3.1 Add device connection

Add device connection information on the device management platform (AnyAccess of version 2.0 or later), and select the corresponding interface and protocol according to the actual situation.

The content that appears in the parameter tab of the new device connection will change according to the connection service selected earlier. If it is a serial port protocol, the parameters need to correctly set the baud rate station address and other information. If it is a network port protocol, you need to correctly set the PLC IP address and port number and other information.

3.2 Add real-time data

Add real-time data on the device management platform (AnyAccess of version 2.0 or later), and set the corresponding variable name and read and write permissions.

After the variables are added, click Configure Synchronization to transfer the variable information to the device. The release status after the last variable should be delivered successfully. If it has not been delivered, click the configuration synchronization button again.

3.2 Configuration data mapping

After the real-time data of the two devices is added, the configuration of the data mapping can be performed. Data mapping is that the source device periodically writes the value of the corresponding address to the target device to realize data communication.

4 Actual effect verification

After clicking Save, the data mapping function starts to work. At this time, you can return to the real-time data to check and verify whether the value in the corresponding target device changes after the data value of the source device changes.

Read more
Edimensional IoT Quick Start

Edimensional IoT Quick Start

Table of contents

0 Introduction

1 Required hardware and software

2 Software acquisition entrance

3 Hardware connection

4 Device configuration

5 Device binding

6 View data

7 Function Exploration—Alarm Settings

8 Function Exploration—Remote Download

9 Function Exploration—Mobile Terminal

10 Function Exploration—Cloud Configuration

 

 

0 Introduction

What is the Internet of Things? I personally think that the Internet of Things is an extension of the Internet. In the beginning, the terminal of the Internet was a computer (personal computer or server), and there was no other terminal hardware except the computer. Simply put, if you want to surf the Internet, you can only use a computer. Later, with the advent of the mobile Internet, mainly because of the addition of smart phone terminals, when you want to surf the Internet, you can use mobile phones in addition to computers. We are talking about the Internet of Things, which means that everything can be connected to the Internet. As long as there is hardware connected to the network and data exchange occurs, it is called the Internet of Things. This is the direction of technological development and the inevitable result of technological development. Those hardware that cannot access the Internet need the help of our IoT gateway (U-BOX, box), the box communicates with the device, and sends data to the Internet to achieve the purpose of data Internet access. This article takes UniMAT Internet of Things gateway as an example to introduce how to make a traditional UN120PLC go online. By reading this article and following the step-by-step setup, you can get a traditional PLC connected to the Internet.

 

1 Required hardware and software

hardware:

1 UN124E

2 UBOX-4G

3 network cables

software:

1 Uniface configuration software - used for configuration engineering, that is, what device does the box communicate with, what data to send to the Internet, how often to send it once, by what method, 4G, WiFi, or wired network, etc. These contents should be in the group. well defined in the state software.

2 Browser - used to log in to the cloud platform website, view the data that has occurred on the Internet, manage the devices connected to the Internet, and so on.

3 Mobile client - used to view data and pictures on the mobile phone.

4 Computer client AnyAccess—used for remote upload and download programs, screen projection and other operations.

2 Software acquisition entrance

1 Uniface configuration software download address http://www.unimat.com.cn/down-196.html

2Cloud platform website http://www.unimatiot.com:8080/ywyun/login

3. Apple mobile phone client: search for "UniMAT Cloud Platform" in the app store to download

Android mobile client download address https://pan.baidu.com/s/1fR9015ENY82HLNxtQxWUMA

4 PC client and configuration software in one compressed package

3 Hardware connection

Note: The two network ports are in switch mode, and the same IP can be used for network access and communication.

From the above information: We want to communicate between UN124E and the box, just connect the power supply separately, and connect the network port of the PLC to the network port of the box with a network cable. If serial communication is used, it is necessary to connect the 3+ 8- pins of the RS485 port on the PLC side to the 5+ 6- terminals of the box, that is, the COM1 port of the box.

At the same time, you need to put the 4G card in the box into the card slot at the top of the box. Note that this card can only be used in a box, and putting it in a mobile phone will make the card lock machine unusable. And after putting it into a box, the card matches the communication module in the box and is automatically activated, and the card cannot be used in other boxes.

4 Device configuration

 What device will our box communicate with? Through what protocol, which communication port? Which addresses? These contents should be set in Uniface software. In this example, we use the box (UBOX-4G) to communicate with the UN120CPU, and send the DO point in the CPU and the first 5 words of the V area to the cloud platform through the Ethernet port.

a)Create a new project in Uniface:

b)To make the IoT settings:

Set the variable name, unit, data type, address, and read and write permissions in turn.

c)Gateway settings: Set the box's own IP address and Internet access here.

d)Download configuration:

After the download is complete, the box communicates with the PLC, and continuously sends the four variables we built to the cloud platform. Next, we go to the cloud platform to see if the data is received.

To view data on the platform, the premise is that there is a platform account and the device is bound to the account. Similar to the device sending you WeChat, you must register a WeChat account from Tencent, and then add the device as a WeChat friend before you can view the WeChat messages he sent you. This process of adding friends is the process of binding.

5 Device binding

1)Account registration: log in to the website http://www.unimatiot.com:8080/ywyun/login

After successful registration, return to login.

6 View data

When the device is online, you can check whether the data is consistent with the PLC. If the device is not online, check whether the SIM card (traffic card) is plugged in, whether the antenna is firmly connected, and whether the 4G signal in the basement is not good.

At this point, we have uploaded the variables in the PLC to the cloud platform, and our devices have been uploaded to the cloud!

 

7 Function Exploration - Establishing a Virtual Serial Port

When the IoT touch screen or gateway uses the serial port to remotely download the PLC program, a virtual serial port needs to be established on the computer. The virtual serial port opens up the serial port channel between the remote PLC and the computer.

It is recommended to use VPSD software to create a virtual serial port.

1,virtual serial port

A. Port 1, the serial port name of the PLC side, the serial port name can be customized, for the convenience of memory, the port 1 is named PLC.

B. Port 2, the serial port name of the computer, name the port 2 as the unused port number of the conventional computer, such as COM8

2,add port

Click the Add Port button C, and the newly created serial port pair will appear on the left side of the software.

Open the computer device manager, you can also see the built serial port pair.

3.Anyaccess Serial Pair Confirmation

Click the Anyaccess software, the plug logo on the upper right, confirm whether the software serial port pair is selected correctly, as shown in the figure below, the serial port pair is incorrectly selected, click button D to select the correct serial port pair.

Reselect serial port pair

In this example, serial port 1 selects PLC, and serial port 2 selects COM8.

4.PLC programming software serial port selection

The programming software selects the newly created serial port 2, COM8

 

 

8 Function Exploration—Alarm Settings

 

To achieve cloud push of alarm information, you need to configure alarm information in the engineering configuration and check the Internet of Things option.

After the alarm information is configured, save the project and download it to the box. After downloading, our newly added alarm can work normally.

Now test whether the alarm information just now works normally: set Q0.0 to 1, and then check in the information center of the cloud platform - real-time alarm to see if there is an alarm push.

If you need WeChat push, you need to bind with WeChat.

The binding process is: 1. Follow the WeChat public account

2 Scan code binding information

About SMS alarm push: There is no SMS push by default. If you need SMS push, you can contact our technical staff to open the experience.

 

 

9 Function Exploration—Remote Download

For remote download, we need to use the computer client AnyAccess. Enter the registered account and password. Click to log in.

The remote download of the box configuration is successful. The box will restart after each remote download. If remote download is required after the restart, the previously opened transparent transmission channel needs to be opened again.

Now download the program of the PLC remotely:

9 Function Exploration—Mobile Terminal

After installing the mobile phone client, log in to the registered account to use and view data information and alarm information on the mobile phone.

10 Function Exploration—Cloud Configuration

The cloud configuration screen is a more intuitive way to view device information remotely. Before understanding the cloud configuration screen, let's first understand a concept: template.

Template: The project configured on the cloud platform (including pictures, variables associated with controls, etc.) is called a template. It can be understood as the project of ordinary touch screen.

Binding of templates: Associating templates with IoT devices, similar to connecting a computer and an ordinary touch screen with a download cable.

Publishing of templates: Apply templates to devices. Similar to the download operation of ordinary touch screen.

After configuring the screen, let's bind the screen to the device:

Next, you can go to the configuration monitor to view the test cloud screen.

 For more functions, please pay attention to our official website - data download - product video, http://www.unimat.com.cn/video-199.html. Check out more video learning materials.

Read more
【Technology Sharing】UniMAT HMI script switching screen operation

【Technology Sharing】UniMAT HMI script switching screen operation

 In practical projects, people often encounter the need to control the screen switching of the touch screen through the PLC external switch, or when the equipment fails, some interfaces can automatically pop up to remind the operator to achieve a more intelligent effect. The following are the specific steps:

The manual automatic knob I0.0 also switches the operation screen while switching the operation mode.

A.After configuring the master/automatic screen, open the script editor and create a new script

B. Customize the script name, select the script type as trigger script

C. Edit trigger conditions (switch to automatic screen)

Note: The trigger condition must be typed on ==

D. Select the screen switching function (the function will be described in detail below after the function is selected by the mouse) and fill in the corresponding parameters

The location of the screen ID 

Generate a function, pay attention to save

Continue to create a falling edge script with the above method (cut to manual screen)

After both scripts are created, click Save

Remarks: I0.0==1, this is the judgment condition, which is equivalent to judging whether the proposition I0.0==1 is true or false, from false to true and from true to false, which are wrong to right (0→1) And right becomes wrong (1→0)

With the help of UniMAT cloud platform, remote locking is realized

A First create a lock screen in the Uniface IoT version

B Make a lock trigger bit in the IoT settings

C Create two scripts in the script editor according to the above screen script usage method, the lock machine can be set to the rising edge of LB10 to 1 to trigger the lock screen, and the unlock to the rising edge of LB10 to 0 to trigger to other normal screens.

D Set LB10 as HMI power-off hold, to ensure that when LB10 is 1, it can keep the locked state after the HMI is powered on again

 

The above method of switching the screen is a basic and simple operation. After the user is a little familiar with the UniMAT HMI script, he can also combine the two screen switching scripts into one by reading the variable function and the IF else statement.

 

Read more
24 results

If You Would Like to Contact Support or Make a Purchase Please Fill out the Form

If you have urgent needs, please call our customer service number

Please fill in your information in detail so that our support staff can clearly understand your needs.

Value is required
Value is required
Please input the correct email address
Value is required
Thank you!