AIN/DIN
The following variables are located in the /common
folder.
Difference between GPIO, AIN and DIN :
- GPIO - high precision, usual reading voltage range is 0-10V, can read negative voltages, can be individualy configured with pull-up or pull-down resistors, can capture pulses (PAS, speed sensor), can be optionally used as an output, is typically isolated from the power stage.
- AIN - usual reading voltage range is from zero up to the battery voltage. It is not isolated from the power stage.
- DIN - a digital state of the physical DIN/ODIN input (if present) or digital representation of the AIN input (if present).
States
ain
[10mV]
Reading of AIN inputs, representing the analog voltage.
AIN inputs are present only in the SL controller.
din
Digital state physical DIN/ODIN inputs or, digital representation of the AIN inputs, where the threshold for logic 1 is set by the adin_thr
parameter.
vspl
[mV]
Internal voltage of the power supply for the I/O module.
This is a diagnostic measurement and only available in certain devices.
Parameters
AIN inputs are present only in the SL controller, therefore the following parameters are only present in this device.
adin_thr
[10mV]
This threshold defines the decision level for converting analog reading of ain
to the digital, bi-state value of din
.
pupd
assigns the global pull-up or pull-dn resistors to all the AIN inputs.
pupd value | Description |
---|---|
0 | floating (~47k pull-dn) |
1 | pull-up (~100k pull-up) |
2 | pull-down (~32k pull-dn) |