Communication protocols
PROGRAMMING MANUAL
212
R
e
vi
si
o
n
1
.0
ETHERNET(1,-1,14,1,1,3)
ETHERNET(1,-1,14,1,2,2)
Change input address to 100:
ETHERNET(1,-1,14,1,0,100)
4.3
Serial protocol
The TJ2-MC64 has a DB-9 connector that contains two serial ports:
•
Port 1: RS232
•
Port 2: RS422 or RS485, depending on the switch settings
See the Trajexia Hardware Reference manual for details.
Both ports can independently support these protocols:
•
Host Link master
•
Host Link slave
•
ModbusRTU slave
•
User defined protocol
4.3.1
Host Link master
If the TJ2-MC64 is the Host Link master, you can send BASIC commands to
a Host Link slave, for example a PC. When you send a BASIC command to
a Host Link slave, the execution of the next BASIC command waits until the
Host Link slave sends a response.
You can use these BASIC commands:
/i
Note
The serial port (port 1) CANNOT be used for programming the unit.
BASIC command
Description
HLM_COMMAND
HLM_COMMAND
executes a specific Host Link command to the
slave.
HLM_READ
HLM_READ
reads data from the Host Link slave to either VR or
TABLE memory.
HLM_STATUS
HLM_STATUS
gives the status of the last command of the Host Link
master.
HLM_TIMEOUT
HLM_TIMEOUT
defines the Host Link master timeout time.
HLM_WRITE
HLM_WRITE
writes data to the Host Link slave from either VR or
TABLE memory.
SETCOM
SETCOM
configures the serial communication port and enables the
Host Link protocols.
BASIC command
Description