EDrive-ST

Device pinout

EDriveST

API function description

class pywpc.EDriveST
  1. 2-phase stepper motor

  2. 51, 200 steps/revolution

  3. 36v maximum power supply

  4. 2.1A maximum output current

  5. 5A maximum peak current

  6. Limit Switches: FWD, REV

  7. Encoder: ABZ (Nominal: 8MHz)

  8. Stall detection/intelligent energy-saving/diagnostic functions

  9. 8-points ramp for smooth acceleration

Motion_cfgAxisDirection(port, axis_dir, timeout=3)

Configure axis direction.

Parameters
portint

Port number. See here for available ports of different WPC devices.

axis_dirint

Set the dirction for the axis. 0: Original direction, 1: Inverse direction.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_cfgAxisDirection_async(port, axis_dir)

Configure axis direction with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

axis_dirint

Set the dirction for the axis. 0: Original direction, 1: Inverse direction.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_cfgEncoder(port, encoder_dir, encoder_posi, timeout=3)

Configure encoder direction and position.

Parameters
portint

Port number. See here for available ports of different WPC devices.

encoder_dirint

Set the dirction for the encoder. 0: Original direction, 1: Inverse direction.

encoder_posiint

Set the position for the encoder.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_cfgEncoder_async(port, encoder_dir, encoder_posi)

Configure encoder direction and position with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

encoder_dirint

Set the dirction for the encoder. 0: Original direction, 1: Inverse direction.

encoder_posiint

The value of encoder position.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_cfgLimit(port, en_forward, en_reverse, limit_polarity, timeout=3)

Configure limit enable and polarity.

Parameters
portint

Port number. See here for available ports of different WPC devices.

en_forward{0, 1}

Prevent mechanical components from exceeding specified boundaries or not. 0: False, 1: True.

en_reverse{0, 1}

Prevent mechanical components from exceeding specified boundaries or not. 0: False, 1: True.

limit_polarity{0, 1}

Set the polarity for limit. 0: Active Low, 1: Active High.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_cfgLimit_async(port, en_forward, en_reverse, limit_polarity)

Configure limit enable and polarity with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

en_forward{0, 1}

Prevent mechanical components from exceeding specified boundaries or not. 0: False, 1: True.

en_reverse{0, 1}

Prevent mechanical components from exceeding specified boundaries or not. 0: False, 1: True.

limit_polarity{0, 1}

Set the polarity for limit. 0: Active Low, 1: Active High.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_close(port, timeout=3)

Close motion module on a given port.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_close_async(port)

Close motion module on a given port with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_enableServoOff(port, timeout=3)

Servo off the singal.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_enableServoOff_async(port)

Servo off the singal with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_enableServoOn(port, timeout=3)

Servo on the singal.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_enableServoOn_async(port)

Servo on the singal with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_getAlarmStatus(port, timeout=3)

Get the alarm status.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

The alarm status

async Motion_getAlarmStatus_async(port)

Get the alarm status with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

The alarm status

Motion_getLimitStatus(port, timeout=3)

Read the instantaneous status of the hardware limit inputs.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statuslist

List of forward, reverse and home limit status.

async Motion_getLimitStatus_async(port)

Read the instantaneous status of the hardware limit inputs with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statuslist

List of forward, reverse and home limit status.

Motion_getParameters(port, timeout=3)

Get module parameters on a given port.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_getProcessState(port, timeout=3)

Get process state on a given port.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

0: Idle or finished. Others: Still running.

async Motion_getProcessState_async(port)

Get process state on a given port with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

0: Idle or finished others: Still runnung

Motion_loadCfgFile(timeout=3)

Load motion parameters from configuration file.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_loadCfgFile_async()

Load motion parameters from configuration file with async mode.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_open(port, timeout=3)

Open motion module on a given port.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_openCfgFile(filename='test.ini')

Open configuration file.

Parameters
filenamestr

The file name.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_openCfgFile_async(filename='test.ini')

Open configuration file with async mode.

Parameters
filenamestr

The file name.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_open_async(port)

Open motion module on a given port with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_readCurrentVelocity(port, timeout=3)

Read current veloicty.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Current velocity

async Motion_readCurrentVelocity_async(port)

Read current veloicty with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

Current velocity

Motion_readEncoderPosition(port, timeout=3)

Read encoder position.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statuslist of position

position[0] : encoder position position[1] : logical position

async Motion_readEncoderPosition_async(port)

Read encoder position with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statuslist of position

