PDA

View Full Version : PLC programming help needed



daski
04-24-2015, 07:54 PM
We need a hand to take 4 binary outputs from the shopbot control board and turn them into 16 outputs using a PLC. Does anyone have this expertise or know where to find someone who could do it for us.

donek
04-25-2015, 12:04 AM
I don't know anything about PLC other than they are suppose to be somewhat difficult to program. You should be able to do this with an arduino which is open source and very inexpensive. What exactly are you wanting to do?

Burkhardt
04-25-2015, 12:48 PM
That is surely possible but depending what you need to drive 100 times overkill. You can buy a 4-line to 16 decoder IC type 74HC154N (http://www.nxp.com/documents/data_sheet/74HC_HCT154.pdf) (e.g. at Digikey) for a Dollar or less. It does directly what you need without any programming if you are not afraid of a soldering iron. Run the 4 Shopbot outputs to the decoder inputs, supply 5V and connect the 2 enable inputs to the negative supply. Then you have 16 direct "active low" output lines that can drive a few mA directly at 5V e.g. for an LED indicator or to drive a solid state relay for higher power. PM me if you want to go that route for more help.

But a PLC is not difficult to program as well.

donek
04-25-2015, 05:16 PM
That is surely possible but depending what you need to drive 100 times overkill. You can buy a 4-line to 16 decoder IC type 74HC154N (http://www.nxp.com/documents/data_sheet/74HC_HCT154.pdf) (e.g. at Digikey) for a Dollar or less. It does directly what you need without any programming if you are not afraid of a soldering iron. Run the 4 Shopbot outputs to the decoder inputs, supply 5V and connect the 2 enable inputs to the negative supply. Then you have 16 direct "active low" output lines that can drive a few mA directly at 5V e.g. for an LED indicator or to drive a solid state relay for higher power. PM me if you want to go that route for more help.

But a PLC is not difficult to program as well.

I'm sort of new to the electronics thing. That's pretty cool. The function description basically describes it as the ability to turn each pin to low while the rest remain high. is the there a reverse chip that would allow you to turn each pin high while the others remain low?

There's also a problem here. I don't see how to make all pins low or even more than one pin low. If the goal is to generate the ability to turn multiple items on or off, it doesn't seem possible. Unless I'm missing something.

Burkhardt
04-25-2015, 11:10 PM
......is the there a reverse chip that would allow you to turn each pin high while the others remain low?
There's also a problem here. I don't see how to make all pins low or even more than one pin low. If the goal is to generate the ability to turn multiple items on or off, it doesn't seem possible. Unless I'm missing something.

I am not aware of a reverse logic 4/16 decoder but I don't know them all so there might be one. The "active low" configuration is more common, since the CMOS chips can sink more current to the negative than source from the positive supply. For driving LEDs or SSR this is actually preferred. If somebody would need to reverse this they can use inverters to turn the logic around, but then you have more than one chip and wiring gets more complicated.

You can turn them all "off", that is high output using one or both of the enable inputs (but that needs another control signal). You can not turn "on" (low) more than one output because you can only represent exactly 16 different states with the 4 input lines.

If you need more flexibility, e.g. using subsequent conditions on the 4 shopbot signal lines to turn on any combination of the 16 outputs then you really need something like a PLC or one of the Arduinos with some programming.

dana_swift
04-25-2015, 11:18 PM
There is a chip "74LS138", it converts 3 inputs to 8 decoded outputs. You will need two of them :) The price is less than $1.00 each, much less than a PLC.

Hope that helps..

D

donek
04-25-2015, 11:43 PM
You can turn them all "off", that is high output using one or both of the enable inputs (but that needs another control signal). You can not turn "on" (low) more than one output because you can only represent exactly 16 different states with the 4 input lines.

What is it with the inconsistency in electronics. In Arduino programing a HIGH represents on or a +5V signal. Now you're indicating that a high signal is a 0V and a low is on or +5V. That makes absolutely no sense. How do you know which convention to follow when there is no consistency?

Burkhardt
04-26-2015, 12:10 AM
What is it with the inconsistency in electronics. In Arduino programing a HIGH represents on or a +5V signal. Now you're indicating that a high signal is a 0V and a low is on or +5V. That makes absolutely no sense. How do you know which convention to follow when there is no consistency?

Sorry if I was not clear....but there is no inconsistency. I tried to use the terms "on" and "off" loosely to indicate "active" or "inactive" independent of the actual signal voltage or polarity. Probably should not have done this to avoid confusion.
But a "high" is ALWAYS 5V (when using 5V logic) or 3V (when using 3V logic) while a "low" is ALWAYS 0V or Gnd as you know it from Arduino.

It is just that "low" or 0V may actually mean an "active" condition. It depends on how you design the circuitry.

donek
04-26-2015, 10:45 AM
Sorry if I was not clear....but there is no inconsistency. I tried to use the terms "on" and "off" loosely to indicate "active" or "inactive" independent of the actual signal voltage or polarity. Probably should not have done this to avoid confusion.
But a "high" is ALWAYS 5V (when using 5V logic) or 3V (when using 3V logic) while a "low" is ALWAYS 0V or Gnd as you know it from Arduino.

It is just that "low" or 0V may actually mean an "active" condition. It depends on how you design the circuitry.

But an SSR is triggered by a high signal, so how do you switch the signal from high to low if you want to use this chip?

Burkhardt
04-26-2015, 11:12 AM
But an SSR is triggered by a high signal, so how do you switch the signal from high to low if you want to use this chip?
An SSR is triggered by the current going through the input terminals, no matter how you connect it. You can connect it between positive supply and the driver output or the driver out and negative supply. The SSR input is optically isolated and does not care.

If you connect the positive SSR input to +5V supply and the negative input to the "active low" driver output, the SSR will be triggered by a "low" signal. This is indeed the preferred method since the driving chip can sink more current than source. That is especially true if you would use an LS series chip like the 74LS138 that Dana suggested.

stump
04-27-2015, 08:55 PM
I'm not sure exactly why you want to do this, however if you wanted to go the PLC route you can pick up a Click PLC from Automation Direct. They are inexpensive (as far as PLC's go), dependable, and the software if free. You do need to specify the inputs and outputs, AC, DC, Relay, voltage range etc. That said, you are still looking at $200 compared to less than $50 for an Arduino or $1 for a chip.

If you decide to go that route I can help.

twelchPTM
06-04-2015, 03:19 PM
arduino would be the way to go for me, "board level programming" can be nerve racking if I was to be developing something like your doing I would eventually get to the chip but I would start with the arduino and work my way up to the single chip design....