How to sense an input which if very fast? I have some idea and want to explore more..

drspanda

Member
Join Date
Oct 2005
Location
Damanjodi
Posts
155
Hello,

Concept: Input should remain for a given time so as for the PLC to look into.

What to do if my input can change its value, which is less than cycle time?

There are three ways:

1. Hardware side: the input module shall extend this particular input pulse even physically input is absent for the required time.

2. Use seperate function modules.

3. Some software commands used in programming...I do not know??
 
what PLC.

A Siemens can offer updating I/O within a scan, OB's called on inputs changing or fast counter cards.

I'm not sure what others offer.

I had a problem once in canning, where I was looking for small gaps between cans moving at 800 cans per minute. I achieved this by installing external off delay timers, which extended the signal and enabled me to see these gaps in the PLC.
 
PeterW said:
what PLC.

A Siemens can offer updating I/O within a scan, OB's called on inputs changing or fast counter cards.

Siemens.

I was told in training that we should use seperate function modules for sensing fast inputs.

I could not understand how did you use off delay timers?? I mean after input image program execution begins and what happens if the input changes its state during program scan or execution??
 
drspanda said:
Siemens.

I was told in training that we should use seperate function modules for sensing fast inputs.

I could not understand how did you use off delay timers?? I mean after input image program execution begins and what happens if the input changes its state during program scan or execution??

The problem I had was not that I needed to react at the very moment the input changed, but the speed of the cans and the length of gap, meant that the photo eye saw the reflector for a very short time (roughly 20ms).

The input would go on and off within a scan, therefore I did not always see it (this was an old S5 150u with a scantime of something like 150mS). Using a relay that stretched the signal to something like 200mS was the cheapest and easiest solution in that instance.
 
Consider the frequency, the "ON" duration, and the "OFF" duration of the device before choosing.which method is appropriate:

If the rising or falling edge frequency of the digitial input is less than TWICE the scan time of the logic which reacts to it, then you must use a high speed counter software module (I am an AB guy, so my terms my be ambiguous to siemens products). A processor that scans fast enough to count the pulses. It could be PLC chassis mounted or a stand alone electronic counter.

If the frequency of the PLC digitial input is more than twice the scan time but the "ON" or "OFF" duration is not, then a simple hardware delay timer is the easiest fix.

Often called a "pulse stretcher", it just extends the "ON" (or off) duration and must be set up so that it does NOT cause an overlap in order to count all pulses.

Again, I am an AB guy, but what we do is use programming structures that allow us to control the scan rate of the PLC software counter, and the scan rate of the I/O.

Are there are Selectable Timed Interrupt Routines that allow a task/subroutine to run at a fixed, regular, repeatable rate, separate from the main scan?

Are there interrupts that will trigger a refreshing of the input image via code?

Hope this helps...
Paul
 
Last edited:
How fast is very fast?

Depending on the speed with which the input can cahnge there are several possibilities. If your basic scan rate is relatively slow - say, 40 - 50 ms and your input is only a little faster, then you may be able to catch it using OB35 to interrupt at, say, 10 or 20 ms intervals (at a cost to the overall scan cycle time, of course).

If your input is too fast to be caught that way, then the next step is to add an FM (function module). Depending on what is necessary, possible solutions range from the simple counter module - FM350 via the FM352 Cam module to the FM352-5 High Speed Boolean Processor. Latter is an FPGA-based 12 pipe parallel processor with a cycle time of 1 µs and a switching speed of 10 µs for inputs and outputs. If that's not fast enough, then you've got a problem!
 
Last edited:
As usual, there is too little information in the OP to give precise advice.

One method (that may or may not be relevant for the application) is to use a hardware interrupt on the input. For an S7-300 this requires special interrupt enabled input modules.
In the program OB40 shall be added for evaluating the interrupt.

I have also used a socalled hardware "pulse stretcher". But I am trying to mave away from that.
For my application, 'normal' fast inputs and 'normal' fast PLC program scan is enough. No need to use HW interrupts.
 

Similar Topics

Hello, I have to read 10 rpm to 8000 rpm in a machine. I tried Proximity switch but I cannot read more than 3000rpm as my plc can sense only...
Replies
17
Views
7,038
I have submitted this tread to a magazine and it got rejected by the editor that obviously has never done motion or used cam tables.
Replies
6
Views
2,089
Hey guys, OT I know, but I feel like there is another experience in this thread to get some good feedback. So right now in our facility, our...
Replies
27
Views
6,353
Hi, I have a rather strange problem when using the input assistant of Visual Studio 2017. Almost all functions, internal or external seem to...
Replies
0
Views
1,308
Hi Any users familiar with the Becker Smartsense range of products? MCU-100/101, SSFM-100 etc I am looking at it for use in an Underground coal...
Replies
0
Views
1,064
Back
Top Bottom