IOT-GATE-RPI5: Raspberry Pi OS: I/O Configuration

From Compulab Mediawiki
Jump to: navigation, search

Overview

This article provides instructions for iotg-rpi5-config utility. It is a command-line interactive tool for configuring IOT-GATE-RPI5 Industrial I/O interfaces.

Running utility

Admolition note.png IOT-GATE-RPI5 configuration settings generated by iotg-rpi5-config are stored in the config.txt file and require a reboot to take effect.

Run the iotg-rpi5-config with root permissions:

pi@raspberrypi:~$ sudo /opt/iot-gate-rpi5/shell/iotg-rpi5-config

Navigation

Use the Up and Down arrow keys to move through menu options, Enter to move in and Esc to move out.
Use Space to select/deselect configuration option.
Use Tab to jump between menu body and control buttons (e.g. Select, Back etc.)

Main Menu

Main menu provides access to main options:

┌─────────────┤ IOTG-RPi5 Configuration Tool (iotg-rpi5-config) ├──────────────┐
│                                                                              │
│           1 Industrial I/O Stack     Industrial I/O Stack options            │
│           2 Save Changes and Exit    Apply changes and exit                  │
│           3 Discard Changes and Exit Exit discarding changes                 │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Ok>                         <Cancel>                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Industrial I/O Stack Options

┌───────────────────────┤ Industrial I/O Stack Options ├───────────────────────┐
│                                                                              │
│           I1 Show          Show Industrial I/O Stack Configuration           │
│           I2 Configure     Configure Industrial I/O Stack                    │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Select>                     <Back>                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Configure Industrial I/O Slots

┌───────────────────────┤ Industrial I/O Slots Options ├───────────────────────┐
│                                                                              │
│       C1 Slot A         Configure Industrial I/O interface for slot A        │
│       C2 Slot B         Configure Industrial I/O interface for slot B        │
│       C3 Slot C         Configure Industrial I/O interface for slot C        │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Select>                     <Back>                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

For industrial slots A and B it is possible to choose one of following configuration option:

  • CAN - configure as CAN FD interface
  • RS485 - configure as RS-485 interface (half-duplex)
  • IDLE - disable all interfaces
┌──────────────────────────┤ Industrial I/O Slot A ├───────────────────────────┐
│                                                                              │
│  ( ) CAN    CAN FD interface                                                 │
│  (*) RS485  RS-485 interface (half-duplex)                                   │
│  ( ) IDLE   No interface is enabled                                          │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Ok>                         <Cancel>                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

For industrial slot C the only configuration option is:

  • DIO - configure Digital I/O interface 4x Digital Signals (inputs or outputs)
┌──────────────────────────┤ Industrial I/O Slot C ├───────────────────────────┐
│                                                                              │
│  (*) DIO  4x Digital Signals (inputs or outputs)                             │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Ok>                         <Cancel>                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
  • Each one of four Digital Signals 0 to 3 can be individually configured as either input or output
┌────────────────────────┤ Digital I/O (DIO) Options ├─────────────────────────┐
│                                                                              │
│                  P0 D0          Configure Digital Signal 0                   │
│                  P1 D1          Configure Digital Signal 1                   │
│                  P2 D2          Configure Digital Signal 2                   │
│                  P3 D3          Configure Digital Signal 3                   │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Select>                     <Back>                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────┤ Digital Signal 2 ├─────────────────────────────┐
│                                                                              │
│  (*) Input   Read-only access enabled                                        │
│  ( ) Output  Write-only access enabled                                       │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Ok>                         <Cancel>                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

User defined configuration can be shown in a corresponding menu.

Show Industrial I/O Modules

┌─────────────────┤ Show Industrial I/O Stack Configuration ├──────────────────┐
│                                                                              │
│      S1 Show User Configured          Show user defined configuration        │
│      S2 Show Current Configuration    Show currently run configuration       │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                                                                              │
│                     <Select>                     <Back>                      │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

User defined configuration

This option displays user defined configuration for industrial I/O slots

     ┌────────────┤ Industrial I/O Stack: user configuration ├────────────┐
     │                                                                    │ 
     │         Slot A:  [RS485] - RS-485 interface (half-duplex)          │ 
     │                                                                    │ 
     │                                                                    │ 
     │         Slot B:  [CAN] - CAN FD interface                          │ 
     │                                                                    │ 
     │                                                                    │ 
     │         Slot C:  [DIO] - 4x Digital Signals (inputs or outputs)    │ 
     │                                                                    │ 
     │                  IN OUT                                            │ 
     │            D0    [*][ ]                                            │ 
     │            D1    [ ][*]                                            │ 
     │            D2    [ ][*]                                            │ 
     │            D3    [*][ ]                                            │ 
     │                                                                    │ 
     │                                                                    │ 
     │                               <Ok>                                 │ 
     │                                                                    │ 
     └────────────────────────────────────────────────────────────────────┘ 

Running configuration

This option displays running configuration of the Industrial I/O Stack

     ┌──────────┤ Industrial I/O Stack: running configuration ├───────────┐
     │                                                                    │ 
     │         Slot A:  [RS485] - RS-485 interface (half-duplex)          │ 
     │                                                                    │ 
     │                                                                    │ 
     │         Slot B:  [RS485] - RS-485 interface (half-duplex)          │ 
     │                                                                    │ 
     │                                                                    │ 
     │         Slot C:  [DIO] - 4x Digital Signals (inputs or outputs)    │ 
     │                                                                    │ 
     │                  IN OUT                                            │ 
     │            D0    [*][ ]                                            │ 
     │            D1    [*][ ]                                            │ 
     │            D2    [*][ ]                                            │ 
     │            D3    [*][ ]                                            │ 
     │                                                                    │ 
     │                                                                    │ 
     │                               <Ok>                                 │ 
     │                                                                    │ 
     └────────────────────────────────────────────────────────────────────┘ 

Save Changes

It's strongly recommended to review user defined configuration for I/O modules before applying a new configuration.

┌──────────────────────────────────────────────────────────┐
│                                                          │
│ Would you like to apply changes and exit?                │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│                                                          │
│               <Save & Exit>          <Back>              │
│                                                          │
└──────────────────────────────────────────────────────────┘

Please note, all changes require a reboot to take effect.

┌────────────────────────────────────────────────────────────────────┐
│                                                                    │
│         NOTE: ANY CHANGES WILL TAKE EFFECT ONLY AFTER REBOOT.      │
│                                                                    │
│         Would you like to reboot now?                              │
│                                                                    │
│                                                                    │
│                  <Yes>                     <No>                    │
│                                                                    │
└────────────────────────────────────────────────────────────────────┘