---
title: "PLC-connected Temperature Monitor"
url: "https://maker.wiznet.io/teju/projects/plc-connected-temperature-monitor/"
markdown_url: "https://maker.wiznet.io/teju/projects/plc-connected-temperature-monitor/md"
type: "UCC: User Created Content"
author: "terrencebarr"
author_url: "https://github.com/electricimp/examples/tree/master/FieldbusGateway_TempPLC"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "terrencebarr"
original_url: "https://github.com/electricimp/examples/tree/master/FieldbusGateway_TempPLC"
published: "2023-01-04"
language: "en"
hardware: ["WIZnet W5500"]
likes: 10
views: 484
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# PLC-connected Temperature Monitor

> This example uses an impAccelerator™ Fielbus Gateway, the Electric Imp Modbus Library, a Click Programmable Logic Controller (PLC) and a the

Original author: terrencebarr (source: https://github.com/electricimp/examples/tree/master/FieldbusGateway_TempPLC)

## Components

- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Documents and links

- [examples/FieldbusGateway_TempPLC/](https://github.com/electricimp/examples/tree/master/FieldbusGateway_TempPLC) (code)

## Article

## Temperature PLC

This example uses an [impAccelerator™ Fielbus Gateway](https://electricimp.com/docs/hardware/resources/reference-designs/fieldbusgateway/), the Electric Imp Modbus Library, a Click Programmable Logic Controller (PLC) and a thermistor to monitor temperature. The thermistor is connected to an analog input on the PLC. The Fielbus Gateway polls this analog input and sends the temperature reading to IBM Watson and Dweet.io.

## Hardware

- [impAccelerator Fielbus Gateway](https://store.electricimp.com/collections/featured-products/products/impaccelerator-fieldbus-gateway?variant=31118564754)

- [C0-02DD1-D Click PLC](https://www.automationdirect.com/adc/Shopping/Catalog/Programmable_Controllers/CLICK_Series_PLCs_%28Stackable_Micro_Brick%29/PLC_Units/C0-02DD1-D?utm_source=google&utm_medium=product-search&gclid=CPeB4NWljNQCFUlNfgod9l4OVg)

- Pump

- Thermistor

- Power Supply

## Software Dependencies

- Electric Imp [Modbus Library](https://github.com/electricimp/Modbus)

- Electric Imp [IBMWatson Library](https://github.com/electricimp/IBMWatson)

- Electric Imp [Dweetio Library](https://github.com/electricimp/Dweetio)

## Device Code

The Fielbus Gateway’s imp005 polls the PLC for temperature readings and sends them to the agent.

## Agent Code

The agent sends the temperature readings to IBM Watson and Dweet.io.

**Note** Dweet.io uses the imp005’s device ID as a unique identifier. IBM Watson requires an account and access keys to push data to it. The keys have been removed from this example code, and so you will have sign up for IBM Watson and paste its access keys into the appropriate variables before the agent can push data to it.

---

Source: https://maker.wiznet.io/teju/projects/plc-connected-temperature-monitor/
