Skip to main content
FW version: Stable

Input mapping

tip

I strongly recommend at least understanding what Signal flow does before reading about input mapping.

Using the input mapping, you can map the physical inputs (GPIOs) to the OPHION inputs.

All of these settings are located in the directory /io in the controller. OPHION considers at most two analog inputs (level_INPUT and level2_INPUT) and two digital inputs (IN1_INPUT and IN2_INPUT). The user maps these inputs to real physical inputs or receives the values in the Ophion controll CAN message.

Parameters

Settable parameters for input mapping, directory /io.

ParameterDescriptionRange
level_INPUTDefines what input is mapped to analog input 1List of input ID.
set 0,255 for CAN_input
level2_INPUTDefines what input is mapped to analog input 2List of input ID.
set 0,255 for CAN_input
IN1_INPUTDefines what input is mapped to digital input 1List of input ID.
set 0,255 for CAN_input
IN2_INPUTDefines what input is mapped to digital input 2List of input ID.
set 0,255 for CAN_input
can_inputEnables control from CAN message0: Disabled
1: Enabled
can_offsetDefines offset for CAN controll MSG. Can MSG ID = offset + addrDefault 0x610
[ 0x600 - 0x700 ]

Physical inputs

When mapping to physical inputs, you can ignore the second part of the parameter. Only set the first value.

  • To the analog input, set the corresponding ID of GPIO input.
  • To the digital input, set the corresponding ID of GDIN or DIN input.

List of input ID.

note
  • GDIN = Gpio DIN, digital input on GPIO pin
  • The second value of the input is device address. In most cases this is 0.
example

For example, if I want to set level_INPUT to GPIO0, the value for parameter io/level_INPUT should be 8,0.

Input from CAN

If you want to receive the input from CAN, you have to set the parameter to 0,255. This means that the input is taken from the CAN message..

tip

You can combine CAN and physical inputs.