pyAPIUSBP

Previous topic

Reference Manual

Next topic

pyAPIUSBP.DIO - Digital Input/Output Units

This Page

Quick Link

Download

pyAPIUSBP.AIO - Analog/Digital Input/Output Units

class pyAPIUSBP.AIO.AIO(deviceName)[source]
getAiChannelSequence(sequence)[source]

This function gets current order of AD conversion across channels. See document of AioGetAiChannelSequence of API-USBP.

Parameters:sequence (list) – See document of AioGetAiChannelSequence of API-USBP.
Returns:See document of AioGwetAiChannelSequence of API-USBP.
getAiChannels()[source]

This function returns number of channels currently used for analog input.

Returns:Number of channels.
getAiClockEdge()[source]

See document of AioGetAiClockEdge of API-USBP.

getAiClockType()[source]

See document of AioGetAiClockType of API-USBP.

getAiEvent()[source]

This method returns events for analog input. See document of AioGetAiEvent of API-USBP.

Returns:See document of AioGetAiEvent of API-USBP.
getAiEventSamplingTimes()[source]

This method returns current number of sampling times. See document of AioGetAiEventSamplingTimes of API-USBP.

Returns:See document of AioGetAiEventSamplingTimes of API-USBP.
getAiEventTransferTimes()[source]

This method returns current number of transfer times. See document of AioGetAiEventTransferTimes of API-USBP.

Returns:See document of AioGetAiEventTransferTimes of API-USBP.
getAiInputMethod()[source]

This function returns current input method of analog inputs.

Returns:0 for single-ended, 1 for differential.
getAiMaxChannels()[source]

This function returns maximum number of analog input channels.

Returns:Maximum number of analog input channels.
getAiMemoryType()[source]

This method returns current memory type for data recording. See document of AioGetAiMemoryType of API-USBP.

Returns:See document of AioGetAiMemoryType of API-USBP.
getAiRange(channel)[source]

This method returns range an analog input channel.

Parameters:channel (int) – Analog input channel.
Returns:Range ID. getRangeString() can be used to get range string from range IO.
getAiRepeatCount()[source]

This method returns crrent repeat count. See document of AioGetAiRepeatCount of API-USBP.

Returns:See document of AioGetAiRepeatCount of API-USBP.
getAiRepeatTimes()[source]

See document of AioGetAiRepeatTimes of API-USBP.

getAiResolution()[source]

This function returns resolution of analog input.

Returns:0 for no-analog-input, 12 for 12bit resolution, 16 for 16bit resolution.
getAiSamplingClock()[source]

See document of AioGetAiSamplingClock of API-USBP.

getAiSamplingCount()[source]

This method returns current number of sampling counts. This method works only when device-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiSamplingCount of API-USBP.

Returns:See document of AioGetAiSamplingCount of API-USBP.
getAiSamplingData(samplingTimes)[source]

This method returns sampling data from device memory. This method works only when device-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiSamplingData of API-USBP.

Parameters:samplingTimes (int) – Size of buffer for data receiving.
Returns:See document of AioGetAiSamplingData of API-USBP.
getAiSamplingDataEx(samplingTimes)[source]

This method returns sampling data (in voltage/current) from device memory. This method works only when device-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiSamplingDataEx of API-USBP.

Parameters:samplingTimes (int) – Size of buffer for data receiving.
Returns:See document of AioGetAiSamplingDataEx of API-USBP.
getAiScanClock()[source]

See document of AioGetAiScanClock of API-USBP.

getAiStartInRange(channel)[source]

See document of AioGetAiStartInRange of API-USBP.

getAiStartInRangeEx(channel)[source]

See document of AioGetAiStartInRangeEx of API-USBP.

getAiStartLevel(channel)[source]

See document of AioGetAiStartLevel of API-USBP.

getAiStartLevelEx(channel)[source]

See document of AioGetAiStartLevelEx of API-USBP.

