GPO - General purpose outputs

The GPO block sets the values of the General purpose outputs (GPO). To read the value, use the GPI block.

Signal specification

The GPO pin is set if the input is >0.

Parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • GPO pin(s) (vectorizable) is the GPO pin(s) to control. It can be a single value or a vector.
  • Reset pin value to 0 in case of fault acts when a fault is detected, for instance when an analog inputs exceeds a configured limit value.
  • Show simulation output port defines if the simulation output is displayed or not.

PLECS block

Signal specification

The GPO pin is set if the input is >0.

General purpose outputs PLECS block

Parameters

  • Device ID selects which B-Box/B-Board to address when used in a multi-device configuration.
  • GPO pin(s) (vectorizable) is the GPO pin(s) to control. It can be a single value or a vector.
  • Optional reset can be set to Reset pin value to 0 in case of fault to act when a fault is detected, for instance when an analog inputs exceeds a configured limit value.
  • Simulation input port defines if the target outport is displayed or not. This parameter is only used in simulation.

C++ functions

void Gpo_SetBit(unsigned int bit, unsigned int device=0);Code language: C++ (cpp)

Sets the addressed GPO pin.

Parameters

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

Clears the addressed GPO pin.

Parameters

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

void Gpo_ToggleBit(unsigned int bit, unsigned int device=0);Code language: C++ (cpp)

Toggles the addressed GPO pin.

Parameters

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

Sets the GPO pin to value.

GPO(bit) = 0 if value=0, GPO(bit) = 1 if value>0

Parameters

  • value: the value to apply to the GPO pin (0 or 1)
  • device: the id of the addressed device (optional, used in multi-device configuration only)
void Gpo_Set(unsigned int value, unsigned int device=0);Code language: C++ (cpp)

Sets the whole 16-bit GPO register.

It has to be called during the control interrupt.

Parameters

  • value: the 16-bit value to apply to the GPO outputs
  • device: the id of the addressed device (optional, used in multi-device configuration only)
void Gpo_ClearBitInCaseOfFault(unsigned int bit, unsigned int device=0);Code language: C++ (cpp)

Configure a bit of the GPO register to be cleared when the system goes in fault.

Parameters

  • value: the value to apply to the GPO pin (0 or 1)
  • device: the id of the addressed device (optional, used in multi-device configuration only)