Search

PLC implementation of the bottle-filling application

Home / Technical Articles / Industrial Automation / PLC implementation of the bottle-filling application
PLC implementation of the bottle-filling application
PLC implementation of the bottle-filling application

Detection of position

In this example (see Figure 1), we will implement a control program that detects the position of a bottle via a limit switch, waits 0.5 seconds, and then fills the bottle until a photosensor detects a filled condition.

After the bottle is filled, the control program will wait 0.7 seconds before moving to the next bottle. The program will include start and stop circuits for the outfeed motor and the start of the process. Table 1 shows the I/O address assignment, while Tables 2 and 3 present the internal and register assignments, respectively.

These assignments include the start and stop process signals.

Bottle-filling system
Figure 1 – Bottle-filling system

Table 1 – I/O address assignment

 I/O Address 
Module TypeRackGroupTerminalDescription
Input000Start process PB1
001Stop process PB2 (NC)
002Limit switch (position detect)
003Photoeye (level detect)
Output030Feed motor M1
031Outfeed motor M2 (system ON)
032Solenoid control
033

Table 2 – Internal output assignment

DeviceInternalDescription
Timer1001Timer for 0.5 sec delay after position detect
Timer1002Timer for 0.7 sec delay after level detect
1003Bottle filled, timed out, feed motor M1

Table 3 – Register assignment

RegisterDescription
4000Preset value 5, time base 0.1 sec (1001)
4001Accumulated value for 1001
4002Preset value 7, time base 0.1 sec (1002)
4003Accumulated value for 1002

Figure 2 illustrates the PLC ladder implementation of the bottle-filling application. Once the start push button is pushed, the outfeed motor (output 031) will turn ON until the stop push button is pushed.

The feed motor M1 will be energized once the system starts (M2 ON); it will stop when the limit switch detects a correct bottle position. When the bottle is in position and 0.5 seconds have elapsed, the solenoid (032) will open the filling valve and remain ON until the photoeye (PE) detects a proper level.


The bottle will remain in position for 0.7 seconds, then the energized internal 1003 will start the feed motor. The feed motor will remain ON until the limit switch detects another bottle.

PLC implementation of the bottle-filling application
Figure 2 – PLC implementation of the bottle-filling application

Reference: Introduction to PLC Programming and Implementation – from relay logic to PLC logic – globalautomation.info

SEARCH: Articles, software & guides

Premium Membership

Premium membership gives you an access to specialized technical articles and extra premium content (electrical guides and software).
Get Premium Now ⚡

About Author

author-pic

Edvard Csanyi

Edvard - Electrical engineer, programmer and founder of EEP. Highly specialized for design of LV/MV switchgears and LV high power busbar trunking (<6300A) in power substations, commercial buildings and industry fascilities. Professional in AutoCAD programming. Present on