EasyManua.ls Logo

Omron TJ1-MC04 - PROGRAMMING 1 - 4.3.2 Host Link Slave

Omron TJ1-MC04 - PROGRAMMING 1
312 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication protocols
PROGRAMMING MANUAL 163
Revision 3.0
/i
/i
/i
4.3.2 Host Link slave
If the TJ1-MC__ is the Host Link slave, a Host Link master (for example, a
programmable terminal) can read data from the TJ1-MC__ and write data to
it. The mapping between the slave and the master is:
/i
You can use these BASIC commands:
/i
Commands
The commands supported for the Host Link Slave protocol are given in the
table below. The protocol supports single frame transfer and multiple frame
transfer.
/i
Example Send TS (test) command to PC using HLM_COMMAND.
BASIC code HLM_COMMAND(HLM_TEST,2,13)
Host Link
communication
From Host Link master to Host Link slave:
@13TSMCW151 TEST STRING2A*
From Host Link slave to Host Link master:
@13TSMCW151 TEST STRING2A*
Result HLM_STATUS PORT(2) = 0, which implies correct communication.
Example Set PC in MON mode using HLM_COMMAND.
BASIC code HLM_COMMAND(HLM_STWR,2,13,2)
Host Link
communication
From Host Link master to Host Link slave:
@13SC0250*
From Host Link slave to Host Link master:
@13SC0052*
Result The PC runs in MON mode. Note that this is necessary for writing data
to the PC using HLM_WRITE.
Example Reading PC model code using HLM_COMMAND (timeout).
BASIC code HLM_TIMEOUT=500
' Destination address: VR(100)
HLM_COMMAND(HLM_MREAD,2,13,MC_VR,100)
Host Link
communication
From Host Link master to Host Link slave:
@13MM42*
From Host Link slave to Host Link master:
no response
Result Because the master has not received a response from the PC,
HLM_STATUS PORT(2) has value 256 (bit 8 is set) after 500 servo
cycles.
TJ1-MC__ memory Host Link mapping Address range
VR CIO 0 to 1023
TABLE DM 0 to 63999
BASIC command Description
SETCOM SETCOM configures the serial communication port, and it enables
the Host Link protocols.
HLS_NODE HLS_NODE defines the slave unit number for the Host Link Slave
protocol.
HLS_MODEL HLS_MODEL defines the TJ1-MC__ model code for the Host Link
Slave protocol.
Type Header code Name Function
I/O memory read-
ing
RR CIO AREA
READ
Reads the specified number of
words from VR memory begin-
ning with the designated word.
RD DM AREA
READ
Reads the specified number of
words from TABLE memory
beginning with the designated
word.
I52E-EN-03.book Seite 163 Freitag, 29. Juni 2007 11:55 11

Table of Contents

Related product manuals