getAiStartOutRange(channel)[source]

See document of AioGetAiStartOutRange of API-USBP.

getAiStartOutRangeEx(channel)[source]

See document of AioGetAiStartOutRangeEx of API-USBP.

getAiStartTrigger()[source]

See document of AioGetAiStartTrigger of API-USBP.

getAiStatus()[source]

This method returns current analog input status. pyAPISUBP.AIO has status ID as class attributes (e.g. pyAPIUSBP.AIO.AIS_BUSY). See document of AioGetAiStatus of API-USBP.

Returns:See document of AioGetAiStatus of API-USBP.
getAiStopDelayTimes()[source]

See document of AioSetAiStopDelayTimes of API-USBP.

getAiStopInRange(channel)[source]

See document of AioGetAiStopInRange of API-USBP.

getAiStopInRangeEx(channel)[source]

See document of AioGetAiStopInRangeEx of API-USBP.

getAiStopLevel(channel)[source]

See document of AioGetAiStopLevel of API-USBP.

getAiStopLevelEx(channel)[source]

See document of AioGetAiStopLevelEx of API-USBP.

getAiStopOutRange(channel)[source]

See document of AioGetAiStopOutRange of API-USBP.

getAiStopOutRangeEx(channel)[source]

See document of AioGetAiStopOutRangeEx of API-USBP.

getAiStopTimes()[source]

See document of AioGetAiStopTimes of API-USBP.

getAiStopTrigger()[source]

See document of AioGetAiStopTrigger of API-USBP.

getAiStopTriggerCount()[source]

This method returns current number of sampling counts when stop trigger is input. This method works only when device-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiStopTriggerCount of API-USBP.

Returns:See document of AioGetAiStopTriggerCount of API-USBP.
getAiStopTriggerTransferCount()[source]

This method returns number of transfers when stop trigger is input. This method works only when user-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiStopTriggerTransferCount of API-USBP.

Returns:See document of AioGetAiStopTriggerTransferCount of API-USBP.
getAiTransferCount()[source]

This method returns current number of data transferred to user buffer. is input. This method works only when user-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiTransferCount of API-USBP.

Returns:See document of AioGetAiTransferCount of API-USBP.
getAiTransferLap()[source]

This method returns how many times user buffer is overwritten. This method works only when user-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiTransferLap of API-USBP.

Returns:See document of AioGetAiTransferLap of API-USBP.
getAiTransferMode()[source]

This method returns current data transfer method of analog input.

Returns:pyAPIUSBP.AIO.CONST_DEVICE_BUFFER for device-buffer-mode, pyAPIUSBP.AIO.CONST_USER_BUFFER for user-buffer-mode.
getAoChannels()[source]

This function returns number of channels currently used for analog output.

Returns:Number of channels.
getAoClockEdge()[source]

See document of AioGetAoClockEdge of API-USBP.

getAoClockType(clockType)[source]

See document of AioGetAoClockType of API-USBP.

getAoEvent(hWnd)[source]

This method returns events for analog output. See document of AioGetAoEvent of API-USBP.

Returns:See document of AioGetAoEvent of API-USBP.
getAoEventSamplingTimes()[source]

This method returns current number of sampling times. See document of AioGetAoEventSamplingTimes of API-USBP.

Returns:See document of AioGetAoEventSamplingTimes of API-USBP.
getAoEventTransferTimes()[source]

This method returns current number of transfer times. See document of AioGetAoEventTransferTimes of API-USBP.

Returns:See document of AioGetAoEventTransferTimes of API-USBP.
getAoMaxChannels()[source]

This function returns maximum number of analog output channels.

Returns:Maximum number of analog output channels.
getAoMemoryType()[source]

This method returns current memory type for data output. See document of AioGetAoMemoryType of API-USBP.

Returns:See document of AioGetAoMemoryType of API-USBP.
getAoRange(channel)[source]

