We will now connect our Productivity Open P1AM Arduino to a Click PLC. Using Modbus TCP the Arduino will be the Client (Master) and the Click will be the Server (Slave).
We will explain how to connect our P1AM-ETH Industrial Arduino Ethernet Shield to the Click PLC. The protocol will be Modbus TCP on an Ethernet communication network. Modbus is a master-slave type of communication. Masters will always send the commands to read or write to the slaves on the network. The slaves will respond if the communication is directed at them. Since this is an Ethernet network our master is known as a client and the slave as a server.
The P1AM Example from Automation Direct on GitHub will be used. It will be modified to write to holding registers and coils in the Click PLC.
The temperature from the thermocouple input unit on the P1AM will be written to the Click PLC. Inputs from the simulator input card on our Arduino P1AM will be written to the Click PLC outputs directly. The Click PLC will also be programmed with a heartbeat circuit. This will detect if communications have been severed and will reset the outputs after 5 seconds. Let’s get started with our Arduino P1AM Modbus client to Click Modbus server. Continue Reading!
We will now look at the productivity Arduino Ethernet web server that we will implement on our Productivity Open P1AM industrial Arduino controller.
This P1AM Web Server Example is based on an example found here. This example uses the productivity open P1AM-ETH shield to create a web server that displays the input values of a P1-08SIM and P1-04THM to a web page. This page is automatically updated every 3 seconds. The IP address of the webserver is set in the Arduino program (Sketch) Entering this IP address in your browser to view the web page. This will display the information from our Arduino P1AM on our web browser. Let’s get started. Continue Reading!