Tracking Environmental Data with LTPS

Tracking Environmental Data with LTPS

About the Application

This tutorial shows how to collect the environmental data — humidity, leak and ambient lighting level — from the LTPS device using the Modbus device, how to process this data with Process Control program, and visualize it in a real time.

  • The red LED turns on when the sensor detects increased humidity.
  • The yellow LED turns on when the sensor detects a low light level.
  • The green LED turns on when the sensor detects a leak.

What you need

Hardware

Onboard Software

Application

Create a Modbus device:

Add registers:

Create a new program "Test":

Let's create local variables:

VAR
    green, yellow, red : BOOL;
END_VAR

Link the local variables with GPIO. Switch the variable direction to the "Output":

Let's create a program in the work form:

Launch Application

It's high time to see our new program in action. Right-click on the program in the System Tree. Choose the Debug action in the popup menu:

Create a chart with the variable "humidity" in the Modbus device:

Tracking Environmental Data with LTPS