This method returns range an analog output channel.

Parameters:channel (int) – Analog output channel.
Returns:Range ID. getRangeString() can be used to get range string from range IO.
getAoRepeatCount()[source]

This method returns crrent repeat count. See document of AioGetAoRepeatCount of API-USBP.

Returns:See document of AioGetAoRepeatCount of API-USBP.
getAoRepeatTimes()[source]

See document of AioGetAoRepeatTimes of API-USBP.

getAoResolution()[source]

This function returns resolution of analog output.

Returns:0 for no-analog-input, 12 for 12bit resolution, 16 for 16bit resolution.
getAoSamplingClock()[source]

See document of AioGetAoSamplingClock of API-USBP.

getAoSamplingCount()[source]

This method returns current number of sampling counts. See document of AioGetAoSamplingCount of API-USBP.

Returns:See document of AioGetAoSamplingCount of API-USBP.
getAoSamplingDataSize()[source]

This method returns data size per sample when user-buffer-mode is set by pyAPISUBP.AIO.getAoTransferMode(). See document of AioGetAoSamplingDataSize of API-USBP.

Returns:See document of AioGetAoSamplingDataSize of API-USBP.
getAoSamplingTimes()[source]

This method returns current number of sampling times. See document of AioGetAoSamplingTimes of API-USBP.

Returns:See document of AioGetAoSamplingTimes of API-USBP.
getAoStartTrigger()[source]

See document of AioGetAoStartTrigger of API-USBP.

getAoStatus()[source]

This method returns current analog input status. pyAPISUBP.AIO has status ID as class attributes (e.g. pyAPIUSBP.AIO.AOS_BUSY). See document of AioGetAoStatus of API-USBP.

Returns:See document of AioGetAoStatus of API-USBP.
getAoStopTrigger()[source]

See document of AioGetAoStopTrigger of API-USBP.

getAoTransferCount()[source]

This method returns current number of data transferred to user buffer. is input. This method works only when user-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioGetAiTransferCount of API-USBP.

Returns:See document of AioGetAiTransferCount of API-USBP.
getAoTransferMode()[source]

This method returns current data transfer method of analog output.

Returns:pyAPIUSBP.AIO.CONST_DEVICE_BUFFER for device-buffer-mode, pyAPIUSBP.AIO.CONST_USER_BUFFER for user-buffer-mode.
getCntComparisonMode(channel)[source]

See document of AioGetCntComparisonMode of API-USBP.

getCntCount(channel)[source]

See document of AioGetCntCount of API-USBP.

getCntEvent(channel)[source]

See document of AioGetCntEvent of API-USBP.

getCntFilter(channel, signal)[source]

See document of AioGetCntFilter of API-USBP.

getCntInputSignal()[source]

See document of AioGetCntInputSignal of API-USBP.

getCntMaxChannels()[source]

See document of AioGetCntMaxChannels of API-USBP.

getCntStatus(channel)[source]

See document of AioGetCntStatus of API-USBP.

getControlFilter(signal)[source]

This method gets current status of digital filter for external signal. See document of AioGetControlFilter of API-USBP.

Parameters:signal (int) – See document of AioGetControlFilter
Returns:See document of AioGetControlFilter
getDiFilter(bit)[source]

This method returns current filter setting for digital input. See ocument of AioGetDiFilter of API-USBP.

Parameters:bit (int) – See ocument of AioGetDiFilter of API-USBP.
Returns:See ocument of AioGetDiFilter of API-USBP.
getDioDirection()[source]

This method returns current direction of digital I/O port. See document of AioGetDioDirection of API-USBP.

Parameters:direction (int) – See document of AioGetDioDirection of API-USBP.
getEcuSignal(destination)[source]

See document of AioGetEcuSignal of API-USBP.

getErrorString(ret)[source]

This method translates error code to error string.

Parameters:code (int) – Error code of Contec API-USBP AIO functions.
getTmEvent(timerId)[source]

