EasyManuals Logo

Omron TJ2-MC64 - PROGRAMMING User Manual

Omron TJ2-MC64 - PROGRAMMING
362 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #107 background imageLoading...
Page #107 background image
BASIC commands
PROGRAMMING MANUAL 101
Revision 1.0
3.2.135 FORCE_SPEED
/i
Syntax FOR variable = start TO end [STEP increment]
commands
NEXT variable
Description The FOR ... NEXT loop allows the program segment between the FOR and
the NEXT statement to be repeated a number of times.
On entering this loop, the variable is initialized to the value of start and the
block of commands is then executed. Upon reaching the NEXT command, the
variable is increased by the increment specified after STEP. The STEP value
can be positive or negative, if omitted the value is assumed to be 1.
While variable is less than or equal to end, the block of commands is repeat-
edly executed until variable is greater than end, at which time program execu-
tion will continue after NEXT.
Note: FOR ... NEXT statements can be nested up to 8 levels deep in a BASIC
program.
Arguments variable
Any valid BASIC expression.
start
Any valid BASIC expression.
end
Any valid BASIC expression.
increment
Any valid BASIC expression.
commands
One or more BASIC commands.
Example FOR opnum = 8 TO 13
OP(opnum,ON)
NEXT opnum
This loop turns on outputs 8 to 13.
Example loop:
FOR dist = 5 TO -5 STEP -0.25
MOVEABS(dist)
GOSUB pick_up
NEXT dist
The STEP increment can be positive or negative.
Example loop1:
FOR l1 = 1 TO 8
loop2:
FOR l2 = 1 TO 6
MOVEABS(l1*100,l2*100)
GOSUB 1000
NEXT l2
NEXT l1
FOR..TO..STEP..NEXT statements can be nested (up to 8 levels deep) pro-
vided the inner FOR and NEXT commands are both within the outer
FOR..TO..STEP..NEXT loop.
See also REPEAT..UNTIL, WHILE..WEND.
Type Axis parameter
Syntax FORCE_SPEED = value
Description The FORCE_SPEED parameter is used to directly control the speed when
forced speed moves (MOVESP, MOVEABSSP, MOVECIRCSP,
MHELICALSP) are loaded. The FORCE_SPEED parameter should be set to
the required value at the time of loading the move into the buffer.
If two forced speed move types are merged, the speed at the merge point is
controlled by the ENDMOVE_SPEED of the outgoing move. If a forced speed
move follows one or more non-forced speed moves the deceleration will
occur to the FORCE_SPEED of the incoming move.
Arguments N/A
Example FORCE_SPEED=2000
See also MOVESP, ENDMOVE_SPEED

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron TJ2-MC64 - PROGRAMMING and is the answer not in the manual?

Omron TJ2-MC64 - PROGRAMMING Specifications

General IconGeneral
BrandOmron
ModelTJ2-MC64 - PROGRAMMING
CategoryController
LanguageEnglish

Related product manuals