adccommunitymod (AutomationDirect) asked a question.

Click and encoder counting.

Created Date: August 06,2014

Created By: jonesjeremya

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

I am wondering if a Click can effectively count encoder pulses on it's first two inputs, and if so what sort of speed restrictions are there? Maybe an application example? I keep seeing 1KHZ on this forum. Can someone kindly break that down into layman's terms? I look to use a 100-250 pulse encoder, both channel A and B. The encoder shaft would turn about 1 time every second. Is this a speed that the Click could handle? The reason I am leaning towards Click is 1) the budget I have to work with, and 2) it uses real math (or at least the kind of math I can wrap my head around). Thanks in advance!


  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: Tinker

    I have said that based on my experiments I suspect that a short interrupt routine could handle about 1kHz (one thousand pulsed per second), but that was just counting simple pulses for a tachometer application (which was just playing around and not a "real " application). You say "both channels A and B ", do you want bidirectional quadrature, or just a unidirectional pulse counts? in the former case it could be challenging. The CLICK interrupts only trigger on the rising edge which will add some complexity and thus make the interrupt routine longer and slow the possible speed. However, 100 to 250 pulses per second is likely still quite manageable, in fact 100 might be done in regular ladder if your overall program is short.

    If this is a critical application I think I'd be inclined to recommend a PLC with dedicated high speed input capability. However that might increase the cost a lot. If you already have a license for Direct Soft (or your program is simple enough to do in less than 100 instructions) then a 05, or 06 with the built in (moderately) high speed is hardly much more than a CLICK. But if you have to shell out $400 for Direct Soft that is not trivial (personally I'd use a Do-More before dealing with BCD, but the CPU plus a CTRIO is a lot more than $400 even though the Do-More software is free)

    Oh, I see you said real math, well, I don't believe the 05, 06 have that. "The budget I have to work with ", I'm not sure the Do-More can do that :(

    Well, a CLICK might work, particularly with the 100 pulse / 1 second option. Do you already have the encoder? remember the CLICK has 24volt inputs, which might be limiting, adding something like a FC-ISO-C costs nearly as much as the CLICK itself

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: Adisharr

    I have said that based on my experiments I suspect that a short interrupt routine could handle about 1kHz (one thousand pulsed per second), but that was just counting simple pulses for a tachometer application (which was just playing around and not a "real " application). You say "both channels A and B ", do you want bidirectional quadrature, or just a unidirectional pulse counts? in the former case it could be challenging. The CLICK interrupts only trigger on the rising edge which will add some complexity and thus make the interrupt routine longer and slow the possible speed. However, 100 to 250 pulses per second is likely still quite manageable, in fact 100 might be done in regular ladder if your overall program is short.

    If this is a critical application I think I'd be inclined to recommend a PLC with dedicated high speed input capability. However that might increase the cost a lot. If you already have a license for Direct Soft (or your program is simple enough to do in less than 100 instructions) then a 05, or 06 with the built in (moderately) high speed is hardly much more than a CLICK. But if you have to shell out $400 for Direct Soft that is not trivial (personally I'd use a Do-More before dealing with BCD, but the CPU plus a CTRIO is a lot more than $400 even though the Do-More software is free)

    Oh, I see you said real math, well, I don't believe the 05, 06 have that. "The budget I have to work with ", I'm not sure the Do-More can do that :(

    Well, a CLICK might work, particularly with the 100 pulse / 1 second option. Do you already have the encoder? remember the CLICK has 24volt inputs, which might be limiting, adding something like a FC-ISO-C costs nearly as much as the CLICK itself

    The DL06 can do real math and the high speed counter can handle a quadrature signal at a reasonable rate (7kHz).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: jonesjeremya

    Thanks for the reply and helpful information.

    I have Directsoft, and have done a couple projects over the years, but none with an encoder. I'm not 100% opposed to doing this in a D06, but I really struggle with BCD. It's just not my thing.

    I'll explain the application, maybe your expertise can tell me if this is even do-able on a Click.

    The encoder will be used to measure and display an axis "position " on a c-more or micro HMI. Basically, this axis is about 10 ' long, moves relatively slowly since this is a very large machine, and the encoder shaft is spun via a dedicated rack and pinion. It will need to be accurate and miss no pulses, ever, in either direction.

    Regarding the encoder, I can put any count/type on it. I estimate the encoder pinion gear at about 1 " diametrical pitch, so roll-out would be approximately 3.141 " per revolution, so that would give me a resolution of +/- about .003 " That is adequate for this application. Again, regarding the speed of the pulses, I estimate the 100ppr (per channel) encoder pinion turning about 1 revolution per second at it's fastest.

    Also, this would need to "count " up and down as the axis is moved. The display/reference would then be scaled to human measurement in either inches or mm. In a nut shell, the operator would command movement of the axis in either the + direction or the - direction to achieve the desired axis position, using the HMI as the reference.

    And finally, I would need the "count " or encoder pulse register to be retentive during periods of no supply power.

    What do you think? Reasonably possible with the Click?

    Regarding the other functions of the Click. The Click + HMI will be used only for selectively starting stopping cutting motors, basic input and output functions, nothing fancy.

    Thanks for any and all advice!

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: bcarlton

    While, with a Click, directly counting a quadrature encoder may be tricky a converter board could provide seperate Up/Down pulses which could be tied to seperate interrupt inputs on the Click.

    Then again, there are some encoders which have the Up/Down pulses as the direct output.

  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: Tinker

    The DL06 can do real math and the high speed counter can handle a quadrature signal at a reasonable rate (7kHz).

    Oops, my bad, I looked at PDF named "d06dd1.pdf, first line in the file (a bold headline) is "DL06 I/O Specifications " on the next page, under "features at a glance " there were two columns and I just looked at the first one without noticing that the heading said DLO5, why the 05 is in an 06 document I don't know, but it is the 05 that doesn't do floating point.

    3.14 " / 0.003 ~ 1000, unless you meant 0.03 (about 1/32 ") I think that 1000 pulses /second would be too fast a CLICK and " miss no pulses, ever " and that is with a converter like bcarlton suggested. With the converter I see no problem at all with 100 pulses / second and doing the quadrature in the CLICK seems possible at that speed (but a pain, the converter seems like a really good idea). However, since you have Directsoft, the 06 is likely the best way to go.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: Adisharr

    Oops, my bad, I looked at PDF named "d06dd1.pdf, first line in the file (a bold headline) is "DL06 I/O Specifications " on the next page, under "features at a glance " there were two columns and I just looked at the first one without noticing that the heading said DLO5, why the 05 is in an 06 document I don't know, but it is the 05 that doesn't do floating point.

    3.14 " / 0.003 ~ 1000, unless you meant 0.03 (about 1/32 ") I think that 1000 pulses /second would be too fast a CLICK and " miss no pulses, ever " and that is with a converter like bcarlton suggested. With the converter I see no problem at all with 100 pulses / second and doing the quadrature in the CLICK seems possible at that speed (but a pain, the converter seems like a really good idea). However, since you have Directsoft, the 06 is likely the best way to go.

    I was a little surprised that the 05 couldn't do it and the 06 could. I had to recently troubleshoot a cutting system that used a lot of floating point math and was going to use my 05 for bench testing. Nope :p

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: jonesjeremya

    Guys, I really do appreciate the advice, expertise, and breaking it down.

    You 're right, my math was off, and so .030 is not acceptable. I need resolution down to the 0.1mm or .004 "

    Looks like the 06 is the way to go for this project. Although I had my heart set on a Click, it's just not in the cards until they release a high speed card and CPU that can handle it. It's been in the talks since the dawn of time, but still no high speed cards?

    Thanks again for the help!

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: August 06,2014

    Created by: jonesjeremya

    I am wondering if a Click can effectively count encoder pulses on it's first two inputs, and if so what sort of speed restrictions are there?

    Maybe an application example?

    I keep seeing 1KHZ on this forum. Can someone kindly break that down into layman's terms?

    I look to use a 100-250 pulse encoder, both channel A and B. The encoder shaft would turn about 1 time every second.

    Is this a speed that the Click could handle? The reason I am leaning towards Click is 1) the budget I have to work with, and 2) it uses real math (or at least the kind of math I can wrap my head around).

    Thanks in advance!

    Expand Post