We will make the automation of a labeling machine based on the M-Duino PLC from Industrialshields. The labeling machine will label bottles of a plant.
Hardware I: Equipment to be used Basically, the labeling machine system consists of:
An M-Duino PLC: This controller is the heart of the system. It controls the display, generates interrupts, and controls the communication.
A Panel PC: Used to read and display the status of the system over the Panel Pc.
A detection Sensor: We will make use of optical fork sensors based on infrared (non visible) light sources because they are easy to be programmed and they allow us a manual adjustment to the sensitivity via potentiometer.
A motor: The motor is used to fix a constant speed in the conveyor belt. –
A relay: Used to activate the labeling piston.
Hardware II: System Regarding the system, in this section we will explain the interface between the M-Duino PLC and the other elements:
We have one detection sensor that we will program it as a Digital Input. Each time a bottle is placed in fornt of the detector, the conveyor belt will stop and wait for label the bottle.
The PLC will control the motion of the conveyor belt activating a motor through a relay. This will be programmed as a Digital Output.
The PLC will control too the labeling piston. This system will be activated through a relay too, and therefore, programmed as a Digital Output too.
As we made in other newsletters, the communication between Panel PC and the M-Duino will be made with I2C.
Furthermore, the system will be able to be stopped through the Panel PC. Let´s see a picture of the system to be automated: Software and code As we explained before, the system has a Panel PC which will allow us to visualize the system status (not implemented in this code) and stop the system whenever we need. The communication between the PLC and the Panel PC will be with I2C, so we will use the Wire library (you can get more information about the library here). The system will have 3 states:
STOP: When the command is received from the Panel PC. This state will enable us to make maintenance activities on the system and other related tasks.
Running and Bottle detected: When a bottle is detected, the system will stop the motor and activate the labeling piston.
Running: This state activates the motor.
As in other newsletters, we recommend using Tesla Scada, which is able to work on Android systems. You can download the code here: Key Benefits The main benefits of the Opiron purposed solution are:
Open Hardware: Which reliable, cheap and expandable
Real time measurement: Panel PC enable users to visualize the system status and stop it easy.
Easy to be integrated: If you plant has already installed an automation system, M-Duino can be integrated using Ethernet.
Variable Frequency Drivers (usually known as VFD´s), are very popular in industry because they can adjust torque and speed of AC motors by varying motor input frequency and voltage. The setpoint can be sent from a PLC and, therefore, from a computer, so this is what we are going to show you in this newsletter: how to send a setpoint to a VFD using a computer connected to an Ardbox PLC from Industrialshields. Hardware and considerations
Before starting the job, we will consider these points:
The VFD has an analog input where we can send the setpoint. Therefore, the communication between the VFD and the PLC will be 4-20 mA.
The Arduino programming environment has a built in serial reader and writer that makes it easier to debug and develop your Arduino code. This point is important taking into account that we will use the
Software and code
To communicate our Ardbox PLC with our computer we will use Serial communication. Serial communication just means that only one bit of information is sent a time. Most computers don’t have serial ports, but use a USB-to-serial driver to send and receive serial communication over USB So basically, inside loop(), we will check if any serial data has arrived with Serial.available(). If data has arrived and is available, store that data in a variable called setpoint, which we will use to send it to the VFD as an analog output. You can download the code here: Key Benefits
The main benefits of the Opiron purposed solution are:
Easy: Easy is the first word that comes to our mind when we think in this application. Easy to install, easy to program, easy to send commands to the VFD!
Open Source: Because open source means flexibility in terms of freedom to modify and integrate your system into more complex systems, and reliability.
Useful: This project is useful because VFD´s are everywhere. See an example of VFD´s application in our blog.
In the dairy industry, packaging machines are used to package food in containers such as yogurt, milk, etc. They are usually integrated into more complex systems, and they are fed by a tank that contains the product (usually milk). In this project we will design a system composed of a tank with milk, a packaging machine, a valve to open and close the way to the machine, and a PID formed by a flow meter and a pump controlled by a frequency driver. In addition, the system has a buzzer to alert to operators of the plant in case of alarms. The system is as shown below: …