Ext Command

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Main Software Enhancement

Version 9.57 or later

Enhanced Communication Commands

DENSO ROBOT
HM-C/HS-C SERIES
HC-C SERIES
XYC-C SERIES
CS-C SERIES
VS-C SERIES

OWNER'S MANUAL (Supplement)


Main Software Enhancement
Version 9.57 or later
Copyright © DENSO, 1999

All rights reserved. No part of this publication may be produced in any form or by any means without
permission in writing from the publisher.

Specifications are subject to change without prior notice.


Preface

This manual describes enhanced communication commands which are newly supported in the main software
version 9.57 or later. They enable the robot controller to communicate with a variety of external equipment
via the controller's RS-232C interface port CN8 which was dedicated to the µVision.

Cautions in using enhanced communication commands

(1) Enhanced communication commands are disabled by default. To use those commands, be sure to
enable them with the OPTION parameter (refer to Section 4.9).
(2) Be sure to use the teach pendant for editing enhanced communication commands. The offline
programming software (WINCAPS) does not support those commands.
Contents

1. What are Enhanced Communication Commands? ............................................................. 1

2. System Requirements.......................................................................................................... 1

3. Execution Flow of Enhanced Communication Commands ................................................. 3

4. Communication Parameters ................................................................................................ 4


4.1 Connection with µVision or other external equipment (MVISION)............................. 4
4.2. Transmission speed (S_BAUD_RATE)...................................................................... 5
4.3 Character length (S_CHARLENGTH) ........................................................................ 6
4.4 Parity bit (S_PARITYBIT) ........................................................................................... 7
4.5 Stop bit (S_STOPBIT) ................................................................................................ 8
4.6 Timeout length (S_TIMOUT) ...................................................................................... 9
4.7 Delimiter (S_DELIMITER) .......................................................................................... 10
4.8 CR/LF code (S_CRCODE)......................................................................................... 11
4.9 Option (OPTION)........................................................................................................ 12

5. Communication Commands ................................................................................................ 13


5.1 SINP ........................................................................................................................... 13
5.2 SINPB ......................................................................................................................... 15
5.3 SOUT.......................................................................................................................... 17
5.4 SOUTB ....................................................................................................................... 18
5.5 SGET .......................................................................................................................... 20
5.6 SSET........................................................................................................................... 24
5.7 SCLEAR ..................................................................................................................... 29

6. Checking the Contents of the Receive and Send Buffers.................................................... 30


6.1 Checking the receive buffer (LOG:SINP)................................................................... 30
6.2 Checking the send buffer (LOG:SOUT) ..................................................................... 31

7. Error List ............................................................................................................................... 32

8. Character Set Table ............................................................................................................. 33


1. What Are Enhanced Communication Commands?

Enhanced communication commands are more versatile than the conventional


communication commands. The robot controller sends and receives these commands via
its RS-232C port CN8.

2. System Requirements

For execution of the enhanced communication commands, your robot controller requires
the following:

(1) Interface
RS-232C

(2) Communications port


CN8

(3) Pin assignment


See Table 1.

Table 1. CN8 Pin Assignment

Viewed from pin face

Pin No. Assignment Pin No. Assignment


1 GND 14 Not used.
2 TXD (Output) 15 Not used.
3 RXD (Input) 16 Not used.
4 RTS (Output) 17 Not used.
5 CTS (Input) 18 Not used.
6 DSR (Input) 19 Not used.
7 GND 20 DTR (Output)
8 Not used. 21 Not used.
9 Not used. 22 Not used.
10 Not used. 23 Not used.
11 Not used. 24 Not used.
12 Not used. 25 Not used.
13 Not used.

1
(4) RS-232C communications requirements
Table 2 lists the RS-232C communications requirements.

NOTE 1: Enhanced communication commands use the RS-232C interface port CN8
dedicated to the µVision, so no µVision can be used when you use those commands.
NOTE 2: Always match the communications conditions of the robot controller with
those of the connected external equipment for accurate data transmission.
NOTE 3: If you modify the communications conditions, turn the controller power off
and on in order to make the new settings go into effect.

Table 2. RS-232C Communications Requirements

Item Specifications Unit Defaults Related


parameters
Connection with O (1) or X (0) O (1) MVISION
µVision or other
external equipment
Transmission speed 9600/19200/38400 bps 9600 S_BAUD_RATE
Character length 7 or 8 bit 8 S_CHARLENGT
Parity bit None, odd, or even bit Odd S_PARITYBIT
Stop bit 1 or 2 bit 1 S_STOPBIT
Timeout length 1 (0.5 sec.) to 32767 (16383.5 sec.) 0.5 sec 6 (3 sec.) S_TIMOUT
Delimiter Comma (2C), space (20), or tab (09) Hex. Comma S_DELIMITER
(2C)
CR/LF code CR (0D), LF (0A), or CR+LF (0D0A) Hex. CR (0D) S_CRCODE
Option X (0) or O (1) X (0) OPTION

2
3. Execution Flow of Enhanced Communication Commands

The main software version 9.57 supports the following seven enhanced communication
commands.

Figure 1 shows the execution flow of those enhanced communication commands. The
circled numerals given in the figure correspond to those given below.

• SINP Reads data from the external equipment into the receive buffer.

‚ SINPB Substitutes data currently stored in the receive buffer for the specified integer
variable.

ƒ SOUT Sends data stored in the send buffer to the external equipment.

„ SOUTB Sends the value of an integer variable to the external equipment.

… SGET Reads data from the receive buffer, converts it into the specified format, and
then substitutes it for a variable.

† SSET Writes the value of an integer variable into the send buffer after converting it
into the specified format.

‡ SCLEAR Clears the receive buffer.

Figure 1. Execution Flow of Enhanced Communication Commands

3
4. Communication Parameters

4.1 Connection with µVision or other external equipment (MVISION)

