类和功能


为了使用此扩展板使用PHPoC Expansion数据库的ExpansionStepper

成员函数

ExpansionStepper class可使用的函数如下。

成员函数 说明
int getPID(void) get the product's ID
char *getName(void) get the product's name
ExpansionStepper(int sid) create an instance of a motor port
void reset(void) stop a motor and initialize settings
void setMode(int mode) set a division rate
void setVrefStop(int vref) set a current limiting of stop state
void setVrefDrive(int vref) set a current limiting of run state
void setVrefLock(int vref) set a current limiting of lock state
void setResonance(int low, int high) set a resonance range
void setSpeed(long speed) set a speed
void setAccel(long accel) set accelration and deceleration
void setPosition(long pos) set a counter position
int getState(void) get operation states
long getPosition(void) get a counter position
void stepMove(long step) drive a motor based on the initial position
void stepGoto(long pos) drive a motor based on the current position
void stepGotoSW(int id, int dir) drive a motor for initial positioning
void stop(long decel = -1) stop a motor
void setEioMode(int id, int mode) set digital input ports
int getEio(int id) get a state of digital input ports