Key points of host side programming:
The command format includes: STX (02h), commands (such as RD, WD), device address (4-digit ASCII hexadecimal), data length, ETX (03h), and checksum.
Interrupt output: When the status of the internal devices (SM0~SM49) in GOT changes or special events (such as screen switching or numerical input completion) occur, GOT will automatically send 1/2/4 byte interrupt data to the host. Enable 'Interrupt Data Byte' and 'Special Interrupt Code' in the detailed communication settings.
3.2 Ethernet Connection
Supported protocols: UDP/IP or TCP/IP. Interrupt output is only valid under TCP/IP.
Set project:
GOT IP address, subnet mask, default gateway.
Ethernet download port number (default 5014) and GOT communication port number (default 5021).
32-bit storage order: LH Order (low word first) or HL Order (high word first).
Notes:
When multiple controllers send commands simultaneously under UDP/IP, GOT may not be able to receive all of them and needs to retry.
When connecting multiple GOTs, each GOT must have a different PLC No. (station number) set and ensure that the IP address is not duplicated.
3.3 Troubleshooting: Common errors in microcomputer connection
Possible causes and solutions for the phenomenon
GOT is unresponsive, POWER LED is normal. The serial cable is too long (>15m) or the wiring is incorrect. Shorten the cable to within 15 meters. Check the RS-232 pin definition (TX/RX cross, SG direct connection)
Read all data as 0 or garbled baud rate/data bits/stop bits/check for inconsistency. Verify that the detailed settings for GOT communication are exactly the same as those on the host side; Confirm the actual signal using an oscilloscope or serial monitoring tool
Error code SD2=1 or 101 (parity error). If the parity settings do not match, change the parity of both parties to the same (None/Even/Odd); Check cable shielding and grounding
Error code SD2=4 or 104 (communication message error): The correct frame termination symbol (ETX or CR) has not been received. Confirm that the message sent by the host ends with ETX (03h) and/or CR+LF; Check if the upper limit of the receiving buffer has been exceeded
Interrupt output has no response and interrupt data byte is not enabled or SM52 is set to ON. Set interrupt data byte ≥ 1 in the communication detailed settings and confirm that SM52=OFF (interrupt output allowed); Replace UDP with TCP/IP
Ethernet connection timeout (Ping not working), IP address conflict or network cable failure, perform Ping test; Check if the GOT IP address ends in. 0 or. 255; Ensure that the switch supports 100BASE-TX
MODBUS/RTU connection
As a MODBUS master station, GOT can connect up to 31 MODBUS/RTU slave station devices (such as frequency converters, instruments, PLCs).
4.1 Wiring points
RS-232: point-to-point, maximum 15 meters.
RS-422/485: multi-point, maximum 1200 meters. Twisted shielded wires must be used. Terminal resistance: When the GOT is located at the end of the bus, set the terminal resistance to 110 Ω (1 pair of wires) or 330 Ω (2 pairs of wires). Intermediate nodes must disable terminal resistors.
Supports 2-wire (half duplex) and 4-wire (full duplex) connections. In the 2-wire system, SDA and RDA need to be short circuited, and SDB and RDB need to be short circuited.
4.2 GOT Side Settings
Communication speed: 9600/19200/38400/57600/115200 bps.
Data bits: 8-bit (MODBUS standard), stop bit 1 or 2, parity check none/odd/even.
Host address: GOT's station number (1-247). Note: The slave station must contain the same device as this station number (for reading).
Number of retries: default 3 times.
Delay time: Some MODBUS devices require frame intervals greater than 3.5 characters, and the delay can be increased here (0-300ms).
4.3 Supported MODBUS Function Codes
Function code name, maximum number of points per use
01 Reading Coil 2000
02 Read Discrete Input 2000
03 Read and hold register 125
04 Read input register 125
05 Writing a single coil 1
06 Write a single register 1
0F writes multiple coils 1968
10 write multiple registers 123
14 Read File Record 124
15 Writing Document Records 122
4.4 Common faults and troubleshooting
Possible causes and solutions for error phenomena
GOT alarm "system alarm (402): timeout error" slave station not responding or address error check slave station power and station number; Confirm that the communication parameters are consistent; Check the terminal resistance
Partial data reading is correct, and some incorrect function codes are not supported by the slave station. Disable unsupported function codes (such as 0F, 10) in GS570~GS576; Or use simpler function codes (01/03)
The write operation is invalid. When broadcasting write, the slave station does not support broadcasting broadcast address (0), which is only applicable for writing; To read, a specific station number must be specified
Intermittent RS-485 bus reflection or interference during communication ensures that only the terminal resistors at both ends are connected; Use shielded twisted pair cables and single ended grounding; Reduce communication speed
4.5 MODBUS Communication Control Function (GS Equipment)