4.1.1 Function
Specifies the external equipment type to be connected to the controller's communications
port CN8. If the DENSO's small-sized visual equipment µVision is connected to CN8, you
may use µVision commands.

4.1.2 Entry range


0 (X): Use CN8 as a communications port for enhanced communication commands.
1 (O): Use CN8 as a µVision port.

NOTE 1: If "0" is set, µVision commands (VIS, JF, VSET, VDT, VPUT, and VRST) cannot
be used. If used, any command will cause ERROR539 and stop the currently running
program at execution of the command.
NOTE 2: If "1" is set, enhanced communication commands (SINP, SINPB, SOUT, SOUTB,
SGET, SSET, and SCLEAR) cannot be used. If used, any command will cause
ERROR589 and stop the currently running program at execution of the command. When
CN8 is used as a µVision port, the communications conditions are fixed to the following
independent of any other parameters:

- Transmission speed 9600 bps


- Character length 8 bits
- Stop bit 1 bit
- Parity Odd

4.1.3 Entry procedure


To set the MVISION parameter, follow the procedure given in Table 2.

Table 2. Setting the MVISION Parameter

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=O
set mode.

(2) Choose the 0 or 1 key SINP "PARAM" "0" entered in


desired MVISION=X this example.
communication ENT SINP "PARAM"
command. S_BAUD_RATE=0
REC with SURE held SINP "PARAM"
down RECORD?
(3) Save the new REC with SURE held
setting. down

4
4.2 Transmission speed (S_BAUD_RATE)

4.2.1 Function
Specifies the transmission speed for communication with external equipment.

4.2.2 Entry range


0: 9600 bps
1: 19200 bps
2: 38400 bps

NOTE: If 38400 bps is set, execution of SINP or SINPB command will cause ERROR598
and stop the currently running program. (The same error will take place also if 19200 bps
is set in the VS-C series.)

4.2.3 Entry procedure


To set the desired transmission speed, follow the procedure given in Table 3.

Table 3. Setting the Transmission Speed

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD SINP "PARAM"
baud rate item. S_BAUD_RATE=0

(3) Choose the desired Any of 0 to 2 keys SINP "PARAM" "1" entered in
transmission S_BAUD_RATE=1 this example.
speed. ENT SINP "PARAM"
S_CHARLENGTH=0
REC with SURE held SINP "PARAM"
down RECORD?
(4) Save the new REC with SURE held
setting. down

5
4.3 Character length (S_CHARLENGTH)

4.3.1 Function
Specifies the character length.

4.3.2 Entry range


0: 7 bits
1: 8 bits

4.3.3 Entry procedure


To set the desired character length, follow the procedure given in Table 4.

Table 4. Setting the Character Length

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD two times SINP "PARAM"
character length S_CHARLENGTH=0
item.
(3) Choose the 0 or 1 key SINP "PARAM" "1" entered in
desired character S_CHARLENGTH=1 this example.
length.
ENT SINP "PARAM"
S_PARITYBIT=0
REC with SURE held SINP "PARAM"
down RECORD?
(4) Save the new REC with SURE held
setting. down

6
4.4 Parity bit (S_PARITYBIT)

4.4.1 Function
Specifies whether a parity bit will be added and selects either odd or even parity if added.

4.4.2 Entry range


0: None
1: Odd
2: Even

4.4.3 Entry procedure


To set the desired parity bit, follow the procedure given in Table 5.

Table 5. Setting the Parity Bit

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD three times SINP "PARAM"
parity bit item. S_PARITYBIT=1
(3) Choose the Any of 0 to 2 keys SINP "PARAM" "2" entered in
desired parity bit. S_PARITYBIT=2 this example.
ENT SINP "PARAM"
S_STOPBIT=0
REC with SURE held SINP "PARAM"
down RECORD?
(4) Save the new REC with SURE held
setting. down

7
4.5 Stop bit (S_STOPBIT)

4.5.1 Function
Specifies a stop bit.

4.5.2 Entry range


0: 1 bit
1: 2 bits

4.5.3 Entry procedure


To set the desired stop bit, follow the procedure given in Table 6.

Table 6. Setting the Stop Bit

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD four times SINP "PARAM"
stop bit item. S_STOPBIT=0
(3) Choose the 0 or 1 key SINP "PARAM" "1" entered in
desired stop bit. S_STOPBIT=1 this example.
ENT SINP "PARAM"
S_TIMOUT=6
REC with SURE held SINP "PARAM"
down RECORD?
(4) Save the new REC with SURE held
setting. down

8
4.6 Timeout length (S_TIMOUT)

4.6.1 Function
Specifies the desired timeout length.

4.6.2 Entry range


1 to 32767 (0.5 to 16383.5 seconds)

NOTE 1: You may enter the timeout length in increments of 0.5 second.
NOTE 2: Entry of "0" will cause no timeout.

4.6.3 Entry procedure


To set the desired timeout length, follow the procedure given in Table 7.

Table 7. Setting the Timeout Length

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD five times SINP "PARAM"
timeout item. S_TIMEOUT=6
(3) Enter the desired Numerical keys SINP "PARAM" "10" (5 seconds)
timeout length. S_TIMEOUT=10 entered in this
example.
ENT SINP "PARAM"
S_DELIMITER=0
REC with SURE held SINP "PARAM"
down RECORD?
(4) Save the new REC with SURE held
setting. down

9
4.7 Delimiter (S_DELIMITER)

4.7.1 Function
Specifies the desired delimiter which separates data fields.

4.7.2 Entry range


0: Comma (2Ch)
1: Space (20h)
2: Tab (09h)

4.7.3 Entry procedure


To set the desired delimiter, follow the procedure given in Table 8.

