0% found this document useful (0 votes)
67 views99 pages

Manual Braço Robótico Janome

This document is an operation manual for Janome robots that contains instructions for proper and safe use. It includes a table of contents listing sections on variables, commands, functions, movement controls, input/output controls, and other programming elements. The manual notes it was written according to IEC 62079 standards and encourages reading the safety information before using the robots.

Uploaded by

Sidinei Campolim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views99 pages

Manual Braço Robótico Janome

This document is an operation manual for Janome robots that contains instructions for proper and safe use. It includes a table of contents listing sections on variables, commands, functions, movement controls, input/output controls, and other programming elements. The manual notes it was written according to IEC 62079 standards and encourages reading the safety information before using the robots.

Uploaded by

Sidinei Campolim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 99

JANOME SCARA/GANTRY ROBOT

JS/JSR4400N/JSG Series
JANOME DESKTOP ROBOT
JR2000N Series

Operation Manual
Features II
(Variables/Commands/Functions)

Thank you for purchasing a Janome Robot.

z Read this manual thoroughly in order to ensure proper use of this robot. Be
sure to read “For Your Safety” before you use the robot. The information will
help you protect yourself and others from possible dangers during operation.

z After having read this manual, keep it in a handy place so that you or the
operator can refer to it whenever necessary.

z This manual is written according to IEC 62079.

Downloaded from www.Manualslib.com manuals search engine


CONTENTS

Features II

FOR YOUR SAFETY ______________________________________________________________ i


PREFACE ____________________________________________________________________ xxi
CONTENTS __________________________________________________________________ xxiii

EXPRESSION STRUCTURE_______________________________________________________ 1

COMMAND LIST ________________________________________________________________ 3

VARIABLE LIST _________________________________________________________________ 8

FUNCTION LIST _______________________________________________________________ 11

SYSTEM FLAG LIST ____________________________________________________________ 14

VARIABLES ___________________________________________________________________ 18
Free Variables: #mv, #mkv, #nv, #nkv, #sv, #skv _____________________________________ 18
Input Variables: #sysIn1..., #genIn1..., #handIn1... ____________________________________ 19
Output Variables: #sysOut1..., #genOut1..., #handOut1... ________________________________ 20
Down Timer: #downTimer1 – #downTimer10 ________________________________________ 21
Point Job Start Height: #jobStartHight______________________________________________ 22
Pallet: #palletFlag (1 – 100), #palletCount (1 – 100) ___________________________________ 23
Workpiece Adjustment: #workAdj_X, #workAdj_Y, #workAdj_Z, #workAdj_R, #workAdj_Rotation _
__________________________________________________________________________ 25
Point Coordinates: #point_X,#point_Y,#point_Z, #point_R,#point_TagCode ________________ 27
Designated Point Coordinates: #P_X, #P_Y, #P_Z, #P_R, #P_TagCode __________________ 28
Designated Point Coordinates in Designated Programs: #prog_P_X, #prog_P_Y, #prog_P_Z,
#prog_P_R, #prog_P_TagCode __________________________________________________ 29

FUNCTIONS __________________________________________________________________ 30
Robot System Functions________________________________________________________ 30
Arithmetic System Functions ____________________________________________________ 33
String System Functions________________________________________________________ 34

Features II xxiii JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


ON/OFF OUTPUT CONTROL _____________________________________________________ 36
Output to I/O: set, reset, pulse, invPulse____________________________________________ 36
Output after X Seconds: delaySet, delayReset_______________________________________ 39
Sound a Buzzer: onoffBZ _______________________________________________________ 40
Blink the LED (Green): onoffGLED ________________________________________________ 41
Blink the LED (Red): onoffRLED__________________________________________________ 42
Output Values from I/O: dataOut, dataOutBCD ______________________________________ 43
Motor Power ON, Servo Motor ON and OFF: motorPowerON, servoON, servoOFF __________ 44

IF BRANCH, WAIT CONDITION ___________________________________________________ 45


if Branch: if, then, else, endIf_____________________________________________________ 45
Wait Condition: waitCond, waitCondTime, timeUp, endWait ____________________________ 47

CONDITION ___________________________________________________________________ 49
Condition Settings: ld, ldi, and, ani, or, ori, anb, orb ___________________________________ 49

DELAY, DATA IN, WAIT START ___________________________________________________ 52


Time Delay: delay _____________________________________________________________ 52
Waiting for a Start Signal: waitStart, waitStartBZ _____________________________________ 54
Input from I/O: dataIn, dataInBCD_________________________________________________ 56

PALLET CONTROL _____________________________________________________________ 57


Pallet Command: loopPallet, resPallet, incPallet _____________________________________ 57

EXECUTION FLOW CONTROL ___________________________________________________ 60


Subroutine Call for Jobs according to Point Types: callBase ____________________________ 60
Subroutine Call for Point Job Data: callJob__________________________________________ 62
End the Point Job: returnJob ____________________________________________________ 64
Subroutine Call for a Program: callProg ____________________________________________ 65
Subroutine Call for a Point String: callPoints_________________________________________ 69
End a Program: endProg _______________________________________________________ 70
Assigning the Returned Value of a Function: returnFunc _______________________________ 71
Jump to the Specified Point: goPoint, goRPoint, goCRPoint ____________________________ 72
Jumping to a Specified Command Line: jump, Label __________________________________ 74

FOR, DO-LOOP ________________________________________________________________ 75


for, do-loop: for, next, exitFor, do, loop, exitDo _______________________________________ 75

MOVE________________________________________________________________________ 77
Move the Z-Axis Alone: upZ, downZ, movetoZ_______________________________________ 77

Features II xxiv JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Linear Movement in CP Drive by Point Job: lineMove, lineMoveStopIf_____________________ 79
Mechanical Initialization by Point Job: initMec _______________________________________ 81
Position Error Detection: checkPos________________________________________________ 82

LCD, 7SLED___________________________________________________________________ 83
Display the Specified Strings on the Teaching Pendant: clrLCD, clrLineLCD, outLCD, eoutLCD_ 83
Display the Desired Number on the 7SLED: sys7SLED, out7SLED_______________________ 84

COM INPUT/OUTPUT ___________________________________________________________ 85


COM Input/Output: outCOM, eoutCOM, inCOM, setWTCOM, cmpCOM, ecmpCOM, clrCOM,
shiftCOM____________________________________________________________________ 85
PC Communication: stopPC, startPC ______________________________________________ 89

VARIABLE, COMMENT, SYSTEM CONTROL ________________________________________ 90


Variable Declaration and Assignment: declare, let ____________________________________ 90
Comment Insertion: rem, crem ___________________________________________________ 92
Change a Program Number by Point Job: setProgNum ________________________________ 93
Change a Sequencer Number by Point Job: setSeqNum_______________________________ 94

Features II xxv JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


EXPRESSION STRUCTURE

Expression
An expression is fixed numbers (string type and numeric type), variables, functions, and operators
combined.

Fixed Number
There are two types of fixed numbers, numeric type (e.g. 125, 2.0, 2e15) and string type (e.g. "ABC").
Numeric type fixed numbers are handled as 8-byte real type (double type), and string type fixed
numbers are handled as 255-byte.

For string type fixed numbers, characters can be specified in hexadecimal code using the % symbol.
e.g. eoutCOM port2,"%0D%0A" : Output CR・LF code.

If there is any character other than 0 – 9, A – F, and a second % symbol after the first %, the second %
is treated as a character.
e.g. eoutCOM port2,"%G01" : Output %G01.

If there is any character from 0 – 9 and A – F, enter %% to output %.


e.g. eoutCOM port2,"%%300" : Output %300.

Variable
A variable is a container into which numeric and string values are placed.
You can use the built-in variables (which are built into the robot as a function) and the user-defined
variables (which can be freely defined by the user).
User-defined variables other than local variables (variables effective only in defined point job data
which are defined by the declare command) are defined in the Customizing mode. (See the operation
manual Features IV for details of the Customizing mode.)

Boolean type (boo): 1-bit variable which holds only 1 (true) or 0 (false)
Numeric type (num): 8-byte real type (double type) variable
String type (str): 255-byte variable

Features II 1 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Function
A function returns a converted value if values or strings are given.
You can use the built-in functions (which are built into the robot as a function) and the user-defined
functions (which can be freely defined by the user).
The user-defined functions are defined in the Customizing mode. (See the operation manual Features
IV for details of the Customizing mode.)

Operator
Operator Description Value
+ Adds the left and right values. num
- Deducts the right value from the left value. num
* Multiplies the left and right values. num
/ Divides the left value by the right value. num
& Combines the left and right values. e.g. "A" & "B" Æ "AB" str
= Assigns the right value to a left value. num,str
Returns 1 if the left value is larger than the right value.
> num,str
Returns 0 if the left value is smaller than or the same as the right value.
Returns 1 if the left value is smaller than the right value.
< num,str
Returns 0 if the left value is larger than or the same as the right value.
Returns 1 if the left value is larger than or the same as the right value.
>=, => num,str
Returns 0 if the left value is smaller than the right value.
Returns 1 if the left value is smaller than or the same as the right value.
<=, =< num,str
Returns 0 if the left value is larger than the right value..
Returns 1 if the left value is not equal to the right value.
<>, >< num,str
Returns 0 if they are equal.
Returns 1 if the left value is equal to the right value.
== num,str
Returns 0 if they are not equal.

The priority of operators is as follows:

1. Expressions in brackets
2. Functions and variables
3. “Independent” + and -
4. * and /
5. +, -, and &
6. >, >=, =>, =<, <=, <, <>, and >< (Relational operator)
7. = (Assignment operator)

Features II 2 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


COMMAND LIST

If you assign point job data that includes any of the highlighted ( ) commands
to a CP passing point, the commands will be ignored.

Point Job Data


Category

Command Necessary Parameter Description

set Output Destination Output ON.


reset Output Destination Output OFF.
pulse Output Destination, Pulse Width Output ON pulses of predetermined length.
invPulse Output Destination, Pulse Width Output OFF pulses of predetermined length.
delaySet Output Destination, Delay Time Output ON after the predetermined delay time.
delayReset Output Destination, Delay Time Output OFF after the predetermined delay time.
onoffBZ ON Time, OFF Time Sound the buzzer on and off.
Flash the green LED on the front of the
ON/OFF Output Control

onoffGLED ON Time, OFF Time JR2000N Series robot (or on the operation box
for the JSR4400N robot).
Flash the red LED on the front of the JR2000N
onoffRLED ON Time, OFF Time Series robot (or on the operation box for the
JSR4400N robot).
Output Data, Output Bit Output numeric data or a tag code assigned to
dataOut a point to the I/O.
Number, Output Destination
Output numeric data or a tag code assigned to
Output Value, Output Bit
dataOutBCD a point to the I/O in BCD (binary-coded
Number, Output Destination decimal).
motorPowerON –
Turn on the designated Axis servomotor.
servoON Axis (Available only for the JS and JSG Series)
Turn off the designated Axis servomotor.
servoOFF Axis (Available only for the JS and JSG Series)
if – Conditional branching
if Branch, Wait Condition

then – Perform if true.


else – Perform if false.
endIf – End of conditional branching
waitCondTime Wait Time Wait for conditions for a designated period.
timeUp – Perform when time is up.
endWait – End of wait condition
waitCond – Wait for conditions.

Features II 3 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Category
Command Necessary Parameter Description

ld Boolean variable or Expression Input ON.


ldi Boolean variable or Expression Input OFF.
and Boolean variable or Expression Input serial ON.
Condition

ani Boolean variable or Expression Input serial OFF.


or Boolean variable or Expression Input parallel ON.
ori Boolean variable or Expression Input parallel OFF.
anb – Serial connection of blocks
orb – Parallel connection of blocks
delay Delay Time Stop for a specified time.
Numeric Variable Name, Input
dataIn Read out numeric data from the I/O.
Bit Number, Input Source
Delay

Numeric Variable Name, Input


dataInBCD Read numeric data in BCD from the I/O.
Bit Number, Input Source
waitStart – Wait for a start signal.
– Wait for a start signal while acknowledging an
waitStartBZ
error with an alarm buzzer.
Pallet Routine Number, go Point
loopPallet Pallet loop
Number
Pallet

resPallet Pallet Routine Number Reset the pallet counter.


incPallet Pallet Routine Number Increase the pallet counter number. (+1)
Call a user-defined point job from a point to
callBase –
which a point job number is set.
Call a point job data subroutine specified by
callJob Point Job Number
number.
Perform a specified point string (defined in the
callPoints Variable Name (Identifier)
Customizing mode).
returnJob – End of point job
Execute Flow Control

Terminate the function by assigning the value


returnFunc Return Value (Expression) of the specified expression as a return value.
(This command is valid in functions only.)
Call a program subroutine specified by
callProg Program Number
number.
endProg – End of program
PTP Condition Number, go Point
goPoint Jump to a specified point.
Number
PTP Condition Number, Relative
goRPoint Jump to a relatively-specified point.
go Point Number
PTP Condition Number, Relative Jump to a selected destination point while
goCRPoint
go Point Number running in the CP drive.
jump Label Number Jump to a specified label.
Label Label Number Label

Features II 4 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Category
Command Necessary Parameter Description

Variable Name, Initial Value, Repeat commands between for and next until
for
End Value, Step Value the specified variable changes from the initial
For, do-loop

next – value to the end value.


exitFor – Break from for loop.
do –
Repeat commands between do and loop.
loop –
exitDo – Break from do loop.
upZ Speed, Distance Z Up
downZ Speed, Distance Z Down
movetoZ Speed, Distance Z Move
Make an Axis move a specified distance
(relative distance) at a specified speed in the
CP line drive. (Relative move command)
Entering this command will display the
specified shifting speed and distance of each
Line Speed, (X, Y, Z) Distance,
lineMove Axis as follows:
R Rotate Angle
e.g. lineMoveSpeed 20
lineMoveX 10
Move

lineMoveY 20
lineMoveZ 0
lineMoveR 0
– Terminate the movement of an Axis made by
lineMoveStopIf
lineMove if the conditions are met.
endLineMove – End of lineMoveStopIf condition statements.
initMec Return the specified Axis to its initial position.
Axis (Perform mechanical initialization.) (Available
only for the JR2000N and JSR4400N Series)
– Detect a position error. (Available only for the
checkPos
JR2000N Series)
clrLCD – Clear the LCD display.
clrLineLCD Clear Line (1 – 13) Clear a specified line on the LCD display.
Display Line (1 – 13), Display
outLCD Display strings on the LCD display.
Column (1 – 40), Display Data
LCD Control

Display Line (1 – 13), Display Display the result of the string expression on
eoutLCD
Column (1 – 40), Display Data the LCD display.
Returns the 7 segment LED display changed
by out7SLED to the previous program number.
sys7SLED –
(Available only for the JR2000N Series and
JSR4400N Series)
Output 7 segment LED. (Available only for the
out7SLED Type, Output Value
JR2000N Series and JSR4400N Series)

Features II 5 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Category
Command Necessary Parameter Description

outCOM Input/Output, Output Data


Output the string from the COM.
Output the result of the string expression from
eoutCOM Input/Output, Output Data
the COM.
Set [Wait Time] (time-out period) for receiving
setWTCOM Input/Output, Wait Time
data from the COM.
Variable Name, Input/Output, Assign the receive data from the COM to the
inCOM
COM Input/Output

Character Length specified variable.


Compare the receive data and string. The result
cmpCOM Input/Output, Compare Data is entered into the system flags (sysFlag(1) –
sysFlag(20)).
Compare the receive data and string expression.
ecmpCOM Input/Output, Compare Data The result is entered into the system flags
(sysFlag(1) – sysFlag(20)).
clrCOM Input/Output Clear the COM receive buffer.
Shift data received from the COM. Delete data
shiftCOM Input/Output, Shift Number
from the top by the specified [Shift Number].
stopPC – Stop the PC communication of the COM1.
startPC – Start the PC communication of the COM1.
declare Variable Type, Variable Name Local variable declaration
Variable, Comment, System Control

Assign the l-value to the r-value.