position[0] : encoder position position[1] : logical position

Motion_resetFactory(port, timeout=3)

Reset factory on a given port.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_resetFactory_async(port)

Reset factory on a given port with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_rstEncoderPosi(port, encoder_posi=0, timeout=3)

Reset the position of an encoder.

Parameters
portint

Port number. See here for available ports of different WPC devices.

encoder_posiint

The value of encoder position.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_rstEncoderPosi_async(port, encoder_posi=0)

Reset the position of an encoder with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

encoder_posiint

The value of encoder position.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_saveCfgFile()

Save motion parameters into configuration file.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_saveCfgFile_async()

Save motion parameters into configuration file with async mode.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_startFindHome(port, searching_speed, approaching_speed, acceleration, search_direction, approach_direction, offset, reset_position, timeout=3)

Start find home.

Parameters
portint

Port number. See here for available ports of different WPC devices.

modeint

1: forward, -1: reverse.

searching_speedint

Set velocity in counts/s or steps/s.

approaching_speedint

Set velocity in counts/s or steps/s.

accelerationint

Acceleration value in counts/s2 or steps/s2.

search_directionint

1: pointing to forward, -1: pointing to reverse.

approach_directionint

1: pointing to forward, -1: pointing to reverse.

offsetint

Performs an offset move of a given distance, in counts (steps), after successfully locating the given reference, but before resetting the position if a reset is requested.

reset_position: bool

True or false to reset the position.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_startFindHome_async(port, searching_speed, approaching_speed, acceleration, search_direction, approach_direction, offset, reset_position)

Start find home with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

modeint

1: forward, -1: reverse.

searching_speedint

Set velocity in counts/s or steps/s.

approaching_speedint

Set velocity in counts/s or steps/s.

accelerationint

Acceleration value in counts/s2 or steps/s2.

search_directionint

1: pointing to forward, -1: pointing to reverse.

approach_directionint

1: pointing to forward, -1: pointing to reverse.

offsetint

Performs an offset move of a given distance, in counts (steps), after successfully locating the given reference, but before resetting the position if a reset is requested.

reset_position: bool

True or false to reset the position.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_startFindLimit(port, mode, searching_speed, approaching_speed, acceleration, offset, reset_position, timeout=3)

Start find limit.

Parameters
portint

Port number. See here for available ports of different WPC devices.

modeint

1: forward, -1: reverse.

searching_speedint

Set velocity in counts/s or steps/s.

approaching_speedint

Set velocity in counts/s or steps/s.

accelerationint

Acceleration value in counts/s2 or steps/s2.

offsetint

Performs an offset move of a given distance, in counts (steps), after successfully locating the given reference, but before resetting the position if a reset is requested.

reset_position: bool

True or false to reset the position.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_startFindLimit_async(port, mode, searching_speed, approaching_speed, acceleration, offset, reset_position)

Start find limit with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

modeint

1: forward, -1: reverse.

searching_speedint

Set velocity in counts/s or steps/s.

approaching_speedint

Set velocity in counts/s or steps/s.

accelerationint

Acceleration value in counts/s2 or steps/s2.

offsetint

Performs an offset move of a given distance, in counts (steps), after successfully locating the given reference, but before resetting the position if a reset is requested.

reset_position: bool

True or false to reset the position.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_startFindZPolarity(port, searching_speed, approaching_speed, acceleration, search_direction, approach_direction, offset, reset_position, timeout=3)

Start find Z polarity.

Parameters
portint

Port number. See here for available ports of different WPC devices.

modeint

1: forward, -1: reverse.

searching_speedint

Set velocity in counts/s or steps/s.

approaching_speedint

Set velocity in counts/s or steps/s.

accelerationint

Acceleration value in counts/s2 or steps/s2.

search_directionint

1: pointing to forward, -1: pointing to reverse.

approach_directionint

1: pointing to forward, -1: pointing to reverse.

offsetint

Performs an offset move of a given distance, in counts (steps), after successfully locating the given reference, but before resetting the position if a reset is requested.

reset_position: bool

True or false to reset the position.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_startFindZPolarity_async(port, searching_speed, approaching_speed, acceleration, search_direction, approach_direction, offset, reset_position)

Start find Z polarity with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

modeint

1: forward, -1: reverse.

searching_speedint

Set velocity in counts/s or steps/s.

approaching_speedint

Set velocity in counts/s or steps/s.

accelerationint

Acceleration value in counts/s2 or steps/s2.

search_directionint

