4.10. Collection of Function Commands
4.10. Collection of Function Commands
The operations that can be executed in a ROBCAD simulation are limited. Only some of the various HR-BASIC operations used in Hi5 controller are supported.
The list of supported functions is shown in [Table 4-2].
Table 4‑2 Function command and the list of corresponding function codes
Function | Function command | |
DO signal output (Digital Out) | DO?={1-0} | |
GO signal output (Group Out) | GO?={0-255} GO?={&B00000001-&B10000000} | |
DI signal input (Digital Input) | WAIT DI? WAIT DI?,{0-60.0},{loc} WAIT DI?,{0-60.0},{loc},{func.no} | |
Jump | GOTO {loc} [,{func no.}] | |
Call | GOSUB {loc} [,{func no.}] | |
Return | RETURN | |
Program call | CALL {1-999} | |
Program jump | JMPP {1-999} | |
Robot stop | STOP | |
Work end | END | |
Conditional statement | Single IF | IF DI?={0-1} THEN {loc.} [ELSE {loc.}] IF GI?={0-255} THEN {loc.} [ELSE {loc.}] IF _RN?={0-255} THEN {loc.} [ELSE {loc.}] |
Complex IF | IF DI?={0-1} THEN {CALL statement} or {JMPP statement} or {DELAY statement} or {STOP statement} or {END statement} ENDIF | |
OR, IF GI?={0-255} THEN OR, IF _RN?={0-255} THEN | ||
Iteration statement | FOR ~NEXT | FOR V{1-400}%={0-30000} TO {0-30000} {step or functions} NEXT |
Time delay | DELAY {1.0-60.0} | |
Spot welding condition | SPOTCND {0-255} | |
Servo gun search | GUNSEA {1-2},{1-2},{50-999} | |
Retrieval register value setting | _RN?={0-255} | |
Retrieval register value increase | _RN?=_RN?+1 | |
Comment | ' {comment} |
Unlike HR-BASIC, only CALL statement, JMPP statement, DELAY statement, STOP statement and END statement can be used in a complex IF block.
Only constant variable “V1%~V400%” can be used for an index variable of the FOR statement. Only a constant can be used for initial value and end value.
Another FOR~NEXT can be nested inside a FOR~NEXT, but no more than 4 layers can be nested in this manner