let Expression
The symbols +, -, *, /, =, (, ), & can be used.
rem Output Data One line comment
crem Output Data Comment at the end of a command line
Change the program number.
z Do not carry out this command while the
setProgNum Program Number robot is running. Use the command
callProgram if you change the program to
be run while the robot is running.
Change the sequencer number in the system
setSeqNum Sequencer Number
data.
Take an image with a camera and calculate the
cameraWadj Work Adjustment Number offset from the data gained according to the
[Workpiece Adjustment] setting.
Use this command when calculating offset using
Work Adjustment Number,
wCameraWadj two camera images according to the [Workpiece
Camera, Z Adjustment

Shot Number
Adjustment].
Take an image with a camera and calculate
cameraTool Tool Number [TCP-X] and [TCP-Y] from the data gained
according to the [Point Tool Data Settings].
Take an image with a camera and set the
number of gained marks and the coordinates as
cameraPallet Pallet Routine Number
the number and the coordinates of the [Pallet
Routine] to be performed.
Calculate the Z offset from the data gained by
takeZWadj Work Adjustment Number the distance or touch-sensitive sensor according
to the [Workpiece Adjustment] settings.
z For the [Camera, Z Adjustment] command category, refer to the Camera & Sensor Functions
operation manual.

Features II 6 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Execute Condition
Category

Command Necessary Parameter Description

ld Boolean variable or expression Input ON.


ldi Boolean variable or expression Input OFF.
and Boolean variable or expression Input serial ON.
Condition

ani Boolean variable or expression Input serial OFF.


or Boolean variable or expression Input parallel ON.
ori Boolean variable or expression Input parallel OFF.
anb – Serial connection of blocks
orb – Parallel connection of blocks

Sequencer
Category

Command Necessary Parameter Description

ld Boolean variable Input ON.


ldi Boolean variable Input OFF.
Calculate

and Boolean variable Input serial ON.


ani Boolean variable Input serial OFF.
or Boolean variable Input parallel ON.
ori Boolean variable Input parallel OFF.
out Output Destination Coil drive
set Output Destination Set the coil drive hold command.
Coil

reset Output Destination Reset the coil drive hold command.


pls Output Destination Output the rising edge of pulse.
plf Output Destination Output the falling edge of pulse.
anb – Parallel connection of serial circuit block
Connection

orb – Serial connection of parallel circuit block


mps – Store data in process of calculation.
mrd – Read out data in process of calculation.
Read out and reset data in process of
mpp –
calculation.
Others

nop – No operation

Features II 7 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


VARIABLE LIST

You can use the built-in variables (which are built into the robot as a function), and the user-defined
variables (which can be freely defined by the user).
User-defined variables other than local variables (variables effective only in defined point job data
which are defined by the declare command) are defined in the Customizing mode. (See the operation
manual Features IV for details of the Customizing mode.)

Boolean type (boo): 1-bit variable which holds only 1 (true) or 0 (false)
Numeric type (num): 8-byte real type (double type) variable
String type (str): 255-byte variable

Category Type Identifier Description


boo #mv (1 – 99) Boolean variable
boo #mkv (1 – 99) Boolean variable (Keeping variable)*
Free num #nv (1 – 99) Numerical variable
Variable num #nkv (1 – 99) Numerical variable (Keeping variable)*
str #sv (1 – 99) String variable
str #skv (1 – 99) String variable (Keeping variable)*
#sysIn1 – 15 (JS and JSG Series)
boo I/O-SYS
#sysIn1 – 16 (JR2000N and JR4400N Series)
Input
#genIn1 – 18 (JS and JSG Series)
Variable boo I/O-1
#genIn1 – 8 (JR2000N and JR4400N Series)
boo #handIn1 – 4 (Available only for JS Series) I/O-H
#sysOut1 – 14 (JS and JSG Series)
boo I/O-SYS
#sysOut1 – 16 (JR2000N and JR4400N Series)
Output
#genOut1 – 22 (JS and JSG Series)
Variable boo I/O-1
#genOut1 – 8 (JR2000N and JR4400N Series)
boo #handOut1 – 4 (Available only for JS Series) I/O-H
System
boo #sysFlag(1) – #sysFlag(999) Refer to “SYSTEM FLAG LIST” on Page 14.
Flag
set #FBZ : Sound the buzzer.
Buzzer boo #FBZ reset #FBZ : Stop the buzzer.
(onoffBZ : Turn the buzzer on and off.)

*: Variables which hold their values even if the robot is turned off are collectively referred to as
keeping variables in the operation manuals.

Features II 8 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Variables
Category Type Identifier Description
The assigned value will be decreased
num #downTimer1 – 10
automatically (by msec).
Start a point job from a position above the Z-
num #jobStartHight coordinate determined by the assigned value.
(Invalid in the CP drive)
Start a point job from a position at a distance
from the X-coordinate determined by the
num #jobStartX
assigned value.
Special
Variable (Invalid in the CP drive)
Start a point job from a position at a distance
from the Y-coordinate determined by the
num #jobStartY
assigned value.
(Invalid in the CP drive)
Start a point job from a position at a distance
from the R-coordinate determined by the
num #jobStartR
assigned value.
(Invalid in the CP drive)
Pallet flag
boo #palletFlag (1 – 100)
Pallet (Corresponds to Pallet Routine Nos. 1 – 100.)
Routine Pallet counter
num #palletCount (1 – 100)
(Corresponds to Pallet Routine Nos. 1 – 100.)
#workAdj_X (1 – 100)
Adjustment value of each Axis in [Workpiece
#workAdj_Y (1 – 100)
Workpiece Adjustment] settings
num #workAdj_Z (1 – 100)
Adjustment (Corresponds to Work Adjustment Nos. 1 –
#workAdj_R (1 – 100)
100.)
#workAdj_Rotation (1 – 100)
#tool_X (1 – 100)
TCP value of each Axis in [Point Tool Data
#tool_Y (1 – 100)
Tool Data num Settings] settings.
#tool_Z (1 – 100)
(Corresponds to Tool Nos. 1 – 100.)
#tool_R (1 – 100)
PTP condition number
The PTP condition number set by using this
PTP variable has priority over other PTP condition
num #priorityPTPCondNum
Condition numbers in the PTP drive (even at the points
to which the additional function data [PTP
Condition] is set).
Add 1 when #seqTCount reaches the
boo #seqT (1 – 99)
specified value or greater.
#seqTCount (1 – 50):
Integrating timer One counter can count 0.001 – 2,147,483,647
num
#seqTCoun (51 – 99): seconds (by 0.001 second).
Sequencer
Unintegrating timer
Add 1 when #seqCCount reaches the
boo #seqC (1 – 99)
specified value or greater.
num #seqCCount (1 – 99) One counter can count 1 – 2,147,483,647.

Features II 9 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Variables
Category Type Identifier Description
X-coordinate value of the point currently
num #point_X
performed
Y-coordinate value of the point currently
num #point_Y
performed
Current
Z-coordinate value of the point currently
Point num #point_Z
Coordinates performed
R-coordinate value of the point currently
num #point_R
performed
Tag code value of the point currently
num #point_TagCode
performed
num #P_X (1 – last point number) X-coordinate value of the specified point
num #P_Y (1 – last point number) Y-coordinate value of the specified point
Specified
Point num #P_Z (1 – last point number) Z-coordinate value of the specified point
Coordinates num #P_R (1 – last point number) R-coordinate value of the specified point
#P_TagCode (1 – last point
num Tag code value of the specified point
number)
#prog_P_X (1 – 255, 1 – last X-coordinate value of the specified point in the
num
point number) specified program
#prog_P_Y (1 – 255, 1 – last Y-coordinate value of the specified point in the
Specified num
point number) specified program
Program,
#prog_P_Z (1 – 255, 1 – last Z-coordinate value of the specified point in the
Specified num
point number) specified program
Point
Coordinates num #prog_P_R (1 – 255, 1 – last R-coordinate value of the specified point in the
point number) specified program
#prog_P_TagCode (1 – 255, Tag code value of the specified point in the
num
1 – last point number) specified program
Condition setting variable number set to the
num #point_CondNum
point currently performed
#P_CondNum (1 – last point Condition setting variable number set to the
num
Condition number) specified point
Number #prog_P_CondNum (1 – Condition setting variable number set to the
num
255, 1 – last point number) specified point in the specified program

Features II 10 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


FUNCTION LIST

You can use the built-in functions (which are built into the robot as a function) and the user-defined
functions (which can be freely defined by the user).
The user-defined functions are defined in the Customizing mode. (See the operation manual Features
IV for details of the Customizing mode.)

x, y: Numerical value or numerical variable


n, m: Numeric value becomes larger than a certain value through rounding or truncation
a, b: String or string variable
Category Type Identifier Description
num currentMainProgNumber () Currently performed main program number
num currentSubProgNumber () Currently performed sub program number
num currentPointNumber () Currently performed point number
num currentArmX () Current X-coordinate [mm]
num currentArmY () Current Y-coordinate [mm]
num currentArmZ () Current Z-coordinate [mm]
num currentArmR () Current R-coordinate [deg]
num currentCmdArmX () Current command X-coordinate [mm]
num currentCmdArmY () Current command Y-coordinate [mm]
num currentCmdArmZ () Current command Z-coordinate [mm]
num currentCmdArmR () Current command R-coordinate [deg]
num numCOM (COM port number) Data byte count of COM receiving port
Display whether the specified condition data
Robot num isConditionData (n)
number is available (1) or not (0).
System Adjust the strings on the teaching pendant LCD
str strCenterLCD (a)
(centering).
Adjust the strings on the teaching pendant LCD
str strRightLCD (a)
(right justification).
Teaching pendant LCD: Right priority; Items on
str strPlusRLCD (a,b) the right are displayed in full if there is an
overlap.
Teaching pendant LCD: Left priority; Items on the
str strPlusLLCD (a,b)
left are displayed in full if there is an overlap.
Valid only for [Job while Moving].
num getSystemPTPmoveTime ()
Time required for the current PTP drive [sec]
Valid only for [Job while Moving].
num getSystemPTPrestTime () Time left before the current PTP drive ends
(reaching the destination) [sec]

Features II 11 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


x, y: Numerical value or numerical variable
n, m: Numeric value becomes larger than a certain value through rounding or truncation
a, b: String or string variable
Category Type Identifier Description
num abs (x) Absolute value
num max (x,y) Maximum value
num min (x,y) Minimum value
num degrade (x) Conversion from degree to radian (x*π/180)
num raddeg (x) Conversion from radian to degree (x*180/π)
num sqrt (x) Square root
num sin (x) Sine
num cos (x) Cosine
num tan (x) Tangent
Arithmetic num atan (x) Arctangent
System num atan2 (x,y) Arctangent
Maximum integer that does not exceed x.
num int (x) e.g. int (1.3) Æ 1, int (-1.3) Æ -2
Integer part of x: sgn (x)*int (abs(x))
(If x is a negative number, sgn (x) becomes -1. If x is a
num ip (x) positive number, sgn (x) becomes +1.)
e.g. ip (1.3) Æ 1, ip (-1.3) Æ -1
Decimal part of x: x-ip (x)
num fp (x) e.g. fp (1.3) Æ 0.3, fp (-1.3) Æ -0.3
num mod (x,y) Value of x modulo y: x-y*int (x/y)
num remainder (x,y) Remainder of dividing x by y: x-y*ip (x/y)
num pow (x,y) x to the power of y
str chr (x) Return a string (1 character) with the given character code.
num ord (a) Return the top character code. Other codes are ignored.
num len (a) Return the string length (non-multibyte).
num strPos (a,b) Return the first part string position in a matching b.
Return the strings n – m counted from the top of the given
str strMid (a,n,m)
string a.
str str (x) Convert a numeric value to a decimal digit string.
Convert a numeric value to a binary string.
str strBin (n,m)
m: Number of binary string digits
Convert a numeric value to a hexadecimal string.
str strHex (n,m)
m: Number of hexadecimal string digits
String Round a numeric value to a 1-byte signed integer to convert
str str1SI (x)
System it to a 1-byte string. (1-byte Signed Integer)
Round a numeric value to a 2-byte signed integer to convert
str str2SIBE (x) it to a 2-byte string using the Big Endian byte order. (2-byte
Signed Integer Big Endian)
Round a numeric value to a 2-byte signed integer to convert
str str2SILE (x) it to a 2-byte string using the Little Endian byte order.
(2-byte Signed Integer Little Endian)
Round a numeric value to a 4-byte signed integer to convert
str str4SIBE (x) it to a 4-byte string using the Big Endian byte order. (4-byte
Signed Integer Big Endian)
Round a numeric value to a 4-byte signed integer to convert
str str4SILE (x) it to a 4-byte string using the Little Endian byte order.
(4-byte Signed Integer Little Endian)

Features II 12 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


x, y: Numerical value or numerical variable
n, m: Numeric value becomes larger than a certain value through rounding or truncation
a, b: String or string variable
Category Type Identifier Description
Regard a numeric value as a float to convert it to a 4-byte
str str4FBE (x) string using the Big Endian byte order. (4-byte Signed Float
Big Endian)
Regard a numeric value as a float to convert it to a 4-byte
str str4FLE (x) string using the Little Endian byte order. (4-byte Signed
Float Big Endian)
Regard a numeric value as a float to convert it to an 8-byte
str str8DBE (x) string using the Big Endian byte order. (8-byte Signed Float
Big Endian)
Regard a numeric value as a float to convert it to an 8-byte
str str8DLE (x) string using the Little Endian byte order. (8-byte Signed
Float Little Endian)
Regard a string as a decimal digit string to convert it to a
num val (a)
numeric value.
Regard a string as a binary string (sequence of “0”, “1”) to
num valBin (a)
convert it to a numeric value.
Regard a string as a hexadecimal string (sequence of “0” –
num valHex (a)
“1”, “A” – “F”, or “a” – “f”) to convert it to a numeric value.
Convert the top character to a 1-byte signed integer. (1-byte
num val1SI (a)
Signed Integer)
Convert the top 2 characters to a 2-byte signed integer
num val2SIBE (a) using the Big Endian byte order. (2-byte Signed Integer
Big Endian)
String Convert the top 2 characters to a 2-byte signed integer
System num val2SILE (a) using the Little Endian byte order. (2-byte Signed Integer
Little Endian)
Convert the top 4 characters to a 4-byte signed integer
num val4SIBE (a) using the Big Endian byte order. (4-byte Signed Integer Big
Endian)
Convert the top 4 characters to a 4-byte signed integer
num val4SILE (a) using the Little Endian byte order. (4-byte Signed Integer
Little Endian)
Convert the top 4 characters to a float using the Big Endian
num val4FBE (a)
byte order. (4-byte Float Big Endian)
Convert the top 4 characters to a float using the Little
num val4FLE (a)
Endian byte order. (4-byte Float Little Endian)
Convert the top 8 characters to a double-precision float
num val8DBE (a) using the Big Endian byte order. (8-byte Double Big
Endian)
Convert the top 8 characters to a double-precision float
num val8DLE (a)
using the Little Endian byte order. (8-byte Little Big Endian)
num valSum (a) Return the sum of a string code from top to bottom.
Remainder of dividing a string (bit string) by a generator
num valCRC (a)
polynomial X16+X12+X5+1
str bitNot (a) Bit invert
str bitAnd (a,b) Bit logical conjunction
str bitOr (a,b) Bit logical add
str bitXor (a,b) Bit exclusive disjunction

Features II 13 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


SYSTEM FLAG LIST

You can use the system flags as Boolean valuables. If conditions are met, “1” (true) is automatically
assigned to a system flag. If conditions are not met, “0” (false) is assigned. You can refer to the
assigned values whenever necessary.

