User manual

Table Of Contents
DELIB API reference |
Seite 160
4.7.1.15. DAPI_STEPPER_CMD_GO_REFSWITCH
Description
The motor goes to the referece position.
Definition
DapiStepperCommand(handle, motor, DAPI_STEPPER_CMD_GO_REFSWITCH,
par1, par2, par3, 0);
Parameters
Values for par1: (if multiple are needed, the individual must be added)
DAPI_STEPPER_GO_REFSWITCH_PAR_REF1
DAPI_STEPPER_GO_REFSWITCH_PAR_REF2
DAPI_STEPPER_GO_REFSWITCH_PAR_REF_LEFT
DAPI_STEPPER_GO_REFSWITCH_PAR_REF_RIGHT
DAPI_STEPPER_GO_REFSWITCH_PAR_REF_GO_POSITIVE
DAPI_STEPPER_GO_REFSWITCH_PAR_REF_GO_NEGATIVE
DAPI_STEPPER_GO_REFSWITCH_PAR_SET_POS_0
par2=Motorpositionsoffset (1/16 Full-step)
par3=Timeout [ms]
Remarks
At first the motor goes to referenceposition 1 or 2 (see par1). Therefor the speed
GOREFERENCEFREQUENCY_TOENDSWITCH is used for (see
DapiStepperCommand_SetMotorcharacteristic). After this the motor goes with
the speed GOREFERENCEFREQUENCY_AFTERENDSWITCH out of the
Referenceposition.
If there is declaration of an offset as parameter (par2), the motor will go to this
offset with the speed GOREFERENCEFREQUENCY_TOOFFSET
Example program
DapiStepperCommand(handle, motor, DAPI_STEPPER_CMD_GO_REFSWITCH,
DAPI_STEPPER_GO_REFSWITCH_PAR_REF1 + DAPI_STEPPER_GO_REFSWITCH_PAR_REF_LEFT +
DAPI_STEPPER_GO_REFSWITCH_PAR_REF_GO_POSITIVE +
DAPI_STEPPER_GO_REFSWITCH_PAR_SET_POS_0, 0, 15000, 0);