Input mapping
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
.
Parameter | Description | Range |
---|---|---|
level_INPUT | Defines what input is mapped to analog input 1 | List of input ID. set 0,255 for CAN_input |
level2_INPUT | Defines what input is mapped to analog input 2 | List of input ID. set 0,255 for CAN_input |
IN1_INPUT | Defines what input is mapped to digital input 1 | List of input ID. set 0,255 for CAN_input |
IN2_INPUT | Defines what input is mapped to digital input 2 | List of input ID. set 0,255 for CAN_input |
can_input | Enables control from CAN message | 0: Disabled 1: Enabled |
can_offset | Defines offset for CAN controll MSG. Can MSG ID = offset + addr | Default 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.
- GDIN = Gpio DIN, digital input on GPIO pin
- The second value of the input is device address. In most cases this is 0.
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..
You can combine CAN and physical inputs.