Class: AnOutput

AnOutput

Provides methods and properties for accessing an analog output.

Members


offset :number

The offset value for converting scaledValue to/from rawValue.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

rawValue :number

The raw, untranslated value of the DAC. Range is [0, 4095]

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

scale :number

The scale value for converting scaledValue to/from rawValue. This value can also be set by calling configureForAmps, configureForMAmps or configureForVolts.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0.0

scaledValue :number

The value, scaled using scale, and offset using offset. The same as (anOutput.rawValue * anOutput.scale) + anOutput.offset.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

Methods


configureForAmps()

Sets scale and offset so scaledValue is in Amps.

Since:
  • 1.0 (WAT 1.0)

configureForMAmps()

Sets scale and offset so scaledValue is in mAmps.

Since:
  • 1.0 (WAT 1.0)

configureForVolts()

Sets scale and offset so scaledValue is in Volts.

Since:
  • 1.0 (WAT 1.0)

setRawValue(val)

Same as writing to rawValue, but can be connected to a signal.

Parameters:
Name Type Description
val number

The new raw value.

Since:
  • 1.3 (WAT 1.4)

setScaledValue(val)

Same as writing to scaledValue, but can be connected to a signal.

Parameters:
Name Type Description
val number

The new scaled value.

Since:
  • 1.3 (WAT 1.4)

Events


stateChanged

Indicates that the state of the analog output has changed. Event will only fire if monitor mode has been enabled.

Parameters:
Name Type Description
value number

new scaled value of the DAC

Since:
  • 1.0 (WAT 1.0)