See document of AioGetTmEvent of API-USBP.

inputDiBit(bit)[source]

This method reads a logical input bit.

Parameters:bitNo (int) – Logical input bit number.
Returns:Data (0 or 1).
inputDiByte(port)[source]

This method reads 1 byte data from a logical input port.

Parameters:portNo (int) – Logical input port number. The first port of the device is 0, and the following ports are 1, 2, 3... Use getMaxPorts() to query how many ports your device has.
Returns:Data (0-255).
multiAi(channelList)[source]

This method reads multiple analog input channels.

Parameters:channelList (list) – List of channel numbers.
Returns:List of values (range of values depends on the device).
multiAiEx(channelList)[source]

This method reads multiple analog input channels and converts them to voltage/current.

Parameters:channelList (list) – List of channel numbers.
Returns:List of values (range of values depends on the device).
multiAo(channels, data)[source]

This method writes data to multiple analog output channels.

Parameters:
  • channes (list) – List of channel numbers.
  • data – List of values (range of values depends on the device).
multiAoEx(channels, data)[source]

This method writes data (in voltage or current) to multiple analog output channels.

Parameters:
  • channels (list) – List of channel numbers.
  • data – List of values (range of values depends on the device).
outputDoBit(bit, data)[source]

This method writes 0 or 1 to a logical output bit.

Parameters:
  • bitNo (int) – Logical output bit number.
  • data (int) – Data to be written. Note that the value must be 0 or 1.
outputDoByte(port, data)[source]

This method writes 1 byte data to a logical output port.

Parameters:
  • portNo (int) – Logical output port number.
  • data (int) – Data to be written. Note that the value must be between 0 to 255 (unsigned byte).
presetCnt(channel, presetData)[source]

See document of AioPresetCnt of API-USBP.

resetAiMemory()[source]

This method resets device buffer for analog input. This method works only when device-buffer-mode is set by pyAPISUBP.AIO.getAiTransferMode() See document of AioResetAiMemory of API-USBP.

Returns:See document of AioResetAiMemory of API-USBP.
resetAiStatus()[source]

This method resets analog input status. See document of AioResetAiStatus of API-USBP.

Returns:See document of AioResetAiStatus of API-USBP.
resetAoMemory()[source]

This method resets device buffer for analog input. See document of AioResetAoMemory of API-USBP.

Returns:See document of AioResetAoMemory of API-USBP.
resetAoStatus()[source]

This method resets analog output status. See document of AioResetAoStatus of API-USBP.

Returns:See document of AioResetAoStatus of API-USBP.
resetCntStatus(channel, status)[source]

See document of AioResetCntStatus of API-USBP.

resetDevice()[source]

This method resets device. Exception is raised if reset fails.

setAiCallBackProc(callbackProc, event, param)[source]

This method sets callback function for event. See document of AioSetAiCallBackProc of API-USBP.

Parameters:
  • callbackProc (ctypes.WINFUNCTYPE) – See document of AioSetAiCallBackProc of API-USBP.
  • event (int) – See document of AioSetAiCallBackProc of API-USBP.
  • param (int) – See document of AioSetAiCallBackProc of API-USBP.
setAiChannelSequence(sequence, channel)[source]

This function sets order of AD conversion across channels. See document of AioSetAiChannelSequence of API-USBP.

Parameters:
  • sequence (list) – See document of AioSetAiChannelSequence of API-USBP.
  • channel (int) – See document of AioSetAiChannelSequence of API-USBP.
setAiChannels(channels)[source]

This function sets number of channels for analog input.

Parameters:channels (int) – Number of channels.
setAiClockEdge(edge)[source]

See document of AioSetAiClockEdge of API-USBP.

setAiClockType(clockType)[source]

See document of AioSetAiClockType of API-USBP.

setAiEvent(hWnd, event)[source]

This method sets events for analog input. See document of AioSetAiEvent of API-USBP.

