GPO - General purpose outputs

The GPO block, or its equivalent C++ routines, is responsible for asserting the specific logic states of the General Purpose Outputs (GPO) pins. This interface allows imperix’s programmable controllers to drive external signals effectively.

Hardware specifications, including location, voltage logic levels and output counts, are summarized in the reference table below. Detailed specifications regarding the GPO can be found within the associated product datasheet. Additionally, a comprehensive technical comparison of imperix’s programmable controllers is provided in PN250.

Param.B-Box 4B-Box 3B-Box microB-Board 3 PRO
Location and count– 48x fiber/VHDCI outputs– 16x VHDCI outputs– 8x PCB header outputs– 16x PCB header outputs
Logic level– 3.3V/5V (elec.)– 3.3V/5V– 5V– 3.3V
Shared with– PWMN/AN/AN/A
Product datasheetB-Box 4B-Box 3B-Box microB-Board 3 PRO

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)