Manual Braço Robótico Janome
Manual Braço Robótico Janome
JS/JSR4400N/JSG Series
JANOME DESKTOP ROBOT
JR2000N Series
Operation Manual
Features II
(Variables/Commands/Functions)
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.
Features II
EXPRESSION STRUCTURE_______________________________________________________ 1
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
CONDITION ___________________________________________________________________ 49
Condition Settings: ld, ldi, and, ani, or, ori, anb, orb ___________________________________ 49
MOVE________________________________________________________________________ 77
Move the Z-Axis Alone: upZ, downZ, movetoZ_______________________________________ 77
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
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.
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
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.
1. Expressions in brackets
2. Functions and variables
3. “Independent” + and -
4. * and /
5. +, -, and &
6. >, >=, =>, =<, <=, <, <>, and >< (Relational operator)
7. = (Assignment operator)
If you assign point job data that includes any of the highlighted ( ) commands
to a CP passing point, the commands will be ignored.
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
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
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)
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.
Sequencer
Category
nop – No operation
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
*: Variables which hold their values even if the robot is turned off are collectively referred to as
keeping variables in the operation manuals.
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.)
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
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)
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.
z Boolean type free variables, #mv (1 – 99) and #mv (1 – 99), can also be used in sequencer
programs
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.
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.
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).
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).
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
P1
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:
To P3
P2-1(P0) P2-2
P2-5 ●
P1
● P2-12
P2-11
These numeric variables hold the adjustment amount and rotation adjustment amount of each Axis in
additional function data [Workpiece Adjustment].
In this example, the [Workpiece Adjustment] is [6] and the tool unit is connected according to the
following settings:
P3 P3
CP End Point CP End Point
P1 P1
Workpiece adjustment amount
z The [Workpiece Adjustment] set to a [CP Start Point] point is activated until the tool unit reaches a
[CP End Point] point.
#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).
Passes P3.
Reaches P4.
Moving] (set to P2).
Repeats [Job while CP
(set to P2).
Repeats [Job while Moving]
#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.
#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.
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:
• 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)
• 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)
• 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].
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
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.
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.
I/O-SYS
The output commands to open and close the hand tool are as follows:
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
#genOut1 #genOut1
#genOut2 #genOut2
#genOut3 #genOut3
z You can set the pulse width for the pulse and invPulse commands using variables or expressions.
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.
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:
0.1sec 0.1sec
1 1 2
2 3
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.
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.
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.
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.
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.
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).
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.
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.
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.
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
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
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].
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 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.
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.
■ 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].
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.
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).
z When there is no Id or Idi corresponding anb or orb, the error message [Error on Point Job] is
displayed.
This section explains the point job data command for controlling time delay.
z The delay command is deactivated at points where the (base) point type [CP Passing Point] is set.
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
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.
This section explains the point job data commands to stop the robot until a start signal comes.
z The waitStart and waitStartBZ commands are deactivated at points where the (base) point type
[CP Passing Point] is set.
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
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
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.
Status of I/O-1
#genIn3 #genIn4 #genIn5 #genIn6 #genIn7 #genIn8 #genIn9 #genIn10
OFF OFF OFF ON OFF OFF ON OFF
Input width: 8
z The input width ([Input Bit No.]) can be set up to [31]. However, different types of I/O pins cannot
be combined.
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.
To P3
P2 (P2-1) P2-4
P1 P2-5 ~ P2-8
P2-9 ~ Pallet Routine Type: Plane Pallet
To P3
The following three commands are used for [Increment by Point Job]:
The following two variables can also be used to control the pallet:
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:
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].
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.
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)
(Point Job Data 7) (Point job set under the user-defined point type)
callBase
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.
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.
z The callJob command is deactivated at points where the (base) point type [CP Passing Point] is
set.
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.
callJob
callJob
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.
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).
While performing a point job, another program can be called and executed as a 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
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
• 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.)
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.
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.
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.
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
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.
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
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
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)
Assign the value of the specified expression as a returned value and end the function.
The return value of the function radians for an argument x is displayed on the teaching pendant LCD.
The following explains how to jump to a specified point after carrying out a point job instead of going to
the next point.
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.
[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:
P1 P2 P3 P4 P5 P6
CP Start Point
CP Stop Point
CP Stop Point
CP Stop Point
CP End Point
CP Start Point
Example
If #genIn2 is ON, sound the buzzer and
stand by until a start signal comes. Label 1
#genIn2==ON
z The Label command cannot be set between if … endIf or waitCondTime … endWait command
lines.
■ do … exitDo … loop
The do … exitDo … loop command lines are repeated until the exitDo command exists.
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.
Only the Z-Axis can be raised or lowered using point job data. These commands belong to the [Move]
command category.
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.
Workpiece
Conveyor Belt
Sensor
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
P1
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.
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
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.
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.
z The [Move] commands are deactivated at points where the (base) point type [CP Passing Point] is
set.
z The command explained below is available for the JR2000N Series only. It is not available for the
JSR4400N, JS, and JSG Series.
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.
The following explains how to display/not display entered items on the teaching pendant LCD.
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.
13th Line
||||||||||||||||||||
0 40th Column
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.
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.
By point job data commands, data can be input or output from COM.
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.
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)
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.
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)
z The stopPC command disables the C & T data transmission. To connect control devices, we
recommend that you use alternative connectors rather than COM1.
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.
You can add comments to point job data and sequencer data commands.
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.
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.
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.
970803108 as of 2007-09
8 January 2009