EMotion
Device pinout
API function description
- class pywpc.EMotion
Ethernet based motion controller modular inter-connection
Easy and quick connect to Servo amplifier
Pulse/Direction or CW/CCW output mode
Differential output (Max: 8MPPS)
Encoder ABZ input (Max: 12MHz)
Break-point/Capture
Linear/Circular/helical interpolation/Multi-axes sync move S-Curve
- Logger_openFile(filename, clear_old=True, verbose=True)
Open CSV file.
- Parameters
- filenamestr
The file name.
- clear_oldbool, default: True
Whether to clear old data (if the file alread exists) or not.
- verbosebool, default: True
Whether to print message out.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Logger_write2DList(value_mat)
Write list of list into file.
- Parameters
- value_matlist of list
The list of list of data to be written.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Logger_writeHeader(header)
Write header into file.
- Parameters
- headerlist of str
Header to be written.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Logger_writeList(value_list)
Write list into file.
- Parameters
- value_listlist
The list of data to be written.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Logger_writeValue(value)
Write value into file.
- Parameters
- valueobject
The data to be written.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfg2AxisLinearInterpo(port, axis1, dest_posi1, axis2, dest_posi2, speed=10000, accel=100000, decel=100000, timeout=3)
Configure two axis linear interpolation parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis1{0, 1, 2, 3}
Axis1.
- dest_posi1int
Destination of axis1.
- axis2{0, 1, 2, 3}
Axis2.
- dest_posi2int
Destination of axis2.
- speedint
Speed vector of linear interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfg2AxisLinearInterpo_async(port, axis1, dest_posi1, axis2, dest_posi2, speed=10000, accel=100000, decel=100000)
Configure two axis linear interpolation parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis1{0, 1, 2, 3}
Axis1.
- dest_posi1int
Destination of axis1.
- axis2{0, 1, 2, 3}
Axis2.
- dest_posi2int
Destination of axis2.
- speedint
Speed vector of linear interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfg3AxisLinearInterpo(port, axis1, dest_posi1, axis2, dest_posi2, axis3, dest_posi3, speed=10000, accel=100000, decel=100000, timeout=3)
Configure three axis linear interpolation parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis1{0, 1, 2, 3}
Axis1.
- dest_posi1int
Destination of axis1.
- axis2{0, 1, 2, 3}
Axis2.
- dest_posi2int
Destination of axis2.
- axis3{0, 1, 2, 3}
Axis3.
- dest_posi3int
Destination of axis3.
- speedint
Speed vector of linear interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfg3AxisLinearInterpo_async(port, axis1, dest_posi1, axis2, dest_posi2, axis3, dest_posi3, speed=10000, accel=100000, decel=100000)
Configure three axis linear interpolation parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis1{0, 1, 2, 3}
Axis1.
- dest_posi1int
Destination of axis1.
- axis2{0, 1, 2, 3}
Axis2.
- dest_posi2int
Destination of axis2.
- axis3{0, 1, 2, 3}
Axis3.
- dest_posi3int
Destination of axis3.
- speedint
Speed vector of linear interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfg4AxisLinearInterpo(port, axis1, dest_posi1, axis2, dest_posi2, axis3, dest_posi3, axis4, dest_posi4, speed, accel=100000, decel=100000, timeout=3)
Configure four axis linear interpolation parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis1{0, 1, 2, 3}
Axis1.
- dest_posi1int
Destination of axis1.
- axis2{0, 1, 2, 3}
Axis2.
- dest_posi2int
Destination of axis2.
- axis3{0, 1, 2, 3}
Axis3.
- dest_posi3int
Destination of axis3.
- axis4{0, 1, 2, 3}
Axis3.
- dest_posi4int
Destination of axis4.
- speedint
Speed vector of linear interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfg4AxisLinearInterpo_async(port, axis1, dest_posi1, axis2, dest_posi2, axis3, dest_posi3, axis4, dest_posi4, speed, accel=100000, decel=100000)
Configure four axis linear interpolation parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis1{0, 1, 2, 3}
Axis1.
- dest_posi1int
Destination of axis1.
- axis2{0, 1, 2, 3}
Axis2.
- dest_posi2int
Destination of axis2.
- axis3{0, 1, 2, 3}
Axis3.
- dest_posi3int
Destination of axis3.
- axis4{0, 1, 2, 3}
Axis3.
- dest_posi4int
Destination of axis4.
- speedint
Speed vector of linear interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfgAlarm(port, axis, en_alarm, alarm_polarity, timeout=3)
Configure alarm parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_alarm{0, 1}
Enable alarm inputs. 0: False, 1: True.
- alarm_polarity{0, 1}
Set the polarity for alarm. 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_cfgAlarm_async(port, axis, en_alarm, alarm_polarity)
Configure alarm parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_alarm{0, 1}
Enable alarm inputs. 0: False, 1: True.
- alarm_polarity{0, 1}
Set the polarity for alarm. 0: Active Low, 1: Active High.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgAxis(port, axis, stepper_output, axis_dir, encoder_dir, servo_on_polarity, timeout=3)
Configure axis parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- stepper_output{0, 1}
It specifies the mode as Step and Direction (one pulse) or Clockwise/Counterclockwise.(two pulse) 0: Step/Dir(One Pulse), 1: CW/CCW(Two Pulse).
- axis_dir{0, 1}
Set axis direction to CW or CCW. 0: CW, 1: CCW.
- encoder_dir{0, 1}
Set encoder direction to CW or CCW. 0: CW, 1: CCW.
- servo_on_polarity{0, 1}
Set the polarity for servo on. 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.
- Motion_cfgAxisMove(port, axis, mode, target_posi=0, velo=10000, accel=100000, decel=100000, timeout=3)
Configure motion operation mode, target position, velocity, acceleration and deceleration of a single axis move.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- mode{0, 1, 2}
Operation mode. 0: Absolute mode, 1: Relative mode, 2: Velocity mode.
- target_posiint
Target position in counts or steps.
- veloint
Velocity in counts/s or steps/s.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfgAxisMove_async(port, axis, mode, target_posi=0, velo=10000, accel=100000, decel=100000)
Configure motion operation mode, target position, velocity, acceleration and deceleration of a single axis move with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- mode{0, 1, 2}
Operation mode. 0: Absolute mode, 1: Relative mode, 2: Velocity mode.
- target_posiint
Target position in counts or steps.
- veloint
Velocity in counts/s or steps/s.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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.
- async Motion_cfgAxis_async(port, axis, stepper_output, axis_dir, encoder_dir, servo_on_polarity)
Configure axis parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- stepper_output{0, 1}
It specifies the mode as Step and Direction (one pulse) or Clockwise/Counterclockwise.(two pulse) 0: Step/Dir(One Pulse), 1: CW/CCW(Two Pulse).
- axis_dir{0, 1}
Set axis direction to CW or CCW. 0: CW, 1: CCW.
- encoder_dir{0, 1}
Set encoder direction to CW or CCW. 0: CW, 1: CCW.
- servo_on_polarity{0, 1}
Set the polarity for servo on. 0: Active Low, 1: Active High.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgBreakPoint(port, axis, mode, breakpoint_polarity, start_posi, pulse_width, pulse_period, pulse_number, timeout=3)
Configure breakpoint parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- mode{0, 1}
0: Absolute position, 1: Relative position.
- breakpoint_polarity{0, 1}
Set the polarity for breakpoint. 0: Active Low, 1: Active High.
- start_posiint
The start position.
- pulse_widthint
The pulse width.
- pulse_periodint
The pulse period.
- pulse_numberint
The pulse period.
- 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_cfgBreakPoint_async(port, axis, mode, breakpoint_polarity, start_posi, pulse_width, pulse_period, pulse_number)
Configure breakpoint parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- mode{0, 1}
0: Absolute position, 1: Relative position.
- breakpoint_polarity{0, 1}
Set the polarity for breakpoint. 0: Active Low, 1: Active High.
- start_posiint
The start position.
- pulse_widthint
The pulse width.
- pulse_periodint
The pulse period.
- pulse_numberint
The pulse period.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgCapture(port, axis, capture_type, mode, timeout=3)
Configure capture parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- capture_type{0, 1}
0: Rising edge, 1: Falling edge.
- mode{0, 1}
0: Logical position, 1: 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_cfgCapture_async(port, axis, capture_type, mode)
Configure capture parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- capture_type{0, 1}
0: Rising edge, 1: Falling edge.
- mode{0, 1}
0: Logical position, 1: Encoder position.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgCircularInterpo(port, x_axis, y_axis, center_point_x, center_point_y, finish_point_x, finish_point_y, dir, speed=10000, accel=100000, decel=100000, timeout=3)
Configure circular interpolation parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- x_axis{0, 1, 2, 3}
x_axis.
- y_axis{0, 1, 2, 3}
y_axis.
- center_point_xint
Set the center point of x by the relative value with respect to the current position.
- center_point_yint
Set the center point of y by the relative value with respect to the current position.
- finish_point_xint
Set the finish point of x by the relative value with respect to the current position.
- finish_point_yint
Set the finish point of y by the relative value with respect to the current position.
- dir{0, 1}
Set circular direction to CW or CCW. 0: CW, 1: CCW.
- speedint
Speed vector of circular interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfgCircularInterpo_async(port, x_axis, y_axis, center_point_x, center_point_y, finish_point_x, finish_point_y, dir, speed=10000, accel=100000, decel=100000)
Configure circular interpolation parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- x_axis{0, 1, 2, 3}
x_axis.
- y_axis{0, 1, 2, 3}
y_axis.
- center_point_xint
Set the center point of x by the relative value with respect to the current position.
- center_point_yint
Set the center point of y by the relative value with respect to the current position.
- finish_point_xint
Set the finish point of x by the relative value with respect to the current position.
- finish_point_yint
Set the finish point of y by the relative value with respect to the current position.
- dir{0, 1}
Set circular direction to CW or CCW. 0: CW, 1: CCW.
- speedint
Speed vector of circular interpolation.
- accelint
Acceleration value in counts/s2 or steps/s2.
- decelint
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_cfgEncoder(port, axis, encoder_z_polarity, timeout=3)
Configure encoder parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- encoder_z_polarity{0, 1}
Set the polarity for encoder Z. 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_cfgEncoder_async(port, axis, encoder_z_polarity)
Configure encoder parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- encoder_z_polarity{0, 1}
Set the polarity for encoder Z. 0: Active Low, 1: Active High.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgFindRef(port, axis, search_type, search_dir, search_velo=10000, search_accle=100000, approach_velo_percent=20, en_reset_posi=0, offset_posi=0, timeout=3)
Configure find reference parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- search_type{0, 1, 2}
Reference position to find. 0: Home, 1: Index, 2: Limit.
- search_dirint
Set search direction to forward or reverse. 0: Forward, 1: Reverse.
- search_veloint
Set velocity in counts/s or steps/s.
- search_accleint
Set acceleration value in counts/s2 or steps/s2.
- approach_velo_percentint or float
The percent of the loaded velocity that a given axis uses to perform final adjustments.
- en_reset_posiint
If true, after successfully locating the given reference, it resets positions to values indicated by current position. If false, no reset is performed. 0: False, 1: True.
- offset_posiint
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.
- 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_cfgFindRef_async(port, axis, search_type, search_dir, search_velo=10000, search_accle=100000, approach_velo_percent=20, en_reset_posi=0, offset_posi=0)
Configure find reference parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- search_type{0, 1, 2}
Reference position to find. 0: Home, 1: Index, 2: Limit.
- search_dirint
Set search direction to forward or reverse. 0: Forward, 1: Reverse.
- search_veloint
Set velocity in counts/s or steps/s.
- search_accleint
Set acceleration value in counts/s2 or steps/s2.
- approach_velo_percentint or float
The percent of the loaded velocity that a given axis uses to perform final adjustments.
- en_reset_posiint
If true, after successfully locating the given reference, it resets positions to values indicated by current position. If false, no reset is performed. 0: False, 1: True.
- offset_posiint
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.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgHelicalInterpo(port, center_point_x, center_point_y, finish_point_x, finish_point_y, en_axis3, pitch_axis3, en_axis4, pitch_axis4, rotation_number, speed, dir, calculation_timeout, timeout=3)
Configure helical interpolation parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- center_point_xint
Set the center point of x by the relative value with respect to the current position.
- center_point_yint
Set the center point of y by the relative value with respect to the current position.
- finish_point_xint
Set the finish point of x by the relative value with respect to the current position.
- finish_point_yint
Set the finish point of y by the relative value with respect to the current position.
- en_axis3{0, 1}
0: False, 1: True.
- pitch_axis3int
The axis3 pitch.
- en_axis4{0, 1}
0: False, 1: True.
- pitch_axis4int
The axis4 pitch.
- rotation_numberint
- speedint
Speed vector of circular interpolation.
- dir{0, 1}
Set circular direction to CW or CCW. 0: CW, 1: CCW.
- calculation_timeoutint
Helical calculation timeout.
- 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_cfgHelicalInterpo_async(port, center_point_x, center_point_y, finish_point_x, finish_point_y, en_axis3, pitch_axis3, en_axis4, pitch_axis4, rotation_number, speed, dir, calculation_timeout)
Configure helical interpolation parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- center_point_xint
Set the center point of x by the relative value with respect to the current position.
- center_point_yint
Set the center point of y by the relative value with respect to the current position.
- finish_point_xint
Set the finish point of x by the relative value with respect to the current position.
- finish_point_yint
Set the finish point of y by the relative value with respect to the current position.
- en_axis3{0, 1}
0: False, 1: True.
- pitch_axis3int
The axis3 pitch.
- en_axis4{0, 1}
0: False, 1: True.
- pitch_axis4int
The axis4 pitch.
- rotation_numberint
- speedint
Speed vector of circular interpolation.
- dir{0, 1}
Set circular direction to CW or CCW. 0: CW, 1: CCW.
- calculation_timeoutint
Helical calculation timeout.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgHome(port, axis, en_home, home_polarity, timeout=3)
Configure home parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_home{0, 1}
enable home inputs. 0: False, 1: True.
- home_polarity{0, 1}
Set the polarity for home. 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_cfgHome_async(port, axis, en_home, home_polarity)
Configure home parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_home{0, 1}
enable home inputs. 0: False, 1: True.
- home_polarity{0, 1}
Set the polarity for home. 0: Active Low, 1: Active High.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgInposi(port, axis, en_inposi, inposi_polarity, timeout=3)
Configure Inposition parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_inposi{0, 1}
Enable Inposition inputs. 0: False, 1: True.
- inposi_polarity{0, 1}
Set the polarity for inposition. 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_cfgInposi_async(port, axis, en_inposi, inposi_polarity)
Configure Inposition parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_inposi{0, 1}
Enable Inposition inputs. 0: False, 1: True.
- inposi_polarity{0, 1}
Set the polarity for inposition. 0: Active Low, 1: Active High.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgJerkAndAccelMode(port, axis, jerk, accel_mode, timeout=3)
Configure jerk and acceleration parameters.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- jerkint
Accerleration increasing/ decreasing rate per unit time.
- acceleration_mode{0, 1}
Trapezoidal or S curve mode. 0: Trapezoidal, 1: S curve.
- 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_cfgJerkAndAccelMode_async(port, axis, jerk, accel_mode)
Configure jerk and acceleration parameters with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- jerkint
Accerleration increasing/ decreasing rate per unit time.
- acceleration_mode{0, 1}
Trapezoidal or S curve mode. 0: Trapezoidal, 1: S curve.
- Returns
- statusint
Return 0 if executed successfully; return error code otherwise. See here for corresponding error messages.
- Motion_cfgLimit(port, axis, 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.
- axis{0, 1, 2, 3}
Axis selector.
- en_forward{0, 1}
Enable forward limit inputs. 0: False, 1: True.
- en_reverse{0, 1}
Enable reverse limit inputs. 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, axis, 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.
- axis{0, 1, 2, 3}
Axis selector.
- en_forward{0, 1}
Enable forward limit inputs. 0: False, 1: True.
- en_reverse{0, 1}
Enable reverse limit inputs. 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_checkRef(port, axis, timeout=3)
Check the status of a search sequence initiated by find reference.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- timeoutint
Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.
- Returns
- statusint
0 : finding reference 1 : found reference
- async Motion_checkRef_async(port, axis)
Check the status of a search sequence initiated by find reference with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
0 : finding reference 1 : found reference
- 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.
- Motion_enableBreakPoint(port, axis, en_break, timeout=3)
Set the breakpoint singal of specific axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_break{0, 1}
Enable breakpoint. 0: False, 1: True.
- 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_enableBreakPoint_async(port, axis, en_break)
Set the breakpoint singal of specific axis with async mode.
- Motion_enableCapture(port, axis, en_capture, timeout=3)
Set the capture singal of specific axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- en_capture{0, 1}
Enable capture. 0: False, 1: True.
- 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_enableCapture_async(port, axis, en_capture)
Set the capture singal of specific axis with async mode.
- Motion_enableServoOff(port, axis, timeout=3)
Servo off singal of specific axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- 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, axis)
Servo off singal of specific axis with async mode.
- Motion_enableServoOn(port, axis, timeout=3)
Servo on singal of specific axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- 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, axis)
Servo on singal of specific axis with async mode.
- Motion_findRef(port, axis, timeout=3)
Execute a search operation to find a reference position.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- 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_findRef_async(port, axis)
Execute a search operation to find a reference position with async mode.
- Motion_getEncoderPosi(port, axis, timeout=3)
Get emcoder position for an axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
Encoder position of the axis.
- async Motion_getEncoderPosi_async(port, axis)
Get Encoder position for an axis with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
Encoder position of the axis.
- Motion_getHomeStatus(port, axis, timeout=3)
Read the instantaneous status of the home inputs.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- timeoutint
Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.
- Returns
- statusint
Home input status.
- async Motion_getHomeStatus_async(port, axis)
Read the instantaneous status of the home inputs with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
Home input status.
- Motion_getLimitStatus(port, axis, timeout=3)
Read the instantaneous status of the hardware limit inputs.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- timeoutint
Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.
- Returns
- statuslist
List int of the forward and reverse limit inputs status.
- async Motion_getLimitStatus_async(port, axis)
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.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statuslist
List int of the forward and reverse limit inputs status.
- Motion_getLogicalPosi(port, axis, timeout=3)
Get logical position for an axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
Logical position of the axis.
- async Motion_getLogicalPosi_async(port, axis)
Get logical position for an axis with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
Logical position of the axis.
- Motion_getMoveStatus(port, axis, timeout=3)
Read the move complete status of an axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- timeoutint
Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.
- Returns
- statusint
If return value is 1, move complete.
- async Motion_getMoveStatus_async(port, axis)
Read the move complete status of an axis with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
If return value is 1, move complete.
- 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.
- Motion_overrideAxisAccel(port, axis, new_accel, new_decel, timeout=3)
Override instantaneous accerleration / deceleration for an axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- new_accelint
Acceleration value in counts/s2 or steps/s2.
- new_decelint
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_overrideAxisAccel_async(port, axis, new_accel, new_decel)
Override instantaneous accerleration / deceleration for an axis with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- new_accelint
Acceleration value in counts/s2 or steps/s2.
- new_decelint
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_overrideAxisPosi(port, axis, new_position, timeout=3)
Override new position for an axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- new_positionint
New position for an axis.
- 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_overrideAxisPosi_async(port, axis, new_position)
Override new position for an axis with async mode.
- Motion_overrideAxisVelocity(port, axis, new_velo, timeout=3)
Override instantaneous velocity for an axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- new_veloint
Velocity in counts/s or steps/s.
- 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_overrideAxisVelocity_async(port, axis, new_velo)
Override instantaneous velocity for an axis with async mode.
- Motion_readCapturePoint(port, axis, timeout=3)
Read a captured position value from an axis or encoder.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- timeoutint
Specify the time (sec) to wait before reporting a timeout error. The default is 3 s.
- Returns
- statusint
Captured position value.
- async Motion_readCapturePoint_async(port, axis)
Read a captured position value from an axis or encoder with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- Returns
- statusint
Captured position value.
- Motion_rstEncoderPosi(port, axis, encoder_posi=0, timeout=3)
Reset the position of an encoder.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- encoder_posiint
Reset value for axis.
- 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, axis, encoder_posi=0)
Reset the position of an encoder with async mode.
- 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_setLogicalPosi(port, axis, counter, timeout=3)
Set logical position for an axis.
- async Motion_setLogicalPosi_async(port, axis, counter)
Set logical position for an axis with async mode.
- Motion_startCircularInterpo(port, timeout=3)
Start circular interpolation.
- 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_startCircularInterpo_async(port)
Start circular interpolation with async mode.
- Motion_startHelicalInterpo(port, timeout=3)
Start helical interpolation.
- 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_startHelicalInterpo_async(port)
Start helical interpolation with async mode.
- Motion_startLinearInterpo(port, timeout=3)
Start linear interpolation.
- 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_startLinearInterpo_async(port)
Start linear interpolation with async mode.
- Motion_startMultiAxisMove(port, axis_list, timeout=3)
Start motion of multiple axes.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis_listlist
The list of axis to select multi move.
- 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_startMultiAxisMove_async(port, axis_list)
Start motion of multiple axes with async mode.
- Motion_startSingleAxisMove(port, axis, timeout=3)
Start motion of single axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- 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_startSingleAxisMove_async(port, axis)
Start motion of single axis with async mode.
- Motion_stop(port, axis, mode, timeout=3)
Stop motion of an axis.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- mode{0, 1}
Mode of stop to execute. 0: deceleration, 1: halt.
- 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_stop_async(port, axis, mode)
Stop motion of an axis with async mode.
- Parameters
- portint
Port number. See here for available ports of different WPC devices.
- axis{0, 1, 2, 3}
Axis selector.
- mode{0, 1}
Mode of stop to execute. 0: deceleration, 1: halt.
- 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 addressnetwork_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 addressnetwork_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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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