Parameters:
  • hWnd (HWND) – See document of AioSetAiEvent of API-USBP.
  • event (int) – See document of AioSetAiEvent of API-USBP.
setAiEventSamplingTimes(samplingTimes)[source]

This method sets number of sampling times. See document of AioSetAiEventSamplingTimes of API-USBP.

Parameters:samplingTimes (int) – See document of AioSetAiEventSamplingTimes of API-USBP.
setAiEventTransferTimes(transferTimes)[source]

This method sets number of transfer times. See document of AioSetAiEventTransferTimes of API-USBP.

Parameters:transferTimes (int) – See document of AioSetAiEventTransferTimes of API-USBP.
setAiInputMethod(method)[source]

This function sets input method of analog inputs.

Parameters:method (int) – 0 for single-ended, 1 for differential.
setAiMemoryType(memType)[source]

This method sets memory type for data recording. See document of AioSetAiMemoryType of API-USBP.

Parameters:memType (int) – See document of AioSetAiMemoryType of API-USBP.
setAiRange(channel, AiRange)[source]

This method sets range of an analog input channel.

Parameters:
  • channel (int) – Analog input channel.
  • AiRange (int) – Range ID. pyAPISUBP.AIO has Range ID as class attributes. That is, you can specify range like pyAPISUBP.AIO.P5
setAiRangeAll(AiRange)[source]

This method sets range of all analog input channels.

Parameters:AiRange (int) – Range ID. pyAPISUBP.AIO has Range ID as class attributes. That is, you can specify range like pyAPISUBP.AIO.P5
setAiRepeatTimes(repeatTimes)[source]

See document of AioSetAiRepeatTimes of API-USBP.

setAiSamplingClock(clock)[source]

See document of AioSetAiSamplingClock of API-USBP.

setAiScanClock(clock)[source]

See document of AioSetAiScanClock of API-USBP.

