Adding a RevPi Base Module #
When you add devices to the project, a list of potential RevPi base modules is displayed.
▷ Select your RevPi base module and add it.
Adding a RevPi Expansion Module #
Certain RevPi expansion modules can be connected to the right and left sides of the RevPi base modules of the RevPi Connect and RevPi Core series. See also Rules for the Arrangement of Devices.
Adding a RevPi I/O Module
Add the RevPi I/O modules to the project tree via the piBridgeLeft and piBridgeRight objects according to the physical arrangement of the RevPi I/O modules in your system.
▷ Select the RevPi I/O module and add it.
Adding a RevPi Gateway
RevPi Gateways are added to the project tree via the PiBridgeEnd object.
PiBridgeEnd is a virtual termination of the PiBridge that indicates the end of the RevPi expansion modules.
▷ Select the RevPi Gateway and add it.
Adding a RevPi Con Module
RevPi Con modules are added to the project tree via the PiBridgeRight object.
▷ Select the RevPi Con module and add it.
Adding a Virtual Device
The Virtual Device can be used to exchange data between CODESYS and other external applications such as Node-RED. For this purpose, a virtual interface uses the memory reserved in the process image. The Virtual Device is added to the project tree via the piBridgeVirtual object.
▷ Add the Virtual Device.
|
Note
|
The example files provided via GitLab already contain ready-made projects and programmed applications. To get started working with RevPi and CODESYS, we recommend the RevPiLED-Control examples for controlling the LEDs. See also CODESYS Examples. |
Configuration #
The RevPi devices are configured in the device configuration of the CODESYS Development System. In its tabular structures, variables can be assigned to the I/O channels and specific values can be set.
▷ Select the RevPi device in the device tree.
❯ The device configuration window opens.
▷ Enter variables in the Mapping tab.
▷ Set values in the Parameter tab.
When a project is loaded onto the RevPi device, the settings are mapped automatically.
At the same time, the configuration is automatically saved in the PiCtory application. It is used in PiCtory only as read-only because the configuration file config.rsc is executed again after each restart of CODESYS.
|
Note
|
CODESYS and PiCtory cannot be used in parallel for configuration. An existing configuration via PiCtory will be overwritten by a configuration via CODESYS. The virtual devices OPC UA Server and MQTT Client can only be used via PiCtory. |
For the type and use of the parameters and configurable values of the RevPi devices, see:
Base Module Configuration
RevPi I/O Module Configuration
RevPi Gateway Configuration
The following mappings are defined for the ModuleState byte in the device configuration:
| Value | Status |
|---|---|
0x00 |
Physically offline |
0x01 |
Physically connected, but no communication |
0x02 |
Standby/Ready (PreOp) |
0x03 |
Cyclic data exchange active (Op) |
CODESYS Tutorials #
We provide sample projects with accompanying tutorials for various use cases with CODESYS and RevPi. This allows you to try out typical applications right away and understand the configuration in CODESYS.
The sample projects cover a variety of topics, such as controlling inputs and outputs, communicating via various protocols, and creating visualizations.
You can download the sample projects from the repository for CODESYS examples.
An overview of all tutorials is available under CODESYS Examples.