Ext Command
Ext Command
Ext Command
DENSO ROBOT
HM-C/HS-C SERIES
HC-C SERIES
XYC-C SERIES
CS-C SERIES
VS-C SERIES
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.
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.
(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
2. System Requirements.......................................................................................................... 1
2. System Requirements
For execution of the enhanced communication commands, your robot controller requires
the following:
(1) Interface
RS-232C
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.
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.
… 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.
3
4. Communication Parameters
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.
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:
4
4.2 Transmission speed (S_BAUD_RATE)
4.2.1 Function
Specifies the transmission speed for communication with external equipment.
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.)
(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.
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.
7
4.5 Stop bit (S_STOPBIT)
4.5.1 Function
Specifies a stop bit.
8
4.6 Timeout length (S_TIMOUT)
4.6.1 Function
Specifies the desired timeout length.
NOTE 1: You may enter the timeout length in increments of 0.5 second.
NOTE 2: Entry of "0" will cause no timeout.
9
4.7 Delimiter (S_DELIMITER)
4.7.1 Function
Specifies the desired delimiter which separates data fields.
10
4.8 CR/LF code (S_CRCODE)
4.8.1 Function
Specifies the desired CR/LF code.
11
4.9 Option (OPTION)
4.9.1 Function
Enables or disables the enhanced communication commands.
NOTE: The default is "0." To use the enhanced communication commands, set "1."
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
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.
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.
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
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.
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.
(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.
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."
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
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.
PROGRAM 1
0010 SOUTB I0001 10 :Sends lower bytes of data assigned
to I0001 through I0010
0020 END
18
5.4.5 Entry procedure
Follow the procedure given in Table 14.
(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
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.
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.
(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
-X.X -X.XXXXXXX
-XX.X -XX.XXXXXX
. .
. .
. .
-XXXXXXX.X -XXXXXXX.X
-XXXXXXXX.X ERROR594
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.
(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
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.
(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
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.
29
6. Checking the Contents of the Receive and Send Buffers
6.1.1 Function
Allows you to check the contents of data received from external equipment by using the
teach pendant.
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.
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.
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.
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.
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.
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
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.