Within EEROS we work with signals having physically meaningful units. However, when such signals are read from real-world hardware we use analog-to-digital converters or encoder which are basically counters. When outputting such signals we use digital-to-analog converters. These counters or converters all deliver or need an integer value. Its maximum and minimum value depend on the resolution of the underlying hardware. The scale and range key allows to convert between the necessary integer value and the physically meaningful signals. You might have several stages in your hardware, see Setting Multiple Scales and Ranges.
To configure such a channel follow these steps:
range with minOut and maxOut.range with minIn and maxIn.scale as minInscale as minOut.scale as maxInscale maxOut.The resulting channel configuration for a 16bit DAC might look like:
  "channel0": {
    "signalId": "dacOut0",
    "scale": [ { "id" : "dac",
                 "minIn":    1000, "maxIn":  64000,
                 "minOut": -9.787, "maxOut": 9.923 } ],
    "range": [ { "id" : "dac",
                 "minIn":       0, "maxIn":  65536,
                 "minOut":  -10.0, "maxOut":  10.0 } ],
    "unit": "V"
  }
If you know the scale and offset of your channel you could give these values directly as:
  "channel0": {
    "signalId": "dacOut0",
    "scale": [ { "id" : "dac",
                 "scale":  0.5,
                 "offset": 2.5 } ],
    "range": [ { "id" : "dac",
                 "minIn":       0, "maxIn":  65536,
                 "minOut":  -10.0, "maxOut":  10.0 } ],
    "unit": "V"
  }
To configure such a channel follow these steps:
range with minIn and maxIn.range with minOut and maxOut.scale as minInscale as minOut. If your are using comedi for instance, you use a user interface to read the digital value. scale as maxInscale maxOut.The resulting channel configuration for a 16bit ADC might look like:
  "channel0": {
    "signalId": "adcIn0",
    "scale": [ { "id" : "adc",
                 "minIn":    -9.6, "maxIn":   8.85,
                 "minOut":    368, "maxOut": 61344 } ],
    "range": [ { "id" : "adc",
                 "minIn":   -10.0, "maxIn":   10.0,
                 "minOut":      0, "maxOut": 65535 } ],
    "unit": "V"
  }
To configure such a channel follow these steps:
scale with maxOut while maxIn is a full turn in rad.range with have noLimit because it might turn forward or backward without limitation.The resulting channel configuration for an encoder might look like:
  "channel0": {
    "signalId": "enc0",
    "scale": [ { "id" : "enc",
                 "minIn":   0, "maxIn": 6.28318530718,
                 "minOut":  0, "maxOut":         4096 } ],
    "range": [ { "id" : "enc",
                 "noLimit": true } ],
    "unit": "rad"
  }