AioGetAoMaxChannels


Function

Retrieves the maximum number of channels for the analog output. This function supports multi-process.

Format

Ret = AioGetAoMaxChannels ( Id , AoMaxChannels )

Parameters

Id [ C, C++ : short ] [ Python : ctypes.c_short ]
Specifies the Device ID retrieved from AioInit function.

AoMaxChannels [ C, C++ : short * ] [ Python : ctypes.POINTER(ctypes.c_short) ]
Specifies the address of the variable that stores the maximum number of channels.

Return value

Ret [ C, C++ : long ] [ Python : ctypes.c_long ]

Return values

Content

0

Normality completion

7

Execute AioResetDevice function because the device has recovered from standby mode

10001

Invalid Id was specified
Use the Id retrieved from AioInit to specify the Id in this function.

10002

AIO driver can't be called
At first, perform AioInit function.

13080

Pointer to AoMaxChannels is NULL
Specify the address of variable to parameter.

20002

Can not use while by another device works
When another process is using the device, all functions except for those that support multi-process can not be performed.

Initial value

The maximum number of channels differs by the device that you use.

Remarks

If the device is in operation, the function cannot be performed.

Specifications based on devices

AIO-163202G-PE
AIO-163202UG-PE
AIO-123202G-PE
AIO-123202UG-PE
AIO-163202F-PE
ADA16-32/2(PCI)F

AoMaxChannels = 2

AIO-160802L-LPE
ADA16-8/2(LPCI)L
ADAI16-8/2(LPCI)L
AIO-160802LI-PE

AoMaxChannels = 2

DA16-16(LPCI)L
AO-1616L-LPE

AoMaxChannels = 16

DA16-8(LPCI)L
AO-1608L-LPE

AoMaxChannels = 8

 AO-1604L-LPE
DA16-4(LPCI)L
DAI16-4(LPCI)L
AO-1604LI-PE

AoMaxChannels = 4

AD12-16(PCI)EV
AD12-16U(PCI)EV
AD16-16(PCI)EV
AD16-16U(PCI)EV
AIO-121601E3-PE
AIO-121601UE3-PE
AIO-161601E3-PE
AIO-161601UE3-PE

AoMaxChannels = 1

DA12-16(PCI)
DA12-8(PCI)
DA12-4(PCI)

AoMaxChannels = 16
AoMaxChannels = 8
AoMaxChannels = 4

AO-1604CI3-PCI

AoMaxChannels = 4

AIO-160802AY-USB
AIO-160802GY-USB

AoMaxChannels = 2

AIO-163202FX-USB

AoMaxChannels = 2

AIO-121602LN-USB
AIO-120802LN-USB

AoMaxChannels = 2

AO-1604LX-USB

AoMaxChannels = 4

AO-1604VIN-USB
AO-1604AIN-USB
AO-1604VIN-ETH
AO-1604AIN-ETH

AoMaxChannels = 4

CPSN-AO-1602LC

AoMaxChannels = 2

CPI-AO-1602LC

AoMaxChannels = 2

AIO-16256256-DEMO

AoMaxChannels = 256

Example

Retrieves the maximum number of channels for the analog output.

C, C++

long Ret;
short AoMaxChannels;
Ret = AioGetAoMaxChannels ( Id , &AoMaxChannels );
 

Python

Ret = ctypes.c_long()
AoMaxChannels = ctypes.c_short()
Ret.value = caio.AioGetAoMaxChannels ( Id , ctypes.byref(AoMaxChannels) )