AIO_InW Method

Description
Reads analog value from optional analog I/O input channel.

Syntax
Function AIO_InW (Channel As Integer) As Integer

Parameters

  • Channel
    Specifies the analog I/O channel number.

Return Value
Returns the input states (Integer expression from 0 to 65535) of specified analog I/O channel.

The following table shows input voltage (current) and return value of each input channel according to input range configuration of analog I/O board.

Input Data Input Range Configuration
Hexadecimal Decimal ±10.24(V) ±5.12(V) 0-5.12(V) 0-10.24(V) 0-24(mA)
0xFFFF 65535 10.23969 5.11984 5.12000 10.24000 24.00000
0x8001 32769 0.00031 0.00016 2.56008 5.12016 12.00037
0x8000 32768 0.00000 0.00000 2.56000 5.12000 12.00000
0x0000 0 -10.24000 -5.12000 0.00000 0.00000 0.00000

See Also
AIO_In Method, AIO_Out Method, AIO_OutW Method

AIO_InW Use Example
VB Examples:

Dim val As Integer  
val = m_spel.AIO_InW(2)  

C# Example:

int val;  
val = m_spel.AIO_InW(2);