Table 8. Setting the Delimiter

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD six times SINP "PARAM"
delimiter item. S_DELIMITER=0
(3) Choose the Any of 0 to 2 keys SINP "PARAM" "1" entered in
desired delimiter. S_DELIMITER=1 this example.
ENT SINP "PARAM"
S_CRCODE=0
REC with SURE held SINP "PARAM"
down RECORD?
(4) Save the new REC with SURE held
setting. down

10
4.8 CR/LF code (S_CRCODE)

4.8.1 Function
Specifies the desired CR/LF code.

4.8.2 Entry range


0: CR (0Dh)
1: LF (0Ah)
2: CR + LF (0D0Ah)

4.8.3 Entry procedure


To set the desired CR/LF code, follow the procedure given in Table 9.

Table 9. Setting the CR/LF Code

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD seven times SINP "PARAM"
CR/LF code item. S_CRCODE=0
(3) Choose the Any of 0 to 2 keys SINP "PARAM" "2" (CR+LF)
desired CR/LF S_CRCODE=2 entered in this
code. example.
ENT SINP "PARAM"
OPTION=X
REC with SURE held SINP "PARAM"
down RECORD?
(4) Save the new REC with SURE held
setting. down

11
4.9 Option (OPTION)

4.9.1 Function
Enables or disables the enhanced communication commands.

4.9.2 Entry range


0: Disable
1: Enable

NOTE: The default is "0." To use the enhanced communication commands, set "1."

4.9.3 Entry procedure


To set the OPTION parameter, follow the procedure given in Table 10.

Table 10. Setting the OPTION Parameter

Procedure Press: On the display Comments


(1) Enter the OPT and SET UP SINP "PARAM"
communications MVISION=X
set mode.
(2) Proceed to the FWD eight times SINP "PARAM"
option item. OPTION=X
(3) Choose "Disable" 0 or 1 key SINP "PARAM" "1" entered in
or "Enable." OPTION=O this example.
ENT SINP "PARAM"
RECORD?
(4) Save the new REC with SURE held
setting. down

12
5. Communication Commands

5.1 SINP

5.1.1 Function
Reads data from external equipment into the receive buffer and substitutes the number of
received bytes for the specified variable.

5.1.2 Syntax
SINP bytevariable

bytevariable Label number of an integer variable (In) to which the


number of received bytes is to be assigned.

5.1.3 Description
(1) Upon receipt of a CR/LF code, this command terminates data receiving.
(2) Unless the controller receives a CR/LF code within the timeout length, it will cause
ERROR590 and stop the currently running program.
(3) If the controller receives data exceeding 256 bytes, it will cause ERROR592 and stop
the currently running program.
(4) If any variable label number exceeding the limit is specified, the controller will cause
ERROR3 and stop the currently running program.
NOTE 1: The number of received bytes is the bytes stored in the receive buffer (except a
last CR/LF code) when the SINP command has been executed.
NOTE 2: The receive buffer will not be cleared automatically. To set the received data from
the head of the receive buffer, therefore, use the SCLEAR command preceding the
execution of the SINP command.

5.1.4 Programming sample


Given below is a program sample which receives data from the external equipment and
substitute it for an integer variable.
- Receives data “123456789ABCDEFcr”
- Substitutes four bytes of the received data starting from the 3rd byte (that is, 3456 in this
sample) for variable I0010.

PROGRAM 1
0010 SCLEAR :Clears the receive buffer
0020 SINP I0001 :Receives data from external equipment
0030 SGET I0010 ASCBIN 3 4 :Converts four bytes from the
3rd byte into binary form and
substitutes it for variable
I0010
0040 END

13
5.1.5 Entry procedure
Follow the procedure given in Table 11.

Table 11. Entering the SINP Command

Procedure Press: On the display Comments


(1) Select SINP. OPT The "DISP"
0010?DISP flashes.
FWD three times The "SINP"
0010?SINP flashes.
ENT
0010?SINP I

(2) Enter the label Numerical keys "10" entered in


number of an 0010?SINP I10 this example.
integer variable to
which the number ENT 10th integer
of received bytes is 0010?SINP I0010 variable selected
to be assigned. in this example.
(3) Save the new REC with SURE held 0010 SINP I0010 Ready for next
setting. down 0020? entry.

14
5.2 SINPB

5.2.1 Function
Substitutes receive butter data stored currently at the execution time of the command and
its data length for the specified variables.

5.2.2 Syntax
SINPB destinationvariable bytevariable

destinationvariable Label number of a heading integer variable (In). The


received data will be assigned to this and the subsequent
integer variables.

bytevariable Label number of an integer variable (Im) to which the


number of bytes of the received data will be assigned.

5.2.3 Description
(1) This command assigns all data currently stored in the receive buffer to the specified
integer variables.
NOTE: If the previously received data is not necessary, clear the receive buffer by using
the SCLEAR command before the connected external equipment sends data to the robot
controller.

5.2.4 Programming sample


Given below is a program sample which receives binary data from the external equipment
and substitutes it for an integer variable.
- Receives data “4Fh, 4Bh, 00h, 12h, 34h, 56h, 78h” in binary form and gets the 4th and 5th
bytes of data.
- After execution of the SINPB, the values of the variables are as follows:
I0001=7 (7 bytes received)
I0002=4Fh (1st byte of data in the receive buffer)
I0003=4Bh (2nd byte of data in the receive buffer)
I0004=00h (3rd byte of data in the receive buffer)
I0005=12h (4th byte of data in the receive buffer)
I0006=34h (5th byte of data in the receive buffer)
I0007=56h (6th byte of data in the receive buffer)
I0008=78h (7th byte of data in the receive buffer)
- Converts data assigned to I0005 and I0006 into 2-byte data and substitutes it for I0010.
The value of I0010 comes to 4660 (1234h).

PROGRAM 1
0010 SINPB I0002 I0001 :Reads received data from I0002
0020 SETI I0010 = I0005*256 :Sets the 4th byte to I0010
0030 SETI I0010 = I0010+I0006 :Adds the 5th byte
0040 END

