Ctrl Command stepper_init
Function
initializes a stepper motor.
Call
stepper_init( No, Period, Dir, Pos, Tol, Enable, WaitTime )
Parameters
No
Period
Dir
Pos
Tol
Enable
WaitTime
®
RTC
5 PC Interface Board
Rev. 1.9 e
10 Commands And Functions
Number of the stepper motor output as an unsigned 32-bit value;
allowed values:
= 1:
Stepper motor output 1
= 2:
Stepper motor output 2
If the value is invalid, then the command won't execute
code: RTC5_PARAM_ERROR).
Pulse period of the CLOCK signal as an unsigned 32-bit value.
1 bit equals 10 µs.
24
allowed range: [0 ... +(2
If Period = 0, then no reference movement is performed and the function
immediately returns (see comments).
Direction of stepper motor motion during the reference movement as a
signed 32-bit value; allowed range: [–2
> 0:
The DIRECTION signal gets set; during the reference movement the
internal position variable increments.
= 0:
The DIRECTION signal gets reset; during the reference movement the
internal position variable decrements.
< 0:
The DIRECTION signal remains unchanged, no reference movement is
performed and the function immediately returns.
New values for position variable and set position in CLOCK pulse units as a
signed 32-bit value (see comments); allowed range: [–2
Tolerance for the reference movement (see comments) as an unsigned 32-bit
value; allowed range: [1 ... +(2
If Dir < 0 and/or Period = 0, then the value Tol = 0 is irrelevant, otherwise
Tol = 0 causes the command not to execute
RTC5_PARAM_ERROR).
ENABLE signal as an unsigned 32-bit value;
32
allowed range: [0 ... +(2
= 0:
The ENABLE signal will be reset.
> 0:
The ENABLE signal will be set.
This parameter (an unsigned 32-bit value) defines when the command, at the
latest, will return (see comments)
1 bit equals 1 s. Allowed range: [0 ... +(2
-1)]; larger values will be clipped.
31
31
... +(2
-1)]:
32
-1)]
(get_last_error
-1)]:
32
-1)]
(get_last_error
return
31
31
... +(2
-1)]
return code:
518
Need help?
Do you have a question about the RTC 5 PC Interface Board and is the answer not in the manual?