MC-Basic:SYSTEM.ANIN
Language: | English |
---|
In general, the analog data structure is built over the layer of digital IO's. Each analog input needs to be mapped over
the digital data structure by using the SYSTEM.ANIN.map and SYSTEM.ANIN.bitrange properties.
According to the specific device configuration, we can set the analog input to use digital infrastructure.
This property reads the value of specific analog input which is translated from a real voltage input value.
Short form
Sys.AnIn[Index]
Syntax
?System.AnIn[Index]
Availability
Version 0.4.20.5r8-C2 or higher
Type
Double
Default
no default. depends on the voltage input value.
Scope
Configuration, Task or Terminal
Limitations
Read-only
Examples
configuration:
- -->Sys.AnIn[1].map = 1000
- -->Sys.AnIn[1].bitrange = 12
- In this case we get a one analog input with Index = 1 that uses sys.Din[1000][12] structure.
usage:
- -->common shared dMyAnalogValue as double
- -->dMyAnalogValue = Sys.AnIn[1]