0 to 24vdc to drive a discreet input to a plc.

Thread Starter

Jeff.M

Joined Dec 6, 2022
15
I need a circuit to convert 0vdc to 24vdc and vice versa. The output needs to drive a discreet input to a PLC.
Thanks in advance for any assistance.
JM
 

Papabravo

Joined Feb 24, 2006
19,558
I need a circuit to convert 0vdc to 24vdc and vice versa. The output needs to drive a discreet input to a PLC.
Thanks in advance for any assistance.
JM
LM393 should do the trick nicely. You can even throw in some hysteresis for good measure.
 

WBahn

Joined Mar 31, 2012
27,854
Fast, It would be nice if I could use a relay.
Thanks
"Fast" is not a suitable specification.

Is 1 ms fast enough?

Is 1 µs too slow?

How fast is "fast"?

It matters because the LM339 is open-collector and so it has to be pulled up externally. The speed with which that happens is going to depend on what is connected to that node, particularly any capacitance on it.
 

Papabravo

Joined Feb 24, 2006
19,558
"Fast" is not a suitable specification.

Is 1 ms fast enough?

Is 1 µs too slow?

How fast is "fast"?

It matters because the LM339 is open-collector and so it has to be pulled up externally. The speed with which that happens is going to depend on what is connected to that node, particularly any capacitance on it.
In a PLC system the inputs are scanned periodically. 5 msec would be a typical scan interval. Events which happen faster than that are invisible to a PLC.
 

MaxHeadRoom

Joined Jul 18, 2013
26,241
The method often used by PLC's Was to scan the whole programmed logic, and then to update an output table containing the result of said logic.
The scan & update time is dependent on the size of the programmed logic .
 

Thread Starter

Jeff.M

Joined Dec 6, 2022
15
In a PLC system the inputs are scanned periodically. 5 msec would be a typical scan interval. Events which happen faster than that are invisible to a PLC.
The switching time for the circuit doesn't matter because this isn't the source. The signal
source is a ultrasonic sensor which is suppose to output 24vdc when it detects a sheet of paper. But the sensor
that my client has outputs 0 volts dc when it detects a sheet of paper. he tried to use a relay but the relay
switching time is to slow. I'm trying to help him remotely.
Thanks again.

JM
 

WBahn

Joined Mar 31, 2012
27,854
The switching time for the circuit doesn't matter because this isn't the source. The signal
source is a ultrasonic sensor which is suppose to output 24vdc when it detects a sheet of paper. But the sensor
that my client has outputs 0 volts dc when it detects a sheet of paper. he tried to use a relay but the relay
switching time is to slow. I'm trying to help him remotely.
Thanks again.

JM
After saying that the switching time for the circuit doesn't matter, you then say that the prior solution wasn't acceptable because the switching time was too slow. So it would seem that switching time does matter.

How slow is too slow?

How fast is fast enough?
 

Thread Starter

Jeff.M

Joined Dec 6, 2022
15
After saying that the switching time for the circuit doesn't matter, you then say that the prior solution wasn't acceptable because the switching time was too slow. So it would seem that switching time does matter.

How slow is too slow?

How fast is fast enough?
1ms will work.
Thanks
 

vu2nan

Joined Sep 11, 2014
277
A sensor, with its open collector output and pull-up resistor connected to a PLC input, will make the input go low when it's sensing and high when it isn't.

1.png

Nandu.
 

ronsimpson

Joined Oct 7, 2019
2,515
What is the maximum voltage on an input of the PLC? 5V or 24V?
If 5V then the pullup resistor should go to 5V not 24V.
See post #13
 

MisterBill2

Joined Jan 23, 2018
13,688
What is the source of the "0"? And what voltage does it have when it is not zero?? Are you able to edit the program on the PLC? Is there a 24 volt source available?
There are quite a few simple ways to achieve what is asked, but just asking that without any of the surrounding information is quite useless, really it is.
If that zero is an open switch to common, then the very simple thing will be to add a pull-up to 24 volts resistor.

That is all the advice you get until the questions are answered.
 
Top