1: pointing to forward, -1: pointing to reverse.

approach_directionint

1: pointing to forward, -1: pointing to reverse.

offsetint

Performs an offset move of a given distance, in counts (steps), after successfully locating the given reference, but before resetting the position if a reset is requested.

reset_position: bool

True or false to reset the position.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_startPositionMove(port, position, speed, acceleration, deceleration, mode, timeout=3)

Start position move.

Parameters
portint

Port number. See here for available ports of different WPC devices.

positionint

Target position in counts or steps.

speedint

Speed vector of move.

accelerationint

Acceleration value in counts/s2 or steps/s2.

decelerationint

Deceleration value in counts/s2 or steps/s2.

modeint

0: absolute, 1: relative.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_startPositionMove_async(port, position, speed, acceleration, deceleration, mode)

Start position move with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

positionint

Target position in counts or steps.

speedint

Speed vector of move.

accelerationint

Acceleration value in counts/s2 or steps/s2.

decelerationint

Deceleration value in counts/s2 or steps/s2.

modeint

0: absolute, 1: relative.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_startScanMove(port, position_0, position_1, speed, acceleration, timeout=3)

Start scan move.

Parameters
portint

Port number. See here for available ports of different WPC devices.

position_0int

Target position in counts or steps.

position_1int

Target position in counts or steps.

speedint

Speed vector of move.

accelerationint

Acceleration value in counts/s2 or steps/s2.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_startScanMove_async(port, position_0, position_1, speed, acceleration)

Start scan move with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

position_0int

Target position in counts or steps.

position_1int

Target position in counts or steps.

speedint

Speed vector of move.

accelerationint

Acceleration value in counts/s2 or steps/s2.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_startVelocticyMove(port, speed, dir, acceleration, deceleration, timeout=3)

Start velocity move.

Parameters
portint

Port number. See here for available ports of different WPC devices.

speedint

Speed vector of move.

dirint

1: pointing to forward, -1: pointing to reverse.

accelerationint

Acceleration value in counts/s2 or steps/s2.

decelerationint

Deceleration value in counts/s2 or steps/s2.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_startVelocticyMove_async(port, speed, dir, acceleration, deceleration)

Start velocity move with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

speedint

Speed vector of move.

dirint

1: pointing to forward, -1: pointing to reverse.

accelerationint

Acceleration value in counts/s2 or steps/s2.

decelerationint

Deceleration value in counts/s2 or steps/s2.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Motion_stopProcess(port, timeout=3)

Stop process on a given port.

Parameters
portint

Port number. See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Motion_stopProcess_async(port)

Stop process on a given port with async mode.

Parameters
portint

Port number. See here for available ports of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Net_getGateway(timeout=3)

Get geteway from the connected web device.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
gatewaystr of 4 int separated by period.

Network gateway.

async Net_getGateway_async()

Get geteway from the connected web device with async mode.

Returns
gatewaystr of 4 int separated by period.

Network gateway.

Net_getIPAddrAndSubmask(timeout=3)

Get IP address and subnet mask from the connected web device.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
network_infolist of 2 str.
  • network_info[0]: IP address

  • network_info[1]: subnet mask

async Net_getIPAddrAndSubmask_async()

Get IP address and subnet mask from the connected web device with async mode.

Returns
network_infolist of 2 str.
  • network_info[0]: IP address

  • network_info[1]: subnet mask

Net_getMACAddr(timeout=3)

Get MAC address from the connected web device.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
mac_addrstr of 6 int separated by colon.

MAC address.

async Net_getMACAddr_async()

Get MAC address from the connected web device with async mode.

Returns
mac_addrstr of 6 int separated by colon.

MAC address.

Net_setIPAddrAndSubmask(ip_addr, subnet_mask='255.255.255.0', timeout=3)

Set IP address and subnet mask to the connected web device.

Parameters
ip_addrstr of 4 int separated by period.

IP network address.

subnet_maskstr of 4 int separated by period.

Subnet mask. (default: “255.255.255.0”)

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Net_setIPAddrAndSubmask_async(ip_addr, subnet_mask='255.255.255.0')

Set IP address and subnet mask to the connected web device with async mode.

Parameters
ip_addrstr of 4 int separated by period.

IP network address.

subnet_maskstr of 4 int separated by period.

Subnet mask. (default: “255.255.255.0”)

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

SNTP_getPeriod(timeout=3)

Get the SNTP period.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
periodfloat

Period of synchronization in [sec].

