MCGS touch screen and computer debugging software modbus communication

MCGS touch screen and computer debugging software modbus communication , hardware preparation

1, there is a computer with a serial port or USB to serial port can also;

2. There is a MCGS touch screen TPC7062KX or MCGS touch screen with RS232 protocol;

3, a communication line, the DP9 female head of the touch screen and the female DP9 female head, 2 and 3 are connected by cross, 5 and 5 stitches are connected as shown in Figure 1;

MCGS touch screen and computer debugging software modbus communication

4. A touch screen download line.

Second, the software preparation work

1, touch screen programming software (MCGS_ embedded version 7.6 (03.0001) complete installation package) other versions are also available, MCGS official website can be downloaded;

2, serial debugging assistant sscom32;

3, cnc check code generator;

Third, touch screen writing and downloading

1, touch screen programming

MCGS touch screen and computer debugging software modbus communication

MCGS touch screen and computer debugging software modbus communication

Figure 4, serial data forwarding window

MCGS touch screen and computer debugging software modbus communication

Fifth, delete the device channel

MCGS touch screen and computer debugging software modbus communication

Figure 6, adding a zone 1 device channel

MCGS touch screen and computer debugging software modbus communication

Add 1 channel, 1 can only read the data of the touch screen on the computer and can't write

MCGS touch screen and computer debugging software modbus communication

Figure 7. Add channel 0

Zone 0 channel, can read and write on the computer side,

MCGS touch screen and computer debugging software modbus communication

Figure VIII, built data

MCGS touch screen and computer debugging software modbus communication

Figure IX. Click on the quick connect variable

MCGS touch screen and computer debugging software modbus communication

Figure 10. Select the default device variable connection

MCGS touch screen and computer debugging software modbus communication

Figure XI, fast connected variables

MCGS touch screen and computer debugging software modbus communication

Figure 12, click to confirm, add all

MCGS touch screen and computer debugging software modbus communication

Figure 13. Create the first button

MCGS touch screen and computer debugging software modbus communication

Figure 14. Create a second button

MCGS touch screen and computer debugging software modbus communication

Figure 15. Creating a fill animation

MCGS touch screen and computer debugging software modbus communication

Figure 16. Download to touch screen

Fourth, computer-side serial port debugging software

MCGS touch screen and computer debugging software modbus communication

Figure 1, open SSCOM debugging assistant

MCGS touch screen and computer debugging software modbus communication

MCGS touch screen and computer debugging software modbus communication

Figure 2. Data segment without checksum

Copy the data into the CRC check code, calculate the check code, and check the code before and after.

MCGS touch screen and computer debugging software modbus communication

Figure 3. Calculating the check code

MCGS touch screen and computer debugging software modbus communication

Figure 4, the first place in the reading 1 area has been written

Then open the serial port, click to send the observation to read the data, be sure to remember the HEX check,

MCGS touch screen and computer debugging software modbus communication

Figure 5, the data read back

Click the first button in the 1st area of ​​the touch screen, the button will set this position to 1, and then click the test software to send the observation and read the data.

MCGS touch screen and computer debugging software modbus communication

MCGS touch screen and computer debugging software modbus communication

Figure 6. It is observed that the data of one bit in the read zone 1 has become 1

Send an instruction from the computer to make the first position in zone 0

MCGS touch screen and computer debugging software modbus communication

Figure 7, write 1 area first click to send to observe the change of the touch screen

MCGS touch screen and computer debugging software modbus communication

Figure 8, click to send feedback back to the data

Reset the first bit of area 0 to 0

MCGS touch screen and computer debugging software modbus communication

Figure 9, reset to 0, first place in zone 0

At this point, you have already made the MODbus protocol of the MCGS touch screen quite understandable.

MCGS communicates with peripherals when running on a computer

Modbus TCP/IP

Use the computer as the host and the peripheral as the slave

1. Set the TCPIP parent device and device 0 under the MCGS device window:

MCGS touch screen and computer debugging software modbus communication

MCGS touch screen and computer debugging software modbus communication

Use the computer as a slave and the peripheral as a host

1. Select the generic TCP/IP parent device – (general TCP/IP device)

2. Device 1 selects ModbusTCPIP data forwarding device

MCGS touch screen and computer debugging software modbus communication

Use the computer as the host and the peripheral as the slave

1. Under the device window of MCGS, set the parent device and device 0: (Note: The serial device can connect the slave device to the PC or download the program to the touch screen and connect with the slave device.)

MCGS touch screen and computer debugging software modbus communication

MCGS touch screen and computer debugging software modbus communication

Use the computer as a slave and the peripheral as a host

1. Select the universal serial port parent device, modbusc serial data forwarding device:

Set under the device window

When using modbusTCP/IP communication, the parent device selects the generic TCP/IP parent device, the host: device 0 selects 'Modicon modbusTCPIP', the slave: device 0 selects 'ModbusTCPIP data forwarding device'; when using modbus 485 communication, The parent device selects 'Universal Serial Parent Device', Host: Device 0 selects 'Modicon modbusRTU', Slave: Device 0 selects 'modbus serial data forwarding device'.

Semi-transparent Liquid Crystal Display

Semi-Transparent Liquid Crystal Display,2.7Inch Translucent Liquid Crystal Display,Thin Translucent Liquid Crystal Lcd Display,Fast Response Lcd Display

Dongguan Yijia Optoelectronics Co., Ltd. , https://www.everbestlcdlcms.com

This entry was posted in on