Hi Speed Counting

15 ft/sec = 180in/sec
Distance between parts is 30 +4 = 34
Number of parts per secont = 180/34 = 5.29
Time part to part = 1/5.29 = 189ms
Time of gap 189ms*4/34 = 22ms
 
TWControls said:
One thing that I haven't seen mentioned that will affect the response time is not only do you have the switching time of the photoeye, but you also have the switching time of the input module. For a 1746-IB16 this would be 8ms on and 8ms off. This would mean somewhere around 24ms on the switching in the worst case. This is above the 20ms scan time
If my numbers are correct for the gap time then the switching time would be the problem. 24ms is the limit if it is connected to a IB16
 
Derek,

Therefore, your ON time is 30 inches x (1ft/12inches) x (1sec/15feet) = 0.1667 seconds = 166.7 milliseconds. Your OFF time is only 4 inches x (1ft/12inches) x (1sec/15feet)= 0.0222 = 22.2 milliseconds.

You meet Bernie's requirements, but just barely. You scan time could vary enough to go from 20 to 22 miliseconds, where you would miss a count.

You could look at decreasing the scan time. There are probably rungs in the program that could be changed to reduce scan time. The easiest way is to delete rungs, delete or combine subroutines.

Because you are using a SLC 5/04, another possibility is to use a DII routine, with regular old Inputs, as explained below.

Rockwell Software 2000
Discrete Input Interrupt Function

Use with processors SLC 5/03, SLC 5/04, SLC 5/05

Description
Use the Discrete Input Interrupt (DII) function for high-speed processing applications or any application that needs to respond to an event quickly. This function allows the 5/03 processor to execute a ladder subroutine when the input bit pattern of a discrete I/O card matches a compare value that you programmed.
The status file contains six bit values and six word values used to program and monitor the DII function. The DII does not require ladder logic instructions for configuration. You program the DII to examine the input bit pattern of any single I/O slot which contains any discrete input card (IG16, IV16, IB8, IB32, etc.) When the input bit pattern matches the compare value, the accumulator is incremented. The DII accumulator counts to the preset value, and once the interrupt is generated, it immediately wraps around and begins counting again at zero.

While scanning the DII subroutine, you can reconfigure the DII to look for an entirely different event. This facilitates DII sequencing. The DII can be programmed to compare each input point to either a high (1) or low (0) state. The accumulator is incremented on the input transition that causes the input points to match the compare value.

Program IIM and IOM (Immediate I/O instructions) in the DII subroutine so that the subroutine will have access to physical machine states.

Programming Procedure
1 Create a subroutine file (range 3-255) and enter the desired ladder rungs. This is your DII subroutine file. . Make sure that the INT instruction is the first instruction in this file. You can program any instruction inside this file except a TND, REF, or SVC instruction. Terminate your DII subroutine with a RET instruction. You may call other subroutines to a level 3 deep from within the DII subroutine.
2 Enter the Input Slot number (Word S:47).
3 Enter the Bit Mask (Word S:48)
4 Enter the Compare Value (Word S:49)
5 Enter the Preset Value (Word S:50)
6 Enter the DII subroutine file number in word S:46 of the status file. A file number of zero disables the DII function.
7 Restore your program and enter the REM RUN mode to begin operation.

Counter Mode - When the preset (S:50) contains a value greater than 1
1 The DII reads the first byte of input data of a selected discrete input card at least once every 100 microseconds. (Interrupt latency will affect the time between the last count and DII execution.)
2 When the input data matches the programmed masked value, the accumulator is incremented by one. The next count occurs when input data transitions to non-matched and then back to matched.
3 When the accumulator reaches or exceeds the preset value, between 1 and 65535, the interrupt is generated.
4 The DII subroutine is executed.
5 The cycle repeats.

Rockwell Software 2000
 
Last edited:
Since Lancie came up with the same times as me I am going say the Switch and Input module are the problem. You can lower the scan time but it will do no good when the physical switch is not fast enough.

Go with Ken's suggestion for the HSC. I have never used either but I have heard good things about them and nightmares about the AB HSC. They are very hard to configure
 
Ok at this point I might just be talking to myself but I love HSC applications, they are my pet projects.

Was just thinking, if all you are doing is counting parts and not doing anytype of processing to them, which I doubt you could at that frequency with normal outputs on a SLC, why couldn't you use something like a Micrologix 1100 for the counting. Then you could use messaging on the Channel 0 or Ethernet with a NET-ENI on the 5/04 to read the values. It would be less expensive than the HSC for the SLC and much easier to configure. Of course you are adding a second PLC
 
Derek, can you increase the gap by 1"? if 4" at 80%, then at 5" you can run 100%. otherwise I think DII is your best solution, high speed card probably is an overkill for what you need.
 
johnyu said:
Derek, can you increase the gap by 1"? if 4" at 80%, then at 5" you can run 100%. otherwise I think DII is your best solution, high speed card probably is an overkill for what you need.
The DII will do no good in this case. The combined switching time of the prox and the input card is too slow

If his scan time is 20ms and his switching limit is 24ms, what good is it going to do to try to process quicker? Ok so we get the S/04 to process a switching every 5ms. So what, our physical I/O is still only capable of 24ms. What is the point?
 
HSC - this application is exactly what it is designed for, processes which take place in a shorter time frame than the regular CPU scan. Get an HSC card and let it handle it. Use the proper hardware for the application. Until you get so fast that you need a faster sensor you are set.
 
Yes, the switch should be good for roughly 44ft/s

I am not sure what you mean by the proper hardware. I would go with Ken's HSC. Configuration is much easier
Ken Moore said:
If you do decide to use a high speed counter, I much prefer the Spectrum 1746sc-CTR4 to the AB model, easier to configure/program, has more channels, and cost less.
http://www.spectrumcontrols.com/ab-1746.html
 
If you want a cheap fix...

As I said before, get a timer...a good programmable one, I prefer Siemens multi, if you are just using this as a count, NOT as a encoder type feed back or anything that is of much importance, you stated its a counter...

Then you could just hold that value low/false value input to your PLC

If you have 22ms on the false and 166 on the true then hold the low with a time off delay for 20ms more

The only thing that you may have trouble with is when you run the machine at a slow speed

its worth a cheap try
 
Thanks again everyone.


I think I am going to get the sprectrum HSC card. I am also think about replacing the photoeye. Can anyone suggest one that they have used with good luck. I am currently using a reflective style, but I am think maybe I should go with an emmiter receiver type. Again, any help would be greatly appreciated.


Derek
 

Similar Topics

I am converting a machine from a micrologix 1100 to athe compactlogix 5069-L306ER controller. I have small disk about 0.930" and need to count at...
Replies
14
Views
3,725
How does everyone count items at a higher speed using a PE? I traditionally just use a sequence to count such as PE gets blocked for a set period...
Replies
8
Views
2,114
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...
Replies
2
Views
1,861
I'm working with a TWDLCAA24DRF that is having trouble missing pulses off of a flow meter. I'm not real familiar with the Twido PLCs but it...
Replies
6
Views
3,590
Hello everyone, I am using a ML1100 and a 2048 pulse incremental two channel encoder. I have set up the high speed counter and the ML1100...
Replies
3
Views
3,213
Back
Top Bottom