15
5.2.5 Entry procedure
Follow the procedure given in Table 12.

Table 12. Entering the SINPB Command

Procedure Press: On the display Comments


(1) Select SINPB. OPT The "DISP"
0010?DISP flashes.
FWD four times The "SINPB"
0010?SINPB flashes.
ENT The "I" flashes.
0010?SINPB I

(2) Enter the label Numerical keys 10th integer


number of a 0010?SINPB I10 variable selected
heading integer in this example.
variable to
which the received ENT 0010?SINPB I0010
bytes will be LENGTH:I
assigned.

(3) Enter the label Numerical keys 0010?SINPB I0010 11th integer
number of an LENGTH:I11 variable selected
integer variable to in this example.
which the number ENT
of received bytes 0010 SINPB I0010
will be assigned.
(See NOTE.)

(4) Save the new REC with SURE held 0010 SINPB I0010 Ready for next
setting. down 0020? entry.
NOTE: Specifying the same label number as that in step (2) will cause ERROR3. Enter any other
label number.

16
5.3 SOUT

5.3.1 Function
Sends data stored in the send buffer to external equipment.

5.3.2 Syntax
SOUT

5.3.3 Description
(1) This command sends all data stored in the send buffer, starting from its head and
appending a CR/LF code to the tail of the data.
(2) If no external equipment is connected, the controller will cause ERROR591 and stop
the currently running program after the timeout length.
(3) Upon completion of data transmission, the send buffer will be cleared.
NOTE: If data contains a CR/LF code, this commanded operation will be terminated by
sending the CR/LF code. To send data including a CR/LF code, use an SOUTB command.

5.3.4 Programming sample


Given below is a program sample which sends the character string "%Scr" to the external
equipment.

PROGRAM 1
0010 SETI I0001=37 :Assigns a % character code to I0001
0020 SETI I0002=83 :Assigns an S character code to I0002
0030 SSET I0001 BINARY 2 CR :Sets "%Scr" to the send buffer
0040 SOUT :Sends data stored in the send buffer to
the external equipment
0050 END

NOTE: For entry of character codes, refer to Section 8, "Character Set Table."

5.3.5 Entry procedure


Follow the procedure given in Table 13.

Table 13. Entering the SOUT Command

Procedure Press: On the display Comments


(1) Select SOUT. OPT The "DISP"
0010?DISP flashes.
FWD five times The "SOUT"
0010?SOUT flashes.
ENT
0010 SOUT
(2) Save the new REC with SURE held 0010 SOUT Ready for next
setting. down 0020? entry.

17
5.4 SOUTB

5.4.1 Function
Sends the specified bytes of data assigned to the specified variable, to the external
equipment directly.

5.4.2 Syntax
SOUTB sourcevariable sendbytes

sourcevariable Label number of a heading integer variable (In). From this


and subsequent integer variables, their assigned values will
be sent.

sendbytes Number of bytes to be sent (Immediate value, Im)

5.4.3 Description
(1) This command sends lower bytes of data assigned to an integer variable specified by
sourcevariable (and the subsequent variables).
(2) If any variable label number exceeding the limit is specified, the controller will cause
ERROR3 and stop the currently running program.
(3) If no external equipment is connected, the controller will cause ERROR591 and stop
the currently running program after the timeout length.
NOTE: Unlike the SOUT command, this command outputs variable values directly to the
external equipment, so it will have no effect on the send buffer.

5.4.4 Programming sample


Given below is a program sample which directly sends the lower bytes of values assigned
to I0001 through I0010 to the external equipment.

PROGRAM 1
0010 SOUTB I0001 10 :Sends lower bytes of data assigned
to I0001 through I0010
0020 END

NOTE: It is assumed that send data is assigned to I0001 through I0010.

18
5.4.5 Entry procedure
Follow the procedure given in Table 14.

Table 14. Entering the SOUTB Command

Procedure Press: On the display Comments


(1) Select SOUTB. OPT The "DISP"
0010?DISP flashes.
FWD six times The "SOUTB"
0010?SOUTB flashes.
ENT The "I" flashes.
0010?SOUTB I

(2) Enter the label Numerical keys "10" entered in


number of an 0010?SOUTB I10 this example.
integer variable
from which data ENT 0010?SOUTB I0010 10th integer
starts to be sent. LENGTH: variable selected
in this example.
(3) Enter the number Numerical keys 0010?SOUTB I0010 "10" entered in
of bytes to be sent. LENGTH: 10 this example.
ENT 0010?SOUTB I0010
LENGTH: 10

(3') Enter the label SETI 0010?SOUTB I0010 The "I" appears.
number of an LENGTH:I
integer variable to Numerical keys 0010?SOUTB I0010 "I0002" selected
which the number LENGTH:I2 in this example.
of bytes to be sent
is assigned. (See ENT 0010 SOUTB I0010
NOTE.) LENGTH:I0002

(4) Save the new REC with SURE held 0010 SOUTB I0002 Ready for next
setting. down 0020? entry.
NOTE: Specifying the same label number as that in step (2) will cause ERROR3. Enter any other
label number.

19
5.5 SGET

5.5.1 Function
Reads data received by the SINP command and stored in the receive buffer, converts it
into the specified format, and then substitutes it for the specified variable.

5.5.2 Syntax
SGET destinationvariable conversiontype startbyte readbytes

destinationvariable Label number of a variable to which converted data will


be assigned. (In, Fn, Jn, or Pn)
conversiontype Conversion type which applies when read data will be
assigned to the specified variable.
Choose one of the following types:
- ASCBIN: From ASCII to BINARY (In, Fn, Jn, or Pn)
- BCDBIN: From BCD to BINARY (In), Converts BCD
data (0h to 065535h) into binary data and assigns it
to an integer variable.
- BINARY: No conversion (In)
NOTE: When Fn, Jn, or Pn is specified to
destinationvariable, only ASCBIN can be selected.
startbyte Starting byte (Immediate value, In) from which data
starts to be read in the receive buffer
To read data separated by delimiters, specify zero (0) to
startbyte and specify the nth field of data to
readbytes.
NOTE: When Jn or Pn is specified to destination-
variable, startbyte is fixed to zero (0) so that data
separated by comma will be read).
readbytes Number of bytes to be read (Immediate value, In)
NOTE: When startbyte is set to zero (0),
readbytes specifies the nth field of data separated by
delimiters.

