...
File | motorcontrol.c | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Function | ER motor_GetRegister(unsigned short dataAddr, long *value); | |||||||||||
Example | The example below is used by modbus to read a specific register
|
Testing the Motor
The motor can be controlled to target positions by setting the following in the MotorControlStruct passed.
Variable | Description |
---|---|
MotionGenerator | Sets the motion control type. 0 - no motion type |
TargetPos | Set the target position in a position control move. Example: TargetPos=1000 will set the target position to 1000 counts. Typically the resolution is 1000 counts/re |
long TargetPos; long TargetSpeed; short TargetTorque; unsigned short TargetAcc; unsigned short TargetDec; unsigned char ControlWord; unsigned char MotionGenerator;