JR2000N Series
No. Identifier Description Condition “1” (True)
01 #FisCOM1 COM1 receive data existence Exists
Result of COM1 receive data compare command
02 #FltCOM1 Constant > Receive data
(cmpCOM)
Result of COM1 receive data compare command
03 #FeqCOM1 Constant = Receive data
(cmpCOM)
Result of COM1 receive data compare command
04 #FgtCOM1 Constant < Receive data
(cmpCOM)
COM1 receive data compare command
05 #FtimeOutCOM1 Timeout
(cmpCOM) timeout
06 #FisCOM2 COM2 receive data existence Exists
Result of COM2 receive data compare command
07 #FltCOM2 Constant > Receive data
(cmpCOM)
Result of COM2 receive data compare command
08 #FeqCOM2 Constant = Receive data
(cmpCOM)
Result of COM2 receive data compare command
09 #FgtCOM2 Constant < Receive data
(cmpCOM)
COM2 receive data compare command
10 #FtimeOutCOM2 Timeout
(cmpCOM) timeout
11 #FisCOM3 COM3 receive data existence Exists
Result of COM3 receive data compare command
12 #FltCOM3 Constant > Receive data
(cmpCOM)
Result of COM3 receive data compare command
13 #FeqCOM3 Constant = Receive data
(cmpCOM)
Result of COM3 receive data compare command
14 #FgtCOM3 Constant < Receive data
(cmpCOM)
COM3 receive data compare command
15 #FtimeOutCOM3 Timeout
(cmpCOM) timeout
16 #FisCOM4 COM4 receive data existence Exists
Result of COM4 receive data compare command
17 #FltCOM4 Constant > Receive data
(cmpCOM)
Result of COM4 receive data compare command
18 #FeqCOM4 Constant = Receive data
(cmpCOM)
Result of COM4 receive data compare command
19 #FgtCOM4 Constant < Receive data
(cmpCOM)
COM4 receive data compare command
20 #FtimeOutCOM4 Timeout
(cmpCOM) timeout
30 #FinitMecError State of mechanical initialization command error Mechanical initialization error
31 #FcameraError State of camera data error Error
32 #FtakeZError State of Z height data (takeZWadj) error Error
33 #FlMoveOutRange Relative move command range Out of range
34 #FlMoveStop Condition stop state of relative move command Stopped by the stop condition
35 #FcheckPosError Result of the position error detect command Position error
36 #FdataInBCDError State of dataInBCD command error Error

Features II 14 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


No. Identifier Description Condition “1” (True)
60 #FstartSW Start switch ON (Pressed)
61 #FincSW Program number selection key (+) ON (Pressed)
62 #FdecSW Program number selection key (–) ON (Pressed)
ON (The emergency stop
63 #FemgSW EMG direct input
switch is pressed.)
64 #Fios I/O-S direct input Circuit open (Disconnected)
71 #Fsensor1 Initial X position sensor ON
72 #Fsensor2 Initial Y position sensor ON
73 #Fsensor3 Initial Z position sensor ON
74 #Fsensor4 Initial R position sensor ON
76 #Fdrvoz1 X driver 0-phase Close
77 #Fdrvoz2 Y driver 0-phase Close
78 #Fdrvoz3 Z driver 0-phase Close
79 #Fdrvoz4 R driver 0-phase Close
91 #FenableSW Enable switch ON (Pressed)
92 #FspmodeSW Special mode switch ON
93 #FspareSW Spare switch ON
94 #FmotorPower State of the power to the motor ON

JR4400N Series
No. Identifier Description Condition “1” (True)
01 #FisCOM1 COM1 receive data existence Exists
Result of COM1 receive data compare command
02 #FltCOM1 Constant > Receive data
(cmpCOM)
Result of COM1 receive data compare command
03 #FeqCOM1 Constant = Receive data
(cmpCOM)
Result of COM1 receive data compare command
04 #FgtCOM1 Constant < Receive data
(cmpCOM)
COM1 receive data compare command
05 #FtimeOutCOM1 Timeout
(cmpCOM) timeout
06 #FisCOM2 COM2 receive data existence Exists
Result of COM2 receive data compare command
07 #FltCOM2 Constant > Receive data
(cmpCOM)
Result of COM2 receive data compare command
08 #FeqCOM2 Constant = Receive data
(cmpCOM)
Result of COM2 receive data compare command
09 #FgtCOM2 Constant < Receive data
(cmpCOM)
COM2 receive data compare command
10 #FtimeOutCOM2 Timeout
(cmpCOM) timeout
11 #FisCOM3 COM3 receive data existence Exists
Result of COM3 receive data compare command
12 #FltCOM3 Constant > Receive data
(cmpCOM)
Result of COM3 receive data compare command
13 #FeqCOM3 Constant = Receive data
(cmpCOM)
Result of COM3 receive data compare command
14 #FgtCOM3 Constant < Receive data
(cmpCOM)
COM3 receive data compare command
15 #FtimeOutCOM3 Timeout
(cmpCOM) timeout
16 #FisCOM4 COM4 receive data existence Exists
Result of COM4 receive data compare command
17 #FltCOM4 Constant > Receive data
(cmpCOM)
Result of COM4 receive data compare command
18 #FeqCOM4 Constant = Receive data
(cmpCOM)

Features II 15 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


No. Identifier Description Condition “1” (True)
Result of COM4 receive data compare command
19 #FgtCOM4 Constant < Receive data
(cmpCOM)
COM4 receive data compare command
20 #FtimeOutCOM4 Timeout
(cmpCOM) timeout
30 #FinitMecError State of mechanical initialization command error Mechanical initialization error
31 #FcameraError State of camera data error Error
32 #FtakeZError State of Z height data (takeZWadj) error Error
33 #FlMoveOutRange Relative move command range Out of range
34 #FlMoveStop Condition stop state of relative move command Stopped by the stop condition
35 #FcheckPosError Result of the position error detect command Position error
36 #FdataInBCDError State of dataInBCD command error Error
60 #FstartSW Start switch ON (Pressed)
61 #FincSW Program number selection key (+) ON (Pressed)
62 #FdecSW Program number selection key (–) ON (Pressed)
ON (The emergency stop
63 #FemgSW EMG direct input
switch is pressed.)
64 #Fios I/O-S direct input Circuit open (Disconnected)
66 #FmponSW Power ON switch ON (Pressed)
68 #FmdSW1 Select key switch 1 ON
69 #FmdSW2 Select key switch 2 ON
71 #Fsensor1 Initial X position sensor ON
72 #Fsensor2 Initial Y position sensor ON
73 #Fsensor3 Initial Z position sensor ON
74 #Fsensor4 Initial R position sensor ON
76 #Fdrvoz1 X driver 0-phase Close
77 #Fdrvoz2 Y driver 0-phase Close
78 #Fdrvoz3 Z driver 0-phase Close
79 #Fdrvoz4 R driver 0-phase Close
91 #FenableSW Enable switch ON (Pressed)
92 #FspmodeSW Special mode switch ON
93 #FspareSW Spare switch ON
94 #FmotorPower State of the power to the motor ON

JS Series and JSG Series


No. Identifier Description Condition “1” (True)
01 #FisCOM1 COM1 receive data existence Exists
Result of COM1 receive data compare command
02 #FltCOM1 Constant > Receive data
(cmpCOM)
Result of COM1 receive data compare command
03 #FeqCOM1 Constant = Receive data
(cmpCOM)
Result of COM1 receive data compare command
04 #FgtCOM1 Constant < Receive data
(cmpCOM)
COM1 receive data compare command
05 #FtimeOutCOM1 Timeout
(cmpCOM) timeout
06 #FisCOM2 COM2 receive data existence Exists
Result of COM2 receive data compare command
07 #FltCOM2 Constant > Receive data
(cmpCOM)
Result of COM2 receive data compare command
08 #FeqCOM2 Constant = Receive data
(cmpCOM)
Result of COM2 receive data compare command
09 #FgtCOM2 Constant < Receive data
(cmpCOM)
COM2 receive data compare command
10 #FtimeOutCOM2 Timeout
(cmpCOM) timeout

Features II 16 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


No. Identifier Description Condition “1” (True)
11 #FisCOM3 COM3 receive data existence Exists
Result of COM3 receive data compare command
12 #FltCOM3 Constant > Receive data
(cmpCOM)
Result of COM3 receive data compare command
13 #FeqCOM3 Constant = Receive data
(cmpCOM)
Result of COM3 receive data compare command
14 #FgtCOM3 Constant < Receive data
(cmpCOM)
COM3 receive data compare command
15 #FtimeOutCOM3 Timeout
(cmpCOM) timeout
16 #FisCOM4 COM4 receive data existence Exists
Result of COM4 receive data compare command
17 #FltCOM4 Constant > Receive data
(cmpCOM)
Result of COM4 receive data compare command
18 #FeqCOM4 Constant = Receive data
(cmpCOM)
Result of COM4 receive data compare command
19 #FgtCOM4 Constant < Receive data
(cmpCOM)
COM4 receive data compare command
20 #FtimeOutCOM4 Timeout
(cmpCOM) timeout
30 #FinitMecError State of mechanical initialization command error Mechanical initialization error
31 #FcameraError State of camera data error Error
32 #FtakeZError State of Z height data (takeZWadj) error Error
33 #FlMoveOutRange Relative move command range Out of range
34 #FlMoveStop Condition stop state of relative move command Stopped by the stop condition
35 #FcheckPosError Result of the position error detect command Position error
36 #FdataInBCDError State of dataInBCD command error Error
63 #FemgSW EMG direct input ON (Pressed)
64 #Fios IOS direct input Circuit open (Disconnected)
66 #FmponSW Power ON switch ON (Pressed)
68 #FmdSW1 Select key switch 1 ON
69 #FmdSW2 Select key switch 2 ON
91 #FenableSW Enable switch ON (Pressed)
92 #FspmodeSW Special mode switch ON
93 #FspareSW Spare switch ON
94 #FmotorPower Motor power state ON
121 #FsvReady1 J1/X servo ready Ready
122 #FsvReady2 J2/Y servo ready Ready
123 #FsvReady3 J3/Z servo ready Ready
124 #FsvReady4 J4/R servo ready Ready
126 #FsvAlarm1 J1/X servo alarm Servodriver error
127 #FsvAlarm2 J2/Y servo alarm Servodriver error
128 #FsvAlarm3 J3/Z servo alarm Servodriver error
129 #FsvAlarm4 J4/R servo alarm Servodriver error
131 #FsvPos1 J1/X servo finish positioning Positioning finished
132 #FsvPos2 J2/Y servo finish positioning Positioning finished
133 #FsvPos3 J3/Z servo finish positioning Positioning finished
134 #FsvPos4 J4/R servo finish positioning Positioning finished
136 #FencOz1 J1/X encoder zero phase Close
137 #FencOz2 J2/Y encoder zero phase Close
138 #FencOz3 J3/Z encoder zero phase Close
139 #FencOz4 J4/R encoder zero phase Close
141 #FencBattery1 J1/X battery warning Battery run out
142 #FencBattery2 J2/Y battery warning Battery run out
143 #FencBattery3 J3/Z battery warning Battery run out
144 #FencBattery4 J4/R battery warning Battery run out

Features II 17 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


VARIABLES

„ Free Variables: #mv, #mkv, #nv, #nkv, #sv, #skv

A variable is a container into which numeric and strings values are placed.
You can use the built-in variables listed below freely. Variable declaration is unnecessary when using
these variables.

Identifier Description
#mv (1 – 99) Boolean variable
#mkv (1 – 99) Boolean variable (Keeping variable)*
#nv (1 – 99) Numerical variable
Free Variable
#nkv (1 – 99) Numerical variable (Keeping variable)*
#sv (1 – 99) String variable
#skv (1 – 99) String variable (Keeping variable)*

*: Variables which hold their values even if the robot is turned off are collectively referred to as
keeping variables in the operation manuals.

„ #mv (1 – 99) and #mkv (1 – 99): Boolean variable


A Boolean variable is a variable that can hold a value of 1-bit 0 or 1. It can be used as a condition
operation expression (ld, ldi) or assignment expression (let) parameter.

z Boolean type free variables, #mv (1 – 99) and #mv (1 – 99), can also be used in sequencer
programs

„ #nv (1 – 99) and #nkv (1 – 99): Numeric variable


These are double type numeric variables that can be used as assignment expression (let) parameters.

„ #sv (1 – 99) and #skv (1 – 99): String variable


These can hold up to 255 bytes. When used as assignment expression (let) parameters, assignment
by = and connection by & are possible.

Features II 18 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Input Variables: #sysIn1..., #genIn1..., #handIn1...

An input variable is a Boolean variable that can only be referred to. You cannot enter a value into it.
It corresponds to the I/O-SYS, I/O-1, and I/O-H input pins. When an ON signal comes, the input
variable becomes “1” (true).

Identifier
Identifier
Category (JR2000N and Connector Description
(JS and JSG Series)
JSR4400N Series)
#sysIn1 – #sysIn15 #sysIn1 – #sysIn16 I/O-SYS Boolean variable for reference only
Input
#genIn1 – #genIn18 #genIn1 – #genIn8 I/O-1 Boolean variable for reference only
Variable
#handIn1 – #handIn4 - I/O-H Boolean variable for reference only

Some of the #sysIn1 – #sysIn15, and 16 (I/O-SYS) pins have pre-assigned functions.
e.g. #sysIn1: Start (When this signal is turned on, the robot starts operation.)

If you wish to use the #sysIn1 – #sysIn15, and 16 (I/O-SYS) pins for functions other than the
pre-assigned ones, switch the function to [Free] in the [IO-SYS Function Assignment] settings ([Run
Mode Parameter] menu).

z The JSG, JR2000N, and JSR4400N Series are not equipped with I/O-H. Identifiers #handIn1 –
#handIn4 are activated for the JS Series only. Note that if you are using I/O-U (option) for the JS
Series, any commands from the robot to I/O-H are deactivated.

z For details of the I/O-SYS pre-assigned functions, see the External Control I (I/O-SYS) operation
manual.

Features II 19 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Output Variables: #sysOut1..., #genOut1..., #handOut1...

An output variable is a Boolean variable.


Output variables correspond to the I/O-SYS, I/O-1, and I/O-H output pins. When an ON signal is
output, the output variables become “1” (true).

Identifier
Identifier
Category (JR2000N and Connector Description
(JS and JSG Series)
JSR4400N Series)
#sysOut1 – #sysOut14 #sysOut1 – #sysOut16 I/O-SYS Boolean variable
Output
#genOut1 – #genOut18 #genOut1 – #genOut8 I/O-1 Boolean variable
Variable
#handOut1 – #handOut4 - I/O-H Boolean variable

Some of the #sysOut1 – #sysOut14, 15 and 16 (I/O-SYS) pins have pre-assigned functions.
e.g. #sysIn1: Ready for Start (When this signal is turned on, the robot can start operation.)

If you wish to use the #sysOut1 – #sysOut14, 15 and 16 (I/O-SYS) pins for functions other than the
pre-assigned ones, switch the function to [Free] in [IO-SYS Function Assignment] settings ([Run Mode
Parameter] menu).

z The JSG, JR2000N, and JSR4400N Series are not equipped with I/O-H. Identifiers #handOut1 –
#handOut4 are activated for the JS Series only. Note that if you are using I/O-U (option) for the JS
Series, any commands from the robot to I/O-H are deactivated.

z For details of the I/O-SYS pre-assigned functions, see the External Control I (I/O-SYS) operation
manual.

Features II 20 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Down Timer: #downTimer1 – #downTimer10

A numeric variable: The assigned value (using a let command) is decreased automatically (by msec).
You can assign another value during the countdown.
The maximum value that can be assigned is 2,147,483,647 (msec).

Category Identifier Description


Special #downTimer1 –
The assigned value is decreased automatically (by msec).
Variable #downTimer 10

For example, create the following point job data and set it to a point as [Job while CP Moving]. The
hexadecimal CR code is output to COM2 every 0.5 seconds while it moves in the CP drive.

if If
ld #downTimer1 == 0 #downTimer1=0
then Then
eoutCOM port2,"%0D" Output a hexadecimal code CR from COM2 and
#downTimer1 = 500 assign 500 (0.5sec) to #downTimer1.

z In this case, you need to assign a value to #downTimer1 in advance (e.g. during a point job).

Features II 21 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Point Job Start Height: #jobStartHight

When a value is assigned to the variable “#jobStartHight” (using a let command) and the variable is
set as [Job before Moving] or [Job while Moving], the point job starts from a position that is higher than
the set Z-coordinate by the assigned value.
Do not set point job data that includes #jobStartHight as the [Point Job] because the robot Axis or Arm
has already reached the point job start position. Also, since this variable acts only on the set point, the
point job start position of the next point does not change.

e.g.

P01
Type: CP Start Point Point Job Data 3

Job before Moving: Point Job Data 3 #jobStartHight 25


Point Job: Point Job Data 12

[Point Job] (Point Job Data 12) is started from a


position 2.5mm higher than the preset height.
2.5mm

P1

Category Identifier Description


Special The point job is started from a position that is higher than the set Z
#jobStartHight
Variable coordinate by the assigned value. (Deactivated during the CP drive)

Features II 22 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Pallet: #palletFlag (1 – 100), #palletCount (1 – 100)

#palletCount (1 – 100) is a numeric variable and #palletFlag (1 – 100) is a Boolean variable.