5.5.3 Description
(1) If any variable label number exceeding the limit is specified, the controller will cause
ERROR3 and stop the currently running program.
(2) If destinationvariable is Jn or Pn, this command reads position data by the
number of axes in succession which are separated by delimiters, and then assigns
them to the specified variable.
(3) If conversiontype is BCDBIN but the specified data is not BCD (4 bits: 0000b to
1001b), the controller will cause ERROR594 and stop the currently running program.
(4) If numerical data in ASCII format contains values other than "0 to 9, period (.), +, -, and
space," or if it contains more than one "period (.), +, and -" mix-used, then the
controller will cause ERROR594 and stop the currently running program.

NOTE 1: If the specified number of axes data is not present in the receive buffer when this
command assigns data to a joint variable or position variable, then this command will
assign only the axes data currently stored in the receive buffer in the order of axes. No
error will take place.

20
NOTE 2: Only position data may be assigned to a position variable, having no effect on
figure data (Pnnnn. F). It is necessary to substitute figure data by using the SETI
command.

5.5.4 Programming sample


Given below is a program sample which reads received data by using the SGET command.

(1) Substitutes received data for the specified integer variable


- Receives 4 bytes of data from 7th to 10th bytes in ASCII format.
Receive data: OK1000200030004000cr
- Converts the received data into the binary format and then substitutes it for I0010. The
value of I0010 comes to 2000.

PROGRAM 1
0010 SINP I0001 :Receives data from external equipment
0020 SGET I0010 ASCBIN 7 4 :Converts four bytes of ASCII
data from 7th to 10th bytes into
binary format and substitutes it
for I0010
0030 END

(2) Substitutes received position data for the specified position variable
- Receives judgement code, X-, Y-, Z-, and T-axis coordinate values which are separated
by commas.
Receive data: OK, 100.0, 200.0, 300.0, 400.0cr
- Substitutes the received data for P0001. The values of P0001 are as follows:
P0001.1=100.0
P0001.2=200.0
P0001.3=300.0
P0001.4=400.0

PROGRAM 1
0010 SINP I0001 :Receives data from external equipment
0020 SGET P0001 ASCBIN 0 2 :Sends lower bytes of data
assigned to I0001 to I0010
0030 END

(3) Substitutes received BCD data for the specified integer variable
- Reads two bytes of data (4th and 5th bytes) in binary format and converts it into the BCD
format.
Receive data: 4Fh, 4Bh, 00h, 12h, 34h, 56h, 78h, 0Dh
- Substitutes the converted data for I0010. The value of I0010 is 1234.

PROGRAM 1
0010 SINP I0001 :Receives data from external equipment
0020 SGET I0010 BCDBIN 4 2 :Reads the 4th and 5th bytes of
BCD data and converts it into
binary format, then substitutes
it for I0010
0030 END

21
5.5.5 Entry procedure
Follow the procedure given in Table 15.

Table 15. Entering the SGET Command

Procedure Press: On the display Comments


(1) Select SGET. OPT The "DISP"
0010?DISP flashes.
FWD seven times The "SGET"
0010?SGET flashes.
ENT The "I" flashes.
0010?SGET I

(2) Enter the label ENT


number of a 0010?SGET I
variable to which Numerical keys "I0010" selected
converted data will 0010?SGET I10 in this example.
be assigned.
ENT 0010?SGET I0010 The "ASCBIN"
FORMAT:ASCBIN flashes.
(3) Select the FWD two times 0010?SGET F0010 "Binary" format
conversion type. FORMAT:BINARY selected in this
(See NOTE 1.) example.
ENT 0010?SGET F0010
START:0
(4) Enter the starting Numerical keys 0010?SGET F0010 "10" entered in
byte in the receive START:10 this example.
buffer.
ENT 0010?SGET F0010
LENGTH:0

(4)' Enter the label SETI 0010?SGET F0010


number of an START:I
integer variable to Numerical keys 0010?SGET F0010 "I0002" selected
which the starting START:I2 in this example.
byte in the receive
buffer is assigned. ENT 0010?SGET F0010
(See NOTE 2.) LENGTH:0
(5) Enter the number Numerical keys 0010?SGET F0010 "8" entered in
of bytes to be read. LENGTH:8 this example.
ENT
0010 SGET F0010

(5)' Enter the label SETI 0010?SGET F0010 The "I" flashes.
number of an LENGTH:I
integer variable to Numerical keys 0010?SGET F0010 "I0003" selected
which the number LENGTH:I3 in this example.
of bytes is
assigned. ENT
(See NOTE 3.) 0010 SGET F0010
(5) Save the new REC with SURE held 0010 SGET F0010 Ready for next
setting. down 0020? entry.

