input reading

panthripu

Member
Join Date
Mar 2004
Posts
228
hi friends
i want to know if my digital input state changes every 50mS then can my plc read it.I mean i want to count how many time one input goes high if it gets high every 50 mS or less .

If i write the program to count this input in a OB which gets scanned every 10mS, can i do this.
 
Answer: YES. In principle you can count every signal where the period is not less than twice the total cycle time of the PLC. In this situation you have at least one I/O cycle where the signal is ON and at least one where the signal is OFF. Normally we count only even slower changing signals, but it can be done.

For a more detailed explanation go to the "LEARN PLCS" section of this site and read the chapter Effects of Response Time.

Kind regards,
 
Whoa!

YES. In principle you can count every signal where the period is not less than twice the total cycle time of the PLC

Theres a very important point that you're forgetting.

What is the propagation delay of the input module?

If the module has a long On-Off, Off-On times (ie. filters on the inputs) you may miss pulses. This will be more evident with AC modules.

In addition, depending on the brand of PLC, you can eliminate scan-time issues by flagging an interrupt or using a scheduled routine to execute faster than the scan time.

Good Luck,

(8{)} ( .)
 
Answer: YES and NO.

I'm just a little bit concerned about the sentence which ends " ...if it gets high every 50 mS or less." How much less?

There are two factors to consider here. One is the interval between the input going high on two succesive occasions; the other is how long the signal stays high on each occasion.

Let's say you have an OB running cyclically at 10mS intervals. If you want to know whether an input has changed state to high in the previous 50mS this seems no problem. As Jean Pierre says, you must have at least one interval where the input is off so the OB can detect the "change of state". However, what if the input comes on and goes off again during the 10mS between cyclic OB executions? You won't know that change occurred. That's why I wonder what your lower limit is when you say "...50mS or less". Even if the change of state only happens once every 100mS, it must stay changed for long enough so your code executing once every 10mS can catch it.

Regards

Ken
 

Similar Topics

I am setting up a new system and have an s7 1214 plc with an sm1231 4x AI (6ES71231-4HD32-0XB0). It is configured for 0-10v and has no faults in...
Replies
5
Views
1,136
I am working on a Micro 820 with a 2080-MOT-HSC high speed counter module. I am trying to read the pulses from a Signet 515 paddle wheel flow...
Replies
0
Views
710
This particular problem is doing my head in... In our system we have a minisonic flowmeter. One of these. It outputs 4-20mA and is an input into...
Replies
4
Views
1,405
Hello all, I am working with a variety of discrete pulse flow meters, Siemens, Flomec, and Seametrics. I am attempting to read flow via discrete...
Replies
17
Views
4,685
Hi, I'm just a complete newbie on ladder logic and plc programming and I started a few weeks working with that, also it's my first post here, I'm...
Replies
0
Views
1,106
Back
Top Bottom