Each variable retains the value of the corresponding pallet counter and pallet flag (1 (true) when the
pallet counter is full) in additional function data [Pallet Routine].
By using these variables, you can move to the next point during a pallet job or skip the designated
pallet.

Category Identifier Description


#palletFlag (1 – 100) Pallet flag (Corresponds to Pallet 1 – 100.)
Pallet
#palletCount (1 – 100) Pallet counter (Corresponds to Pallet 1 – 100.)

z #palletFlag (1 – 100) does not become “1” (true) even if a value which fills the counter is assigned
to #palletCount (1 – 100).

For example, you can skip a designated pallet during a pallet job.
The robot picks up a workpiece at P1, places it on a pallet (set at P2) and moves to the next point (P3) when
the pallet becomes full. However, there are two points (P2-5 and P2-11) on the pallet where a workpiece is
not placed.

In this example, the [Pallet Routine Number] is [3] and the tool unit is connected according to the
following settings:

Picking up a workpiece: #handOut1 is ON.


Placing a workpiece: #handOut1 is OFF.

To P3

P2-1(P0) P2-2

P2-5 ●
P1
● P2-12
P2-11

Points where a workpiece is not placed

Features II 23 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Point job data set to P1
set #handOut1 Pick up workpiece.

Point job data set to P2


if If
ld #palletCount(3) == 5 #palletCount (3) is
or #palletCount(3) == 11
else other than 5 (P2-5) and 11 (P2-11),
reset #handOut1 Place (release) a workpiece.
endIf
loopPallet 3,1 Add 1 to the counter of Pallet 3.
If the counter reaches maximum, go to the next
command. (In this example, the point job is over
because there are no more commands.)
If not, shift to Point 01 (P1).

Features II 24 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Workpiece Adjustment: #workAdj_X, #workAdj_Y,
#workAdj_Z, #workAdj_R, #workAdj_Rotation

These numeric variables hold the adjustment amount and rotation adjustment amount of each Axis in
additional function data [Workpiece Adjustment].

Category Identifier Description


Workpiece adjustment amount in the X direction
#workAdj_X (1 – 100)
(Corresponds to Workpiece Adjustment 1 – 100.)
Workpiece adjustment amount in the Y direction
#workAdj_Y (1 – 100)
(Corresponds to Workpiece Adjustment 1 – 100.)
Workpiece Workpiece adjustment amount in the Z direction
#workAdj_Z (1 – 100)
Adjustment (Corresponds to Workpiece Adjustment 1 – 100.)
Workpiece adjustment amount in the R direction
#workAdj_R (1 – 100)
(Corresponds to Workpiece Adjustment 1 – 100.)
Workpiece adjustment amount by the rotating angle
#workAdj_Rotation (1 – 100)
(Corresponds to Workpiece Adjustment 1 – 100.)

For example, you can perform a line dispensing between P2 – P3.


At P1, the workpiece adjustment amount (workpiece offset value) is received from the sensor connected to
COM.

In this example, the [Workpiece Adjustment] is [6] and the tool unit is connected according to the
following settings:

Starting dispensing: #handOut1 is ON.


Stopping dispensing: #handOut1 is OFF.

CP Start Point CP Start Point


P2 P2

P3 P3
CP End Point CP End Point

P1 P1
Workpiece adjustment amount

Point job data set to P1


declare str hosei Declaration of a string type local variable hosei
inCom hosei,port1,10 Receive a work adjustment amount from COM1 to hosei.
#workAdj_X(6) = hosei Assign the value in hosei to #workAdj_X(6).
(#workAdj_X(6) is the X direction adjustment amount of
Workpiece Adjustment 6)

Features II 25 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Point job data set in P2 ([Workpiece Adjustment] is set to this point.)
set #handOut1 Start dispensing.

Point job data set in P3


reset #handOut1 Stop dispensing.

z The [Workpiece Adjustment] set to a [CP Start Point] point is activated until the tool unit reaches a
[CP End Point] point.

Features II 26 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Point Coordinates: #point_X,#point_Y,#point_Z,

#point_R,#point_TagCode

These variables hold the coordinates and tag code values of the running point. A running point is the
point to which point job data including this variable is set. When point job data including this variable is
set to [Job before Moving], [Job while Moving], or [Job while CP Moving], the current tool center point
position is different from the value in this variable.
In the figure below, a [Job before Moving] set to P2 is performed at P1, but when point job data set in
the [Job before Moving] includes these variables, the P2 coordinates are retained even at P1.
These variables hold the original coordinate values of a point. The values do not change even when
the additional function data [Workpiece Adjustment] and the variable #jobStartHight are used.

CP Passing Point
P1 P2 P3 P4
CP Start Point
Performs [Job before Moving] (set to P2).

Performs [Point Job] (set to P2).

Passes P3.

Reaches P4.
Moving] (set to P2).
Repeats [Job while CP
(set to P2).
Repeats [Job while Moving]

Category Identifier Description


#point_X X coordinate value of the running point
Current #point_Y Y coordinate value of the running point
Point #point_Z Z coordinate value of the running point
Coordinates #point_R R coordinate value of the running point
#point_TagCode Tag code value of the running point

Features II 27 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Designated Point Coordinates: #P_X, #P_Y, #P_Z, #P_R,

#P_TagCode

These variables hold the coordinates and tag code values of the designated point in the current
program.
These variables hold the original coordinate values of a point. The values do not change even when
additional function data [Workpiece Adjustment] and the variable #jobStartHight are used.

Category Identifier Description


X coordinate value of given point in current
#P_X (1 – Last point number)
program
Y coordinate value of given point in current
#P_Y (1 – Last point number)
program
Given Point Z coordinate value of given point in current
#P_Z (1 – Last point number)
Coordinates program
R coordinate value of given point in current
#P_R (1 – Last point number)
program
Tag code value of given point in current
#P_TagCode (1 – Last point number)
program

Features II 28 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Designated Point Coordinates in Designated Programs:

#prog_P_X, #prog_P_Y, #prog_P_Z, #prog_P_R,

#prog_P_TagCode

These variables hold the coordinates and tag code values of the designated point in the designated
program.
These variables hold the original coordinate values of a point. The values do not change even when
the additional function data [Workpiece Adjustment] and the variable #jobStartHight are used.

Category Identifier Description


X coordinate value of the designated
#prog_P_X (1 – 255, 1 – Last point number)
point in the designated program
Y coordinate value of the designated
Designated #prog_P_Y (1 – 255, 1 – Last point number)
point in the designated program
Point
Z coordinate value of the designated
Coordinates #prog_P_Z (1 – 255, 1 – Last point number)
point in the designated program
in
Designated R coordinate value of the
Program #prog_P_R (1 – 255, 1 – Last point number) designated point in the designated
program
#prog_P_TagCode (1 – 255, 1 – Last point Tag code value of the designated
number) point in the designated program

Features II 29 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


FUNCTIONS

„ Robot System Functions

You can use the built-in variables (which are built into the robot system) and the user-defined variables
(which can be freely defined by the user).
The user-defined variables other than local variables (variables effective only in defined point job data
which are defined by the declare command) are defined in the Customizing mode. (See the operation
manual Features IV for details of the Customizing mode.)
The functions built into the robot system are as follows:

Type Identifier Description


num currentMainProgNumber () Currently performed main program number
num currentSubProgNumber () Currently performed sub program number
num currentPointNumber () Currently performed point number
num currentArmX () Current X-coordinate [mm]
num currentArmY () Current Y-coordinate [mm]
num currentArmZ () Current Z-coordinate [mm]
num currentArmR () Current R-coordinate [deg]
num currentCmdArmX () Current command X-coordinate [mm]
num currentCmdArmY () Current command Y-coordinate [mm]
num currentCmdArmZ () Current command Z-coordinate [mm]
num currentCmdArmR () Current command R-coordinate [deg]
num numCOM (COM port number) Data byte count of COM receiving port
Display whether the specified condition data number
num isConditionData (n)
is available (1) or not (0).
Adjust the strings on the teaching pendant LCD
str strCenterLCD (a)
(centering).
Adjust the strings on the teaching pendant LCD (right
str strRightLCD (a)
justification).
Teaching pendant LCD: Right priority; Items on the
str strPlusRLCD (a,b)
right are displayed in full if there is an overlap.
Teaching pendant LCD: Left priority; Items on the left
str strPlusLLCD (a,b)
are displayed in full if there is an overlap.
Valid only for [Job while Moving].
num getSystemPTPmoveTime ()
Time required for the current PTP drive [sec]
Valid only for [Job while Moving].
num getSystemPTPrestTime () Time left before the current PTP drive ends (reaching
the destination) [sec]

Features II 30 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


• currentMainProgNumber()
This variable holds the currently performed main program number.

• currentSubProgNumber()
This variable holds the currently performed subprogram number. When a subprogram is not being
performed, it holds the currently performed main program number.

• currentPointNumber()
This variable holds the currently performed point number. The point number of the work home
position is 0.

• currentArmX(),currentArmY(),currentArmZ()
This variable holds the current Arm position (coordinates). (Absolute coordinates, in millimeters)

• currentArmR()
This variable holds the current R-Axis rotation angle (R-Axis coordinate). (Absolute coordinates, in
degrees)

• currentCmdArmX(), currentCmdArmY(), currentCmdArmZ()


This variable holds the current designated Arm position (coordinates). (Absolute coordinates, in
millimeters)

• currentCmdArmR()
This variable holds the current designated R-Axis rotation angle (R-Axis coordinate). (Absolute
coordinates, in degrees)