22
NOTE 1: Each time you press the FWD when the "ASCBIN" is flashing in step (2), the display
cycles through the following:
ASCBIN → BCDBIN → BINARY → ASCBIN
Each time you press the BACK, the display cycles in the reverse order of the above.
NOTE 2: Specifying the same label number as that in step (2) will cause ERROR3. Enter any other
label number.
NOTE 3: Specifying the same label number as that in step (2) or (4') will cause ERROR3. Enter
any other label number.

23
5.6 SSET

5.6.1 Function
Converts the value of a variable into the specified format and writes it into the send buffer.

5.6.2 Syntax
SSET sourcevariable conversiontype convertdigits delimiter

sourcevariable Label number of a variable from which data will be sent


to the send buffer. (In, Fn, Jn, or Pn)
If Jn or Pn is specified, this command sets ASCII data
by the number of axes, separating its values with
delimiter codes.

conversiontype Conversion type which applies when values assigned to


sourcevariable will be set to the send buffer.
Choose one of the following types:
- BINASC: From BINARY to ASCII (In, Fn, Jn, or Pn)
- BINBCD: From BINARY to BCD (In). Converts an
integer variable value into the 2 or 3 bytes of BCD
data and then set it to the send buffer.
- BINARY: No conversion (In). Sets data from
sourcevariable by the number of digits specified
by convertdigits into the send buffer.

convertdigits Number of digits to be converted when source-


variable is BINASC.
0: Automatically applies the number of digits of a
variable value.
Other than 0: Converts a variable value into the
specified digits of ASCII character string and sets it to
the send buffer. Include a decimal point and minus sign
in convertdigits. If the specified number of digits is
greater than the variable value, the upper digits are
zero-filled; if it is less, the controller will cause
ERROR594 and stop the currently running program.
NOTE: When Fn, Jn or Pn is specified to
sourcevariable, convertdigits is fixed to zero (0)
and the number of digits to be converted is fixed to 10
including signs and decimal points.

Value of variable ASCII data converted

-X.X -X.XXXXXXX
-XX.X -XX.XXXXXX
. .
. .
. .
-XXXXXXX.X -XXXXXXX.X
-XXXXXXXX.X ERROR594

NOTE: When conversiontype is BINARY,


convertdigits specifies the number of successive
integer variables to be set into the send buffer.

24
delimiter Delimiter type to be appended to the tails of data sets.
CR: Sets a CR/LF code specified by the S_CRCODE
parameter.
Comma (,): Sets a delimiter code specified by the
S_DELIMITER parameter.
NONE: Nothing follows data sets.

5.6.3 Description
(1) This command sets data to a position immediately following the previous SSET
command.
(2) If any variable label number exceeding the limit is specified, the controller will cause
ERROR3 and stop the currently running program.
(3) If the specified data exceeds the send buffer capacity, the controller will cause
ERROR593 and stop the currently running program.
NOTE 1: The contents of the send buffer will be cleared after execution of SOUT command.
To send the same data more than one time, you need to use the SSET command again.
NOTE 2: If a position variable is specified to sourcevariable, this command sets only
position data into the send buffer. No figure data (Pnnnn. F) will be set. If figure data is
needed, it is necessary to use an SSET command.

5.6.4 Programming sample


Given below is a program sample which sends a variable value to the external equipment
by using the SSET command.

(1) Converts the values of integer variables into ASCII format and sends them to the
external equipment
- Converts the values assigned to I0001, I0002, and I0003 into ASCII format and sends
them to the external equipment, separating them with delimiter codes specified by
delimiter.
- The send data is as follows:
I0001=11"
I0002=222
I0003=3333
Send data="11,222,333cr"

PROGRAM 1
0010 SSET I0001 BINASC 0"," :Sets the value assigned to
I0001 with delimiter codes
0020 SSET I0002 BINASC 0"," :Sets the value assigned to
I0002 with delimiter codes
0030 SSET I0003 BINASC 0 CR :Sets the value assigned to
I0003 with CR/LF codes
0040 SOUT :Sends data to the external
equipment
0050 END

25
(2) Converts the values of position variables into ASCII format and sends them to
the external equipment
- Converts the values of position variables into ASCII format by the number of axes and
sends the ASCII character string to the external equipment, separating them with
delimiter codes specified by delimiter.
- The send data is as follows:
P0001.1=100.0
P0001.2=200.0
P0001.3=300.0
P0001.4=400.0
Send data="100.00000,200.00000,300.00000,400.00000cr"

PROGRAM 1
0010 SSET P0001 ASCBIN 0 CR :Sets data into the send buffer
0020 SOUT :Sends data to external equipment
0030 END

(3) Sends the character string "DENSO" to the external equipment


- Sends the lower bytes of values assigned to I0001 to I0005.
- The send data is as follows:
I0001=68 ("D": 44h)
I0002=69 ("E": 45h)
I0003=78 ("N": 4Eh)
I0004=83 ("S": 53h)
I0005=79 ("O": 4Fh)
Send data="DENSOcr"

PROGRAM 1
0010 SETI I0001=68 :Sets "D"
0020 SETI I0002=69 :Sets "E"
0030 SETI I0003=78 :Sets "N"
0040 SETI I0004=83 :Sets "S"
0050 SETI I0005=79 :Sets "O"
0060 SSET I0001 BINARY 5 CR :Sets data to the send buffer
0070 SOUT :Sends data to the external
equipment
0080 END

26
5.6.5 Entry procedure
Follow the procedure given in Table 16.

Table 16. Entering the SSET Command

Procedure Press: On the display Comments


(1) Select SSET. OPT The "DISP"
0010?DISP flashes.
FWD eight times The "SSET"
0010?SSET flashes.
ENT The "I" flashes.
0010?SSET I

(2) Enter the label ENT


number of a 0010?SSET I
variable from Numerical keys "I0010" selected
which data will be 0010?SSET I10 in this example.
sent to the send
buffer. ENT 0010?SSET I0010 The "BINASC"
FORMAT:BINASC flashes.
(3) Select the FWD two times 0010?SSET I0010 "BINARY"
conversion type. FORMAT:BINARY selected in this
(See NOTE 1.) example.
ENT 0010?SSET F0010
LENGTH:0

(4) Enter the number Numerical keys 0010?SSET F0010 "10" entered in
of digits to be LENGTH:10 this example.
converted. ENT 0010?SSET F0010
(See NOTE 2.) DELIMITER:CR

(4)' Enter the label SETI 0010?SSET F0010 The "I" flashes.
number of an LENGTH:I
integer variable to Numerical keys 0010?SSET F0010 "I0002" selected
which the number LENGTH:I2 in this example.
of digits is
assigned. ENT 0010?SSET F0010
(See NOTE 3.) DELIMITER:CR

(5) Select the desired FWD 0010?SSET F0010 The delimiter is


delimiter code. DELIMITER:"," selected.
(See NOTE 4.) ENT
0010 SSET F0010

27
Procedure Press: On the display Comments
(6) Save the new REC with SURE held 0010 SGET F0010 Ready for next
setting. down 0020? entry.

NOTE 1: Each time you press the FWD when the "BINASC" is flashing in step (2), the display
cycles through the following:
BINASC → BINBCD → BINARY → BINASC
Each time you press the BACK, the display cycles in the reverse order of the above. If
sourcevariable is Fn, Jn, or Pn, then the conversion type is fixed to BINASC.

NOTE 2 If sourcevariable is Fn, Jn, or Pn, then the number of digits is fixed to 0.

NOTE 3: Specifying the same label number as that in step (2) will cause ERROR3. Enter any other
label number.

NOTE 4: Each time you press the FWD when the "CR" is displayed in step (4), the display cycles
through the following:
CR → , → NONE → CR
Each time you press the BACK, the display cycles in the reverse order of the above.

28
5.7 SCLEAR

5.7.1 Function
Clears the data stored in the receive buffer.

5.7.2 Syntax
SCLEAR

5.7.3 Description
NOTE: This command does not clear the send buffer. To clear it, 1) Carry out an SOUT
command or 2) Select program and start operation.

