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;
4. A touch screen download line.
Second, the software preparation work1, 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 downloading1, touch screen programming
Figure 4, serial data forwarding window
Fifth, delete the device channel
Figure 6, adding a zone 1 device channel
Add 1 channel, 1 can only read the data of the touch screen on the computer and can't write
Figure 7. Add channel 0
Zone 0 channel, can read and write on the computer side,
Figure VIII, built data
Figure IX. Click on the quick connect variable
Figure 10. Select the default device variable connection
Figure XI, fast connected variables
Figure 12, click to confirm, add all
Figure 13. Create the first button
Figure 14. Create a second button
Figure 15. Creating a fill animation
Figure 16. Download to touch screen
Fourth, computer-side serial port debugging softwareFigure 1, open SSCOM debugging assistant
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.
Figure 3. Calculating the check code
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,
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.
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
Figure 7, write 1 area first click to send to observe the change of the touch screen
Figure 8, click to send feedback back to the data
Reset the first bit of area 0 to 0
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 computerModbus 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:
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
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.)
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:
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