• numCOM(port#)
This variable holds the data byte count of COM receiving port.

• isConditionData(num n)
This variable holds the presence (1) or absence (0) of the specified condition data number.

• strCenterLCD(string s)
This variable adjusts the strings on the teaching pendant LCD (centering).

• strRightLCD(string s)
This variable adjusts the strings on the teaching pendant LCD (right justification). (Normally
left-justified)

Features II 31 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


• strPlusRLCD(string a, string b)
This variable adjusts the strings on the teaching pendant LCD (right priority).
Items on the right are displayed in full if there is an overlap.

• strPlusLLCD(string a, string b)
This variable adjusts the strings on the teaching pendant LCD (left priority).
Items on the left are displayed in full if there is an overlap.

• getSystemPTPmoveTime()
This variable holds the time required for the current PTP drive (in seconds).
Valid only for [Job while Moving].

• getSystemPTPrestTime()
This variable holds the time left before the current PTP drive ends (reaching the destination) (in
seconds).
Valid only for [Job while Moving].

Features II 32 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Arithmetic System Functions

The following built-in arithmetic functions can be used:

x, y : Numeric value
n, m : Rounded integer value
Type Identifier Description
num abs (x) Absolute value
num max (x,y) Maximum value
num min (x,y) Minimum value
num degrade (x) Conversion from degree to radian (x*π/180)
num raddeg (x) Conversion from radian to degree (x*180/π)
num sqrt (x) Square root
num sin (x) Sine
num cos (x) Cosine
num tan (x) Tangent
num atan (x) Arctangent
num atan2 (x,y) Arctangent
Maximum integer that does not exceed x.
num int (x) e.g. int (1.3) Æ 1, int (-1.3) Æ -2
Integer part of x: sgn (x)*int (abs(x))
(If x is a negative number, sgn (x) becomes -1. If x is a positive
num ip (x) number, sgn (x) becomes +1.)
e.g. ip (1.3) Æ 1, ip (-1.3) Æ -1
Decimal part of x: x-ip (x)
num fp (x) e.g. fp (1.3) Æ 0.3, fp (-1.3) Æ -0.3
num mod (x,y) Value of x modulo y: x-y*int (x/y)
num remainder (x,y) Remainder of dividing x by y: x-y*ip (x/y)
num pow (x,y) x to the power of y

Features II 33 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ String System Functions

The following string built-in functions can be used:

x, y: Numerical value or numerical variable


n, m: Numeric value becomes larger than a certain value through rounding or truncation
a, b: String or string variable
Type Identifier Description
str chr (x) Return a string (1 character) with the given character code.
num ord (a) Return the top character code. Other codes are ignored.
num len (a) Return the string length (non-multibyte).
num strPos (a,b) Return the first part string position in a matching b.
str strMid (a,n,m) Return the strings n – m counted from the top of the given string a.
str str (x) Convert a numeric value to a decimal digit string.
Convert a numeric value to a binary string.
str strBin (n,m)
m: Number of binary string digits
Convert a numeric value to a hexadecimal string.
str strHex (n,m)
m: Number of hexadecimal string digits
Round a numeric value to a 1-byte signed integer to convert it to a
str str1SI (x)
1-byte string. (1-byte Signed Integer)
Round a numeric value to a 2-byte signed integer to convert it to a
str str2SIBE (x) 2-byte string using the Big Endian byte order. (2-byte Signed Integer
Big Endian)
Round a numeric value to a 2-byte signed integer to convert it to a
str str2SILE (x) 2-byte string using the Little Endian byte order. (2-byte Signed Integer
Little Endian)
Round a numeric value to a 4-byte signed integer to convert it to a
str str4SIBE (x) 4-byte string using the Big Endian byte order. (4-byte Signed Integer
Big Endian)
Round a numeric value to a 4-byte signed integer to convert it to a
str str4SILE (x) 4-byte string using the Little Endian byte order. (4-byte Signed Integer
Little Endian)
Regard a numeric value as a float to convert it to a 4-byte string using
str str4FBE (x)
the Big Endian byte order. (4-byte Signed Float Big Endian)
Regard a numeric value as a float to convert it to a 4-byte string using
str str4FLE (x)
the Little Endian byte order. (4-byte Signed Float Big Endian)
Regard a numeric value as a float to convert it to an 8-byte string using
str str8DBE (x)
the Big Endian byte order. (8-byte Signed Float Big Endian)
Regard a numeric value as a float to convert it to an 8-byte string using
str str8DLE (x)
the Little Endian byte order. (8-byte Signed Float Little Endian)
Regard a string as a decimal digit string to convert it to a numeric
num val (a)
value.
Regard a string as a binary string (sequence of “0”, “1”) to convert it to
num valBin (a)
a numeric value.

Features II 34 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


x, y: Numerical value or numerical variable
n, m: Numeric value becomes larger than a certain value through rounding or truncation
a, b: String or string variable
Type Identifier Description
Regard a string as a hexadecimal string (sequence of “0” – “1”, “A” –
num valHex (a)
“F”, or “a” – “f”) to convert it to a numeric value.
Convert the top character to a 1-byte signed integer. (1-byte Signed
num val1SI (a)
Integer)
Convert the top 2 characters to a 2-byte signed integer using the Big
num val2SIBE (a)
Endian byte order. (2-byte Signed Integer Big Endian)
Convert the top 2 characters to a 2-byte signed integer using the Little
num val2SILE (a)
Endian byte order. (2-byte Signed Integer Little Endian)
Convert the top 4 characters to a 4-byte signed integer using the Big
num val4SIBE (a)
Endian byte order. (4-byte Signed Integer Big Endian)
Convert the top 4 characters to a 4-byte signed integer using the Little
num val4SILE (a)
Endian byte order. (4-byte Signed Integer Little Endian)
Convert the top 4 characters to a float using the Big Endian byte order.
num val4FBE (a)
(4-byte Float Big Endian)
Convert the top 4 characters to a float using the Little Endian byte
num val4FLE (a)
order. (4-byte Float Little Endian)
Convert the top 8 characters to a double-precision float using the Big
num val8DBE (a)
Endian byte order. (8-byte Double Big Endian)
Convert the top 8 characters to a double-precision float using the Little
num val8DLE (a)
Endian byte order. (8-byte Little Big Endian)
num valSum (a) Return the sum of a string code from top to bottom.
Remainder of dividing a string (bit string) by a generator polynomial
num valCRC (a)
X16+X12+X5+1
str bitNot (a) Bit invert
str bitAnd (a,b) Bit logical conjunction
str bitOr (a,b) Bit logical add
str bitXor (a,b) Bit exclusive disjunction

Features II 35 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


ON/OFF OUTPUT CONTROL

„ Output to I/O: set, reset, pulse, invPulse

This section explains the commands to be output to the tool unit (I/O). These commands belong to the
[ON/OFF Output Control] command category.

Command Category Command Parameter Job


Output ON to a designated output
set Output Destination
destination.
Output OFF to a designated output
reset Output Destination
destination.
ON/OFF Output Output ON pulse of a designated
Control Output Pulse
pulse width to a designated output
Destination Width
destination.
Output OFF pulse (inverting pulse)
Output Pulse
invPulse of a specified width to a specified
Destination Width
output destination.

For example, connect the hand tool to the robot according to the following settings:

• The hand tool opens. Å Close Air 1 and Open Air 2. JR2203N
• The hand tool closes. Å Open Air 1 and close Air 2.
• Air 1 opens. Å Turn on Solenoid Valve 1.
• Air 2 opens. Å Turn on Solenoid Valve 2.
• Air 1 closes. Å Turn off Solenoid Valve 1.
• Air 2 closes. Å Turn off Solenoid Valve 2.
• Solenoid Valve 1 is ON. Å Turn on #sysOut15. Solenoid
Valve 1
• Solenoid Valve 2 is ON. Å Turn on #sysOut16.
• Solenoid Valve 1 is OFF. Å Turn off #sysOut15. Air 1
• Solenoid Valve 2 is OFF. Å Turn off #sysOut16.

Hand Tool Solenoid Air 2


Valve 2

I/O-SYS

Features II 36 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Accordingly,
• The hand tool opens. Å Turn off #sysOut15 and on #sysOut16.
• The hand tool closes. Å Turn on #sysOut15 and off #sysOut16.

The output commands to open and close the hand tool are as follows:

reset #sysOut15 Output #sysOut15 OFF.


Æ Open the hand tool.
set #sysOut16 Output #sysOut16 ON.

set #sysOut15 Output #sysOut15 ON.


Æ Close the hand tool.
reset #sysOut16 Output #sysOut16 OFF.

z The set command continues to output an ON signal unless the command reset comes.

The pulse output commands to open and close the hand tool are as follows:

ON
invPulse #sysOut15 100 #sysOut15 Å 0.1sec Æ
OFF
Open the
hand tool.
ON
pulse #sysOut16 100 #sysOut16 Å 0.1sec Æ
OFF

ON
pulse #sysOut15 100 #sysOut15 Å 0.1sec Æ
OFF
Close the
hand tool.
ON
invPulse #sysOut16 100 #sysOut16 Å 0.1sec Æ
OFF

Features II 37 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


z The pulse and invPulse commands move on to the next command before completing output.
For example, the following two kinds of point job data have different results:

pulse #genOut1 100 set #genOut1


delay 100
reset #genOut1
pulse #genOut2 200 set #genOut2
delay 200
reset #genOut2
set #genOut3 set #genOut3

#genOut1 #genOut1

#genOut2 #genOut2

#genOut3 #genOut3

0.1sec 0.1sec 0.2sec

delay100 means “Stand by for 0.1 second at that point”.

z You can set the pulse width for the pulse and invPulse commands using variables or expressions.

Features II 38 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Output after X Seconds: delaySet, delayReset

The delaySet and delayReset commands are used to output ON/OFF signals to a designated output
destination after a designated time.
The delay time can be set 0.001sec – 9999.999sec.

Command Category Command Parameter Job


Output ON output after specified delay
delaySet Delay Time
ON/OFF Output Destination time
Control Output OFF output after specified
delayReset Delay Time
Destination delay time

The delaySet and delayReset commands move on to the next command before completing output.
If signals are output by set or reset commands after waitCondTime, the next command execution
timing is different as follows:

e.g. delaySet e.g. waitCondTime/set


1. delaySet #sysOut2 100 1. waitCondTime 100
2. set #sysOut1 2. set #sysOut1
3. ……. 3. set #sysOut2
4. …….

0.1sec 0.1sec

1 1 2

2 3

z You can set the delay time using variables or expressions.

Features II 39 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Sound a Buzzer: onoffBZ

You can sound a buzzer using a point job command.

Command Category Command Parameter Job


set Output Destination (BZ) Sound a buzzer.
ON/OFF Output Control reset Output Destination (BZ) Stop a buzzer.
onoffBZ ON Time, OFF Time Sound and stop a buzzer.

If the set or onoffBZ commands are executed, the buzzer continues to sound until the reset command
is executed.

z You can set [ON Time] and [OFF Time] for the onoffBZ command using variables or expressions.

Features II 40 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Blink the LED (Green): onoffGLED

z The commands below are available only for the JR2000N and JSR4400N Series. The JS and JSG
Series are not equipped with these commands.

You can turn on and off, or blink the LED light on the front body (JR2000N) or the operation box
(JSR4400N) using a point job command.

Command Category Command Parameter Job


set Output Destination (GLED) Turn on the LED (Green).
ON/OFF Output Control reset Output Destination (GLED) Turn off the LED (Green).
onoffGLED ON Time, OFF Time Blink the LED (Green).

If the set or onoffGLED commands are executed, the green LED is on or blinking until the reset
command is executed.

z You can set [ON Time] and [OFF Time] for the onoffGLED command using variables or
expressions.

Features II 41 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Blink the LED (Red): onoffRLED

z The commands below are available only for the JR2000N and JSR4400N Series. The JS and JSG
Series are not equipped with these commands.

You can turn on and off, or blink the LED light on the front body (JR2000N) or the operation box
(JSR4400N) using a point job command.

Command Category Command Parameter Job


set Output Destination (RLED) Turn on the LED (Red).
ON/OFF Output Control reset Output Destination (RLED) Turn off the LED (Red).
onoffRLED ON Time, OFF Time Blink the LED (Red).

If the set or onoffRLED commands are executed, the red LED is on or blinking until the reset
command is executed.

z You can set [ON Time] and [OFF Time] for the onoffRLED command using variables or
expressions.

Features II 42 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Output Values from I/O: dataOut, dataOutBCD

Any numeric values 1 – 999,999,999 or tag codes can be output to the I/O or the Boolean free
variables #mv (1 – 99) and #mkv (1 – 99).

Command Category Command Parameter Job


Output Output Output Bit Output values from the
dataOut
Data Destination Number I/O.
ON/OFF Output Control
Output Output Output Bit Output values in BCD
dataOutBCD
Data Destination Number from the I/O.

z Using tag code output, you can output different values using the same point job data if you set
different values as tag codes to multiple points.
z The output values and widths can be set using variables or expressions.

You need to set the three parameters: the output value (value to be output), the output width (the
number of I/O pins to be used for output; also referred to as [Output Bit No.]), and the output
destination (the smallest number between I/Os to be used for output: for example, if you use
#genOut8 – #genOut10, the output destination is [8]), for the dataOut and dataOutBCD commands.

z The dataOut and dataOutBCD commands require serial I/O pins for output.

Example:
(Settings) (Command) (Output) 6=110 (binary)
Output Value: 6 #genOut8: 0 (OFF)
Output Width: 3 dataOut 6, #genOut8, 3 #genOut9: 1 (ON)
Output Destination: #genOut8 #genOut10: 1 (ON)

z If the output value does not fall within the set output width, the upper digit will be truncated.

Example:
(Settings) (Command) (Output) 14=1110 (binary)
Output Value: 14 #genOut8: 0 (OFF)
Output Width: 3 dataOut 14, #genOut8, 3 #genOut9: 1 (ON)
Output Destination: #genOut8 #genOut10: 1 (ON)
: 1 (truncation)

z The output width ([Output Bit No.]) can be set up to [31]. However, different types of I/O pins cannot
be combined.

Features II 43 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Motor Power ON, Servo Motor ON and OFF:
motorPowerON, servoON, servoOFF

z The commands below are available only for the JS and JSGN Series. The JR2000N Series is not
equipped with these commands. The JSR4400N Series is equipped with only motorPowerON.

You can turn on the power to the robot’s motor or turn on and off the designated Axis servomotor by
using a point job command. If an Axis servomotor is off, the Axis cannot be controlled by the robot.
When the X-, Y- and R-Axes servomoters are off, they can be moved manually.

z You cannot turn off the motor power using commands.

Command Category Command Parameter Job


motorPowerON – Turn on the power to the robot’s motor.
ON/OFF Output Control servoON Axis Turn on the designated Axis servomoter.
servoOFF Axis Turn off the designated Axis servomoter.

Features II 44 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


IF BRANCH, WAIT CONDITION

„ if Branch: if, then, else, endIf

This section explains the point job data commands for performing different jobs according to
conditions. These belong to the [if Branch, Wait Condition] command category.

Command Category Command Parameter Job


if – if Branch
then – Execute the following command if true:
if Branch, Wait Condition
else – Execute the following command if false:
endIf – End of if Branch

z Be sure to put a conditional command after the if command.

For example, perform the following point jobs


using the if, then, else and endIf commands:

Example 1 #genIn2=ON
If #genIn2 is on, raise the Z-Axis by 10mm
and output a pulse to #genOut1.
If #genIn2 is not on, lower the Z-Axis by
Ascend 10mm. Descend 10mm.
10mm and output a pulse to #genOut2. Output to #genOut1. Output to #genOut2.

The Example 1 above will be performed using the following point job commands:
if If the following condition is true, go to then. If false, go to else.
ld #genIn2 #genIn2 = ON (Condition)
then If the condition is true, execute the following commands:
upZ 10,20 Raise the Z-Axis by 10mm at 20mm/sec, and
pulse #genOut1,200 Output ON pulse to #genOut1. (in 0.2sec widths).
else If the condition is false, execute the following commands.
downZ 10,20 Lower the Z-Axis by 10mm at 20mm/sec, and
pulse #genOut2,200 Output ON pulse to #genOut2 (in 0.2sec widths).
endIf End of if Branch

Features II 45 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Example 2
If both #genIn1 and #genIn2 are on, sound a Label 1
buzzer and stand by until the start instructions
come.
If both #genIn1 and #genIn2 are not on,
#genIn1
advance to the next job.
#genIn2
Sound the alarm
and stand by for
start.

The Example 2 above will be performed using the following point job commands:
Label 1 (A destination mark for the jump command)
if If the following conditions are true, go to then. If false, go to the point next to
ld #genIn1 endIf.
and #genIn2 #genIn1=ON (Condition 1)
then And #genIn2=ON (Condition 2)
waitStartBZ If the conditions are true, execute the following commands:
jump L1 Sound the buzzer and stand by at the point until the start instructions come.
endIf Jump to [Label 1] when start instructions come.
End of If Branch

z It is not necessary for both the then and else commands to exist at the same time. However, the if
command without the endIf command is recognized as an error.

z The waitCondTime, timeUp … endWait, and if … endIf command lines will be indented as follows:

waitCondTime 200
ld #genIn2 Be sure not to use more than 9 indents.
timeUp
set genOut2 If the point job data includes more than 9 indents, it will
if be recognized as an error and the error message [Error
ld #genIn1 on Point Job] will be displayed.
then
downZ 20,20 If timeUp or endWait precedes waitCondTime or if then,
waitCondTime 200 else or endIf proceeds if, it will also be recognized as an
ld #genIn4 error and the message [Error on point job] will be
timeUp displayed.
waitStartBZ
endWait
endIf
endWait
3rd indent
2nd indent
1st indent

Features II 46 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


„ Wait Condition: waitCond, waitCondTime, timeUp, endWait

This section explains the point job data commands for waiting until the sensor (connected to #genIn2)
is turned on. These commands belong to the category [Wait Condition].

Command Category Command Parameter Job


waitCondTime Wait Time Wait the condition for a set period.
timeUp – Execute when time is up.
Wait Condition
endWait – End of wait command
waitCond – Wait the condition.

z The wait condition commands are deactivated at the points whose point type or base type is set to
[CP Passing Point].
z Be sure to put a conditional command after the waitCond or waitCondTime command.

Following are some examples where the wait condition commands are used:

„ waitCond … endWait: Wait until conditions are met.


e.g. A workpiece exists. Æ Sensor (#genIn2) ON
A workpiece does not exist. Æ Sensor (#genIn2) OFF Condition

waitCond Stand by at the point until the following conditions are met:
ld #genIn2 #genIn2=ON (Condition)
endWait End of the condition line

„ waitCondtime … timeUp … endWait: Wait for the specified period of time until conditions
are met.
e.g. If the workpieces do not come within 30 seconds, it is recognized as an error, an external lamp
(connected to #genOut2) comes on, and the robot stands by until a start signal comes.
To restart operation, fix the problem and press the start button.

waitCondTime 3000 Wait for 3 seconds until the following condition is met:
ld #genIn2 #genIn2=ON (Condition)
timeUp If the condition is not met within 3 seconds,
set #genOut2 Output ON signal to #genOut2,
waitStartBZ Stand by in place until a start signal comes.
reset #genOut2 Output OFF signal to #genOut2 when a start signal comes.
endWait End of the line for commands if the condition is not met for another 3
seconds.

Features II 47 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


z endWait and timeUp cannot be used alone.
z For waitCondTime, the wait time can be set using variables and expressions.

Example:
declare num wtime Declare a local variable wtime.
if If
ld #genIn3 #genIn3=ON
then then
wtime = 3000 Assign 3000 to wtime.
else If not
wtime = 1000 Assign 1000 to wtime.
endIf
waitCondTime wtime Wait for 3 or 1sec until the following condition is met:
ld #genIn2 #genIn2=ON (Condition)
timeUp If the condition is not met within 3 or 1sec,
set #genOut2 Output ON signal to #genOut2,
waitStartBZ Stand by in place until a start signal comes.
reset #genOut2 When a start signal comes, output an OFF signal to #genOut2.
endWait End of the command line if the condition is not met within 3 or 1sec.

Features II 48 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


CONDITION

■ Condition Settings: ld, ldi, and, ani, or, ori, anb, orb

This chapter explains the conditional operation commands that come after if Branch and Wait
Condition commands (if, waitCond, waitCondTime). The command category is [Condition].

Command Category Command Parameter Job


ld Boolean variable or expression ON input
ldi Boolean variable or expression OFF input
and Boolean variable or expression Serial ON input
ani Boolean variable or expression Serial Off input
Condition
or Boolean variable or expression Parallel ON input
ori Boolean variable or expression Parallel OFF input
anb - Block serial connection
orb - Block parallel connection

I/O-SYS input (#sysIn), I/O-SYS output (#sysOut), I/O-1 input (#genIn), I/O-1 output (#genOut), I/O-H
input (#handIn), I/O-H output (#handOut), system flag (#sysFlag), internal relay (#mv), keep relay
(#mkv), and pallet flag can be given as command parameters.
Comparison operation expressions can also be used. Variables and functions can also be used in
comparison operation expressions as well as the above parameters.

Comparison operation Comparison operation


Meaning Meaning
expression expression
○ <= □ □ is greater than or
○ == □ □ is equal to ○.
○ =< □ equal to ○.
○ >= □ □ is less than or equal
○<□ □ is greater than ○.
○ => □ to ○.
○ <> □
○>□ □ is less than ○. Not equal.
○ >< □

A [Condition] command must always start from an Id or Idi command line. If the command includes
only an independent ON (true) or OFF (false) condition, it needs 1 line, but when multiple conditions
are connected with and, or, etc., multiple lines are required.
Expressions can also be used in the condition commands. In this case, the result of the expression is
judged as 0 (false) or nonzero (true).

Features II 49 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ ld: ON input
waitCond Wait in place until the following condition is met:
ld #genIn2 #genIn2=ON (Condition)
endWait End of condition line

■ ldi: OFF input


waitCond Wait in place until the following condition is met:
ldi #genIn2 #genIn2=OFF (Condition)
endWait End of condition line

■ and: Series ON input


waitCond Wait in place until the following conditions are met:
ld #genIn1 #genIn1 is ON (Condition 1)
and count>=10 and count value is 10 or greater (Condition 2)
endWait End of condition line
z count is a variable.

■ ani: Series OFF input


waitCond Wait in place until the following conditions are met:
ldi #genIn1 #genIn1 is OFF (Condition 1)
ani count<=10 and count value is 10 or less (Condition 2)
endWait End of condition line

■ or: Parallel ON input


waitCond Wait in place until the following conditions are met:
ld #genIn1 #genIn1 is ON (Condition 1)
or #genIn2 or #genIn2 is ON (Condition 2).
endWait End of condition line

■ ori: Parallel OFF input


waitCond Wait in place until the following conditions are met:
ldi #genIn1 #genIn1 is OFF (Condition 1)
ori #genIn2 or #genIn2 is OFF (Condition 2)
endWait End of condition line

Features II 50 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ anb: Block serial connection
waitCond Wait in place until the following conditions are met:
ld count>=10 Count is 10 or greater
or flag or flag is ON Condition 1
ldi #genIn1 #genIn1 is OFF
ani #genIn2 and #genIn2 is also OFF Condition 2
anb Both Conditions 1 and 2 are true,
endWait End of condition line

■ orb: Block parallel connection


waitCond Waits in place until the following conditions are met.
ld count>=10 Count is 10 or greater
Condition 1
or flag or flag is ON
ldi #genIn1 #genIn2 is OFF
ani #genIn2 and #genIn2 is also OFF Condition 2
orb Either Condition 1 or 2 is true,
endWait End of condition line

z When there is no Id or Idi corresponding anb or orb, the error message [Error on Point Job] is
displayed.

Features II 51 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


DELAY, DATA IN, WAIT START

■ Time Delay: delay

This section explains the point job data command for controlling time delay.

Command Category Command Parameter Job


Delay, Data In,
delay Delay Time Stand by in place for the specified delay time.
Wait Start

z The delay command is deactivated at points where the (base) point type [CP Passing Point] is set.

■ delay: Delay for the specified period of time

Example:
set #genOut1 Output ON signal to #genOut1,
delay 100 Delay for 0.1sec.
reset #genOut1 Output OFF signal to #genOut1.
set #genOut2 Output ON signal to #genOut2.
delay 200 Delay for 0.2sec.
reset #genOut2 Output OFF signal to #genOut2.

ON Å0.1secÆ
#genOut1
OFF
ON
#genOut2 Å 0.2sec Æ
OFF

Features II 52 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


The delay time can be set using variables or expressions as well as numeric values.

Example:
declare num wtime Declare the local variable wtime.
if If
ld #genIn1 #genIn1=ON
then then
wtime = 100 Assign 100 to wtime.
else If not
wtime = 200 Assign 200 to wtime.
endIf
set #genOut1 Output ON signal to #genOut1.
delay wtime Delay for 0.1 or 0.2sec.
reset #genOut1 Output OFF signal to #genOut1.

Features II 53 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Waiting for a Start Signal: waitStart, waitStartBZ

This section explains the point job data commands to stop the robot until a start signal comes.

Command Category Command Parameter Job


waitStart – Stand by in place until a start signal comes.
Delay, Data In,
Wait Start Stand by in place while sounding a buzzer until
waitStartBZ –
a start signal comes.

z The waitStart and waitStartBZ commands are deactivated at points where the (base) point type
[CP Passing Point] is set.

■ waitStart: Wait for start


Example:
set #genOut1 Output an ON signal to #genOut1.
waitStart Stand by in place until a start signal comes.
reset #genOut1 Output an OFF signal to #genOut1 (if a start signal comes).

■ waitStartBZ: Wait for start (with buzzer)


Example: If #genIn1 does not come on within 2 seconds, it is recognized as an error, #genOut2
(connected to an external alarm or alarm lamp) comes on, and the robot stands by for a
start signal while sounding a buzzer.
When the operator fixes the problem and sends a start signal, #genOut2 goes off and the
operation will restart from Point 05.

waitCondTime 2000
ld #genIn1 Wait until #genIn1 comes on for 2 seconds.
timeUp If #genIn1 does not come on within 2 seconds,
upZ 50,20 Raise the Z-Axis 50mm (at 20mm/sec),
set #genOut2 Output ON signal to #genOut2,
waitStartBZ Sound a buzzer and stand by in place until a start signal comes.
reset #genOut2 Output OFF signal to #genOut2 (when a start signal comes),
goPoint PTP3,5 Go to Point 05.
endWait End of the command if #genIn1 does not come on within 2 seconds

Features II 54 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


z If the waitCondTime, timeUp … endWait and if … endIf commands are combined, the command
lines are indented as shown below.

waitCondTime 200
ld #genIn2 Be sure not to use more than 9 indents.
timeUp
set genOut2 If the point job data includes more than 9 indents, it will be
if recognized as an error and the error message [Error on
ld #genIn1 Point Job] will be displayed.
then
downZ 20,20 When timeUp or endWait comes before waitCondTime,
waitCondTime 200 or if then, else or endIf comes before if, it will also be
ld #genIn4 recognized as an error and the error message [Error on
timeUp Point Job] will be displayed.
waitStartBZ
endWait
endIf
endWait

3rd indent
2nd indent
1st indent

Features II 55 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Input from I/O: dataIn, dataInBCD

Read out a numeric value from I/O or Boolean variables #mv (1 – 99) or #mkv (1 – 99) and assign it to
the specified variable.

Command
Command Parameter Job
Category
Numeric Read out numeric data
Delay, dataIn Input Source Input Bit No.
Variable Name from I/O.
Data In,
Wait Start Numeric Read numeric data from
dataInBCD Input Source Input Bit No.
Variable Name I/O in BCD.
z BCD: Binary-Coded decimal
z Read out width can be set using variables or expressions.

The dataIn and dataInBCD commands require the following three parameters: a variable to which a
loaded value is assigned, an input width (number of I/Os to be used for input), and an input width (the
smallest number between I/Os to be used for input: If #genIn3 – #genIn10 are used, the input source
is [3]).

z The dataIn and dataInBCD commands require the serial I/O pins for input.

Example:
declare numeric code Declare a local variable code.
dataIn code,#genIn3,8 Read out data #genIn3 – #genIn10 (I/O-1) as a numeric
value and assign it to code.

declare numeric code Declare the local variable of “code.”


dataInBCD code,#genIn3,8 Read out data #genIn3 – #genIn10 (I/O-1) in BCD and
assign it to code.

Status of I/O-1
#genIn3 #genIn4 #genIn5 #genIn6 #genIn7 #genIn8 #genIn9 #genIn10
OFF OFF OFF ON OFF OFF ON OFF
Input width: 8

In the above I/O status, the following result will be returned:


For the dataIn command, the value of code is 18.
For the dataInBCD command, the value of code is 12.
Input Width can be set up to “31.” However, it cannot be extended to a different I/O.

z The input width ([Input Bit No.]) can be set up to [31]. However, different types of I/O pins cannot
be combined.

Features II 56 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


PALLET CONTROL

■ Pallet Command: loopPallet, resPallet, incPallet

There are two types of additional function data [Pallet Routine]: One is [Auto Increment], which
increases the counter automatically (the tool unit will move to the next point on the pallet sequentially).
The other is [Increment by Point Job], which will not increase the counter (that is, the tool unit will not
move to the next position on the pallet) unless you set the point job data to update the counter.
If you select [Auto Increment], you do not need to set a point job command to control the pallet
operation. The tool unit will automatically move to the next point and update the pallet counter.
However, on the [Auto Increment] pallet, the tool unit can only move in serial order P2-1, P2-2, P2-3
… as shown below.

Example: [Auto Increment] Pallet

To P3

P2 (P2-1) P2-4
P1 P2-5 ~ P2-8
P2-9 ~ Pallet Routine Type: Plane Pallet

P2-13 Counter Control: Auto Increment



Row: 4
P2-16
Column: 4

Example: [Increment by Point Job] Pallet

To P3

P2 (P2-1) P2-2 Pallet Routine Type: Plane Pallet


P2-3 P2-4 Counter Control: Increment by Point Job
P2-5 ~ Row: 4
P1
P2-9 ~ Column: 3
P2-12

Features II 57 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


On the [Increment by Point Job] pallet, the tool unit can move randomly, as shown on the previous
page. For example, the tool unit returns to P1 each time before it moves to the next point. (P1 Æ P2
(P2-1) Æ P1 Æ P2-2 Æ P1 Æ P2-3…)

The following three commands are used for [Increment by Point Job]:

Command Category Command Parameter Job


Add 1 to the pallet counter and if the
Pallet Number,
loopPallet counter reaches maximum, the tool unit
go Point Number
Pallet Control will move to the specified point.
resPallet Pallet Number Reset the counter to 0.
incPallet Pallet Number Add 1 to the pallet counter.

The following two variables can also be used to control the pallet:

[palletFlag(n)]: A Boolean variable which has the following content:


• The Pallet Counter (No. n) reaches maximum = ON (true)
• The Pallet Counter (No. n) does not reach maximum = OFF (false)
[palletCount(n)]: A numeric variable which has the value of Pallet Counter (No. n)

In the following example of point job data, the tool unit picks up the workpiece from P1 (set #genOut1)
and places it at P2 (reset #genOut1) on the [Increment by Point Job] pallet shown on the previous
page:

Point Job Data (to be set to P1)


set #genOut1 Picks up the workpiece.

Point Job Data (to be set to P2)


reset #genOut1 Releases (places) the workpiece.
loopPallet 10,1 Add 1 to the counter of Pallet No. 10.
If the counter reaches maximum, go to the next command.
(In this example, the point job is over because there are no
more commands.)
If the counter is not at maximum, move to P1.

z The tool unit shifts (to P1 in the point job data for P2 above) using the loopPallet command
according to the program data [PTP Condition].

Features II 58 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


If the incPallet command (Add 1 to the specified pallet counter) is used instead of the loopPallet
command, the pallet control command will be as follows:

e.g. incPallet is used instead of loopPallet.


reset #genOut1 Release (Place) the workpiece.
incPallet 10 Add 1 to the counter of Pallet No. 10.
if If
ld #palletFlag(10) The counter of Pallet 10 does not reach maximum,
else
goPoint PTP3,1 Go to P1 (according to PTP Condition 03).
endif

z If you use the loopPallet command, the tool unit shifts to the specified point according to the
program data [PTP Condition]. If you use the incPallet command, you can use the goPoint or
goRPoint command together, and you can also select the additional function data [PTP Condition].

If you use the incPallet command, another job (e.g. pulse output) can be performed each time the tool
unit shifts to P1.
reset #genOut1 Release (Place) the workpiece.
incPallet 10 Add 1 to the counter of Pallet No. 10.
if if
ld #palletFlag(10) The counter of Pallet 10 does not reach maximum,
else
pulse #genOut5,200 Output a pulse and
goPoint PTP0,1 Shift to P1.
endif

The pallet number (and the go Point number for the loopPallet command) can be specified using
expressions.
Example:
declare num pal Declare a local variable pal.
if If
ld #genIn3 #genIn3=ON
then then
pal = 5 Assign 5 to pal.
else If not
pal = 6 Assign 6 to pal.
endIf
reset #genOut1 Release (Place) the workpiece.
loopPallet pal,1 Add 1 to the counter of Pallet 5 or 6,
go on to the next command if the counter reaches maximum.
(In this example, the point job is over because there are no
more commands.)
If the counter is not at maximum, move to P1.

Features II 59 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


EXECUTION FLOW CONTROL

■ Subroutine Call for Jobs according to Point Types: callBase

If you set point job data to a point where the user-defined point type created in the Customizing mode
is already set, the point job set under the user-defined point type will not be performed.
For example, If you add a new point job to a point where the point type [Wait Start Point] is already set,
the job originally set to the point will be ignored (the tool unit does not stand by until the start switch is
pressed or a start signal comes on at the [Wait Start Point]) and the newly added job will be performed
instead.

e.g. At Points P1 and P2 where the user-defined point Title : Pick-up point
type shown to the right is set, the following point job Base type : PTP Point
data will be performed at each point: Job before Moving : Yes
Job while Moving : Yes
(P1) Job before Moving : Point job data 5 Point Job : Yes
Job while Moving : Point job data 6
Point Job : Point job data 7

(P2) Job before Moving : [Job before Moving] set under the user-defined point type
Job while Moving : [Job while Moving] set under the user-defined point type
Point Job : [Point Job] set under the user-defined point type

P1 P2

Point 01 Point 02
Type: Pick-up point Type: Pick-up point
Job before Moving No.: 5 Job before moving No.: 0 (No job)
Job while Moving No.: 6 Job while moving No.: 0 (No job)
Point Job No.: 7 Point job No.: 0 (No job)

Features II 60 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


In this case, if you execute the callBase command in a newly added job, the original job set under the
user-defined point type can be called as a subroutine and be performed.
For the example on the previous page, if you execute the callBase command in Point Job Data 7, the
original job set under the user-defined point type can be called as a subroutine when a new point job
is performed at P1.

(Point Job Data 7) (Point job set under the user-defined point type)

callBase

Command Category Command Parameter Job


Call and execute the job command string set
Execute Flow Control callBase – under the user-defined point type at the point
where the user-defined point type is set.

z The callBase command is deactivated at points where the (base) point type [CP Passing Point] is
set.

The job command string set under the user-defined point type can be called as a subroutine by the
callBase command. Therefore, if the callBase command is executed in a [Job before Moving], [Job
while Moving], and [Job while CP Moving], the command string for each job will be called as a
subroutine.
In the example on the previous page, if the callBase command is used in Point Job Data 5, the
command string for [Job before Moving] set under the user-defined point type will be called when [Job
before Moving] set to P1 is executed.

Features II 61 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Subroutine Call for Point Job Data: callJob

While performing a point job, another point job data can be called and executed as a subroutine.

A point job can be clearer and easier if you create a specific job common to multiple point job data sets (e.g.
error handling) as a point job data set and call it when necessary.
Also, if you extract command lines from a point job data set and create them as another point job data
set, you can check a part of the point job data.

Command Category Command Parameter Job


Call a subroutine of the point job data
Execute Flow Control callJob Point Job Number
for the given number.

z The callJob command is deactivated at points where the (base) point type [CP Passing Point] is
set.

waitCondTime 200 set #genOut1


ld #genIn1 downZ 20,20
timeUp Label 1
set #genOut1 Command lines for timeup waitStartBZ
downZ 20,20 are extracted and converted if
Label 1 into another point job data ld #genIn1
waitStartBZ set. then
if reset #genOut1
ld #genIn1 else
then jump L1
reset #genOut1 endIf
else
jump L1
endIf e.g. Point Job No. 91
endWait

waitCondTime 200
ld #genIn1
timeUp
callJob 91 Point job data No. 91 can
endWait be called by the callJob
command.

After the called point job data (No. 91 in this example) is complete, the next command line of the
callJob command (endWait in this example) in the calling point job data is performed.

Features II 62 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


z When the point job data called by the callJob command contains a callJob command, an error (No.
042: [Job for callJob doesn't exist]) is returned if the nest level exceeds Level 10. (The following
example shows the nest level 2.)

Command Execution Flow

callJob
callJob

Nest level 1 Nest level 2

Point job data numbers can also be given using expressions.


Example:
declare num ejob Local variable ejob declaration
waitCondTime 200 Wait for 0.2 seconds until the following condition is met:
ld #genIn1 #genIn1=ON (Condition)
timeUp If the condition is not met within 0.2 seconds,
if if
ld #genIn2 #genIn2=ON
then then
ejob = 9 Assigns 9 to ejob.
else If not,
ejob = 10 Assigns 10 to ejob.
endIf
callJob ejob Call the point job data No. 9 or 10 as a subroutine.
endWait

Features II 63 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ End the Point Job: returnJob

If a condition in the point job data is complex and there is no process to meet the condition, the point
job can be ended by the returnJob command.

Command Category Command Parameter Job


Execute Flow Control returnJob – End a point job.

The following example shows point job data using the returnJob command:

if
Condition 1 Condition 1
then
Process 1
Process 1
if
Condition 2 Condition 2
then
returnJob returnJob
else
Process 2 Process 2
endIf
endIf
Process 3
Process 3

Note: Once registered, if the returnJob command is removed from the point job data, Process 3 will
be performed even if Condition 2 is ON (YES).

Features II 64 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Subroutine Call for a Program: callProg

While performing a point job, another program can be called and executed as a subroutine.

Command Category Command Parameter Job


Call the specified program number as a
Execute Flow Control callProg Program Number
subroutine.

z The callProg command is deactivated at points where the (base) point type [CP Passing Point] is
set.

waitCondTime 200
ld #genIn1
timeUp
callProg 17 Program No. 17 can be called by the callProg command.
endWait

After the called program (No. 17 in this example) is complete, the next command line of the callProg
command (endWait in this example) in the calling point job data is performed.

z The called program (hereinafter referred to as subprogram in this manual) will be performed as a
[1 Cycle Playback] program even if [Continuous Playback] is selected as [Cycle Mode] settings in
the [Program Data Settings] menu. The tool unit does not return to the work home position after
running the last point of the called program, as shown below.
(SP1: Subprogram Point 1)

Calling point
P1 P2 P3 P4 P1 P2 P3 P4

P1
(Last point)
SP1
P3

P2 SP2 SP3

Program 5 Program 12 Program 12 was called from


P2 in Program 5.

Features II 65 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Program numbers can also be given using expressions.

Example:
declare num eprg Declare a local variable eprg.
waitCondTime 200 Wait for 0.2 seconds until the following condition is met:
ld #genIn1 #genIn1=ON (Condition)
timeUp If the condition is not met within 0.2 seconds,
if If
ld #genIn2 #genIn2=ON
then then
eprg = 9 Assign 9 to eprg.
else If not,
eprg = 10 Assign 10 to eprg.
endIf
callProg eprg Call the program No. 9 or 10 as a subroutine.
endWait

■ Position Data Settings


Point coordinates definition (position data settings) in the point data can be set in [Position Data
Types] in the [Program Data Settings] menu. There are the following three position data types:

• Absolute: The position data value is equal to the robot’s absolute coordinates. (Default)
• Relative: The position data is equal to the distance from the program start coordinates to the
current position coordinates.
(If the start coordinate is (0,0), it is equal to the [Absolute] setting.)
• Moving Amount: The position data value is equal to the distance to the next point.

If you set a subprogram to [Relative] or [Moving Amount], the tool unit always runs at an equal
distance from the calling point (where point job data including the callProg command is set.)

Example: The subprogram is set to [Relative] or [Moving Amount].


The current point (calling point) is handled as SP1 (Subprogram Point 1); but the position data of SP1
is not used. The work home position is not called.

Calling Point Calling Point


P6 P7 P8 P6 P7 P8
SP1 SP1

SP2 SP3 SP2 SP3

Features II 66 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Example: The subprogram is set to [Absolute].
The tool unit runs on the coordinates of point data of the called point regardless of the position of the
calling point. At the current point (calling point), the tool unit performs the [Job on Start of Cycle] (set to
the work home position of the subprogram, and then shifts to SP1 (Subprogram Point 1).

Calling Point Calling Point


P6 P7 P8 P6 P7 P8

SP1 SP1
SP2 SP3 SP2 SP3

z When a program called by the callProg command contains a callProg command, an error (No.
044: [Program for callProg doesn't exist]) is returned if the nest level exceeds Level 10.

Features II 67 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Depending on the position data settings, the next point coordinates vary even if the position data
values are the same. (See below)

Position Data Value (0,0) (15,20) (10,20) (5,10)


P1 P2 P3 P4 P5
Absolute
(10,10) (0,0) (15,20) (10,20) (5,10) Fixed robot coordinates
Relative
(10,10) (10,10) (25,30) (20,30) (15,20) Fixed robot coordinates
Moving Amount
(10,10) (10,10) (25,30) (35,50) (40,60) Fixed robot coordinates
Ç Program Start Position Coordinates

z If you run a program as a subprogram, the robot Axis or Arm will not return to the work home. If
[Relative] or [Moving Amount] is set in a program, the robot Axis or Arm will also not return to the
work home.
The robot Axis or Arm returns to the work home only when [Absolute] is set in the program and is
performed independently, not by a CallProgram command.

■ How to Register a [Relative] Program


When registering any point in the JOG mode, the position data setting must be set to [Absolute].
When creating a program which is set to [Relative], shift (offset) all the points so as to match the
coordinates of the first point to the position (0,0,0) after registering the desired point.

■ How to Register a [Moving Amount] Program


You cannot convert the registered coordinates into [Moving Amount]. Register any points under the
[Moving Amount] setting in the MDI mode.

Features II 68 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Subroutine Call for a Point String: callPoints

A point string (also referred to as an array of points or series of points, defined in the Customizing
mode) with an identifier can be called and executed as a subroutine.

Command Category Command Parameter Job


Call the specified point string as
Execute Flow Control callPoints Variable Name (Identifier)
a subroutine.

z The callPoints command is deactivated at points where the (base) point type [CP Passing Point] is
set.

For example, set the point job data shown below to P1.

if
ld #genIn1
then
callPoints cleaning A point string cleaning can be called by the callPoints command.
downZ 10,10
out #genOut1

Point string: cleaning

P1 P2

If #genIn1 is ON, go to the point string cleaning and execute point job data and additional function
data set to the point string cleaning. Then go to P1, lower the Z-Axis by 10mm and output the ON
signal to #genOut1.
If #genIn1 is OFF, lower the Z-Axis by 10mm and then output the ON signal to #genOut1.

Features II 69 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ End a Program: endProg

A program (operation) can be terminated at the current point by the endProg command. The robot
Arm or Axis will not return to the work home position

Command Category Command Parameter Job


Execute Flow Control endProg – End a program run at the current point.

z The endProg command is deactivated at points where the (base) point type [CP Passing Point] is
set.

The following example shows point job data using the endProg command:

waitCondTime 500
ld #genIn2 genIn2=ON
timeUp
movetoZ 0,10
endProg
endWait

Raise the Z-Axis to the


highest position and end
the program.

By the endProg command, a program is terminated at the current point and the robot Arm or Axis will
not return to the work home position. You cannot restart the program from that position. Start the
program from the first point.

z If you wish to return to the work home position before terminating the program, use the goPoint
command with a destination number [0] (work home position). (Refer to Page 72)

Features II 70 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Assigning the Returned Value of a Function: returnFunc

Assign the value of the specified expression as a returned value and end the function.

Command Category Command Parameter Job


Return Value Assign the specified expression as a return
Execute Flow Control returnFunc
(Expression) value and end the function.

z The returnFunc command cannot be used in point job data.

Point Job Data Function (Identifier: radians)

outLCD 7,4,radians(x) The function can be called. returnFunc 0.017453*x

The return value of the function radians for an argument x is displayed on the teaching pendant LCD.

Features II 71 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Jump to the Specified Point:
goPoint, goRPoint, goCRPoint

The following explains how to jump to a specified point after carrying out a point job instead of going to
the next point.

Command Category Command Parameter Job


PTP Condition Number,
goPoint Jump to the specified point.
go Point Number
PTP Condition Number,
Execute Flow Control goRPoint Jump to the specified relative point.
Relative go Point Number
PTP Condition Number, Jump to the specified destination
goCRPoint
Relative go Point Number during the CP drive.

z The goPoint, goRPoint and goCRPoint commands are deactivated at points where the (base)
point type [CP Passing Point] is set.
z The point number and relative point number for the goPoint and goRPoint can be given using
variables or expressions. If you wish to set the destination for the goCRPoint command using
variables or expressions, the value must be either [0] or [1].

The following example shows point job data using the goRPoint command:

waitCondTime 500
#genIn2=ON
ld #genIn2
timeUp
waitStartBZ
goRPoint PTP3,8
endWait

waitStartBZ

goRPoint PTP3,8

If #genIn2 is not turned on within 0.5 seconds, sound the buzzer and wait until a start signal comes.
After receiving a start signal, restart operation from 8 points ahead (plus 8 points) of the current
point.

Features II 72 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Example

[goPoint PTP3,25]: Jump to Point 25 (according to PTP Condition 03).


If you set [0] as the [PTP Condition Number], the tool unit will move
according to the program data [PTP Condition].
If you set [0] as the [Point Number], the tool unit will return to the work home
position. (Jumps to a specified point number.)

[goRPoint PTP3,-4]: Jump to 4 points behind (minus 4 points from) the current point (according to
PTP Condition 03).
If you set [0] as [PTP Condition Number], the tool unit will move according to
the program data [PTP Condition].
If you set [0] as [Relative Point Number], the tool unit will restart operation
from the same point. (Jumps to a relatively specified point number.)

[goCRPoint PTP3,1]: This command is used to jump to the specified point during the CP drive.
After a cycle of operation, from [CP Start Point] to [CP End Point], the tool unit
will return to the point where the current CP drive is started ([CP Start Point] if
the destination number is set to [0]. If [1] is set, the tool unit will move to the
next point of the [CP End Point] (according to PTP Condition 03).
If you set [0] as [PTP Condition Number], the tool unit will move according to
the program data [PTP Condition].

For example, if this command is executed between P1 and P5, the tool unit
will move according to the destination number as follows:

Destination 0: Shifts to P1.


Destination 1: Shifts to P6.

P1 P2 P3 P4 P5 P6
CP Start Point

CP Stop Point

CP Stop Point

CP Stop Point

CP End Point

CP Start Point

Features II 73 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Jumping to a Specified Command Line: jump, Label

Command Category Command Parameter Job


jump Label Number Jump to the specified label number.
Execute Flow Control
Label Label Number Destination mark for the jump command

Example
If #genIn2 is ON, sound the buzzer and
stand by until a start signal comes. Label 1

If #genIn2 is not ON, go to the next job.

#genIn2==ON

Sound buzzer and


wait for start.

Label 1 (Destination mark)


if If the following condition is true, go to then. If not, go to the next
ld #genIn2 command after endIf.
then genIn2=ON
waitStartBZ If the above condition is true, execute the following commands:
jump L1 Sound a buzzer and stand by in place until a start signal comes.
endIf Jump to [Label 1] (when a start signal comes).
End of if Branch

z The Label command cannot be set between if … endIf or waitCondTime … endWait command
lines.

z The label number can be set from [Label 1] up to [Label 99].

Features II 74 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


FOR, DO-LOOP

■ for, do-loop: for, next, exitFor, do, loop, exitDo

Command Category Command Parameter Job


Variable Name,
Initial Value, Repeats commands between for and next
for
End Value, until the specified variable changes from
Step Value the initial value to the end value.
for, do-loop next –
exitFor – Break from for loop.
do –
Repeat commands between do and loop.
loop –
exitDo – Break from do loop.

■ for … exitFor … next


The for command specifies the number of repetitions.

declare num ival Declare a local variable ival.


for ival=1 to 8 step 1 The initial value of the variable ival is 1. Add 1 to the variable for
(Contents to be repeated) every loop and repeat the commands between for and next until
next the ival becomes 8.

declare num ival Declare a local variable ival.


for ival=1 to 8 step 1 The exitFor command breaks out of the for … next loop and go
(Contents to be repeated) to the command after next.
if
ld #genIn1 Condition: If #genIn1=1, break out of the for … next loop even if
then the ival does not become 8 and go to the command after next.
exitFor
endIf
next

Features II 75 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


The for command parameters: initial value, end value and step value, can be given using variables or
expressions.

declare num loop Declare a local variable loop.


declare num ival Declare a local variable ival.
if If
ld #genIn1 #genIn1=ON
then then
loop = 5 Assign 5 to loop.
else If not
loop = 10 Assign 10 to loop.
endIf
for ival=1 to loop step 1 The initial value of the variable ival is 1. Add 1 to the variable for
(Contents to be repeated) every loop and repeat the commands between for and next until
next the ival becomes the same value (5 or 10) as the variable loop.

■ do … exitDo … loop
The do … exitDo … loop command lines are repeated until the exitDo command exists.

do Without a condition to exit from the do loop, the command goes


(Contents to be repeated) into an infinite loop.
loop

do z The contents to be repeated can be put both before and after


(Contents to be repeated) Condition.
if
ld #genIn1 Condition:
then If #genIn1=1, break out of the do … loop loop and go to the next
exitDo command of the loop.
endIf
(Contents to be repeated)
loop

z When the [for, do-loop] commands are used, an error (No. 046: [for, do Nesting Error]) is returned
if the nest level exceeds Level 10.
z If the [for, do-loop] commands are set to the (base) point type [CP Passing Point] points as point
jobs, the robot may be stopped due to there being too many loops.

Features II 76 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


MOVE

■ Move the Z-Axis Alone: upZ, downZ, movetoZ

Only the Z-Axis can be raised or lowered using point job data. These commands belong to the [Move]
command category.

Command Category Command Parameter Job


Raise only the Z-Axis by the specified
upZ Distance, Speed
distance.
Lower only the Z-Axis by the specified
Move downZ Distance, Speed
distance.
Raise or lower the Z-Axis to the specified Z-
movetoZ Distance, Speed
coordinates (absolute coordinates).

z The [Move] commands are deactivated at points where the (base) point type [CP Passing Point] is
set.

Example
In the PTP drive, stop the hand tool unit 10mm above the workpiece, check whether or not the
workpiece is in place using a sensor, and then lower the tool slowly to hold the workpiece.

Hand Tool Unit

Workpiece
Conveyor Belt

Sensor

waitCond Wait in place until the following condition is met:


ld #genIn2 #genIn2=ON (Condition)
endWait End of condition
downZ 10,20 Lower only the Z-Axis by 10mm (at 20mm/sec).

Features II 77 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


The distance and speed can be given by variables and expressions.

waitCond Wait in place until the following condition is met:


ld #genIn2 #genIn2=ON (Condition)
endWait End of condition
downZ #P_Z(1)-#point_Z,20 Lower or raise only the Z-Axis at 20mm/sec by a distance
calculated by deducting the Z-coordinates of the current point
from the Z-coordinates of P1.
#P_Z(1): Variable which has the Z-coordinate value of P1 in the current program
#point_Z: Variable which has the Z-coordinate value of the current point

z If you assign a value to the variable #jobStartHight to point job data as [Job before Moving] or [Job
while Moving] (using a let command), the robot starts the point job from a position higher than the
set Z-coordinate determined by the assigned value.

Example:

P01
Type: CP Start Point Point Job Data 3

Job before Moving: Point Job Data 3 #jobStartHight 25


Point Job: Point Job Data 12

Start [Point Job]. (Point Job Data 12)


2.5mm

P1

Features II 78 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Linear Movement in CP Drive by Point Job: lineMove,

lineMoveStopIf

The robot Axis or Arm can move linearly in the CP drive using point job data commands.
The moving speed (referred to as CP speed) and the moving amount in each Axis direction can be set.
The CP drive can be terminated in the middle of the movement by setting conditions.

Command Category Command Parameter Job


(CP) Line Speed
X Distance
Move lineMove Y Distance Move by the entered distance in CP drive.
Z Distance
R Rotate Angle

z The [Move] commands are deactivated at points where the (base) point type [CP Passing Point] is
set.

To set each Axis distance, enter the distance from the current point to the destination point you wish to
shift to. Enter [0] as the distance if you wish to move the Axis in that direction.
The distance can also be entered using a variable or an expression.

lineMoveSpeed 20
The point job data shown to the right is an example lineMoveX 25
of linear movement in the CP drive using the lineMoveY -20
lineMove commands. lineMoveZ 5
lineMoveR 0
endLineMove

Current Position
X
+25mm
Commands for each Axis are displayed separately
as shown above; however, all of the Axes will move
together at one time.
-20mm

Features II 79 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ How to Stop the Movement in the Middle of the CP Drive using Conditions

Example:
lineMoveSpeed 3
lineMoveX 20
lineMoveY 0
lineMoveZ 0
lineMoveR 0
lineMoveStopIf
ld #sysIn1 Condition to stop in the middle of the movement
endLineMove
If #sysIn1 comes on, the robot Axis stops moving and goes to the next
callJob11
command (callJob11), even before the Z-Axis moves 20mm in the
plus direction.

If the movement in the CP drive is terminated by conditions, you can check whether or not the robot
Axis has moved the specified distance before it was stopped by referring to the system flag
(#sysFlag34).
0: The robot Axis has completed moving the specified distance in that direction.
1: The robot Axis has completed moving in that direction with conditions.

■ If the Robot Axis Exceeds the [Move Area Limit] defined by the lineMove Command

If the Arm exceeds the [Move Area Limit] by the lineMove command, it will stop at the position where
it reaches the move area limit and then go to the next command.

By referring the system flag (#sysFlag33), you can check lineMoveSpeed 3


whether the robot Axis has completed moving the specified lineMoveX 20
distance before reaching the [Move Area Limit]. lineMoveY 0
Complete: 0 lineMoveZ 0
Not complete: 1 lineMoveR 0
endLineMove
if
ld #sysFlag33
[Wait Start] command: If the robot Axis reaches the [Move then
Area Limit] before moving the specified distance, sound a waitStartBZ
buzzer and stop until a start signal comes. endIf

Features II 80 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Mechanical Initialization by Point Job: initMec

z The command explained below is available for the JR2000N and JSR4400N Series only. It is not
available for the JS and JSG Series. If you are using the JSR4400N Series, this command is
activated only when [Axis] (specifications) is set to [ALL] (all Axes).

Mechanical initialization is performed when the robot is turned on. You can initialize only the desired
Axis using a point job command. With the initMec command, the robot Axes are able to return to the
absolute coordinates (x: 0, y: 0, z: 0, r: 0) even if a position error has occurred.

Command Category Command Parameter Job


Move initMec Axis Initialize the specified Axis.

z The [Move] commands are deactivated at points where the (base) point type [CP Passing Point] is
set.

Axis Specification Contents


all Initialize all Axes.
x Initialize the X-Axis.
y Initialize the Y-Axis.
z Initialize the Z-Axis.
r Initialize the R-Axis.

z Mechanical initialization is performed at low speed.

Features II 81 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Position Error Detection: checkPos

z The command explained below is available for the JR2000N Series only. It is not available for the
JSR4400N, JS, and JSG Series.

Position errors can be detected using point job commands.


When the checkPos command is executed, the robot Axis goes to the absolute coordinates (x:0, y:0,
z:0, r:0), regardless of the current position coordinates. After a position error has been detected, the
robot Axis goes to the next point.

Command Category Command Parameter Job


Move checkPos – Detect a position error.

z The [Move] commands are deactivated at points where the (base) point type [CP Passing Point] is
set.

Refer to the system flag (#sysFlag35) for the result of the position error check.
Normal: 0
Position Error: 1

Example:
checkPos Perform a position error check.
if If
ld #sysFlag(35) a position error is detected,
then
waitStartBZ sound a buzzer and wait until a start signal comes.
endIf

If a position error is detected, the #sysOut8 ([Position Error]) signal also comes on.

Features II 82 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


LCD, 7SLED

■ Display the Specified Strings on the Teaching Pendant:

clrLCD, clrLineLCD, outLCD, eoutLCD

The following explains how to display/not display entered items on the teaching pendant LCD.

Command Category Command Parameter Job


clrLCD – Clear the LCD display.
clrLineLCD Clear Line Clear the specified line on the LCD display.
Display Line,
Display the entered strings at the specified
LCD Control outLCD Display Column,
position on the LCD display.
Display Data
Display Line, Display the evaluation of the entered string
eoutLCD Display Column, expression at the specified position on the
Display Data LCD display.

z Rows or columns can be specified using variables or expressions. For the eoutLCD command, the
displayed strings can be specified using string expressions.
outLCD 7,4,"PULSE": Display the string PULSE on the teaching pendant LCD.
eoutLCD 7,4,#sv(24) + #sv(25): Display the combined value of the string variables #sv(24) and
#sv(25) on the teaching pendant LCD.

1st Line Run Mode Program Number 1


Test Program
There are 13 lines and 40 Stopping Start Enable
columns on the teaching Cycle Top Point Number 1
pendant LCD.
Up to 40 one-byte characters
(20 double-byte characters)
can be displayed in a row.

13th Line
||||||||||||||||||||
0 40th Column

Features II 83 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Display the Desired Number on the 7SLED: sys7SLED,

out7SLED

z The command explained below is available for the JR2000N and JSR4400N Series only. It is not
available for the JS and JSG Series.

Using the out7SLED command, you can display the desired number on the 7-segment LED (program
number display) on the front of the robot (JR2000N) or the operation box (JSR4400N).
The number display will return to the program number specified by the sys7SLED command.

Command Category Command Parameter Job


Switch the number displayed by the out7SLED
sys7SLED – command to the program number previously
LCD Control,
displayed.
7Seg LED
Output Type
out7SLED Output the specified number to 7-segment LED.
Output Value

Select from the following four output types:

Output Type Description


Num Display the specified number on the 7-segment LED.
Er Display the code Er and the specified number alternately on the 7-segment LED.
St Display the code St and the specified number alternately on the 7-segment LED.
Ur Display the code Ur and the specified number alternately on the 7-segment LED.

The output value can be specified using variables and expressions.

Example:
out7SLED Num,10: Display a numeric value 10.
out7SLED Er,20: Display the code Er and a numeric value 20 alternately.
out7SLED St,nMyNum: Display the code St and a value of the variable nMyNum alternately.

Features II 84 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


COM INPUT/OUTPUT

■ COM Input/Output: outCOM, eoutCOM, inCOM, setWTCOM,


cmpCOM, ecmpCOM, clrCOM, shiftCOM

By point job data commands, data can be input or output from COM.

Command Category Command Parameter Job


outCOM Input/Output, Output DataOutput a character string from COM.
Output an evaluation of the string
eoutCOM Input/Output, Output Data
expression from COM.
Variable Name, Input/Output, Assign the data received on COM to
inCOM
Character Length a specified variable.
Set [Wait Time] (timeout period) for
setWTCOM Input/Output, Wait Time
receiving data on COM.
Compare the received data on COM
with a character string. The result is
COM Input/Output cmpCOM Input/Output, Compare Data
entered into the system flag
(sysFlag1 – 20).
Compare the received data on COM
with a string expression. The result
ecmpCOM Input/Output, Compare Data
is entered into the system flag
(sysFlag1 – 20).
clrCOM Input/Output Clear the COM port receive buffer.
Shift the data received on COM.
shiftCOM Input/Output, Shift Number Delete data from the top by [Shift
Number].

■ COM Output: outCOM, eoutCOM


Up to a 255-character strings can be output from COM.
Select [outCOM] or [eoutCOM] and then select the desired COM port number on the Input/Output
selection screen. The Output Data entry screen will appear. Enter the character string you wish to
output and press the ESC key. (For the key operations on Character entry screen, see “Entering
Characters and Formulas” in the Teaching Pendant Operation manual.) Enclose the character strings
to be output in double quotes (“”) (See e.g.1) When outputting variables and formulas, do not use
double quotes (“”) (See e.g.2)

e.g.1: eoutCOM port2,"ERROR" : Output the character string ERROR.


e.g.2: eoutCOM port2,#sv(24) & #sv(25) : Output a value combining character string variables
#sv(24) and #sv(25).

Features II 85 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


For the eoutCOM command, characters can be specified in hexadecimal code using the % symbol
(See e.g.3) However, if any character other than 0 – 9, A – F, or % comes after the % symbol, the %
symbol is output as a character. (See e.g.4) If you wish to output the % symbol as a character when
any of w0 – 9, A – F come after it, enter two % symbols (%%). (See e.g.5)

e.g.3: eoutCOM port2,"%0D%0A" : Output CR LF codes.


e.g.4: eoutCOM port2,"%G01" : Output a character string %G01.
e.g.5: eoutCOM port2,"%%300" : Output a character string %300.

■ COM Input: inCOM


Received data from COM is assigned to a variable by a specified number of characters. If the
received data is larger than the specified number of characters, characters counted from the top
according to the specified number are assigned.
If the received data is less than the specified number of characters, the robot stands by for the time
specified by the setWTCOM command, and then assigns the received data to a variable. If the
setWTCOM command is not set, the robot stands by for 0.1sec.

z If point job data including any COM input command is set at a [CP Passing Point], the robot stands
by for 0sec to receive data.

■ COM Receive Data Comparison: cmpCOM, ecmpCOM


The COM receive buffer (a place where received data is stored) and a specified character string are
compared one by one starting from the top character. The comparison result is indicated by a system
flag.
In cases when the data and the string are not equal, the comparison is completed, and data is not
received after the specified wait time, the corresponding system flags will be turned on. (See table
below)
You can set a wait time for receiving data using the setWTCOM command. If the setWTCOM
command is not set, the robot stands by for 0.1sec.
When using the ecmpCOM command, a character string compared with a receive buffer can be
specified using a string expression.

System Flags
COM1 COM2 COM3 COM4 (TPU)
Specified Character > Receive Buffer sysFlag(2) sysFlag(7) sysFlag(12) sysFlag(17)
Specified Character = Receive Buffer sysFlag(3) sysFlag(8) sysFlag(13) sysFlag(18)
Specified Character < Receive Buffer sysFlag(4) sysFlag(9) sysFlag(14) sysFlag(19)
Timeout sysFlag(5) sysFlag(10) sysFlag(15) sysFlag(20)

Features II 86 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


*: If point job data including the cmpCOM or
cmpCOM(1)
ecmpCOM command is set at a [CP Passing
Point], the robot stands by for 0sec to receive
X=1 data.

Wait Time* Timeout


(Timeout period)

Received
Turn sysFlag(5) on.

Specified Receive ≠
character buffer
Xth Character : Xth Character


X = X+1 >: Turn sysFlag(2) on.
<: Turn sysFlag(4) on.


X: Specified number
of characters


Turn sysFlag(3) on.

Go to the next
command.

Features II 87 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ COM Receive Wait Time Settings: setWTCOM
You can set the wait time (timeout period) for receiving data for the cmpCOM or ecmpCOM
commands. If no data is received within the specified wait time, it will time out and the corresponding
system flag will be turned on. The default is set to 0.1sec.

■ COM Receive Buffer Clear: clrCOM


The receive buffer is a place where received data is stored. Each COM port has an 8-kbyte receive
buffer. Newly received data will not overwrite the existing data, but will be written after the existing
data.
A receive buffer will be cleared by turning off the power or executing the clrCOM command.

■ Shifting COM Receive Data: shiftCOM


A specified data byte in the receive buffer is deleted.

e.g. 2-byte Shift


Receive Buffer
A B C D E F G H C D E F G H

z You can tell whether the data is stored in each receive buffer by looking at its system flag.
If a receive buffer has received data, a corresponding system flag comes ON.
COM1 COM2 COM3 COM4 (TPU)
With received data sysFlag(1) sysFlag(6) sysFlag(11) sysFlag(16)

Features II 88 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ PC Communication: stopPC, startPC

■ Stopping and Starting COM1 Communication: stopPC, startPC


COM1 is normally used to communicate with a PC. If you wish to connect COM1 to devices to
control the robot using point job commands, instead of communicating with a PC (for C & T data
transmission), it is necessary to stop the PC communication transaction operated by the system.
If the stopPC command is executed, PC communication will not be established unless the power is
turned off or the startPC command is executed.

z The stopPC command disables the C & T data transmission. To connect control devices, we
recommend that you use alternative connectors rather than COM1.

Features II 89 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


VARIABLE, COMMENT, SYSTEM CONTROL

■ Variable Declaration and Assignment: declare, let

A variable that is activated only in point job data containing a declare command and a user-defined
function (defined in the Customizing mode) is referred to as a local variable.
When a local variable is declared, it is necessary to set the variable type and the identifier. The
identifier is used as a variable name and the variable type can be selected from either the numeric
type or the string type.
A local variable can also be declared as an up to three-dimensional array.

The let command assigns the right-hand operand (numeric value, variable value, or evaluation of
string expression) to the left-hand operand. When this command is input, only an expression is
displayed.

Command Category Command Parameter Job


Variable Type,
declare Local variable declaration
Variable, Comment, Variable Name
System Control Assign right-hand operand to the left-hand
let Expression
operand.

e.g. declare command


declare numeric abc Numeric variable abc declaration
declare string def String variable def declaration

e.g. let command


count = 0 Assign 0 to the variable count.
count = count + 1 Add 1 to the variable count.
count = in - out Assigns the difference of the value of out subtracted from
the value of in to the variable count.
total = nin * 365 Assigns the product of 365 multiplied by the value of nin to
the variable total.
tsuki = total / 12 Assigns the quotient of the value of total divided by 12 to
the variable tsuki.
fullname=name1 & name2 Assigns the string composed of name1 and name2 to the
variable fullname.

Features II 90 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Both of the following point job data items use a local variable count, but the two variables do not
interfere with each other since a local variable is activated only in point job data containing a declare
command. For example, if 0 is assigned to the variable count in point job data 24 (or 05), the value of
the variable count in point job data 05 (or 24) will not change.

e.g. Point Job Data 05


declare numeric count Numeric local variable count declaration
count=0 Set the initial value 0 to the variable count.
do Repeat the commands between do and loop.
count=count+1 Add 1 to the variable count.
callJob 24 Execute point job data 24.
if If
ld count>=10 the value of the variable count is larger than 10,
then
exitDo jump to the next command of the loop command.
endIf
loop Return to the do command.

e.g. Point Job Data 24


declare count Local variable count declaration
count=0 Set the initial value 0 to the variable count.
Label 1 Label 1 (jump destination mark)
pulse #genOut11,250 Output (Turn on) a pulse signal to #genOut11.
count=count+1 Add 1 to the variable count.
if If
ld count<=3 the value of the variable count is less than 3,
then
jump L1 jump to Label 1.
endIf

Features II 91 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Comment Insertion: rem, crem

You can add comments to point job data and sequencer data commands.

Command Category Command Parameters Job


Variable, Comment, rem Output Data 1 line comment
System Control crem Output Data End-of-line comment

e.g.
if If
ld #genIn1 #genIn1 is true,
rem #genIn1: Obstacle sensor (#genIn1: Obstacle sensor): Comment
then
waitStartBZ Sound a buzzer and stand by until a start signal comes.

e.g.
if If
ld #genIn1 crem #genIn1: Obstacle #genIn1 is true, (#genIn1:Obstacle sensor): Comment
sensor
then
waitStartBZ Sound a buzzer and stand by until a start signal comes.

z If you are using the teaching pendant, an end-of-line comment made by the crem command will be
displayed in multiple lines as shown above if the comment does not fit into one line.

Features II 92 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Change a Program Number by Point Job: setProgNum

The program number being selected can be changed using point job data commands. This function is
useful in the following cases:

• If you set a setProgNum command to the point job data performed when the power is turned on,
the same program number will always be activated every time the power is turned on.
• If you set a setProgNum command to the point job data performed after a point job at the work
home position, the program number will automatically be changed.
For example, if you wish to repeat Program 1 Æ Program 2 Æ Program 3 as a cycle of operation,
set the setProgNum2 command to the point job data performed after a point job at the work home
position of Program 1. The program number will automatically change to Program 2 after running
Program 1. Accordingly, you can change the program numbers, from 2 to 3 and from 3 to 1.
• If you set a setProgNum command to the point job data performed when the robot is standing by
for a start signal, you can change the program number according to inputs from COM. For example,
if you connect the barcode reader to COM, you can change the program number according to the
barcode.

If you change a program number while running a program, the running program will not be changed
immediately. After the robot runs the current program, the robot stands by for a start signal. Then the
program number is changed when the robot restarts.
Use the callProg command if you wish to execute another program while running a program.

Command Category Command Parameter Job


Variable, Comment, Change the program number when the
setProgNum Program Number
System Control robot restarts running after standing by.

z Program numbers can be specified by variables or expressions.

Features II 93 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


■ Change a Sequencer Number by Point Job: setSeqNum

The selected sequencer number can be changed using point job data commands.
A complicated sequencer data set cannot be created because the number of commands for
sequencer data is limited to up to 100 steps. However, you can create multiple sets of sequencer data
that are performed such as when the power is turned on, the robot is standing by or running programs,
and change the number using the setSeqNum command.
For example, if you set a setSeqNum02 command to [Job on Start of Cycle] ([Job and Sequencer on
Run Mode] menu) and a setSeqNum01 command to [Job on End of Cycle] ([Job and Sequencer on
Run Mode] menu), the sequencer data No. 2 will be executed during operation and the sequencer
data No. 1 will be executed during standby.

If you change the sequencer number while running a program, the running sequencer data will not be
changed immediately. After the robot runs the current program, the robot stands by for a start signal.
The sequencer number is then changed when the robot restarts.

Command Category Command Parameter Job


Variable, Comment, Change the sequencer number when the
setSeqNum Sequencer Number
System Control robot restarts running after standing by.

z Sequencer numbers can be specified using variables or expressions.

Features II 94 JS/JSR4400N SCARA Robot


JSG GANTRY Robot
JR2000N Desktop Robot

Downloaded from www.Manualslib.com manuals search engine


Janome Sewing Machine Co., Ltd.
Industrial Equipment Sales Department
Postal Code: 193-0941
1463 Hazama-machi, Hachioji-shi, Tokyo, Japan
Tel: +81-42-661-6301
Fax: +81-42-661-6302

The specifications of the robot or the contents of this manual may be


modified without prior notice to improve its quality.
No part of this manual may be reproduced in any form, including
photocopying, reprinting, or translation into another language, without the
prior written consent of JANOME.

©2009, JANOME Sewing Machine Co., Ltd., All rights reserved.

970803108 as of 2007-09

8 January 2009

Downloaded from www.Manualslib.com manuals search engine

You might also like