5.6.5 Entry procedure


Follow the procedure given in Table 17.

Table 17. Entering the SCLEAR Command

Procedure Press: On the display Comments


(1) Select SCLEAR. OPT The "DISP"
0010?DISP flashes.
FWD nine times The "SCLEAR"
0010?SCLEAR flashes.
ENT
0010 SCLEAR
(2) Save the new REC with SURE held 0010 SCLEAR Ready for next
setting. down 0020? entry.

29
6. Checking the Contents of the Receive and Send Buffers

6.1 Checking the receive buffer (LOG:SINP)

6.1.1 Function
Allows you to check the contents of data received from external equipment by using the
teach pendant.

6.1.2 Display format


Data will be displayed in the following format:
IN nnn:AAAAAAAA
hhhhhhhhhhhhhhhh

Where,
n: nth byte, starting from 000.
A: Data in ASCII characters. For control codes or other undisplayable characters,
periods (.) will be displayed.
h: ASCII data shown in hexadecimal form.

6.1.3 Entry procedure


Follow the procedure given in Table 18.

Table 18. Checking the Contents of the Receive Buffer

Procedure Press: On the display Comments


(1) Enter the log STEP and DISP LOG MODE
mode. MODE:?
(2) Select the SINP VIS and FWD LOG MODE The "SINP"
mode. MODE:SINP flashes.
(See NOTE 1.) ENT LOG MODE
MODE:SINP
ENT IN 000:12345678 Eight bytes of
3132333435363738 data starting
from the 1st byte
will be displayed.
(3) Display the FWD IN 008:90ABC. The subsequent
subsequent data. 39304142430D 8 bytes of data
will be displayed.
(See NOTE 2.)

NOTE 1: In this example, the receive data is "1234567890ABCcr". If no receive data is present in
the buffer, the "DATA NOTHING" will appear in the lower row.
NOTE 2: Data will be displayed, 8 bytes per page. Pressing the FWD key when no data is present
in the subsequent page will return to the head page.

30
6.2 Checking the send buffer (LOG:SOUT)

6.2.1 Function
Allows you to check the contents of data set into the send buffer by using the teach pendant.

6.2.2 Display format


Data will be displayed in the following format:
OUT nnn:AAAAAAAA
hhhhhhhhhhhhhhhh

Where,
n: nth byte, starting from 000.
A: Data in ASCII characters. For control codes or other undisplayable characters,
periods (.) will be displayed.
h: ASCII data shown in hexadecimal form.

6.2.3 Entry procedure


Follow the procedure given in Table 19.

Table 19. Checking the Contents of the Send Buffer

Procedure Press: On the display Comments


(1) Enter the log STEP and DISP LOG MODE
mode. MODE:?
(2) Select the SINP VIS and FWD two LOG MODE The "SOUT"
mode. times MODE:SOUT flashes.
(See NOTE 1.) ENT LOG MODE
MODE:SOUT
ENT OUT 000:12345678 Eight bytes of
3132333435363738 data starting
from the 1st byte
will be displayed.
(3) Display the FWD OUT 008:90ABC. The subsequent
subsequent data. 39304142430D 8 bytes of data
will be displayed.
(See NOTE 2.)

NOTE 1: In this example, the send data is "1234567890ABCcr". If no send data is present in the
buffer, the "DATA NOTHING" will appear in the lower row.
NOTE 2: Data will be displayed, 8 bytes per page. Pressing the FWD key when no data is present
in the subsequent page will return to the head page.

31
7. Error List

Table 20 lists the error codes newly prepared for enhanced communication commands.

Table 20. Error Codes for Enhanced Communication Commands

Error code Meaning Probable cause


