FLT - Fault inputs

The FLT block configures and reads the digital fault inputs.

The fault input pin signals are tied to the fault manager and, using the FLT block, they can be configured to generate a “hardware fault” and immediately disable all the PWM outputs (similar to an analog input limit fault or any other fault). They can also be accessed as digital inputs like a GPI.

Simulink block

Signal specification

The output signal returns the value of one FLT pin.

Fault inputs block Simulink

Parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • Fault input(s) (vectorizable) selects the pin(s) to read.
  • Activate fault input enable the generation of a “hardware fault” if the pin goes high and immediately disable all the PWM outputs.
Fault inputs Simulink dialog parameters

PLECS block

Signal specification

The output signal returns a vector containing the values of the FLT pins. The vector size is defined by the number of FLT pin(s) read which is specified by the parameter Fault input(s).

Fault inputs PLECS block

Parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • Fault input(s) (vectorizable) selects the pin(s) to read.
  • Activate fault input enable the generation of a “hardware fault” if the pin goes high and immediately disable all the PWM outputs.
Fault inputs PLECS dialog parameters

C++ functions

void Flt_ActivateFaultInput(tFaultInput input, unsigned int device=0);Code language: C++ (cpp)

Enables the generation of a “hardware fault” if the addressed pin goes high.

It has to be called in UserInit().

Parameters

  • input: the FLT input pin number
  • device: the id of the addressed device (optional, used in multi-device configuration only)
int Flt_GetBit(unsigned int bit, unsigned int device=0);Code language: C++ (cpp)

Returns the FLT pin value (0 or 1).

It has to be called during the control interrupt.

Parameters

  • input: the FLT input pin number
  • device: the id of the addressed device (optional, used in multi-device configuration only)
int Flt_Get(unsigned int device=0);Code language: C++ (cpp)

Returns the values of the fault inputs in the form of a 16-bit value.

It has to be called during the control interrupt.

Parameters

  • device: the id of the addressed device (optional, used in multi-device configuration only)