The real-time clock on the Click Plus can now be more accurate. A network time service (NTP or SNTP) has been added to the Click Plus controller. This will allow the time to be synchronized with an internet time server or local network. Daylight savings time is quickly implemented with just a memory retentive bit that we can turn on and off based on the time change in the area.
We will be setting up the network time service on our Click Plus. The real-time clock (RTC) will be updated via the internet time service. Daylight savings time and the RTC will also be programmed. This will be based on our previous Click Real-Time Clock post. Let’s get started. Keep on Reading!
We will now look at the data logging capability using our Click plus PLC.
Data logging is the collection of data over time. This is usually used for data analysis at a later time. The amount of data (System Information) stored and the frequency of the storage will depend on your specific application.
The hardware used to store the data is usually called a data logger. Using the information from our last post, the MQTT information collected (Temperature in Atlanta and Click Analog) will now be logged in two different ways. A micro SD card on the Click Plus will be used to store the data every minute in a CSV (Comma Separated Value) file. Node-RED will also be used to store the same data in a SQL database. Let’s get started on how to use these data loggers. Keep on Reading!
We will now look at the MQTT communication capability using our Click plus PLC.
MQTT stands for Message Queuing Telemetry Transport. This simple ‘publish and subscribe’ communication protocol, does not take too many resources.
Constrained devices with low bandwidth are ideal for MQTT. This protocol provides machine-to-machine (M2M) connectivity which is ideal for the Internet of Things. (IoT) This protocol is not for remote IO or real-time (deterministic) applications. MQTT is a good solution for applications that move data from hundreds or thousands of machines (sensors) to clients in many networks.
We will be installing a windows based broker called Mosquitto. The Click Plus PLC will be one of the clients publishing and subscribing to the MQTT broker. Node-RED will be the other client publishing and subscribing to the MQTT broker. Each client will share information. Let’s get started. Keep on Reading!
We will now establish communication using four different methods from our computer to the new Click Plus controller. The click programming software version 3.00 will be used for the communication methods. Click Plus controllers allow you to program them through the micro USB port on every CPU. WiFi (Bluetooth Provisioning) is also available on some controllers. Ethernet and Serial ports may also be used for programming if they are present on your model of Click Plus.
We will be establishing PC to PLC communications using version 3.00 of the click programming software. Four different ways will be discussed on getting connected to the Click Plus controller to program. Let’s get started. Keep on Reading!
A watchdog is a piece of code that will timeout when an error occurs in our program. It will usually cause the CPU (program/sketch) to stop or reset.
We will now look at the instructions for the watchdog timer in productivity blocks. This includes the Configure Watchdog, Start Watchdog, Stop Watchdog, and Pet Watchdog.
Our sample sketch will modify the P1000 Expansion Digital Inputs and Outputs Part 2 program by adding a watchdog timer.
Let’s get started. Continue Reading!