BASIC commands
PROGRAMMING MANUAL
140
Revi
si
on 3.0
3.2.248 SQR
/i
3.2.249 SRAMP
/i
3.2.250 STEP
See
FOR..TO..STEP..NEXT
.
3.2.251 STEP_RATIO
/i
Type
Mathematical function
Syntax
SQR(expression)
Description
The
SQR
function returns the square root of the expression. The expression
must have positive (including 0) value.
Arguments
•
expression
Any valid BASIC expression.
Example
>> PRINT SQR(4)
2.0000
See also
N/A
Type
Axis parameter
Syntax
SRAMP
Description
The
SRAMP
parameter contains the S-curve factor. The S-curve factor con-
trols the amount of rounding applied to the trapezoidal profiles. A value of 0
sets no rounding. A value of 10 sets maximum rounding. The default value of
the parameter is 0.
SRAMP
is applied to the
FORWARD
,
MOVE
,
MOVEABS
,
MOVECIRC
,
MHELICAL
and
REVERSE
commands.
Notes:
•
Using S-curves increases the time required for the movement to com-
plete.
•
The S-curve factor must not be changed while a move is in progress.
Arguments
N/A
Example
No example.
See also
AXIS
.
Type
Axis command
Syntax
STEP_RATIO(output_count, dpos_count)
Description
This command sets up a ratio for the output of the axis stepper. Every servo-
period the number of steps is passed through the
STEP_RATIO
function
before it goes to the step pulse output.
Pulse Count Out = (numerator)/(denominator) *
MPOS
.
STEP_RATIO
affects both
MOVECIRC
and
CAMBOX
.
Notes:
•
The
STEP_RATIO
function operates before the divide by 16 factor in the
stepper axis.
•
Large ratios should be avoided as they will lead to either loss of resolu-
tion or much reduced smoothness in the motion. The actual physical step
size x 16 is the BASIC resolution of the axis and use of this command
may reduce the ability of the Motion Controller to accurately achieve all
positions.
•
STEP_RATIO
does not replace
UNITS
. Do not use
STEP_RATIO
to
remove the x16 factor on the stepper axis as this will lead to poor step
frequency control.
Arguments
•
denominator
An integer number between 0 and 16777215 that is used to define the
denominator in the above equation.
•
numerator
An integer number between 0 and 16777215 that is used to define the
numerator in the above equation.
I52E-EN-03.book Seite 140 Freitag, 29. Juni 2007 11:55 11