setAiStartInRange(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStartInRange of API-USBP.

setAiStartInRangeEx(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStartInRangeEx of API-USBP.

setAiStartLevel(channel, level, direction)[source]

See document of AioSetAiStartLevel of API-USBP.

setAiStartLevelEx(channel, level, direction)[source]

See document of AioSetAiStartLevelEx of API-USBP.

setAiStartOutRange(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStartOutRange of API-USBP.

setAiStartOutRangeEx(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStartOutRangeEx of API-USBP.

setAiStartTrigger(trigger)[source]

See document of AioSetAiStartTrigger of API-USBP.

setAiStopDelayTimes(delayTimes)[source]

See document of AioSetAiStopDelayTimes of API-USBP.

setAiStopInRange(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStopInRange of API-USBP.

setAiStopInRangeEx(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStopInRangeEx of API-USBP.

setAiStopLevel(channel, level, direction)[source]

See document of AioSetAiStopLevel of API-USBP.

setAiStopLevelEx(channel, level, direction)[source]

See document of AioSetAiStopLevelEx of API-USBP.

setAiStopOutRange(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStopOutRange of API-USBP.

setAiStopOutRangeEx(channel, level1, level2, stateTimes)[source]

See document of AioSetAiStopOutRangeEx of API-USBP.

setAiStopTimes(stopTimes)[source]

See document of AioSetAiStopTimes of API-USBP.

setAiStopTrigger(trigger)[source]

See document of AioSetAiStopTrigger of API-USBP.

setAiTransferMode(mode)[source]

This method sets data transfer method of analog input.

Parameters:mode (int) – pyAPIUSBP.AIO.CONST_DEVICE_BUFFER for device-buffer-mode, pyAPIUSBP.AIO.CONST_USER_BUFFER for user-buffer-mode.
setAoCallBackProc(callbackProc, event, param)[source]

This method sets callback function for event. See document of AioSetAoCallBackProc of API-USBP.

Parameters:
  • callbackProc (ctypes.WINFUNCTYPE) – See document of AioSetAoCallBackProc of API-USBP.
  • event (int) – See document of AioSetAoCallBackProc of API-USBP.
  • param (int) – See document of AioSetAoCallBackProc of API-USBP.
setAoChannels(channels)[source]

This function sets number of channels for analog output.

Parameters:channels (int) – Number of channels.
setAoClockEdge(edge)[source]

See document of AioSetAoClockEdge of API-USBP.

setAoClockType(clockType)[source]

See document of AioSetAoClockType of API-USBP.

setAoEvent(hWnd, event)[source]

This method sets events for analog output. See document of AioSetAoEvent of API-USBP.

Parameters:
  • hWnd (HWND) – See document of AioSetAoEvent of API-USBP.
  • event (int) – See document of AioSetAoEvent of API-USBP.
setAoEventSamplingTimes(samplingTimes)[source]

This method sets number of sampling times. See document of AioSetAoEventSamplingTimes of API-USBP.

Parameters:samplingTimes (int) – See document of AioSetAoEventSamplingTimes of API-USBP.
setAoEventTransferTimes(transferTimes)[source]

This method sets number of transfer times. See document of AioSetAoEventTransferTimes of API-USBP.

Parameters:transferTimes (int) – See document of AioSetAoEventTransferTimes of API-USBP.
setAoMemoryType(memType)[source]

This method sets memory type for data output. See document of AioSetAoMemoryType of API-USBP.

Parameters:memType (int) – See document of AioSetAoMemoryType of API-USBP.
setAoRange(channel, range)[source]

This method sets range of an analog output channel.

Parameters:
  • channel (int) – Analog output channel.
  • AiRange (int) – Range ID. pyAPISUBP.AIO has Range ID as class attributes. That is, you can specify range like pyAPISUBP.AIO.P5
setAoRangeAll(range)[source]

This method sets range of all analog output channels.

Parameters:AiRange (int) – Range ID. pyAPISUBP.AIO has Range ID as class attributes. That is, you can specify range like pyAPISUBP.AIO.P5
setAoRepeatTimes(repeatTimes)[source]

See document of AioSetAoRepeatTimes of API-USBP.

setAoSamplingClock(clock)[source]

See document of AioSetAoSamplingClock of API-USBP.

setAoSamplingData(samplingTimes, data)[source]

This method sets output data. See document of AioSetAoSamplingData of API-USBP.

Parameters:
  • samplingTimes (int) – See document of AioSetAoSamplingData of API-USBP.
  • data (int) – See document of AioSetAoSamplingData of API-USBP.
setAoSamplingDataEx(samplingTimes, data)[source]

This method sets output data in voltage/current. See document of AioSetAoSamplingData of API-USBP.

Parameters:
  • samplingTimes (int) – See document of AioSetAoSamplingData of API-USBP.
  • data (int) – See document of AioSetAoSamplingData of API-USBP.
setAoStartTrigger(trigger)[source]

See document of AioSetAoStartTrigger of API-USBP.

setAoStopTrigger(trigger)[source]

See document of AioSetAoStopTrigger of API-USBP.

setAoTransferData(dataNumber, buffer)[source]

This method sets user buffer for analog output. This method works This method works only when user-buffer-mode is set by pyAPISUBP.AIO.getAoTransferMode(). See document of AioSetAoTransferData of API-USBP.

Parameters:
  • dataNumber (int) – See document of AioSetAoTransferData of API-USBP.
  • buffer (ctypes.c_long_array) – See document of AioSetAoTransferData of API-USBP.
setAoTransferMode(mode)[source]

This method sets data transfer method of analog output.

Parameters:mode (int) – pyAPIUSBP.AIO.CONST_DEVICE_BUFFER for device-buffer-mode, pyAPIUSBP.AIO.CONST_USER_BUFFER for user-buffer-mode.
setCntCallBackProc(channel, callbackProc, event, param)[source]

See document of AioSetCntCallBackProc of API-USBP.

setCntComparisonMode(channel, mode)[source]

See document of AioSetCntComparisonMode of API-USBP.

setCntComparisonReg(channel, presetNumber, comparisonData, flag)[source]

See document of AioSetCntComparisonReg of API-USBP.

setCntEvent(channel, hWnd, event)[source]

See document of AioSetCntEvent of API-USBP.

setCntFilter(channel, signal, value)[source]

See document of AioSetCntFilter of API-USBP.

setCntInputSignal(channel, inputSignal)[source]

See document of AioSetCntInputSignal of API-USBP.

setCntPresetReg(channel, presetNumber, presetData, flag)[source]

See document of AioSetCntPresetReg of API-USBP.

setControlFilter(signal, value)[source]

This method sets digital filter for external signal. See document of AioSetControlFilter of API-USBP.

Parameters:
  • signal (int) – See document of AioSetControlFilter
  • value – See document of AioSetControlFilter
setDiFilter(bit, value)[source]

This method sets filter for digital input. See ocument of AioSetDiFilter of API-USBP.

Parameters:
  • bit (int) – See ocument of AioSetDiFilter of API-USBP.
  • value (float) – See ocument of AioSetDiFilter of API-USBP.
setDioDirection(direction)[source]

This method sets direction of digital I/O port. See document of AioSetDioDirection of API-USBP.

Parameters:direction (int) – See document of AioSetDioDirection of API-USBP.
setEcuSignal(destination, source)[source]

See document of AioSetEcuSignal of API-USBP.

setTmCallBackProc(timerId, callbackProc, event, param)[source]

See document of AioSetTmCallBackProc of API-USBP.

setTmEvent(timerId, hWnd, event)[source]

See document of AioSetTmEvent of API-USBP.

singleAi(channel)[source]

This method reads an analog input channel.

Parameters:channel (int) – Channel number.
Returns:Value (range depends on the device).
singleAiEx(channel)[source]

This method reads an analog input channel and converts it to voltage/current.

Parameters:channel (int) – Channel number.
Returns:Value (range depends on the device).
singleAo(channel, data)[source]

This method writes data to an analog output channel.

Parameters:
  • channel (int) – Channel number.
  • data (int) – Output data.
singleAoEx(channel, data)[source]

This method writes data (in voltage or current) to an analog output channel.

Parameters:
  • channel (int) – Channel number.
  • data (int) – Output data (in voltage/current).
startAi()[source]

This method starts analog input. See document of AioStartAi of API-USBP.

startAiSync(timeOut)[source]

This method starts synchronous analog input. See document of AioStartAiSync of API-USBP.

Parameters:timeOut (int) – See document of AioStartAiSync of API-USBP.
startAo()[source]

This method starts analog output. See document of AioStartAo of API-USBP.

startCnt(channel)[source]

See document of AioStartCnt of API-USBP.

stopAi()[source]

This method stops analog input. See document of AioStoptAi of API-USBP.

stopAo()[source]

This method stops analog output. See document of AioStoptAo of API-USBP.

stopCnt(channel)[source]

See document of AioStopCnt of API-USBP.

stopTmTimer(timerId)[source]

See document of AioStopTmTimer of API-USBP.

pyAPIUSBP.AIO.getAioDeviceType(device)[source]

Get type of the device. Device name can be obtained as the second element of device information returned by getAioDeviceType().

Parameters:device (str) – Model name of a device.
Returns:Device type.
pyAPIUSBP.AIO.getRangeString(r)[source]

Get range string from range ID.

Parameters:r (int) – range ID.
Returns:range string.
pyAPIUSBP.AIO.queryAioDeviceName()[source]

Get a list of AIO devices. Information of each device consists of device ID and device name (example: [‘AIO000’, ‘AIO-120802LN-USB’]).

Returns:A list of AIO device names.