Help with SLC high speed counting (IIM and STI)

jake789

Member
Join Date
Jan 2009
Location
Illinois
Posts
4
Hello, I have a machine that is counting plates and stacking them.

I've found that when the gap is too small, the PLC gets the wrong count.

Each plate takes about 160ms and I'm guessing the gap is about 5-20ms but I've never seen them overlap.

Program scan time is 14-18ms.

To fix this today I upgraded the input card to a high speed version. 1746-ITB.

My problem is the new counters are way off. Mostly overcounting. I know this because I have a timer on the old counters that tell me the acc time that it took to stack 60 plates.

When I use the same timing logic with the STI rung, the acc times of counting to 60 is all over the place.

Anyone have any ideas if I'm doing something wrong? If this doesn't work I might try a HSC card....

Untitled.jpg
 
Your STI is set for 100ms. So this logic executes every 100ms (with a tiny bit of error). I think this is the wrong approach.

I would think you might need to look at a digital input interrupt to execute logic on the rising (and perhaps falling) edges of the sensor, so that you can capture changes that might occur faster than the overall execution time of the SLC.

The STI is for stuff that needs to happen at regular intervals like PID updates. It can be used for things that need to happen fast, but 100ms is not fast enough in this case. I do not like the IIM approach where you repeat the updates and the logic all over the place or call a subroutine many times as opposed to the input interrupt.

EDIT: Some resources:
http://www.plctalk.net/qanda/showthread.php?t=65560

http://www.plctalk.net/qanda/showthread.php?t=62941 (especially post #30)
 
Last edited:
Thanks for the reply. I was switching between 10x1ms and 1x10ms and must have forgot to change it. So 10ms was my target. Weird thing is that both of those settings acted differently even though they should have both been the same.

For the DII, one thing I didn't mention is that this machine has 2 stacks that its counting. It seems that the DII is only good for 1 particular input. Or am I able to use it for more than 1 input?


Also since I couldn't get the STI working. I ended up copying the IIM logic several times in the program (about once every 100 rungs). This seems to be working, at least better then the original counter. But its kind of messy thats why I thought the STI would be a cleaner way to do it. Plus now I have no idea just how fast the inputs are being updated.
 
Last edited:

Similar Topics

Machine has existing DN devices that are connected to SLC 5/04. All communication is working fine now. Supplier wants to remove some DN devices...
Replies
6
Views
842
Hello everyone, I am migrating a program from STL to SCL via S7-1200 portal, I would like you to help me by converting these lines of code...
Replies
4
Views
1,633
Hello Everyone, I'm a pretty green PLC tech and I need help logging on to some SLC 5/04 PLCs. I have a 1747-UIC and 1747-CP3 cables and I'm using...
Replies
16
Views
6,960
Hello, I have a SLC 5/04 processor that I can't get online with and hope someone can help me with any ideas. This processor has a DH+ and DH-485...
Replies
8
Views
3,254
I've got a guy looking for help with a SLC 5/02 with a flashing fault light near Charlottesville VA. It will be a while before I can get to it...
Replies
0
Views
1,354
Back
Top Bottom