PLC input accuracy

hainter

Member
Join Date
Nov 2005
Location
Cypress, CA
Posts
10
Hey Guys,

I have a generic application where I'm using two sensors to detect a moving object and then use a timer off the second sensor to trigger something happening. I'm using an AB compact logix L23. the problem is with scan time it makes the timer calculation too inaccurate.

My initial thought was to trigger an interrupt off each input and another interrupt off the timer being done to eliminate scan time inaccuracies, but the L23 doesn't support this.

Two questions:

Can you think of another way to program this to make it more accurate?

Is there another PLC brand that you could recommend that would be better for this application?

Regards
 
as an example:

the scan time is around 2-3 ms, so that means that each input could be up to the scan time inaccurate. the sensors are placed about 50 inches apart and the object takes about 100-200ms to travel this distance (lets say 100ms for the example). So i use this to do a speed calc which could be up to 6ms off based on scan time (one scan time for each input).


My speed calc ends up anywhere from 515 inches/sec to 485 inches/sec. (when in reality it should have been 500 inches/sec)


Based off of this speed, I want to time for an event 100 inches away. enter a little bit more inaccuracy for the timer based on scan time.

My time to the event (based on my speed calcs) is anywhere from 194ms to 206ms which ends up being off by up to 3ms based on scan time.


this makes my event timing off by up to 15ms which is about 7.5 inches when its moving at 500 inches/sec.


The engineer in me can't help but want to make this more accurate, but maybe I'm just a little bit crazy.
 
I do not know the particular Plc you are using but am familiar with the logix programming software used on AB PLC's

My suggestion is to look at immediate inputs and immediate outputs but even then you may not see much improvement over what you are already getting.

If it was just a running speed then my suggestion is to take several samples say 5 and average them this would give a more accurate display but would not be suitable if wanting to trigger an output
 
Hainter,

For many programs, the scan time is relatively stable, provided that you are not using remote I/O, or going online to the program regularly from a computer. If your scan time is consistent, then you could try subtracting the known scan time from the measured times. That might get you close enough.
 
Yeah, I was gonna suggest that you could subtract the known average scan time from your timer length. I'd forgotten about immediate inputs and outputs, but that likely wouldn't hurt anything to try.

And at 500 inches a second, I can't help but wonder what your moving. That's 28 miles an hour, or 45 km an hour...
 
I wonder if you could use a 1769-BOOLEAN for this application. Use the sensor inputs as interrupts to accurately measure the delay between the two, and then load twice the delay into the Output Delay of the BOOLEAN module and trigger the output off the second sensor. It might get you to within 1 ms accuracy.
 
Thanks for the reply guys.

The problem with figuring out a average scan time and subtracting that out is that you don't when the input comes on in relation to the scan and that's the problem.

The 1769-BOOLEAN sounds like the answer, I'll look into that.
 
You need a high speed counter/timer for this. It can't be done in software alone.

Another question is then what is the rise and fall times of your sensors? If the sensors are slow you will gets lots of variation from them too.

The real problem is that you haven't told us what your are really trying to do. What is the required accuracy? I am sure it has all been done before.
 
If you want to stay the the ControlLogix platform the best choice would be to go to something like the full size ControlLogix, 1756 and look at the Sequence of Events modules (1756-IB16ISOE and 1756-IH16ISOE). This would give you very high accuracy time stamps to compare against to get much better accuracy. With this module the Timestamp accuracy is listed as 100 micro-seconds.

If you could use a measurement device, like a tach, encoder, etc. back to a high speed counter, it would be able to do all the work for you as Peter mentioned.

Darren
 
Just ran across the 1732E-IB16M12SOE which is an Armorblock Sequence Of Events module. You may be able to use with the L23 to get the accurate timestamps you want, BUT I am not sure after looking at the manual. It may require some of the newer CIP Sync Grandmaster clock features that require the newer 1756-EN2x or EN3x Ethernet modules (or a Stratix switch on the network that supports that feature). It is kind of unclear and it will let you configure it with the L23 ethernet, but you will need to check if that will work. Looks interesting if it will work with the lower end controllers.

Darren
 

Similar Topics

Hi all, I’m an electrician with limited knowledge of PLC circuits. Typically I will see simple 2/3/4 wire terminations for transmitters on...
Replies
26
Views
1,255
I'd like to talk this through a little: Relays are regularly used for PLC outputs, regardless of a need for signal conversion. But what about...
Replies
15
Views
949
See code at the bottom. Hi all. For the story, this is my first complete project using a Rockwell PLC, I've been mostly working with Unity Pro...
Replies
7
Views
788
Hi all, I want to catch min piks of an analog signal when digital signal is on(pls see the attached oscillogram). My hardware is 5069-L306ER CPU...
Replies
3
Views
989
I have a robot cell controlled via PLC. I want to use an output from the PLC, based on whatever part number the cell is processing, to open a...
Replies
6
Views
896
Back
Top Bottom