top of page

PLC Projects

March 2020

20200323_230951.jpg

I was given a bunch of PLC gear some time ago and have finally found time to start making something of it. Currently my setup consists of a Teco SG2 PLC, an Allen Bradly logix 5555 PLC, a HMI for the Allen Bradly and a bunch of peripherals including a bunch of power supplies, various 4-20 mA transducers, relays, an industrial switch and mounting hardware.

20190921_150907.jpg
20190921_150948.jpg

 When sorting out what I wanted to put on my wall safety was the main concern. The golden rule is no exposed conductor that is above ELV levels and preferably not above 24VAC or 30VDC. This makes the supply for the PLC the main cause for concern as all but 1 of the power supplies I was given had exposed screw terminals or cage clamps. My solution was to create an enclosure that could mount on a DIN rail and could hold a power supply inside with no exposed mains. The Allen Bradly PLC fortunately already had a enclosed power supply built into it.

20200323_221755.jpg
psu din.png

After setting up the power supply the next thing to do was to add some hardware for the PLC's to interact with, unfortunately the Allen Bradly controller doesn't have an input module which limits what I do with it but the Teco fortunately has input, output and analog input capability. 

alarm.png

The first module I wanted to add was a simple alarm and a button. I made an enclosure with holes for each. Electrically I used 2 15k resistors to form a voltage divider for the switch to make sure the input module received the correct 12VDC. I did the same on the piezo buzzer to drop the voltage down to 12VDC which is what it is rated for, and found that doing it this way served a double purpose, because the buzzer is capacitive the second resistor allows it to discharge this results in it making a whining sound like a siren rather than a flat tone. I am pretty sure the manufacturer has done something else to make it have this functionality but I would not have found it otherwise. 

20200323_221818.jpg

After installing this module on my wall I made some simple programs to test if everything was working as expected I used teco's sg-2 client to write and upload. The first program I made was using a 4-20mA tilt sensor. 

tilt latch.png

When the tilt sensor reaches a set value g1 will close which will energise the latch and the buzzer. When the switch is pressed it will de-energise the buzzer and the latch turning it off. If the tilt sensor reaches the set point while the switch is pressed nothing will happen. I did not have a mount yet for the tilt sensor so I removed it and made a simple alarm with a timer.

teco.png

For this program when the button is pressed the alarm will sound for 5 seconds before turning off. If the button is held it will stay on until 5 seconds after it is released. Not complicated but is something the module can do on it's own until more modules or sensors are added.

setpointind.png
setpointind2.png

The next module I added has a potentiometer and 3 indicator lights. the indicator lights can be used to show the status of the program and the potentiometer can be used to adjust values like a set point for closed loop control or changing an alarm level for an analog signal.

20200331_165139.jpg

A few problems came up when installing this module I found out that my voltage divider with the potentiometer didn't end up working the way I thought it would when plugged into the analog input of the PLC. The analog signal would drop when plugged into the PLC but would remain correct when unplugged. This would be explained by the PLC loading the voltage divider which would make sense as the only spare potentiometer I had spare to use on this project was 500k which is not ideal. 

MD function block.png

The solution to this problem I found after looking through the TECO SG manual was to use the MD(multiply/divide) function block. Obviously using this method will cause a loss in resolution but for the purpose of this module it should work fine. I set my MD function block to multiply my signal by 5 as the measured voltage with the loading effect was 0V to 1.7V the new span becomes 0V to 8.5V. I tested this with one of the new indicator lights with a program that turns the light on once the scaled value reaches over 5 volts with this program.

© 2023 by CREA8ME. Proudly created with Wix.com

bottom of page