In this example, we will read the temperature using the RTD channel of the RevPi AIO and output the measured value to an analog output channel connected to a digital display.

Prerequisites #

Hardware #

✓ RevPi Connect 4
✓ RevPi AIO
✓ Temperature Sensor (e.g., PT1000, 4 Wire)
✓ Digital Display (e.g., ITP11 Process Indicator)

▷ Connect the Temperature Sensor (PT1000) to the RTD channel 1 of the RevPi AIO.

▷ Connect RevPi Connect 4 and RevPi AIO using the PiBridge.

▷ Ensure the power supply is properly connected.

▷ Operate your RevPi either in headless mode or connect a monitor, mouse, and keyboard to it.

For detailed instructions about how to set up your system, see Getting Started.

Software #

✓ CODESYS Development System installed on your PC

To ensure a compatible system with suitable software, see CODESYS System Requirements.

Step 1: Create a New Project in CODESYS #

▷ See how to create a project here and adapt with your Hardware.

▷ In this example we use the EN 61131-3 programming languages for PLC.

Step 2: Configure the RTD Channel and Output Channel #

▷ ensure that the temperature sensor to RTD channel 1 on the RevPi AIO is connected.

▷ Configure RTD Channel 1 for PT1000 - 4 wire temperature measurements.

▷ Connect the digital display (ITP11 Process Indicator) to analog output channel 1 on the RevPi AIO.

▷ Configure the analog output channel to use 4 …​ 20 mA current.

AIO Setting

Step 3: Write the Code for reading Temperature from RTD channel und wrie to the Output Channel #

▷ Assign the variable name RTD_CH1 to the RTD Channel 1 with data type INT

▷ Assign the variable name iAIO_ch2 to the Output Channel 2 with data type INT

AIO Setting

▷ Double-click on PLC_PRG in the device tree. ❯ This will open the program window PLC_PRG where the Code for reading Temperature from RTD channel und write to the Output Channel of to the RevPI AIO shall be written in ST.

AIO Setting

Step 4: Run the Application #