async SNTP_getPeriod_async()

Get the SNTP period with async mode.

Returns
periodfloat

Period of synchronization in [sec].

SNTP_getServerIP(timeout=3)

Get the SNTP server IP.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
IPstr of 4 int separated by period.

IP address of the target SNTP server; 255.255.255.255 means automatic search.

async SNTP_getServerIP_async()

Get the SNTP server IP with async mode.

Returns
IPstr of 4 int separated by period.

IP address of the target SNTP server; 255.255.255.255 means automatic search.

SNTP_getSyncStatus(timeout=3)

Get the SNTP status.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
IPstr of 4 int separated by period.

IP address of the connected SNTP server; 0.0.0.0 means no server is reachable.

async SNTP_getSyncStatus_async()

Get the SNTP status with async mode.

Returns
IPstr of 4 int separated by period.

IP address of the connected SNTP server; 0.0.0.0 means no server is reachable.

SNTP_setPeriod(period, timeout=3)

Set the SNTP period.

Parameters
periodfloat

Period of synchronization in [sec].

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async SNTP_setPeriod_async(period)

Set the SNTP period with async mode.

Parameters
periodfloat

Period of synchronization in [sec].

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

SNTP_setServerIP(ip_addr='255.255.255.255', timeout=3)

Set the SNTP server IP.

Parameters
ip_addrstr of 4 int separated by period.

IP address of the target SNTP server; 255.255.255.255 means automatic search.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async SNTP_setServerIP_async(ip_addr='255.255.255.255')

Set the SNTP server IP with async mode.

Parameters
ip_addrstr of 4 int separated by period.

IP address of the target SNTP server; 255.255.255.255 means automatic search.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

SNTP_syncNow(timeout=3)

Synchronize SNTP.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async SNTP_syncNow_async()

Synchronize SNTP with async mode.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_getDeviceAlias(timeout=3)

Get device alias name.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
Alias namestring

The alias name of the device.

async Sys_getDeviceAlias_async()

Get device alias name with async mode.

Returns
Alias namestring

The alias name of the device.

Sys_getDriverInfo(timeout=3)

Get device firmware information.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
driver_infolist of three string
  • driver_info[0]: Model name.

  • driver_info[1]: Mode.

  • driver_info[2]: Firmware version.

async Sys_getDriverInfo_async()

Get device firmware information with async mode.

Returns
driver_infolist of three string
  • driver_info[0]: Model name.

  • driver_info[1]: Mode.

  • driver_info[2]: Firmware version.

Sys_getGateway(timeout=3)

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_getGateway.

async Sys_getGateway_async()

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_getGateway_async.

Sys_getIPAddrAndSubmask(timeout=3)

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_getIPAddrAndSubmask.

async Sys_getIPAddrAndSubmask_async()

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_getIPAddrAndSubmask_async.

Sys_getMACAddr(timeout=3)

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_getMACAddr.

async Sys_getMACAddr_async()

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_getMACAddr_async.

Sys_getMode(slot, timeout=3)

Get the mode from a given slot.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
str_str

Mode of slot.

async Sys_getMode_async(slot)

Get the mode from a given slot with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
str_str

Mode of slot.

Sys_getPinModeInPort(port, timeout=3)

Get pin mode in specific port.

Parameters
portint

See here for available ports of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
pinsint

How many pins in specific port.

pin_modelist of 8 string
  • [pin0, pin1,……pin7]

  • pinmode : Disabled, Idle, DI, DO, UART, I2C, SPI, CAN, PWM and ADC.

async Sys_getPinModeInPort_async(port)

Get pin mode in specific port with async mode.

Parameters
portint

See here for available ports of different WPC devices.

Returns
pinsint

How many pins in specific port.

pin_modelist of 8 string
  • [pin0, pin1,……pin7]

  • pinmode : Disabled, Idle, DI, DO, UART, I2C, SPI, CAN, PWM and ADC.

Sys_getPythonVersion(timeout=3)

Get python software version.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
versionstring
async Sys_getPythonVersion_async()

Get python software version with async mode.

Returns
versionstring
Sys_getRTC(timeout=3)

Get RTC date and time.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
str_str
Date and time represented by “A-B-C, D:E:F”.
  • “A” is year.

  • “B” is month.

  • “C” is day.

  • “D” is hour.

  • “E” is minute.

  • “F” is second.

async Sys_getRTC_async()

Get RTC date and time with async mode.