539 µVision command inhibited With the MVISION parameter being set to 0 (X),
a µVision command was executed.
589 Enhanced communication With the MVISION parameter being set to 1
commands inhibited (¡), an enhanced communication command
was executed.
590 Timeout in receiving Data cannot be received within the time length
specified by the S_TIMOUT parameter.
591 Timeout in sending Data cannot be sent within the time length
specified by the S_TIMOUT parameter.
(The TxRDY sticks to OFF.)
592 Receive data length exceeding Received data exceeds 256 bytes.
the limit
593 Send data length exceeding the The controller attempted to send data
limit exceeding 256 bytes.
The controller attempted to set data exceeding
256 bytes to the send buffer.
594 Format error At execution of SGET command,
- startbyte or readbytes exceeds 256
bytes,
- the converted format is illegal, or
- no delimiter is detected.
At execution of SSET command,
- the set data exceeds 10 digits.
595 Parity error A parity error is detected.
(The controller receives data from external
equipment which sets a different parity bit.)
596 Overrun error An overrun error is detected.
(The transmission speed is too high in data
receiving.)
597 Framing error A framing error is detected.
(The controller receives data from external
equipment which sets a different stop bit.)
598 Transmission speed exceeding The SINP or SINPB was executed with the
the limit transmission speed being set to 38400 bps.
(This error will occur also if 19200 bps is set in
the VS-C series.)
599 Communication command During execution of a communication
interrupted command, Halt or Robot stop signal is inputted.

32
8. Character Set Table

To send alphanumeric and symbol characters to external equipment, you need to enter
their codes in decimal. See the character set table given below.

Table 21. Character Set Table

In decimal Charac- In decimal Charac- In decimal Charac- In decimal Charac-


(In hex.) ter (In hex.) ter (In hex.) ter (In hex.) ter
0 (00h) NUL 32 (20h) SP 64 (40h) @ 96 (60h) `
1 (01h) SOH 33 (21h) ! 65 (41h) A 97 (61h) a

2 (02h) STX 34 (22h) " 66 (42h) B 98 (62h) b


3 (03h) ETX 35 (23h) # 67 (43h) C 99 (63h) c
4 (04h) EOT 36 (24h) $ 68 (44h) D 100 (64h) d
5 (05h) ENQ 37 (25h) % 69 (45h) E 101 (65h) e
6 (06h) ACK 38 (26h) & 70 (46h) F 102 (66h) f
7 (07h) BEL 39 (27h) ' 71 (47h) G 103 (67h) g
8 (08h) BS 40 (28h) ( 72 (48h) H 104 (68h) h
9 (09h) HT 41 (29h) ) 73 (49h) I 105 (69h) I
10 (0Ah) LF 42 (2Ah) * 74 (4Ah) J 106 (6Ah) j
11 (0Bh) VT 43 (2Bh) + 75 (4Bh) K 107 (6Bh) k
12 (0Ch) FF 44 (2Ch) , 76 (4Ch) L 108 (6Ch) l
13 (0Dh) CR 45 (2Dh) - 77 (4Dh) M 109 (6Dh) m
14 (0Eh) SO 46 (2Eh) . 78 (4Eh) N 110 (6Eh) n
15 (0Fh) SI 47 (2Fh) / 79 (4Fh) O 111 (6Fh) o
16 (10h) DLE 48 (30h) 0 80 (50h) P 112 (70h) p
17 (11h) DC1 49 (31h) 1 81 (51h) Q 113 (71h) q
18 (12h) DC2 50 (32h) 2 82 (52h) R 114 (72h) r
19 (13h) DC3 51 (33h) 3 83 (53h) S 115 (73h) s
20 (14h) DC4 52 (34h) 4 84 (54h) T 116 (74h) t
21 (15h) NAC 53 (35h) 5 85 (55h) U 117 (75h) u
22 (16h) SYN 54 (36h) 6 86 (56h) V 118 (76h) v
23 (17h) ETB 55 (37h) 7 87 (57h) W 119 (77h) w
24 (18h) CAN 56 (38h) 8 88 (58h) X 120 (78h) x
25 (19h) EM 57 (39h) 9 89 (59h) Y 121 (79h) y
26 (1Ah) SUB 58 (3Ah) : 90 (5Ah) Z 122 (7Ah) z
27 (1Bh) ESC 59 (3Bh) ; 91 (5Bh) [ 123 (7Bh) {
28 (1Ch) ES 60 (3Ch) < 92 (5Ch) ¥ 124 (7Ch) |
29 (1Dh) GS 61 (3Dh) = 93 (5Dh) ] 125 (7Dh) }
30 (1Eh) RS 62 (3Eh) > 94 (5Eh) ^ 126 (7Eh) ~
31 (1Fh) US 63 (3Fh) ? 95 (5Fh) _ 127 (7Fh) DEL

NOTE: Codes 0 through 31 represent control characters as follows:

0 NUL (Null) 12 FF (Form Feed) 24 CAN (Cancel)


1 SOH (Start of Heading) 13 CR (Carriage Return) 25 EM (End of Medium)
2 STX (Start of Text) 14 SO (Shift Out) 26 SUB (Substitute)
3 ETX (End of Text) 15 SI (Shift In) 27 ESC (Escape)
4 EOT (End of Transmission) 16 DLE (Data Link Escape) 28 FS (File Separator)

33
5 ENQ (Enquiry) 17 DC1 (Device Control 1) 29 GS (Group Separator)
6 ACK (Acknowledge) 18 DC2 (Device Control 2) 30 RS (Record Separator)
7 BEL (Bell) 19 DC3 (Device Control 3) 31 US (Unit Separator)
8 BS (Backspace) 20 DC4 (Device Control 4) 32 SP (Space)
9 HT (Horizontal Tabulation) 21 NAC (Negative Acknowledge) 127 DEL (Delete)
10 LF (Line Feed) 22 SYN (Synchronous Idle)
11 VT (Vertical Tabulation) 23 ETB (End of Transmission Block)

34
DENSO ROBOT
HM-C/HS-C SERIES
HC-C SERIES
XYC-C SERIES
CS-C SERIES
VS-C SERIES

OWNER'S MANUAL (Supplement)


First Edition, August 1999

DENSO CORPORATION

8U20C

The purpose of this manual is to provide accurate information in the handling and operating of the
robot. Please feel free to send your comments regarding any errors or omissions you may have
found, or any suggestions you may have for generally improving the manual.

In no event will DENSO be liable for any direct or indirect damages resulting from the application
of the information in this manual.

You might also like