Commands


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

spc_request($sid, 6, $wbuf)
spc_request($sid, 7, $rbuf)
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-2407 Commands

Dedicated commands for each smart expansion board can be used with spc_request and spc_request_dev. The spc_request function is used for sending and receiving data, and the spc_request_dev function is used for setting and checking status.

The list of PES-2407 commands is as follows:

cmd arg1 arg2 arg3
set uart (parameters) -
count (counter) (value)
ifg (bits) -
ifd (del) -
(start_del) (end_del)
- -
txdelay (bits) -
break (time) -
get uart - -
count (counter) -
rxlen [del] -
txfree - -
rxbuf - -
txbuf - -
ifg - -
ifd - -
txdelay - -

※ (): mandatory, []: optional