Returns
str_str
Date and time represented by “A-B-C, D:E:F”.
  • “A” is year.

  • “B” is month.

  • “C” is day.

  • “D” is hour.

  • “E” is minute.

  • “F” is second.

Sys_getSerialNumber(timeout=3)

Get serial number.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
str_str

Serial number represented by string of 8 characters.

async Sys_getSerialNumber_async()

Get serial number with async mode.

Returns
str_str

Serial number represented by string of 8 characters.

Sys_reboot(timeout=3)

Reboot the device.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_reboot_async()

Reboot the device with async mode.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setAIOMode(slot, timeout=3)

Set the AIO state on a given slot.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setAIOMode_async(slot)

Set the AIO state on a given slot with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setDIMode(slot, timeout=3)

Set the DI state on a given slot.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setDIMode_async(slot)

Set the DI state on a given slot with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setDIOMode(slot, timeout=3)

Set the DIO state for the slot in the connected WPC device.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setDIOMode_async(slot)

Set the DIO state for the slot in the connected WPC device with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setDOMode(slot, timeout=3)

Set the DO state for the slot in the connected WPC device.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setDOMode_async(slot)

Set the DO state for the slot in the connected WPC device with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setDeviceAlias(alias, timeout=3)

Set the alias name of the device.

Parameters
aliasstr

The alias name of the device

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setDeviceAlias_async(alias)

Set the alias name of the device.

Parameters
aliasstr

The alias name of the device

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setIPAddrAndSubmask(ip_addr, subnet_mask='255.255.255.0', timeout=3)

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_setIPAddrAndSubmask.

async Sys_setIPAddrAndSubmask_async(ip_addr, subnet_mask='255.255.255.0')

Deprecated in v1.0.5. Will be removed in v1.2.0.

See :ref:Net_setIPAddrAndSubmask_async.

Sys_setIdleMode(slot, timeout=3)

Set the IDLE state on a given slot.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setIdleMode_async(slot)

Set the IDLE state on a given slot with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setMotionMode(slot, timeout=3)

Set the motion state on a given slot.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setMotionMode_async(slot)

Set the motion state on a given slot with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setRTC(year, month, day, hour, minute, second, timeout=3)

Set RTC date and time.

Parameters
yearint

year (CE).

monthint

month (1~12).

dayint

day (1~31).

hourint

hour (24-hour clock) (0~23).

minuteint

minute (0~59).

secondint

second (0~59).

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setRTC_async(year, month, day, hour, minute, second)

Set RTC date and time with async mode.

Parameters
yearint

year (CE).

monthint

month (1~12).

dayint

day (1~31).

hourint

hour (24-hour clock) (0~23).

minuteint

minute (0~59).

secondint

second (0~59).

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_setSwitchMode(slot, timeout=3)

Set the switch state on a given slot.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_setSwitchMode_async(slot)

Set the switch state on a given slot with async mode.

Parameters
slotint

Slot number. See here for available slot of different WPC devices.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_startRTCAlarm(mode, day, hour, minute, second, timeout=3)

Start RTC time to alarm AI.

Parameters
modeint

0: Day value interpreted as calendar day. 1: Day value interpreted as weekday.

dayint

Celendar day (1~31)/ Weekday (1~7).

hourint

hour (24-hour clock) (0~23).

minuteint

minute (0~59).

secondint

second (0~59).

timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_startRTCAlarm_async(mode, day, hour, minute, second)

Start RTC time to alarm AI with async mode.

Parameters
modeint

0: Day value interpreted as calendar day. 1: Day value interpreted as weekday.

dayint

Celendar day (1~31)/ Weekday (1~7).

hourint

hour (24-hour clock) (0~23).

minuteint

minute (0~59).

secondint

second (0~59).

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

Sys_stopRTCAlarm(timeout=3)

Stop alarming.

Parameters
timeoutint

Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

async Sys_stopRTCAlarm_async()

Stop alarming with async mode.

Returns
statusint

Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.

close()

Close web device handle.

Parameters
verbose: bool, default: True

Whether to print out messages or not.

Returns
None
connect(ip_addr='192.168.1.110', port=7, verbose=True)

Connect handle to web device.

Parameters
ip_addrstr of 4 int separated by period.

IP network address of the WPC device to connect to.

portint, default: 7

TCP port.

verbose: bool, default: True

Whether to print out messages or not.

Returns
None
disconnect(verbose=True)

Disconnect handle from web device.

Parameters
verbose: bool, default: True

Whether to print out messages or not.

Returns
None