We will now be looking at how to use analog inputs to our Arduino UNO controller. An analog input converts a voltage level into a digital value. This can then be used in our Arduino program or sketch. The analog input signal can represent many different items. Speed, levels, distance, brightness, density, humidity, etc. are a few items that this external input can represent.
We will be wiring a 10K potentiometer to the first analog input of the controller. The Arduino Uno R3 from our Super Starter Kit will be used. As the analog values changes via our potentiometer, we will use PWM to change the brightness of an LED. We will look at how this conversion from analog voltage to digital is done. Values will be displayed on the built-in serial monitor of our Arduino IDE software. Let’s get started. Continue Reading!
We will now utilize Ethernet/IP to connect a Click PLC as remote IO on a Productivity system. The productivity series of controllers can use explicit and implicit messaging techniques of EtherNet/IP to optimize data exchanges across the network.
Explicit messaging means that the data messages that are transmitted will contain everything needed in order to respond or decode the message. It is a normal client/server relationship with instructions explicitly spelled out in the data messages. This communication happens at times that the Client requests the information.
Implicit messaging means the data messages are streamlined. The device is configured ahead of time to know what to do with the data. This is used for time-critical messages and it functions as a typical scanner/adapter relationship. Implicit messaging is real-time. It has the ability to copy data with minimal additional information because both ends already know exactly what each bit and byte.
A Click PLC will be set up as remote distributed inputs and outputs for our Productivity 1000 controller. Implicit Ethernet IP will be set up. The Click will be the Ethernet IP adapter and the Productivity will be the Ethernet IP scanner. Let’s get started. Keep on Reading!
We will look at the BRX Do-More FTP (File Transfer Protocol) on our PLC. Using FTPGET and FTPPUT instructions we can transfer files to an FTP server. Our BRX Do-More PLC now has the ability to be an FTP Client. This will allow us to transfer our logged files to an FTP server that we programmed in the following post.
Data Logging – Video
As an FTP Client, the Do-More PLC now has the ability to transfer and retrieve files from the network at an appropriate time in the PLC logic.
We will be setting up a Windows 10 FTP server on our computer. Using the FTPPUT FTP Client command on our BRX Do-More PLC we will store a file on our FTP server. The FTPGET Client command instruction will be used to retrieve a recipe text file on our server. This recipe file will have three timers that we will be used in a sample program to turn on some outputs. Let’s get started. Continue Reading!
We will now be looking at using digital inputs (pushbuttons) to turn LEDs on and off. This will be programmed using our Arduino Uno R3 from our Super Starter Kit. Pushbuttons will allow actions to be performed that our Arduino program sketch will interpret and take action.
We will be wiring two pushbutton switches. A pull-down resistor will be wired to the first switch and a pull-up resistor will be wired to the second switch. This will change the state of the input (High (1) or Low (0)) based on the wiring. Two LEDs will be wired to the outputs of the Arduino Uno. This will show the state of the switches and allow the switch inputs to modify the state of the LED. We will look at three different programs.
Eliminating switch bouncing will also be discussed and programmed using our Arduino Uno super starter kit. Let’s get started. Continue Reading!
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!