Commands


You can use spc_request_dev or spc_request_sys function when setting or using a smart expansion board.

spc_request_dev($sid, $cmd)
spc_request_sys($sid, $cmd)

Common Commands of Smart Expansion Boards

Common commands can be used with spc_request_sys function and a list of the commands is as follows:

Command Option Description
get did get a device ID
get uid get a unique ID

PES-2403 Commands

Dedicated commands for each smart expansion board can be used with spc_request_dev.
A list of dedicated commands for PES-2403 is as follows:

cmd arg1 arg2 arg3 arg4
set mode full - -
half - -
vref stop (0~15) -
drive (0~15) -
lock (0~15) -
rsnc (low_pps) (high_pps)
speed (pps) - -
accel (accel) [decel] -
pos (-1000000000 ~ +1000000000) - -
get state - - -
pos - - -
move step [speed] [accel] [decel]
goto pos [spped] [accel] [decel]
sw(0~3) [speed] [accel] [decel]
stop [decel] - - -
eio get (0~3) - -
set (0~3) mode input
lock

※ (): mandatory, []: optional