4Software
List of commands 4-87
Pr
og
ra
m contr
o
l
Subroutine
Executes the designated subroutine. (Within program)
GoSub 200
Returns from the subroutine.
Return
Executes the designated program.
CallP "P10",M1,P1
Defines the program argument executed with the CALLP command.
FPrm M10,P10
Executes the subroutine corresponding to the designated expression value.
On M1 GOSUB 100,200,300
Interrupt
Defines the interrupt conditions and process.
Def Act 1, M1=1 GOTO 100
Enables/disables the interrupt.
Act 1=1
Defines the start line of the program to be executed when an interrupt is
generated from the communication line.
On Com(1) GOSUB 100
Enables the interrupt from the communication line.
Com(1) ON
Disables the interrupt from the communication line.
Com(1) OFF
Stops the interrupt from the communication line.
Com(1) STOP
Wait
Designates the wait time, and the output signal pulse output time. (0.01s
unit)
Dly 0.5
Waits until the variable becomes the designated value.
Wait M_IN(1)=1
Stop
Stops the program execution.
Hlt
Generates an error. During program execution, continue, stop or servo OFF
can be designated.
Error 9000
End
Ends the program execution.
End
Ha
n
d
Hand open
Opens the designated hand.
HOpen 1
Hand close
Closes the designated hand.
HClose 1
Inpu
t/ou
tput
Assignment
Defines the input/output variables.
Def IO PORT1=BIT,0
Input
Retrieves the general-purpose input signal.
M1=M_IN (1)
Output
Calls out the general-purpose output signal.
M_Out(1) =0
Parallel execution
Mechanism designa
-
tion
Acquires the mechanism with the designated mechanism No.
GetM 1
Releases the mechanism with the designated mechanism No.
RelM 1
Selection
Selects the designated program for the designated slot.
XLoad 2,"P102"
Start/stop
Carries out parallel execution of the designated program.
XRun 3,"100",0
Stops parallel execution of the designated program.
XStp 3
Returns the designated program's execution line to the head and enters the
program selection enabled state.
XRst 3
Others
Definition
Defines the integer type or real number type variable.
Def Inte KAISUU
Defines the character string variable.
Def Char MESSAGE
efines the layout variable. (Up to 3-dimensional possible)
Dim PDATA(2,3)
Defines the joint variable.
Def Jnt TAIHI
Defines the position variable.
Def Pos TORU
Defines the function.
Def FN TASU(A,B)=A+B
Clear
Clears the general-purpose output signal, variables in program, variables
between programs, etc.
Clr 1
File
Opens a file.
Open "COM1:" AS #1
Closes a file.
Close #1
Inputs data from a file.
Input# 1,M1
Outputs data to a file.
Print# 1,M1
Comment
Describes a comment.
Rem "ABC"
Label
Indicates the branching destination.
*SUB1
Type
Class
Function
Input format (example)