MC-Basic:SYSTEM.ANOUT

From SoftMC-Wiki
Jump to: navigation, search
Language: English

In general, the analog data structure is built over the layer of digital IO's. Each analog output needs to be mapped over
the digital data structure by using the SYSTEM.ANOUT.map and SYSTEM.ANOUT.bitrange properties. According to the specific device configuration, we can set the analog output 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.AnOut[Index]

Syntax

?System.AnOut[Index]

Availability

Version 0.4.20.5r8-C2 or higher

Type

Double

Default

0.0

Scope

Configuration, Task or Terminal

Limitations

Read or write.

Examples

configuration:

  • -->Sys.AnOut[1].map = 1000
  • -->Sys.AnOut[1].bitrange = 12
  • In this case we get a one analog output with Index = 1 that uses sys.Dout[1000][12] structure.

usage:

  • -->common shared dMyAnalogValue as double
  • -->dMyAnalogValue = Sys.AnOut[1]
  • -->dMyAnalogValue =1.234
  • -->Sys.AnOut[1] = dMyAnalogValue
  • -->?Sys.AnOut[1]
  • -->1.234

See Also