This publication was written to assist you in better understanding this part of your IA system. If you require further assistance, please
contact IA Technical Support. For Central and East Coast Time Zones, please call our Itasca, IL office at 1-800-944-0333 or FAX 630467-9912. For Mountain and Pacific Time Zones, please call our Torrance, CA office at 1-800-736-1712 or FAX 310-891-0815; Monday
thru Friday from 8:30AM to 5:00PM.
Intelligent Actuator, Inc.
U.S. Headquarters
2690 W. 237th Street
Torrance, CA 90505
310-891-6015 / 310-891-0815 FAX
Intelligent Actuator, Inc.
Midwest Regional Office
1261 Hamilton Parkway
Itasca, IL 60143
630-467-9900 / 630-467-9912 FAX
The information and technical data contained herein are subject to change without notice. Intelligent Actuator, Inc. assumes no responsibility for any
errors or omissions regarding the accuracy of the information contained in this publication.
Foreword
SEL Language is the simplest type of the numerous robot languages being used today . The perplexing problem of
using simple language to effect high level control has been beautifully resolved with SEL Language.
The language most generally used for robot control is based on BASIC language which uses sentences formats and
interpreting these sentences requires considerable time. As the level of expression gets higher, the interpreter
*1.
becomes less capable of handling real time control
added. Furthermore, the process becomes increasingly complex, as one encounters problems with false commands,
required knowledge of MS-DOS, etc.
It goes without saying that being able to accomplish the same task using a simple method is much better. So,
we welcome you to step into the world of high level control using SEL Language which is a simple system, that
operates at high speeds even as it is interpreting.
At this point, an extra step, compling *2 , needs to be
*1An interpreter is executing a command as it translates that command into computer language.
*2Compling refers to translating the command into computer language before the comand is executed,
1
Table of Contents
1.Numerals and Symbols in SEL Language
1. 1 List of numerals handled by SEL Language ........................................................................................................ 4
1. 2 Symbols used in SEL Language .......................................................................................................................... 5
2.3 List of I/O ports for the Super SEL type .............................................................................................................. 7
2.4 List of I/O ports for the DS type.......................................................................................................................... 8
4.1 What are variables?........................................................................................................................................... 11
4.2 Types of variables ............................................................................................................................................. 11
8. 1 Position program. ...............................................................................................................................................18
9. 1 Common parameters for multiple axes. ...............................................................................................................22
9. 2 Common parameters for a single axis..................................................................................................................23
9. 3 Parameters by axis ..............................................................................................................................................24
10 .List of SEL Language Command Codes by Function ................................................................................................26
11 .List of SEL Language Command Codes in Alphabetical Order .................................................................................30
12.8 Program control commands .............................................................................................................................52
12.9 T ask management commands ..........................................................................................................................54
12.12 Actuator control declarations..........................................................................................................................64
12.13 Actuator control commands ............................................................................................................................72
12.14 Structured IF commands. .................................................................................................................................80
12.15 Structured DO commands................................................................................................................................83
13.1 List of Error Codes ..........................................................................................................................................98
13.2 What to do when an Error Code occurs ...........................................................................................................99
3
1.Numerals and Symbols in SEL Language
1.1List of numerals handled by SEL Language
The various types of functions required in a program are expressed as numerals.
Note: Variables 99 and 199 are special registers that the system uses for calculations.
l Battery Back-up Range
When the power is turned back ON, everything will be cleared except the area backed up by the battery.
(Same as an emergency stop)
Program........................ Stop
Output Port .................. Clear
Local Flag .................... Clear
Local Variable .............. Clear
Home Position ............. Clear
Global Flag................... Maintained
Global Variable ............ Maintained
4
1.Numerals and Symbols in SEL Language
lRange of numerical values in SEL
SEL uses two types of numbers, integers and real numbers but are subject to the following limitations.
1.Inside the controller
The range of whole numbers that can be accommodated is ±2,147,483,648 and for real numbers the theoretical range
is ±3.4 x 10
2.Limitations in actual use
The programming tool developed initially was an LCD teaching pendant which resulted in certain constraints with
respect to input and output from the program. The numerical values that can be handled from the program are 9,999,999~99,999,999 for integers and -999,999~9999,999 or -.999999~.999999, in other words an eight digit
value including the decimal point sign for real numbers. Also, when doing floating point calculations, the significant
figure can only be guaranteed up to 7 digits and it will include errors that are particular to floating points.
3.Position data
Internally, position data is handled as whole number data but during the calculation process, these are incorporated
into real numbers and treated as real numbers. There are no problems when dealing with numbers ±9999.999 but
when these are internally calculated as general data and not position data (repeated multipliying and dividing), a
problem arises with the accuracy of the last digit.
When using the Super SEL, please pay close attention to these points. In particular, if you use the CPEQ command in
a comparative calculation using real numbers, you will see almost no correlation. In this case, you will need to use
the CPLE/CPGE command which can view the large and small relations in parallel.
38,
as a single precision floating point.
1. 2Symbols used in SEL Language
SYMBOLMEANINGEXAPLANA TION
ZRZeroWhen calculation results are 0, post turns ON
EQEqualWhen operand 1 = operand 2, post turns ON
NENot equalWhen operand 1 ≠ operand 2, post turns ON
G TGreater thamWhen operand 1 > operand 2, post turns ON
GEGreater or equal toWhen operand 1 ≥ operand 2, post turns ON
LTLess thanWhen operand 1 < operand 2, post turns ON
LELess than or equal toWhen operand 1 < operand 2, post turns ON
PEPosition endWhen movement is comeplete, post turns ON
C PCompleteWhen the command is completed, post turns ON
TUTime upAfter the time has elapsed, post turns ON
XXNo position dataWhen there is no valid value in the position, post turns ON
ONONOn
OFOFFOff
NTNotInvert
FNForward ONMoves forward while the designated I/O · flag is ON
FFForward OFFMoves forward while the designated I/O · flag is OFF
B NBackward ONMoves backward while the designated I/O · flag is ON
B FBackward OFFMoves backward while the designated I/O · flag is OFF
(turns ON 2 points before the end of path, circular and
arc moves when used in successive, consecutive lines of code)
5
.oNtupnI
tnemngissA
epyTSD
510~100dradnatS
2.I/O Ports
2. 1Input Ports
Input ports are used for limit switches, sensor switches, etc.
004~014 are used as BCD codes to
designate the Position No.
The moment input port 000
(external start input) turns ON,
the actuator moves to the designated
position.
Homing is performed when there is
no Position No. designation.
9
3.Flags
3. Flags
The function of flags is to set and reset data within "Memory." This is analogous to "internal relays" or "coils" in a PLC.
In general, there are two (2) types of flags: Global flags 600 ~ 887 which can be used in all programs and local flags 900 ~ 999 which
can be used only in individual programs.
Global flags are saved when the power is turned OFF (battery backup). Local flags are erased when the power is turned OFF .
Communicates signals
by using global flags
which are visible in all
programs.
Program n
WTON 600
Waiting for Flag 600 to turn ON
BTON 900BTON 900
Even though these are the same
command, these local flags exist
individually in each program.
10
4.Variables
4. 1What are variables?
The term "variable register" is a software term. Imagine a box that holds numbers. Numbers can be put in and taken out,
added, subtracted, and so on.
Variable
Register #1
Put 1234 into variable register #1
T ake 456 out of variable register #1
Add 1 to variable register #1
CommandOperand 1Operand 2
Add11
This command adds 1 to variable register #1. If the register contains 2, then the variable becomes 3.
Add one to variable register #1
Variable
Register #1
2
(Already contains "2")
11
4.Variables
4.2 T ypes of variables
There are two types of variables.
Integer variable
These are whole number variables which cannot take decimal points. For example: [-2, -1, 0, 1, 2, 3]
V ariable
Register #1
Integer V ariable
Register
1 2 3 4
Integer Variable
No.
Integer Variable
No.
Note: The variable 99 is a special register for whole integer calculation.
The numbers that can be input in the program are -9,999,999 to 99,999,999.
200~299 Global i nteger variable: Can be used in all programs
1~99
Local integer variable: Can be used o nly within an i ndivi dual
program
Real variable
These are variables that can accommodate the actual value exactly as it appears, including digits following the
decimal point. [Example: 1234.567]
Real V ariable
V ariable
Register #1
Register
1234.567
Integer Variable
No.
Integer Variable
No.
Note: The variable 199 is a special register for real number calculation.
The numbers that can be input in the program are -99,999.9 to 999,999.99 (8 digits which includes
the decimal point sign).
300~399 Global i nteger variable: Can be used in all programs
100~199
Local integer variable: Can be used o nly within an i ndivi dual
program
12
4.Variables
Variables with an asterisk (*)
The asterisk symbol (*) is used to designate contents of the variable register. In the example given below, the contents
in variable register 1 are placed in variable register 2. If "1234" is in variable register 1, then "1234" is what goes in
variable register 2.
CommandOperand 1Operand 2
LET11234
1234
Put in
V ariable
Register #1
1 2 3 4
CommandOperand 1Operand 2
LET2*1
V ariable
Register #2
1 2 3 4
V ariable
Register #1
1 2 3 4
13
5.Tags
"Tag" means heading. A TAG can be thought of as the same as placing labels on important pages. The TAG as it is used in
the SEL programming language is the "return to" area and is used in conjunction with the GOTO command to provide
programming loops.
Tag
CommandOperand 1
TAGTag No. (Integers 1~64)
T AG 1
GOTO 1
Can be used individually in each program.
14
6.Subroutines
Frequently repeated steps in a program can be expressed as subroutines in order to simplify the entire application program.
These subroutines are individually usable in each program. (Up to a maximum of 15 subroutines can be nested)
CommandOperand 1
EXSRSubroutine No. (1 ~ 64 Integers, or Variables)
Execute subroutine command
CommandOperand 1
BGSRSubroutine No. (1 ~ 64 Integers)
Begin subroutine command
CommandOperand 1
EDSR--------
End subroutine command
EXSR 1
EXSR 1
EXSR 1
BGSR 1
EDSR
Call subroutine
Subroutine
15
7.Axis Designation
There are two ways to designate the axes to be used: axis number and axis pattern.
7.1 Axis number and notation
With the Super SEL controller , multiple axes are indicated as shown in the table, but it is possible to change the figures
using the parameters.
Axis No.
11
22
33
4
55
66
77
88
The axis no. is used when designating one axis out of many axes.
Commands to designate Axis No. are:
BASE, PPUT , PGET
Default
Notation
4
Note:The DS type displays only one axis.
16
7.Axis Designation
7.2 Axis Pattern
Selection of an axis is specified by either "1" or "0"
(Upper)
Axis No.87654321
Used11111111
Not Used00000000
Example
If Axis 1 and Axis 2 are in use, then this is signified by ...
0 0 0 0 0 0 1 1
Axis 2
Axis 1
The zeroes before the 1 are unnecessary . The simplified form is 11, without leading zeroes.
(Lower)
Example
If Axis 1 and Axis 8 are in use, then this is signified by ...
1 0 0 0 0 0 0 1
Axis 8
Axis 1
In this example, the zeroes are necessary in order to indicate the position of Axis 8.
Axis pattern is used when designating more than one axis at the same time.
Note:The axis pattern for the DS type is preset since there is only one axis.
17
8.Structure of SEL Language
The SEL programming consists of a position and application program (command) section.
8.1 Position Program
In the position section, we have coordinates, velocity, acceleration, and variables.
1~1500 mm/sec
*1,2
Standard
0.3G
*2
-itisoP
.oNno
1
2
3
4
7991
8991
9991
0002
yticoleV
-itareleccA
no
±9999.999mm
1sixA2sixA3sixA4sixA5sixA6sixA7sixA8sixA
* 1Varies according to the actuator model.
*2When velocity and acceleration are set in the position data, this has priority over the data set in the
application program. T o validate the application data, set x.xxx or 0 in the position data.
Note:The DS type is a single axis only. Also position numbers go up to 500.
18
8.Structure of SEL Language
The outstanding feature of Super SEL Language is the simplicity of its command structure which eliminates the need for a
compiler and allows high speed operation with just an interpreter.
8. 2 Commands
8. 2-1Structure of Super SEL Language
One step of the command has the following structure.
noisnapxE
)RO·DNA(
Putting this in a ladder diagram,
noitidnoCtupnI
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
ò
-nammoC
d
(1) The conditions before the commands are equivalent to "if ~ then" statements in BASIC language.
-nammoC
d
IF ~ THEN ELSE
Carry out a command when an input condition is established, and turn the post ON, if post is
designated. When not established, go on to the next step regardless of the next command (ex. WTON, WTOF).
The designated post remains the same , however it needs to be monitored carefully.
If there is no conditioning set up, carry out command unconditionally.
If condition is used as "negative condition", then place an "N" (NOT).
Input/output port & flag can be used for condition.
○○○○○○○○○○○○○○○○○○○○○○○○○○○○○○
dnarepO
1
dnarepO
1
dnarepO
2
dnarepO
2
To the next step,
tsoP
○○○○○○○○
. . . . .
tsoP
tsoP
·troptuptuO(
)galF
ò
(2) Post is set based on the result of the command execution.
-nammoC
d
Actuator motion control commands: becomes OFF immediately after the command starts to be executed,
and becomes ON when the command is completed. Computation commands: when the result becomes a certain
value, it turns ON, and it stays OFF otherwise.
Output ports and flags can be used for the post section.
dnarepO
1
dnarepO
2
19
tsoP
8.Structure of SEL Language
8. 2-2Expansion Condition
It is possible to combine conditions to make more complicated conditions as follows:
AND Expansion(Ladder Diagram display) (Super SEL Language)
Cond 1
Cond 2
Cond 3
OR Expansion
Cond 1
Cond 2
AND
AND
OR
ExpansionInput
Commands
Command Operand1 Operand2
Condition1
ANDCondition 2
ANDCondition 3 Command Operand1 Operand2
Commands
ExpansionInput
Command Operand1 Operand2
Condition 1
ORCondition 2 Command Operand 1 Operand 2
Output
Ouptput
AND/OR Expansion
Cond 1
Cond 2
Cond 3
AND
OR
ExpansionInput
Command Operand1 Operand2
Condition1
ANDCondition 2
ORCondition 3 Command Operand1 Operand2
Commands
Output
Note:By conevention, all “AND” operations are performed before the “OR” operations when they are used in conjunction.
20
9.List of Parameters
Reference values are indicated below. Settings at the time of shipment vary according to the actuator model.
* Commands not yet publicly available cannot be used.
Note: The circle (O) in the multiple axes, single axis columns indicates that the command can be used for
multiple axes or a single axis. However, MOVD, MVDI are command languages specific to the DS type.
31
12.SEL Language
12.1Numeric calculations commands
LET (Assign)
●
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOTEL.oNelbairaVataDRZ
[Function]Assigns the value in operand 2 to the variable in operand 1.
[Example 1]LET11 0Assign a value of 10 to variable register 1.
[Example 2]LET12Assign 2 to variable 1.
● TRAN (Transfer)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
When 0 is assigned to the variable in Operand 1, the output turns ON.
LET310Assign 10 to variable 3.
LET* 1* 3Assign 10 (content of variable 3) to variable 2 (content of variable 1).
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC1dnarepO2dnarepO
dnammoC
dnammoC
tsoP
)galF·troptuptuO(
tsoP
)galF·troptuptuO(
lanoitpOlanoitpONART.oNelbairaV.oNelbairaVRZ
[Function]Assigns the contents of the variable in Operand 2 to the variable in Operand 1.
This function is also known as "indirect addressing" or "pointing to a pointer."
[Example 1]TRAN12Assign the content of variable 2 to variable 1.
[Example 2]LE T12Assign 2 to variable 1.
LET23Assign 3 to variable 2.
LET34Assign 4 to variable 3.
LET410Assign 10 to variable 4.
TRAN1*3Assign 10 (variable 4 which is the content of variable 3) to the
variable for 2.
The variables change in the following manner.
2
1
2
3
2
3
4
104
à
1
2
3
4
410
10
32
12.SEL Language
● CLEAR (Clear Variables)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpORLC.oNelbairaV.oNelbairaVRZ
[Function]Clears the variables from the variable in operand 1 to the variable in operand 2.
[Example 1]CLR15Clear variables from 1 to 5.
[Example 2]LET110Assign 10 to variable 1.
tupnI
noitidnoc
)galF·O/I(
The contents of the cleared variables becomes 0.
When 0 is assigned to the variable in operand 1, the output turns ON.
LET220Assign 20 to variable 2.
CLR* 1* 2Clear variables from 10 (content of variable 1)
dnammoC1dnarepO2dnarepO
to 20 (content of variable 2).
dnammoC
tsoP
)galF·troptuptuO(
33
12.SEL Language
12.2Arithmatic calculation commands
● ADD (Add)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpODDA.oNelbairaVataDRZ
[Function]Adds the value in operand 2 to the contents of the variable in operand 1, then stores this in the
[Example1]LE T13Assign 3 to variable 1.
[Example 2]LET12Assign 2 to variable 1.
●SUB (Subtract)
tupnI
noitidnoc
)galF·O/I(
variable in operand 1. The output turns ON when the result of the operation is 0.
ADD12Add 2 to 3 (content of variable 1).
LET23Assign 3 to variable 2.
LET32Assign 2 to variable 3.
ADD*1 * 3Add 2 (content of variable 3) to variable 2 (content of variable 1).
dnammoC1dnarepO2dnarepO
3+2 is 5 which is entered in variable1.
3+2 is 5 which is entered in variable 2.
dnammoC
tsoP
)galF·troptuptuO(
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOBUS.oNelbairaVataDRZ
[Function] Subtracts the value in operand 2 from the contents of the variable in operand 1, then stores
[Example 1]LET13Assign 3 to variable 1.
[Example 2]LET12Assign 2 to variable 1.
tupnI
noitidnoc
)galF·O/I(
this in the variable in operand 1. The output turns ON when the result of the operation is 0.
ADD12Subtract 2 from 3 (content of variable 1).
LET23Assign 3 to variable 2.
LET32Assign 2 to variable 3.
ADD*1 * 3Subtract 2 (content of variable 3) from variable 2
dnammoC1dnarepO2dnarepO
(content of variable 1).
3-2 is 1 which is entered in variable 2.
dnammoC
tsoP
)galF·troptuptuO(
34
12.SEL Language
● MULT (Multiply)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOTLUM.oNelbairaVataDRZ
[Function]Multiplies the contents of the variable in operand 1 by the value in operand 2, then stores this
[Example 1]LET13Assign 3 to variable 1.
[Example 2]LET12Assign 2 to variable 1.
●DIV (Divide)
tupnI
noitidnoc
)galF·O/I(
in the varible in operand 1. The output turns ON when the result of the operation is 0.
MU LT12Multiply 3 (content of variable 1) by 2.
LET23Assign 3 to variable 2.
LET32Assign 2 to variable 3.
MULT* 1 *2Multiply variable 2 (content of variable 1) by 2
dnammoC1dnarepO2dnarepO
(content of variable 1).
3x2 is 6 which is entered in variable 2.
dnammoC
tsoP
)galF·troptuptuO(
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOVID.oNelbairaVataDRZ
[Function]Divides the contents of the variable in operand 1 by the value in operand 2, then stores this
Note:When operand 1 is an integer type variable, anything beyond the decimal point is disregarded.
[Example 1]LET13Assign6 to variable 1.
[Example 2]LET12Assign 2 to variable 1.
tupnI
noitidnoc
)galF·O/I(
in the varible in operand 1. The output turns ON when the result of the operation is 0.
DIV12Divide 6 (content of variable 1) by 2.
LET26Assign 3 to variable 2.
LET32Assign 2 to variable 3.
MULT*1 *3Divide variable 2 (content of variable 1) by 2
dnammoC1dnarepO2dnarepO
(content of variable 1).
6÷2is 3 which is entered in variable 2.
dnammoC
tsoP
)galF·troptuptuO(
35
12.SEL Language
● MOD (Remainder)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpODOM.oNelbairaVataDRZ
[Function]Divides the contents of the variable in operand 1 by the value in operand 2, then stores
Note:The MOD command is used with respect to an integer type variable.
[Example1]LET17Assign 7 to variable 1.
[Example 2]LET12Assign 2 to variable 1.
tupnI
noitidnoc
)galF·O/I(
the remainder in the variable in operand 1. The output turns ON when the result of the
operation is 0.
MOD13Figure the remainder when 7 (content of variable 1)is divided by 3.
LET23Assign 7 to variable 2.
LET33Assign 3 to variable 3.
MO D*1 *2Figure the remainder when variable 2 (content of variable 1).
dnammoC1dnarepO2dnarepO
7
÷3 is 2 with a remainder of 1 which is entered in variable 1.
7÷3 is 2 with a remainder of 1 which is entered in variable 1.
dnammoC
tsoP
)galF·troptuptuO(
36
12.SEL Language
12.3Functional calculation commands
● SIN (Sine)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpONIS.oNelbairaVataDRZ
[Function]Assigns the sine of operand 2 to the contents of the variable in operand 1.
Note 1:Radian=Angle x π÷180
[Example 1]SIN1000.523599Assign 0.5, sine of 0.523599, to variable 100.
[Example 2]LET11 00Assign 100 to variable 1.
tupnI
noitidnoc
)galF·O/I(
The output turns ON when the result of the operation is 0.
For the setting in operand 1, designate a real number varible in the operand 100
LET10 1 3030x π÷180 (radian) (convert 30°to radian and
MULT1013.141592assign this to variable 101).
DI V1 01180Assign 0.5, sine of contents in variable101 to
SIN*1*101variable 100 (contents of variable 1).
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
~199, 300~399.
)galF·troptuptuO(
●COS(Cosine)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOSOC.oNelbairaVataDRZ
[Function]Assigns the cosine of operand 2 to the contents of the variable in operand 1.
Note:Radian = Angle x π÷180.
[Example 1]SIN1001.047197Assign 0.5, sine of 1.047191 to variable 100.
[Example 2]LE T1100Assign 100 to variable 1.
tupnI
noitidnoc
)galF·O/I(
The output turnsON when the result of the operation is 0.
For the setting in operand 1, designate a real number variable in the range 100~199, 300~399.
L E T10 1 3060x π÷180 (radian) (convert 60°to radian and
MULT1013.141592assign this to variable 101).
DI V1 01180Assign 0.5, cosine of contents in variable101 to
SIN*1*101variable 100 (contents of variable 1).
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
37
12.SEL Language
● TAN (Tangent)
noisdnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpONAT.oNelbairaVataDRZ
[Function]Assigns the tangent of operand 2 to the contents of the variable in operand 1. The output turns
Note 1:Radian=Angle x π÷ 180
[Example 1]TAN10 00.785398Assign 1, tangent of 0.785398, to varible in 100.
[Example 2]LE T1100Assign 100 to variable 1.
●ATN (Arctangent)
tupnI
noitidnoc
)galF·O/I(
ON when the result of the operation is 0. For the setting in operand 1, designate a real number
variable in the range 100~199, 300~399. The unit in operand 2 is radians.
LET1014545x π÷180 (radian) (convert 45°to radian and
MULT1013.141592assign this to variable 101).
DI V101180Assign 1, tangent of contents in variable101 to
TAN*1*101variable 100 (contents of variable 1).
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpONTA.oNelbairaVataDRZ
[Function]Assigns the arctanagent of operand 2 to the contents of the variable in operand 1. The output
Note 1:Radian=Angle x
[Example 1]A TN1001Assign 0.785398, arctangent of 1, to variable 100.
[Example 2]LE T1100Assign 1 to variable 101.
tupnI
noitidnoc
)galF·O/I(
turns ON when the result of the operation is 0. For the settings in operand 1, designate a real
number variable in the range 100~199, 300~199. The unit in operand 2 is radians.
π ÷
180
L E T1 0 11Assign 0.785398, arctangent of contents in variable101
TAN*1*101to variable 100 (contents of variable 1).
dnammoC1dnarepO2dnarepO
dnammoC
Assign 100 to variable 1.
tsoP
)galF·troptuptuO(
38
12.SEL Language
● SQR(Square)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpORQS.oNelbairaVataDRZ
[Function]Stores the square root (SQR) of the data in operand 2 in the variable in operand 1.
The output turns ON when the result of the operation is 0.
[Example 1]SQR14Assign square root of 4,2 to variable 1.
[Example 2]LE T110Assign 10 to variable 1.
tupnI
noitidnoc
)galF·O/I(
LET24Assign 4 to variable 2.
S QR*1*2Assign the square root of 4 (contents of variable 2) to variable 10
dnammoC1dnarepO2dnarepO
(contents of variable 1).
dnammoC
tsoP
)galF·troptuptuO(
39
12.SEL Language
12.4Logic and Operation commands
● AND (Logic And)
noisdnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpODNA.oNelbairaVataDRZ
[Function]Stores the results of the logic AND operation on the contents of the variable in operand 1
[Example 1]LET1204Assign 204 to variable 1.
[Example 2]LET12Assign 2 to variable 1.
tupnI
noitidnoc
)galF·O/I(
and the in operand 2, in the variable in operand 1. The output turns ON when the result of the
operation is 0.
AN D11 70Assign 136 the result of logic AND on 204 (contents of variable 1)
L ET2204Assign 204 to variable 2.
L ET3170Assign 170 to variable 3.
dnammoC1dnarepO2dnarepO
AND 170 (data in operand 2), to vaiable 1.
dnammoC
tsoP
AND *1* 3 Assign 136, the result of logic AND on 204(content of variable 2 which is
the content in variable 1) and 170 (content of variable 3), to 2(the content
of variable 1).
)galF·troptuptuO(
Decimal number Binary number
204 11001100
AND 170
136
AND 10101010
10001000
40
12.SEL Language
● OR (Logic Or)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpORO.oNelbairaVataDRZ
[Function]Stores the results of the logic OR operation on the contents of the variable in operand 1 and the
[Example 1]LET1204Assign 204 to variable 1.
[Example 2]LET12Assign 2 to variable 1.
tupnI
noitidnoc
)galF·O/I(
data in operand 2, in the variable in operand 1. The output turns ON when the result of the
operation is 0.
OR11 7 0Assign in 238, the result of logic AND on 204 (contents of variable 1)
LET2204Assign 2 to variable 1.
L ET3170Assign 170 to variable 3.
OR*1*3Assign 238, the result of logic OR on 204 (content of variable 2 which is
dnammoC1dnarepO2dnarepO
and 170 (data in operand 2), to variable 1.
the content in variable 1) and 170 (content of variable 3), to 2(the content of
variable 1).
dnammoC
tsoP
)galF·troptuptuO(
Decimal number Binary number
204 11001100
OR 170
238
OR 10101010
10001000
41
12.SEL Language
● EOR (Exclusive Or Logic)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOROE.oNelbairaVataDRZ
[Function]Stores the results of the exclusive logic operation on the contents of the variable in operand 1 and the
data in operand 2, in the variable in operand 1. The output turns ON when the result of the
operation is 0.
[Example 1]LET1204Assign 204 to variable 1.
E OR11 7 0Assign 102 in, the result of exclusive logic of 204 (contents of variable 1)
[Example 2]LET12Assign 2 to variable 1.
LET2204Assign 2 to variable 1.
L ET3170Assign 170 to variable 3.
E OR*1*3Assign 102, the result of logic OR on 204 (content of variable 2 which is
Decimal number Binary number
204 11001100
EOR 170
102
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
and 170 (data in operand 2), to variable 1.
the content in variable 1) and 170 (content of variable 3), to 2
(the content of variable 1).
EOR10101010
0110110
dnammoC
tsoP
)galF·troptuptuO(
42
12.SEL Language
12.5Comparison operation commands
●CPXX (Compare)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOXXPC.oNelbairaVataD
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
QEEN
TGEG
TLEL
[Function]Compares the contents of the variable in operand 1 and the value in operand 2 and if the
condition is satisfied, the output turns ON. When the condition is not satisfied, the output turns
OFF.
GT ... Operand 1 > Operand 2
GE . ..Operand 1 ≥ Operand 2
L T ... Operand 1 < Operand 2
LE ... Operand 1 ≤ Operand 2
[Example 1]LET110Assign 10 to variable 1.
CPEQ110600If the content of variable 1 is 10, flag 600 turns ON,
6 0 0AD D21If flag 600 is ON, 1 is added to variable 2.
tsoP
)galF·troptuptuO(
[Example 2]LET12Assign 2 to variable 1.
L ET210Assign 10 to variable 2.
L ET310Assign 10 to variable 3.
CPNE*1*3310If the variable in 2 (the content of variable 1) does not equal the
content of variable 3, then output 310 turns ON. Therefore, in this
example, output 310 is OFF .
43
12.SEL Language
12.6Timer Commands
● TIMW (Timer)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOWMITEMITUT
[Function]The program stops and waits for the time set in operand 1.
Setting range is 0.01 ~ 99 and units are seconds.
When the designated time has elapsed and the program moves to the next step, the output turns ON.
[Example 1]TIMW 1.5W ait for 1.5 seconds.
[Example 2] LET 110 Assign 10 to variable 1.
TIMW*1 Contents of variable 1 waits 10 seconds.
● TIMC (Timer Cancel)
noisnapxE
noitidnoc
·DNA(
)RO
tupnI
noitidnoc
)galF·O/I(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC1dnarepO2dnarepO
dnammoC
dnammoC
tsoP
)galF·troptuptuO(
tsoP
)galF·troptuptuO(
lanoitpOlanoitpOCMIT.oNmargorP
[Function]Cancels the time
of the other programs designated in operand 1 that are running in parallel.
[Example 1]TIMC10Cancel time wait for prorgam 10.
[Example 2]L ET11 0Assign 10 to variable 1.
TIMC*1Cancel time wait for program 10 (content of variable 1).
44
12.SEL Language
● GTTM (Time Acquisition)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOMTTG.oNelbairaV
[Function]Writes the system time to the variable in operand 1. The time unit is 10msec.
The time obtained with this command is a value that has no base. Therefore, call this command twice,
and the difference gives the time that has elapsed.
[Example 1] GTTM 1Read the reference time to variable 1.
AD D1500Set the ending time for 5 seconds later .
GTTM 2Read the current system time to variable 2.
DWGE 1*2After 5 seconds, proceeds to the next step after EDDO.
:The processing during this time will repeat for 5 seconds.
:
GTTM 2 Read the current system time to variable 2.
EDDO
[Example 2] LET 15 Assign 5 to variable 1.
GTTM *1 Store the current system time in the variable for 5 (content of variable 1).
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
45
12.SEL Language
12.7I/O · Flag operation commands
● BTXX (Output Port • Flag Operation)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
lanoitpOlanoitpOXXTBgalF·tuptuOlanoitpO
[Function]Turns ON, OFF , or inverts from the output · flag designated in operand 1 to the output · flag designated
in operand 2.
BTXX
ON...Turns the status ON.
OF...Turns the status OFF.
NT...Inverts the status.
[Example 1]BTON300 Output port 300 turns ON.
[Example 2]BTOF 30030 7 Output port 300∼307 turns OFF .
[Example 3]LE T1600 Assign 600 to variable 1.
BTNT∗1 Invert flag 600 (content of variable 1).
)galF·troptuptuO(
[Example 4]LE T1600 Assign 600 to variable 1.
L ET2607 Assign 607 to variable 2.
BTON*1*2 Turns flags from 600 (content of variable 1) to 607
(content of variable 2) ON.
46
12.SEL Language
● WTXX (I/O Port • Flag Wait)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOXXTWgalF·O/I
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpO
tuoemiT
UT
[Function]Program waits until designated in operand 2 turns ON/OFF.
Can abort the wait after a set time by designating a time in operand 2.
Setting range is 0.01~99 seconds. After a set time has elapsed, the output
turns ON (Only where is an operand 2).
WT
XX
ON... Waits for I/O port · flag to turn ON.
OF... Waits for I/O port · flag to turn OFF.
[Example 1]WTON 15 Waits for I/O port 15 to turn ON.
[Example 2]WTOF 255 900 W ait for input 25 to turn ON. If not ON within 5 seconds,
turn flag 900 ON and proceed to the next step.
tsoP
)galF·tuptuO(
47
12.SEL Language
● IN (Binary Number Read I/O • Flag)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpONIgalF·tropO/IgalF·tropO/I
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]Reads the value from the designated I/O port or flag as a binary number, then stores this
value in variable register 99.
7
2
3222120291817161
NOFFOFFOFFOFFONOFFONO
6
2
5
2
4
2
3
2
2
2
1
2
0
2
• • • Binary Number
• • • Input Port No.
ò
0010010
7
2
+ 0 + 0 + 0 + 0 + 2
28 + 0 + 0 + 0 + 0 + 4 + 0 + 2
2
+ 0 + 2
1
0
Binary number
= 133 in decimal notation
ò
133• • • • • • • • • • •Variable 99
Note:The maximum input limit for the port is 31 consecutive bits.
tsoP
)galF·tuptuO(
[Example 1]I N 8 15Read input ports 8 ~15 as a binary number in variable 99.
[Example 2] LET18 Assign 8 to variable 1.
LET2 15 Assign 15 to variable 2.
IN* 1*2 Read port 8(content of variable 1) to port 15
(content of variable 2) as a binary number to variable 99.
48
12.SEL Language
● INB (BCD Read I/O • Flag)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOBNItroptupnI
[Function] Reads the BCD value from the designated input port, then stores this value in variable register 99.
15
ONOFF
Note 1: The maximum number of digits that can be input is 8 (32 bits).
Note 2: The I/O Port • Flag used is 4 x n (number of digits).
[Example 1]INB82Read input port from 8 for 2 digits (up to 15) as a binary number
tupnI
noitidnoc
)galF·O/I(
Upper digits
1413
OFFOFF
dnammoC1dnarepO2dnarepO
Lower digits
1211
ON
OFF
⇓⇓
⇓
⇓⇓
133
to variable 99.
• • • • • • • • • Variable 99
dnammoC
109
OFF
fo.oN
stigidDCB
8
••• Input port No.
ON
tsoP
)galF·tuptuO(
[Example 2 ]LET 18Assign 8 to variable 1.
LET 22Assign 2 to variable 2.
IN* 1*2Read from input port 8 (content of variable 1) for 2 digits
(content of variable 2)(up to 15) as a BCD value to variable 99.
49
12.SEL Language
● OUT (Binary Number Output)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOTUOgalF·O/IgalF·O/I
[Function] Output the value of variable 99 to output ports or flags from operand 1 to opreand 2.
133• • • • • • • • • • • • • • • • Variable 99
Upper
1
307306305304303302
ON
Note 1: The maximum number of digits that can be output is 32 bits.
OFFOFFOFFOFF
0000
0
ò
1
ONON
1
301300
OFF
• ••Output port Number
• • •Output port Number
tsoP
)galF·tuptuO(
[Example 1]OUT300307Write the value of variable 99 as a binary value to output ports from
300~307.
[Example 2]LET13 00Assign 300 to variable 1.
LET2307Assign 307 to variable 2.
OUT*1*2Write the value of variable 99 as a binary number to output ports 300
(content of variable 1) through 307 (content of variable 2).
50
12.SEL Language
● OUTB (BCD Output)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOBTUOgalF·O/IstigidDCBfo.oN
[Function] Output the value of variable 99 to ourput ports or flags from operand 1 to operand 2.
10000101
tupnI
noitidnoc
)galF·O/I(
reppUrewoL
dnammoC1dnarepO2dnarepO
85 • • • • • • • • • • • • • • • • Variable 99
ò
dnammoC
• • •Binary number
tsoP
)galF·tuptuO(
ò
307306305304303302
ON
Note 1: The maximum number of digits that can be output is 8 (32 bits).
Note 2: The output port • f lag used is 4 x n (number of digits).
.
[Example 1]OUT3002Write the value of variable 99 as a BCD value to output ports from 300
OFFOFFOFFOFF
for 2 digits (up to 307).
ONON
301300
OFF
• • •Output port Number
[Example 2]LET13 00Assign 300 to variable 1.
LET22Assign 2 to variable 2.
OUT*1*2Write the value of variable 99 as a BCD value to output ports from 300
(content of variable 1) for 2 digits (content of variable 2) (up to 15).
51
12.SEL Language
● GOTO (Jump)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOOTOG.oNgaT
[Function]Jumps to the position of the tag number designated in operand 1.
Note:The GOTO command is valid only within the same program.
[Example 1]TAG1Set the tag.
:
:
:
GOTO1Jump to tag 1.
[Example 2]LET110Assign 10 to 1.
GOTO*1Jump to tag 10 (content of variable 1).
tsoP
)galF·tuptuO(
● TAG (Tag Declaration)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
lanoitpOlanoitpOGAT.oNgaT
[Function]Sets the tag number designated in operand 1.
[Example]Refer to the GOTO command.
dnammoC
tsoP
)galF·tuptuO(
52
12.SEL Language
● EXSR (Execute Subroutine)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
RSXE.oNenituorbuS
[Function]Executes the subroutine number designated in operand 1.
Note: Only a subroutine number within the same program is enabled.
[Example1]EXSR 1 Execute subroutine 1.
:
:
EXIT
BGSR 1 Begin subroutine 1
:
:
:
EDSR End subroutine 1.
[Example 2] LET 110 Assign 10 to 1
EXSR*1 Execute subroutine 10 (content of variable 1).
tsoP
)galF·tuptuO(
● BGSR (Begin Subroutine)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
RSGB.oNenituorbuS
[Function]Commands the start of the subroutine number designated in operand 1.
[Example]Refer to the EXSR command.
● EDSR (End Subroutine)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
RSDE
[Function]Commands end of subroutine. This is always required at the end of a subroutine. After this, the
program moves to the step after the EXSR called out.
)galF·tuptuO(
)galF·troptuptuO(
[Example 1] Refer to the EXSR command.
53
12.SEL Language
12.9Task management commands
● EXIT (Exit Program)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOTIXE
[Function]Finishes the program. When final step is reached without the EXIT command, process
returns to the front.
* The status when the program is complete
• Output Port ..................... Valid
• Local Flag..................... Invalid
• Local Variable...............Invalid
• Current Value .................. Valid
• Global Flag ..................... Valid
• Global Variable ............... Valid
[Example]:
:
EXITEnds the program.
tsoP
)galF·tuptuO(
● EXPG (Start Another Program)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOGPXE.oNmargorPPC
[Function]Starts another program and processes it in parallel.
When that program (task) has been started, the port and flag in the post section is output.
[Example 1]EXPG 1 0Start program number 10.
[Example 2]LET 110Assign 10 to variable 1.
EXPG *1Start variable 1 (content 10) program.
tsoP
)galF·tuptuO(
54
12.SEL Language
● ABPG (Stop Other Program)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOGPBA.oNmargorPPC
[Function]Forces the other program being executed in operand 1 to end.
When that progran (task) is forced to end, the port and flag in the post section is output.
Note:The ABPG command stops the program once the command being executed is completed.
[Example 1]ABPG10Stop program No. 10.
[Example 2]LE T11 0Assign 10 to variable 1.
ABPG * 1Stop variable 1 (content 10) program.
● SLPG (Task Pause) * Commands not yet publicly available can not be used.
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·tuptuO(
tsoP
)galF·tuptuO(
lanoitpOlanoitpOGPLS
[Function]Pauses self task, and begins execution again by WUPG command of another program.
[Example1] SLPGPauses self task.
● WUPG (Startup Other Task) * Commands not yet publicly available can not be used.
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
lanoitpOlanoitpOGPUW.oNmargorPPC
[Function]Executes programs paused by the SLPG command assigned in operand 1.
Once the startup is succesful, output turns ON.
[Example 1]WUPG 1Execute program No. 1.
)galF·tuptuO(
[Example 2]LET110Assign 10 to variable 1.
WUPG *1Execute variable1 (content 10) program.
55
12.SEL Language
● GTPG (Acquire Task Level) * Commands not yet publicly available can not be used.
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOGPTG.oNelbairaV.oNmargorP
[Function]Reads the task condition of operand 2 program into operand 1 variable.
[Function]Checks to see whether there is valid data in the designated axis pattern and position number. If there is no
data, the post flag or output port turns ON. Post section turns ON only when all the axes specified by the
axis pattern are XX.XXX. ("0" is considered as data.)
[Example]PTST 111160 0If there is no data in position 11 of axis 1 and 2, flag 600 turns ON.
61
12.SEL Language
● PVEL (Assign V elocity Data)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
lanoitpOlanoitpOLEVPyticoleV.oNnoitisoP
[Function]Assigns the value in operand 1 as the velocity for the designated position data. Variables can also be
used. This command is used to change the actual velocity.
*When a value is assigned that will result in a negative number after calculation, there is no warning at
the time you execute this command but an alarm will occur when you try to use the data.
[Example]PVEL1003Assign a value of 100mm/sec to the velocity data for position number 3.
)galF·troptuptuO(
● PACC (Assign Acceleration Data)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
lanoitpOlanoitpOCCAPnoitareleccA.oNnoitisoP
[Function]Assigns the acceleration data in Operand 1 for the acceleration of the position data. As with the PVEL
command, you can assign a value using the variable but there is no function that checks the value range
when executing this command. Therefore, please be careful not to assign a value that exceeds the actuator's
limits.
[Example]P ACC0.33Assign a value of 0.3 to the acceleration speed data for position number 3.
)galF·troptuptuO(
62
12.SEL Language
● PSIZ (Check Position Data Size)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
lanoitpOlanoitpOZISP.oNelbairaV
[Function]Checks the maximum size of the position data that can be used.
[Example]PSIZ 1The maximum value of the position data goes into variable 1 (variable to be assigned) in
operand 1.
● PAXS (Read Axis Pattern)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOSXAP.oNelbairaV.oNnoitisoP
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
)galF·troptuptuO(
[Function]Stores the axis pattern of the position in operand 2 into the variable in operand 1.
[Example 1] P AXS100200Store the axis pattern of position 200 into variable 100. When the points are set
as in the position table below , 2 (10 in binary notation) is stored in variable 100.
[Example 2] When the points are set as below , 2 (10 in binary notation) is stored in variable 100.
LET13Assign 3 to variable 1.
P A XS*1*2Assign 101 to variable 2.
LET2301Store the axis pattern of the position for 101 which is the value contained in
variable 2, to variable 3 which is contained in variable 1. When the points are
set as below , 3 (11 in binary notation) is stored in variable 3.
63
12.SEL Language
● VEL(Velocity)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
lanoitpOlanoitpOLEVyticoleV
[Function]Sets the velocity of an actuator movement in mm/sec. The maximum velocity varies according to the model
of the actuator so please set below that value.
*Decimal places cannot be used. Entering a decimal value will cause an error.
*The minimum velocity setting is 1mm/sec.
[Example]V EL1000
1000mm/sec (V elocity Setting)
VEL1000
MOVP 1
MOVP 2
VEL500
MOVP 3
MOVP 4
The velocity between these two points is 1000mm/sec.
The velocity between these two points is 500mm/sec.
● OVRD (Override)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
lanoitpOlanoitpODRVO
[Function]This command decreases the velocity according to the designated ratio. (V elocity coef ficient setting).
The range of the ratio settings is from 1 ~100%.
*When you use the override function, any value below 1 will be clamped at 1. Any decimal value in the
speed setting will be rounded off.
[Example]V EL100100mm/sec setting.
OVRD50100mm/sec is reduced by 50% and the actual velocity becomes 50mm/sec.
64
dnammoC
tsoP
yticoleV
eulavoitar
)galF·troptuptuO(
12.SEL Language
● ACC (Acceleration)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
lanoitpOlanoitpOCCAnoitareleccA
[Function]Sets the acceleration of the actuator movement which is expressed in G (Gravity). The maximum acceleration
varies and depends on the actuator model and payload. The rated acceleration is 0.3 G. The actuator moves
at the rated acceleration 0.3 G when acceleration is not set by the ACC command.
[Example]ACC0.3
0.3G(Acceleration setting at 0.3G)
65
12.SEL Language
● SCRV (S Motion Ratio Setting)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
lanoitpOlanoitpOVRCSoitaR
[Function]Sets the ratio to control the S motion of the actuator.
The setting range is integers from 0 ~ 50 (%).
If this command is not used to set the ratio or when it is set to 0 (%), the actuator makes a trapezoid motion.
v
dnammoC
tsoP
)galF·troptuptuO(
[Example 1]SCRV30S motion ratio is set to 30%.
[Example 2]LET150Assign 50 to variable 1.
S CRV*1S motion ratio is set to 50 (%) which is the content of variable 1.
66
t
12.SEL Language
● ATRG (Arch Motion Trigger)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
lanoitpOlanoitpOGRTA
dnammoC1dnarepO2dnarepO
dnammoC
noitisoP
)%(oitar
[Function]Sets the axis movement position ratio to execute the ARCH command.
*The position ratio depends on the distance of the movement but it should be set at 50~60% or higher.
When the ratio is set too low, a "C2" alarm may occur.
[Example]Application program
200
(No.1)
X
60%
(No.2)
HOME 11
VEL100
A TRG60
ACC0.3
ARCH 1 3
60%
0
200
(No.3)
Y
noitisoP
ataD
1.oN000.002xxx.xxx
2.oNxxx.xxx000.002
3.oN00.0xxx.xxx
sixAXsixAY
tsoP
)galF·troptuptuO(
● OFST (Offset)
noisnapxE
noitidnoc
·DNA(
)RO
tupnI
noitidnoc
)galF·O/I(
lanoitpOlanoitpOTSFO
dnammoC1dnarepO2dnarepO
dnammoC
sixA
nrettap
tesffO
eulav
[Function]This command adds an offset value to the target value when the actuator moves. The offset amount is
given in mm and the resolution is 0.001mm. Offset values can be negative numbers within the range of
movement.
* The OFST command can only be used for the axes in that program. T o set an of fset value for axes in
multiple programs, the OFST command must be executed for each program.
[Example]OFST10000011 50.00050mm is added to the movement amount of Axis 1, Axis 2, and Axis 8.
tsoP
·troptuptuO(
)galF
67
12.SEL Language
● HOLD(Hold: Axis Temporary Stop)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpODLOHgalF·O/I
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
[Function]Designates an input port for sending a command to decelerate and stop while a move command is being
executed. If the designated input port turns ON, then velocity decreases until all motion stops. When the
input port turns OFF , then motion begins again. The HOLD command applies only to the axes in the
designated task (program), and does not affect axes running in other programs.
[Example]HOLD25When input port 25 turns ON, velocity decreases until all motion stops.
V
t
Input 25 ON
HOLD
Input 25 OFF
Remaining
motion
Motion
Completed
)galF·troptuptuO(
* When the HOLD function is used during PATH, CIR, ARC motion commands, the actuator stops at the next
position. During the execution of straight line motion commands such as MOVL, MOVP , it stops immediately .
* The IA system uses a unique homing sequence which locks the servo and detects the stroke edge during
homing. If the HOLD is activated at the end of homing, this might cause a "servo run-away = alarm" after the
HOLD is released. Therefore, HOLD should be designated after the HOME command. If you need to designate HOLD from the beginning, a home area detection switch (an area limit switch) must be installed so that
the HOLD designation will not be carried out in this area.
* HOLD and CANC cannot be used in the same program. (If both are written in the same program, the command
that is designated later is the one that becomes effective).
68
12.SEL Language
● CANC(Cancel: Cancels Remainder of Move)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
lanoitpOlanoitpOCNACgalF·O/I
[Function] Designates an input or flag for sending a command to decelerate and stop while a move command is being
executed. If the actuator is moving and the designated input port turns ON, then velocity decreases until all
motion stops. Any other programmed motion thereafter is cancelled and not executed.
* HOLD and CANC cannot be used in the same program. (If both are written in the same program, the
command that is designated later is the one that becomes effective).
[Example] CANC25
When input port 25 turns ON, velocity decreases until all motion stops. All motion after this is cancelled.
Input 25
V
ON
t
Motion
Completed
The rest is cancelled
* During PATH, CIR, ARC motion designa-
tion, the actuator moves to the next position.
Any other programmed motion thereafter is
cancelled and not executed.
)galF·troptuptuO(
● BASE (Axis Base Designation)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
lanoitpOlanoitpOESAB.oNsixA
[Function] Count axes starting with the designated axis as the first axis.
[Example] HOME 11Axis No.1 and Axis No.2 perform homing.
BASE 3Axis No.3 is counted as the first axis.
HOME 11Axis No.3 and Axis No.4 perform homing.
After homing, Axis No.3~8 move by designating Axis No.1~6
(axis pattern and position data).
69
dnammoC
tsoP
)galF·troptuptuO(
12.SEL Language
●GRP (Grouping of Axes)
noisnapxE
noitidnoc
·DNA(
)RO
lanoitpOlanoitpOPRG
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
[Function]This command moves the actuator through the position data of the designated axis pattern.
(Even if there is data in axes other than those designated, the actuator will not move to these positions).
[Example]GR P00000011From position data for 8 axes, data from axis 1 and 2 is taken out and executed.
dnammoC
sixA
nrettap
tsoP
·troptuptuO(
)galF
●DEG (Degree Setting)
noisnapxE
noitidnoc
·DNA(
)RO
lanoitpOlanoitpOGEDelgnA
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]This command sets up the motion increments for use with CIR (Circular Movement) and ARC
(Arc Movement) commands. When performing CIR and ARC commands, passing points will be calculated
by dividing a circle into the degrees as set. When increments are set small, the circular movement is
accurate, however, when they are too small, the speed becomes too slow. When CIR and ARC commands are
performed without setting increments, the motion increments of the actuator will be 15 degrees.
[Example]D E G10
Motion in 10
degree increments.
tsoP
·troptuptuO(
)galF
70
12.SEL Language
AXST (Axis Status Acquisition)
●
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOTSXA.oNelbairaV.oNsixA
[Function]Stores the status (error code) of the axis in Operand 2 in the variable in Operand 1.
Only error codes that begin with the letter "A" will be stored in the register in Operand 1. These error
codes are the same ones that are displayed on the front panel of the controller. (The error codes in the
table are written in hexadecimal numbers. The hexadecimal value in the variable in Operand 1 must be
converted to a decimal number to identify its error code.)
[Example]AXST12Read the status for Axis 2 to variable 1.
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
If 161 was in variable 1, 161 ÷ 16 = 10 ( = A) with a remainder of 1, then
this means that error code A1 (External Interrupt Error) occurred on Axis 2.
dnammoC
tsoP
)galF·troptuptuO(
71
12.SEL Language
12.13 Actuator Control Commands
● SVXX (Servo ON/OFF)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOXXVSnrettapsixA
[Function] This commands turns the servo of the designated axes ON/OFF .
SVXX
ON • • • Turns the servo ON.
OF
[Example]SVON
● HOME (Return Home)
SVON 11001100Turn on the servo for axis 4, 7, 8. This does not affext
noisnapxE
noitidnoc
)RO·DNA(
• • • Turns the servo OFF.
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
axes that are already ON.
dnammoC
tsoP
)galF·troptuptuO(
tsoP
)galF·troptuptuO(
lanoitpOlanoitpOEMOHnrettapsixAlanoitpO
[Function]This command executes homing of the designated axes. Servos turn ON automatically.
[Example]HOME 10000011Axis 1, 2, and 8 axes execute homing.
72
12.SEL Language
● MOVD (Direct Designate Move)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpODVOMnoitisopevoMlanoitpO
[Function]Moves the actuator to a position designated in operand 1.
Output turns OFF when axis move starts, and upon completion, turns ON.
[Example 1]MOVD 100Move the axis to position 100.
[Example 2]LET 11 00Assign 100 to variable 1.
MOVD *1Move the axis to variable 1 (content 100) position.
* Note: This command is applicable to the DS type only.
● MOVP (Point to-Point Position Data)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
tsoP
)galF·troptuptuO(
lanoitpOlanoitpOPVOM.onnoitisoPlanoitpO
[Function] This command moves the actuator to the designated position number from point to point without
interpolation.
[Example] MOVP 100
Moves to Position No. 100 (point to point).
MOVP *1
If variable 1 is 150, then the actuator moves to
noitisoP
.oN
1
2
3
○○○○○○
123
position number 150 (point to point).
-0.001
0
0
0
-0.002
0
Move path when X-axis moves to 200mm point and Y-axis moves
to 100mm point from home.
Y axis
100mm
Home 0
Y axis motion complete
X axis
200mm
Each axis moves at its
own designated speed.
001
051
○○
-0.001
-0.002
-x.xxx
x
-x.xxx
x
73
12.SEL Language
● MOVL( Position Data with Interpolation)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
.oNnoitisoP
lanoitpOlanoitpOLVOM
[Function]Moves the actuator to the designated point while using interpolation (not point to point).
[Example]MOVL100
Move to position No. 100 using interpolation.
MOVL*1
If variable 1 is 150, then the actuator moves to position 150 using interpolation.
Move path when X-axis moves to 200mm point and
Y-axis moves to 100mm point from home.
Y axis
100mm
Home 0
X and Y axis complete move at the same time
X axis
200mm
elbairaVlanoitpO
The tip of the combined motion for each
of the axes moves at the designated speed.
The path from the starting point to the end
point makes a straight line.
tsoP
)galF·troptuptuO(
● MVDI (Incremental Move)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
lanoitpOlanoitpOIDVM
dnammoC1dnarepO2dnarepO
dnammoC
noitisoP
tnemercnI
[Function]Moves the as a move load of the value designated in operand 1.
The output becomes OFF when axis move starts, and upon completion, turns ON.
[Example]MVDI30Move 30mm from the current position to the +direction.
* Note: This command is applicable to the DS type only.
tsoP
)galF·troptuptuO(
EP
74
12.SEL Language
● MVPI (Incremental PTP Move)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
lanoitpOlanoitpOIPVM.oNnoitisoPEP
[Function]Moves the actuator to the designated position number in reference to the current position from point to point
without interpolation.
[Example]MVPI1
When the current position is (50, 50) and position 1 data is (150, 100), the actuators move 150 in the X
direction and 100 in the Y direction to the position (200, 150).
150mm
50mm
Home 0
Y axis
50mm200mm
Y axis only completes movement
Each axis moves at its own designated speed.
X axis
● MVLI (Incremental Interpolation Movement)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
lanoitpOlanoitpOILVM.onnoitisoPlanoitpO
[Function]Moves the actuator to the designated point in operand 1 from the current position while interpolating
(not point to point).
[Example]MVLI1
When the current position is (50, 50) and the position 1 data is (150, 100), the actuators move to the position
(200, 150) which is 150 in X direction and 100 in Y direction from the current position.
150mm
50mm
Home 0
Y axis
50mm200mm
X, Y complete motion at the same time
The tip of the combined motion for each of the axes
moves at the designated speed. The path from the
start to the finish point makes a straight line.
X axis
)galF·troptuptuO(
75
12.SEL Language
● ARCH (Arch Motion)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
lanoitpOlanoitpOHCRA
dnammoC1dnarepO2dnarepO
dnammoC
gnitratS
.oNnoitisop
gnidnE
.oNnoitisop
tsoP
[Function]In order to accomplish faster pick & place motion in the air and the tact time, the actuator performs an
arch motion movement by changing the position ratio of the axis movement before it reached the
intermediate target position.
[Example]LET11Assign 1 to variable 1.
LET23Assign 3 to operand 2.
ATRG7 0Set position ratio to 70%.
ARCH *1Execute arch move from variable 1 (content 1) to variable 2 (content 3)
position.
*Note: See ATRG command
●PATH (Path Movement)
)galF·troptuptuO(
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOHTAP
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
gnitratS
noitisop
.oN
gnidnE
noitisop
.oN
tsoP
)galF·troptuptuO(
EP
[Function]Actuator moves continuously between the designated starting point and the finishing point. The locus is
a B-spline-type, free-form curve which passes through the inside of the designated coordinate. It is
possible for the actuator to move close to the designated coordinate by increasing the acceleration.
However, when it exceeds the maximum acceleration, an error will occur.
* Three and four axis motion can be performed by this command.
[Example 1]PATH 1 0 012 0Moves continuously to position 100 ~ 120.
[Example 2]LET 150Assign 50 to variable 1.
LET 2100Assign 100 to variable 2.
PATH *1*2Continuosly move positions from variable 1 (content 50) to variable 2
(content 100).
76
12.SEL Language
● CIR (Circular Movement)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpORIC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
gnissaP
1noitisop
[Function]Executes circular motion using the current position as the starting
point and passing points 1 and 2. The rotation direction is determined by the position data. The following diagram shows CW
(clockwise) motion but this can be changed to CCW (counterclockwise) by exchanging positions 1 and 2.
*This command is available for the specified orthogonal plane
(Automatically selected by position data. Generally the XY plane
is selected.) Also, care is needed if using this with the OFST
command (check movement).
[Example]CI R100101
Executes a circular motion passing through position numbers 100
and 101.
gnissaP
2noitisop
Starting Point
Starting Point
tsoP
)galF·troptuptuO(
lanoitpO
Passing Position 1
Passing Position 2
Position No. 100
Position No. 101
77
12.SEL Language
● ARC (Arc Movement)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOCRA
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
gnissaP
1noitisop
gnissaP
2noitisop
tsoP
EP
[Function]Executes an arc motion from the current position to operand 2 position, passing through operand 1.
The output turns OFF during an arc move and turns ON upon completion. However, when other
commands as ARC, P ATH and CIR follow in a consecutive order, turns ON at the 2nd point prior to the
last point.
* This command is available for the specified orthogonal plane (automatically selected by position
data). Generally the XY plane is selected.
[Example 1]ARC100101Executes an arc motion from the current position to position 101,
passing through 100.
[Example 2]LET15Assign 5 to variable 1.
LET26Assign 6 to variable 1.
AR C*1*2Executes an arc motion from the currrent position
(passing through variable 1 content 5) to variable 2
(content 6) position.
)galF·troptuptuO(
78
12.SEL Language
●JXWX (Jog move)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOXWXJ
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
sixA
nrettap
O/I
galF
tsoP
EP
[Function]Continues to move while the axis designated in operand 1 meets the condition I/O port flag
designated in operand 2. Stops when the axis reached soft limit.
JXWX
FN
• • •Designated port moves forward during ON.
BN• • •Designated port moves backward during ON.
FF• • •Designated port moves forward during OFF.
BF• • •Designated port moves backward during OFF.
Note:HOLD is not available for this command.
[Example 1]JBWF1100110010While input 10 is OFF, Axis 3, 4, 7, and 8 moves backwards.
[Example 2]LET520Assign 20 to variable 5.
JFWN 10101010* 5While input of variable 5 (content 20) is ON, move forward
axis 2, 4, 6, and 8.
)galF·troptuptuO(
● STOP (Slows to a Stop)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOPOTS
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
sixA
nrettap
[Function]Axis designated in operand 1 axis pattern slows to a stop.
[Example]STOP11001100Axis 3, 4, 7 and 8 Slows to a stop.
tsoP
)galF·troptuptuO(
EP
79
12.SEL Language
12.14Structured IF Commands
●IFXX (Structured IF)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOXXFI.oNelbairaVataD
[Function]Compares the contents of the variable in operand 1 and the value in operand 2. When the condition is estab-
lished, the program proceeds to the next step. When the condition is not established, if there is a
corresponding ELSE command, the program proceeds to the next step after that. If not, it proceeds to the next
step after the corresponding EDIF command. When the input condition is not established and there is no IFXX
command executed, the program proceeds to the step following the corresponding EDIF . Up to 15 levels of
nesting are available when ISXX and DWXX are combined.
IFGE20Select moving direction
JFWN 015Move Axis 1 forward
ELSE
JBWN 015Move Axis 1 backward
EDIF
ELSE
IFNE21Select moving direction
JFWN 105Move Axis 2 forward
ELSE
JBWN 105Move Axis 2 backward
EDIF
EDIF
Variable 1 selects Axis 1 or Axis 2. Variable 2 selects forward or backward to jog.
When flag 600 is OFF, nothing is done and the program proceeds to the step after the last EDIF.
*Do not use GOTO (TAG) in between IFXX and EDIF.
80
12.SEL Language
● ISXX (String Comparison)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOSIXX.oNnmuloC
[Function]Compares the character string in the column numbers in Operand 1 and Operand 2. When the condition
is established, the program proceeds to the next step. When the condition is not established, if there is a
corresponding ELSE command, the program proceeds to the next step after that. If not, it proceeds to
the next step after the corresponding EDIF command. The length of the string to be compared is set by
the SLEN command. If there is a literal character in either Operand 1 or Operand 2, the length to be
compared is that of the literal character. When the input condition is not established and there is no IFXX
command executed, the program proceeds to the step following the corresponding EDIF. Up to 15
levels of nesting are available when ISXX and DWXX are combined.
ISXX
600ISEQ1'1AXS'Select Axis
Column 1 ~ 4 is to select Axis 1, Axis 2 and column 5 ~ 8 is to select the jog direction.
When flag 600 is OFF, nothing is done and the program proceeds to the step after the last EDIF.
When column 1 ~ 8 contains the data shown below, Axis 1 moves forward.
[Function]The ELSE command is used in conjunction with the IFXX command and ISXX command. When the
condition is not established, the command following the ELSE statement will be executed.
[Example]Refer to IFXX and ISXX.
tupnI
noitidnoc
)galF·O/I(
dnammoC
dnammoC1dnarepO2dnarepO
ESLE
tsoP
)galF·troptuptuO(
● EDIF (IFXX End)
noisnapxE
noitidnoc
·DNA(
)RO
[Function]Declares the end of an IFXX command.
[Example]Refer to IFXX.
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
FIDE
dnammoC
tsoP
)galF·troptuptuO(
82
12.SEL Language
12.15Structured DO Command
● DWXX (DO WHILE)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOWDXX.oNelbairaVataD
[Function]Compares the contents of the variable in Operand 1 and the value in Operand 2. While the condition is
established, the commands are executed up to EDDO.When the condition is not established, the program
proceeds to the step after the corresponding EDDO command. The LEAV command can be used to force the
end of the loop. When the input condition is not established, the DWXX command is not executed and the
program proceeds to the next step after the corresponding EDDO. Up to 15 levels of nesting are available
when ISXX and DWXX are combined.
·
EDDO
While variable 1 is 0, the commands up to the EDDO command are repeated.
If flag 600 turns ON during this time, the loop is forced to end and the program proceeds to
the next step after the EDDO command.
● EDDO (End DO WHILE)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
lanoitpOlanoitpOODDE
[Function]Declares the end of the loop which started with DWXX.
When a DWXX condition is not established, the program proceeds to next step after this command.
tsoP
)galF·troptuptuO(
[Example]Refer to DWXX.
83
12.SEL Language
●LEAV (Escape From DO WHILE)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOVAEL
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]Escapes the DOXX loop, then the program proceeds to the next step after EDDO.
[Example]DWEQ 10
·
·
600LEAV
·
·
EDDO
While variable 1 is 0, the commands up to the EDDO command are repeated.
If flag 600 turns ON during this time, the loop is forced to end and the program proceeds to the next
step after the EDDO command. If variable 1 is still 0, then the loop is repeated.
●ITER (Repeat)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
tsoP
)galF·troptuptuO(
lanoitpOlanoitpORETI
[Function]Forces the control to move to EDDO during the DOXX loop.
[Example]DWEQ 10
·
·
600ITER
·
·
EDDO
While variable 1 is 0, the commands up to the EDDO command are repeated.
If flag 600 turns ON during this time, the loop is forced to end and control is forced to move to the
EDDO command. If variable 1 is still 0, then the loop is repeated.
84
12.SEL Language
12.16Branching commands
●SLCT (Start Selection Group)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOTCLS
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
[Function]Branches to the next step after the OTHE command if none of the conditions set up by the WHXX,
WSXX or any commands up to the EDSL command are met.
(Example]SCPY1‘Right’Assign ‘Right’ to column 1 and 5.
:
600SLCTSince the string in columns 1 through 5 are equal to ‘Right’, the
commands that follow this WSEQ will be executed.
WSEQ 1‘Right’Since the string in columns 1 through 5 are not equal to ‘left’,
the commands that follow this WSEQ will not be executed. If it
is neither, then the commands that follow OTHE are executed.
WSEQ 1‘Left’When flag 600 is OFF, or if any one of the conditions is executed,
:then end the select.
OTHE
:
EDSL
)galF·troptuptuO(
85
12.SEL Language
● WHXX (Selected When T rue Variable)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
XXHW.oNelbairaVataD
dnammoC
[Function]This is used between the SLCT∼ EDSL commands. Compares the contents of the variable in
operand 1 to the value in operand 2. If the conditions are met, then the code following the WHXX will
be executed up to the next WHXX. If the conditions are not met, the program will go to the next WHXX
command or OTHE command or EDSL.
WHXX
EQ..........Operand 1 = Operand 2
NE..........Operand 1 ≠Operand 2
GT..........Operand 1 >Operand 2
GE..........Operand 1 >Operand 2
LT..........Operand 1 <Operand 2
LE..........Operand 1 <Operand 2
[Example]LET120Assign 20 to variable 1.
L ET210Assign 10 to variable 2.
:
SLCTBranches.
WHEQ 110If the content of variable is 10, (1) is executed but since the
:content is 20, program refers to the next condition.
(1)
:
WHGT 1*2Executed if the content of variable 1 is greater than the
: -content of variable 2.
(2 )V ariable 1 (=20) > variable 2 (=10), so (2) is executed.
:
OTHEIf no conditions are fufilled, this is executed. Since (2) was
:executed, (3) will not be executed.
(3)
:
EDSLWhen one of the conditions is met and that command is
:performed, processing moves to EDSL. In this example,
(4 )(2) and (4) are executed.
:
tsoP
)galF·troptuptuO(
*When there is a possibility of several conditions being met, the WXXX command that appears first goes into effect and
the commands that follow are not executed. When conditions are demanding, list the ones with the highest priority first.
86
12.SEL Language
● WSXX (Selected When True Character)
noisnapxE
noitidnoc
)RO·DNA(
[Function]This is used during SLCT∼ EDSL. Compares the character string in the columns in operand 1 and
tupnI
noitidnoc
)galF·O/I(
operand 2. If the conditions are met, then the code following the WSXX will be executed up to the next
WSXX. If the conditions are not met, the program will go up to the next WSXX command or OTHE
command or EDSL. Comparison is made based on the length designated in the SLEN command. When
operand 2 is a literal character, that is the length that is executed.
WSXX
dnammoC
dnammoC1dnarepO2dnarepO
XXSW.oNmuloCretcarahclaretiL·.oNnmuloC
tsoP
)galF·troptuptuO(
EQ
NE
• • •Operand 1 = Operand 2
• • •Operand 1 ≠ Operand 2
[Example]SLEN3Sets the number of characters to be compared to 3.
SCPY1‘ABC’Assign ‘ABC’ to column 1.
LET13Assign 3 to variable 1.
:
SLCT
WSEQ 1‘XYZ’Branches.
:If columns 1~3 are ‘XYZ’, (1) is executed but since columns
(1)1~3 are ‘ABC’, this is not executed.
:
WSEQ 1‘ABC’
:If columns1~3 are ‘ABC’, (2) is executed. Therefore, this
(2)code is executed.
:
OTHE
: If no conditions are fufilled, this is executed. Since (2) was
(3)executed, (3) will not be executed.
:
EDSLWhen one of the conditions is met and that command is performed,
: processing moves to EDSL. In this example, (2) and (4)
(4)are executed.
*When there is a possibility of several conditions being met, the WXXX command that appears first goes into effect and
the commands that follow are not executed. When conditions are demanding, list the ones with the highest priority first.
87
12.SEL Language
● OTHE (Selected in Case of Other)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
EHTO
dnammoC
tsoP
[Function]This is used between SLCT~EDSL commands. This declares the command to be executed when no
other conditions are met.
[Example]Please refer to SLCT, WHXX and WSXX.
)galF·troptuptuO(
● EDSL (End of Selected Group)
noisnapxE
noitidnoc
)RO·DNA(
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
LSDE
[Function]Declares the end of SLCT command.
[Example]Please refer to SLCT, WHXX and WSXX.
dnammoC
tsoP
)galF·troptuptuO(
88
12.SEL Language
12.17 External input output command
● OPEN (Open Channel)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpONEPO.oNlennahC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
[Function]Opens the channel specified in operand 1. Channels specified after this will be able to transmit and receive
signals. An ending character must be set by the SCHA command before executing this command.
[Example]SCHA10Designate 10 (=LF) as the ending character.
OPEN1Open channel 1.
SCHA13Designate 13 (=CR) as the ending character.
L ET12Assign 2 to variable 1. Open channel 2, the value contained in variable 1.
OPEN*1
●CLOS (Close Channel)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOSOLC.oNlennahC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
[Function]Closes the channel specified in operand 1. Channels specified after this will be unable to transmit and
receive signals.
[Example]CLOS1Close the channel.
[Example]LE T12Assign 2 to variable 1.
CLOS*1Close channel 2, the value contained in variable 1.
)galF·troptuptuO(
89
12.SEL Language
● READ
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpODAER.oNlennahC.oNnmuloC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]Reads the character string from the channel in operand 1 to the column in operand 2.
Stops reading when the character designated in the SCHA command appears.
The column can be either local or global.
[Example]SCHA10Set LF (= 10) for the ending character .
OPEN1Open channel 1.
READ12Read the character string from channel 1 to column 2 until LF appears.
CLOS1Close the channel.
LET12Assign 2 to variable 1.
LET23Assign 3 to variable 2.
SCHA13Set CR (= 13) for the ending character.
READ*1*2Read the character string from channel 2 (content of variable 1) to column 3
(content of variable 2) until CR appears.
tsoP
)galF·troptuptuO(
90
12.SEL Language
● WRIT (Write)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOTIRW.oNlennahC.oNnmuloC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]Writes the character string from the channel in operand 1 to the column in operand 2.
Stops writing after the character designated in the SCHA command is written.
The column can be either local or global.
[Example]SCHA10Set LF (= 10) for the ending character .
OPEN1Open channel 1.
WRIT12Write the character string from channel 1 to column 2 until LF appears.
CLOS1Close the channel.
LET12Assign 2 to variable 1.
LET23Assign 3 to variable 2.
SCHA13Set CR (= 13) for the ending character.
WRIT*1*2Read the character string from channel 2 (content of variable 1) to column 3
(content of variable 2) until CR appears.
tsoP
)galF·troptuptuO(
● SCHA (Set Ending Letter)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOAHCSedocretcarahC.oNnmuloC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]Sets the ending letter to be used in the READ command and WRIT command. A value from 0 ~ 255
(character code used in BASIC) can be designated for the character.
[Example]Refer to the READ command and WRIT command.
tsoP
)galF·troptuptuO(
91
12.SEL Language
12.18String processing commands
● SCPY
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOYPCS.oNnmuloC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
.oNnmuloC
retcarahClaretiL
[Function]Copies the character string from the column in operand 2 to the column in operand 1.
Copies only the length set by the SLEN command. When operand 2 is a literal character, that
is the length copied.
[Example]SCPY1‘ABC’Copy ‘ABC’ to column 1.
SLEN10Set the length of the operation to 10 bytes.
SCPY100200Copy the length of the operation to 10 bytes.
Copy 10 bytes from the column 200 to column 100.
L ET1300Assign 300 to variable 1.
L ET2400Assign 400 to variable 2.
SLEN5Set the length of the operation to 5 bytes.
SCPY*1*2Copy 5 bytes from column 400 (the content of variable 2)
to column 300 (the content of variable 1).
tsoP
)galF·troptuptuO(
● SCMP (Compare Character String)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOPMCS.oNnmuloC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
.oNnmuloC
retcarahClaretiL
tsoP
)galF·troptuptuO(
QE
[Function]Compares the column in operand 1 and the column in operand 2. Compares only the length set by the
SLEN command. When operand 2 is a literal character, that is the length compared.
[Example]SCMP1‘ABC’60 0When column 1~3 are ‘ABC’ flag 600 turns ON.
SLEN5Set the length to be compared to 5 bytes.
SCPY1030999When the 5 bytes from column 10 and column 30 are equal,
flag 999 turns ON.
L ET11 0Assign 300 to variable 1.
L ET22 0Assign 400 to variable 2.
SLEN3Set the length of the operation to 5 bytes.
SCMP*1*2310When the 3 bytes in column 10 (the content of variable 1) and
the 3 bytes in column 20 (the content of variable 2) are equal,
then, the output turns ON.
92
12.SEL Language
● SGET (Acquire Character String)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOTEGS.oNelbairaV.oNnmuloC
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]Assigms 1 character from the column in operand 2 to the variable in operand 1.
[Example]SGET100Assign 1 byte of column 100 to variable 1.
LET13Assign 3 to variable 1.
LET21Assign 1 to variable 2.
SCPY1‘A’Copy ‘A ’ to coumn 1.
SGET*1*2Assign ‘A’ in column 1 (content of variable 2) to
variable 3(content of variable 1).
tsoP
)galF·troptuptuO(
● SPUT (Set Character)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOTUPS.oNnmuloCataD
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
dnammoC
[Function]Sets the data in operand 2 to the column in operand 1.
[Example]SPUT510Set 10 (LF) to column 5.
L ET1100Assign 100 to variable 1.
L ET250Assign 50 to variable 2.
SPUT*1*2Set 50 (' 2') which is the content of variable 2 to column 100
(content of variable 1).
tsoP
)galF·troptuptuO(
93
12.SEL Language
● STR (Change Character String Decimal)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpORTS.oNnmuloCataD
[Function]Copies the data in operand 2 which has been converted to a decimal character string to the column in
operand 1. Uses zero-suppress to match this to the length set by the SLEN command.
Even if the data is longer than the length, the length set by the SLEN command takes precedence.
[Example]SLEN5. 3
tupnI
noitidnoc
)galF·O/I(
STR1123
Set the length to a 5 digit integer with 3 decimals.
The following will be set in column 1~9,
123456789
LET110
LE T2987. 6543
SLEN2. 3
STR*1*2
Assign 10 to variable 1.
Assign 987. 6543 to variable 2.
Set the length to a 2 digit integer with 3 decimals.
The following will be set in column 10~15,
dnammoC1dnarepO2dnarepO
123 .000
dnammoC
tsoP
)galF·troptuptuO(
011121314151
87.654
.Since the data was longer than the set length, 9 in the 100s place and 3 in the 4th decimal place
are cut off.
94
12.SEL Language
● STRH (Change Character String Hexadecimal)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOHRTS.oNnmuloCataD
[Function]Copies the data in operand 2 which has been converted to a hexadecimal character string to the column in
operand 1. Uses zero-suppress to match only the integers to the length set by the SLEN command.
Even if the data is longer than the set length, the setting by the SLEN command will take precedence.
[Example]SLEN5
tupnI
noitidnoc
)galF·O/I(
STRH1255
Set format for a 5 digit integer.
The following will be set in column 1~5,
12345
FF
LET110
LE T2987. 6543
SLEN2. 3
STRH*1*2
Assign 10 to variable 1.
Assign 987. 6543 to variable 2.
Set format for a 2 digit integer with 3 decimals.
The following will be set in column 10~11,
dnammoC1dnarepO2dnarepO
dnammoC
tsoP
)galF·troptuptuO(
0111
DB
.3, the decimal segment of the SLEN command, and .6543 in variable 2 will be ignored.
The integer expressed in hexadecimal notation is ' 3DB'. However, 3 in the third digit will be cut
off since the length is set to 2 digits.
95
12.SEL Language
● VAL (Character String Change Data Decimal)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOLAV.oNelbairaV.oNnmuloC
[Function]Converts the data in the column in operand 2 to a number and assigns this to the variable
in operand 1. The length set by the SLEN command will be converted.
[Example]SCPY10'1234'Copy the string '1234' into columns 10~13.
SLEN4Set the length to 4 bytes.
VAL110‘1234’ in column 10 is converted to the number 1234 and assigned
L ET1100Assign 100 to variable 1.
L ET220Assign 20 to variable 2
SCPY20‘1234’Copy ‘1234’ to column 20~23.
SCPY24‘.567’Copy ‘.567’ to columns 24~27.
SLEN8Set the length to 8 bytes.
VA L H*1*2‘1234.567’ in column 20 (content of variable 2) will be converted to
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
to variable 1.
the binary number 1234.567 and assigned to variable 100
(content of variable 1).
dnammoC
tsoP
)galF·troptuptuO(
96
12.SEL Language
● V ALH (Character String Data Hexadecimal)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpOHLAV.oNelbairaV.oNnmuloC
[Function]Converts the hexadecimal data in the column in operand 2 to a decimal number and assigns this to the variable
in operand 1. The length set by the SLEN command will be converted. Only the integers will be converted
and the decimal places will be disregarded.
[Example]SCPY10' 1234'Set ' 1234' in column 10.
SLEN4Set the length to 4 bytes.
VAL11 0The hexadecimal number ' 1234' in column 10 is converted to the
L ET1100Assign 100 to variable 1.
L ET220Assign 20 to variable 2
SCPY20' ABCD'Copy ' ABCD' to column 20.
SLEN4Set the length to 4 bytes.
VA L H*1*2The hexadecimal ' ABCD' in column 20 (content of variable 2) will be
tupnI
noitidnoc
)galF·O/I(
dnammoC1dnarepO2dnarepO
number 4660 and assigned to variable 1.
converted to the binary number 43982 and assigned to variable 100
(content of variable 1).
dnammoC
tsoP
)galF·troptuptuO(
● SLEN (Set Length)
noisnapxE
noitidnoc
)RO·DNA(
lanoitpOlanoitpONELShtgneL
[Function]Sets the length for the string command.
SCMP···Decimals Invalid
SCPY···Decimals Invalid
ISXX···Decimals Invalid
STRH···Decimals Invalid
V AL,VALH···Decimals Invalid
STR···Decimals V alid