weAut_01 (weAutSys' target hardware) has 8 digital output (DO) channels (LV, 100mA, protected). Those outputs are supervised with respect to overload and over-temperature.
The allowed range for the load voltage (LV) is 7..28V, the nominal values being either 12V or 24V. The LV is supervised, too.
Functions | |
uint8_t | actDOdriver (void) __attribute__((always_inline)) |
DO digital (process) output: actual value. | |
uint8_t | doDriverEnabled (void) __attribute__((always_inline)) |
Digital (process) output DO driver enabled. | |
uint8_t | doDriverOK (void) __attribute__((always_inline)) |
Digital (process) output DO driver OK. | |
void | enableDOdriver (uint8_t state) __attribute__((always_inline)) |
Enable the digital (process) output DO driver. | |
uint8_t | prvDOdriver (void) __attribute__((always_inline)) |
DO digital (process) output: previous value. | |
void | toDOdriver (uint8_t value) |
Output to digital (process) output DO. | |
Variables | |
uint8_t | lowLV |
Load voltage low. |
void toDOdriver | ( | uint8_t | value | ) |
Output to digital (process) output DO.
This function outputs an eight bit value to the standard digital process output.
On weAut_01 (weAut_00) this is the complete SPI 1 output function to the protected DO driver and its 8 green (ordered output) status LEDs.
The value
goes direct to the 8 green DO LEDs. The state driven to the DO outputs further depends on the state of the driver (enable / disable, fault) and on the level of its supply -- the load voltage (LV) or "Lastspannung" in German.
On other platforms (arduMega2560 and the like) the value will be output to the eight bit port configured. If no DO is configured (marcro DO_0_PORT undefined) no output will be done (but the states are hold).
value | 8 bits for 8 green LEDs, upper row, located in the same column as the corresponding DO clamps |
uint8_t actDOdriver | ( | void | ) |
DO digital (process) output: actual value.
This function returns the actual value of the DI LEDs.
uint8_t prvDOdriver | ( | void | ) |
DO digital (process) output: previous value.
This function returns the actual value of the DI LEDs.
void enableDOdriver | ( | uint8_t | state | ) |
Enable the digital (process) output DO driver.
This function allows all 8 DO output channels to be turned off respectively on.
On weAut_01 (weAut_00) this will control the protected DO driver (9..28V "Lastspannung") and does in no way influence the output value set by toDOdriver(uint8_t)
, which will be still displayed by the (8 green) DO LEDs.
The off state will be signaled by the (red) DO disable LED.
Also, turning off is the procedure to reset any output driver's fault state, be it on over temperature or over current. Turning off on a fault state will probably not make the situation worse. A fault condition turns the output driver off anyway.
On other platforms this will be used to mask out the the output value set by toDOdriver(uint8_t)
respectively re-enable it.
state | true: enable; false: disable |
uint8_t doDriverEnabled | ( | void | ) |
Digital (process) output DO driver enabled.
uint8_t doDriverOK | ( | void | ) |
Digital (process) output DO driver OK.
On weAut_01 (weAut_00) this function returns true if the protected DO driver (9..28V "Lastspannung") is neither in over current nor over temperature shut down state for at least one output channel.
On other platforms with a Port dedicated to DO this function returns true if the re-read out pin values equal the actual output. If that is not so there may be shorts to Vdd or Gnd or configuration problems.
In all other cases this function blindly returns true.
uint8_t lowLV |
Load voltage low.
Non 0 means a low load voltage supply (LV, German Lastspannung). In that case the digital output's (DO's) supply is below about 10.3V. This is also approximately the level where weAut_01's lower blue LEDs shine with only medium brightness. Lower side of the board means the RJ45 jack side.
At 10 V load voltage the processor's an all other periphery's supply is still guaranteed, even if the redundant supply should be absent. But the operation of 12V periphery is probably at risk and that of 24V periphery normally gone already.
Hint 1: If a more accurate control of LV is needed, its possible to tie an (DI) input as AI to LV (using it in the analogue mode then).
Hint 2: weAut_01 can have this LV threshold risen to (industrial automation) 24V mode by a simple wire bridge. See the hardware manual of your module.
Hint 3: lowLV
is implemented as a counter counting up to 128 respectively down to 0 every millisecond according to LV > about 10,3V. The 0-1-transition will set / un-set the red (test) LED, so red = on will indicate "LV low". This may slightly interfere with other usages of this red test LED during development / debugging phases.
After an intermediate use of the red (test) LED it can be restored to the proper (LV) state by setStatusLedRd(lowLV)
.
Hint 4: This variable should never be set by user / application software.
This feature is available at weAut_01 (weAut_00) only. Boards without "real" process signals and load supply handling can't have it.