Can a PLC be used for this?

Bug_Power

Member
Join Date
Jun 2003
Posts
8
Okay I've done a bit more research into the project that I'm trying to accomplish and found the following logic is needed.

Output is
40Hz signal 0-12v
or
140Hz signal 0-12v

Input variable freqency from 0-250Hz



Now what I'm trying to accomplish is to send 40Hz out until the input frequency reaches a defined limit, at that point the freqency goes high to 140Hz until the input freqency drops below the defined limit.
The defined limit is set preferrably by a push butten when then freqency is at the desired Hertz. This value would be stored and would only change if the user activated the push button again to change the defined limit.

For example....your watching your Multimeter and when you see 60hz you push the button. Now from now on at 60Hz the output goes from 40hz to 140Hz
 
Bug_Power

If your input and output signals are square pulse trains, then this is not a problem. Virtually any modern small PLC is perfectly capable of dealing with this kind of signals and at quite higher frequency range - up to 250 kHz. All these PLCs usually have what traditionally has been called "high-speed counter input" (at least one, sometimes two of them) and "pulse-train output". Voltagewise, they should be capable of working in 10 to 30 VDC range. The output current rating however is quite low, about 100 mA. So if you need to drive something bigger, you would need some kind of amplifier stage: a transistor, an op-amp, an optocoupler etc.

Don't forget that, as any microprocessor-based device, a PLC works by a beat: there is always scan-time delay. If 2 to 10 ms delay is not a problem for your application, you may use a PLC, oterwise you would need some other solution.

You will also have a problem if you have to deal with some non-square pulse signals, like a sine wave (and I have gut's feeling this is what you are talking about). PLCs are not designed to work with sine waves (this is simply not what they are for). However I am sure there are many easy and inexpensive ways to convert your input into a square pulse and your output to whatever shape it has to be.

Programming is an easy part here. The pushbutton input, when activated (better to use ONE-SHOT command here), will copy the value from the "input frequency" register into a storage register (use MOVE command). The value in the "input frequency" register will be continuously compared with the value in the storage register (use one of COMPARE commands available). If less or equal - move a value that corresponds to 40 HZ pulse to your "output frequency" register. If greater - move whatever means 140 HZ there. The particular details will greatly depend on the brand and model of the PLC chosen, all the stuff above is just an outline.

One more thing: if you can spend a couple hundred bucks for a small alphanumeric display, then you don't need no dam' multimeter...
 
Sorry School teacher don't have a couple hundred bucks. :)

How can I tell if it's a square wave or sin wave? Like I said I'm very comfortable with the programming and logic part being that I have a software background, I've just never attempted any hardware before. The output I don't belive is driving anything. A controller just monitors this signal and activates when it gets to a certain freqency. I'm just trying to fool the controller into starting at a user defined point.

Cost is a huge concern the total cost for the unit needs to be relativly small. Can you suggest a PLC that would be appropriate so that I can order one, possibly even list a site where it may be purchased? What is the approximate price range for these PLCs? How about programming software? I have a Needhams. EMP-20 programmer to program the chips I just may need some new modules for it.
 
Bug_Power

Well, I assume you have a better clue on what kind of source your frequency signal is coming from... There must be a least expensive oscilloscope in the physics lab or something to check it out with.
Once again, if it is a square wave - you shold be OK, if not - a couple of capacitors and resistors might be needed to distort it as close as possible to a square. Sorry, my basic electronics is a tad rusty now, maybe someone else could help you better on that.
Programming a PLC may be a bit surprising in concept - especially for people with the software background (sounds strange, but that the way it is.) It is certainly far from being a rocket science, nevertheless I would advise to go over the great PLC manual this site offers - just to get a gist of it. One good news - with PLCs you don't have to burn any chips; not at least until your system will have been fully tested and is working to your pleasure and it is optional even then.
As far as particular PLC type... I understand that money is a concern (show me someone for whom it is not ;) ). The cheapest (and not necesserily bad) brand is Automation Direct, their small PLC goes as low as $99. However you cannot use its high-speed counter inputs and its pulse outputs at the same time, it is "either/or" thing. Not good.
The most popular Allen-Bradleys are quite pricey, alas.
Look at the following ones: Keyence KV-10 and GE Fanuc VersaMax Nano (you need a model with DC inputs and DC outputs, programming software and programming cable). Go to their sites (www.keyence.com and www.gefanuc.com), find the nearest distributor, talk to them. There might be discounts for schools. Don't forget that the economy is still not good, so they are very eager to sell (hopefully this will change soon - the economy, I mean). I think you might be able to get the whole kit for about $200 or so.
Good luck!
 
Another good question might be "Should a PLC be used for this?" An engineer I ain't but it seems like what you want to do could be done as well with a small assortment of hardware components.

As I see it, the essence of your project is to select one of two outputs based a true-false condition - one wrinkle being that the condition is somewhat variable.

I'm just shooting from the hip here so anyone more knowledgeable feel free to jump in. Here goes:

The output switching sounds relatively simple - would a DTMF (dual tone multifrequency encoder) chip, or something like it work to generate your output? If this won't provide the correct frequencies, use two separate generators and use an analog MUX to switch between them or to shut both off.

The input: The input frequency drives a frequency-to-voltage converter which is applied to one side of a comparator. The other side of the comparator is driven by a voltage derived from a DAC (digital to analog converter) which is in turn driven by the variable operator signal, which could be as simple as a thumbwheel switch.

The comparator output drives the analog mux to select the output frequency.

If this sounds too dumb, just tell me to go away

.02 :rolleyes:
 
I've been given 20 different ways to solve this problem. PLC's were just thrown in that group.
How's this sound

use the Freq-Volt converter like you stated, then for the user, they could use a potientometer for input of the variable signal. Comparitor checks to see if input Voltage is greater or equal to User Voltage. If so use crystal to generate a signal 140hz. ELSE use crystal to generate a signal of 40hz


Hows that sound....

now how can I build it. I have 0 experiance and work at a Jr. High so no scopes or anything to play with.
 
The pot sounds like a good idea since you apparently don't need extreme accuracy. You could use crystals to generate the 40/140hz signals but you'd need a divider circuit since crystal oscillators operate at much higher frequencies. If you go with this approach I'd go with a pair of 555 astable multivibrators. These are (I assume they're still easily available) cheap, versatile IC sources of various signals.

If you don't have the knowledge to build this why not see if some of the Vo-tech kids could build it for you as a class project? If not an option at the Junior high level, what about the Senior high?
 

Similar Topics

Has any used a ballistic pressure transducer with a PLC? I am not sure if it will capture the event that I need to use as a control. The device...
Replies
2
Views
1,060
Good day all, Im just wondering if there are any existing hmi system tags that i can use as a plc input tag to indicate that there is a triggered...
Replies
0
Views
1,065
I'm working on a temperature/humidity test chamber that was made in China sporting a TATO PLC that looks exactly like a Micrologix 1000. Also has...
Replies
8
Views
3,241
Hi all! I have one question, it might be simple for one of you but I spent hours searching and reading through different platform until I found...
Replies
11
Views
1,608
Does anyone have leads on places that will buy used functioning PLC components? Specifically Square D Sy/Max model 50 programmable controllers...
Replies
14
Views
5,371
Back
Top Bottom