News:

  • June 08, 2026, 05:38:40 AM

Login with username, password and session length

Author Topic: Pulse catch - can I write params CPU->CTRIO?  (Read 24909 times)

JD in NJ

  • Newbie
  • *
  • Posts: 6
Pulse catch - can I write params CPU->CTRIO?
« on: November 25, 2009, 05:07:37 PM »
Thanks for the great job you guys do. I only discovered the CTRIO a few weeks ago after years of using AD PLC's and I am excited with the possibilities. It is a great product, but the documentation is mind boggling. Still, through trial & error and your website, I have managed to figure out what I need to know.

I plan on using two H0-CTRIO in a DL06 CPU with an Optimate 620 HMI. The CTRIO functions I need are quad encoder, edge timers (two) and pulse catch. I need adjust various setting for these functions using the  HMI and ladder logic. So far I have learned how to use the RD and WT instructions to set the current count of a quad encoder and how to load a preset table for the edge timer presets. The stumbling block is the pulse catch.

There are two parameters for pulse catch: minimum input signal duration and output signal duration. They are easily manipulated using CTRIO Workbench. But as far as I can tell, they are not accessible from ladder logic. Is this true? How totally frustrating.

There must be a work around. Please share the secret with me. My project's very life depends on it!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #1 on: November 25, 2009, 06:25:32 PM »
Hmmmm....I hate to be the bearer of bad news, but unless I have forgotten, there isn't a way to do so.

The purpose of the pulse catcher was just to grab quick pulses and stretch them for slower devices. I don't guess it ever occurred to us that you might want to make that dynamic.

What exactly are you trying to do? Maybe we can offer some other options.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

JD in NJ

  • Newbie
  • *
  • Posts: 6
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #2 on: November 25, 2009, 07:19:44 PM »
Hi Bob,

Thanks for the reply. I want to use the pulse catch to condition a signal that will be output to a counter. I am counting objects falling past a thru-beam photo eye. In certain batches, the object may have a center hole, which may produce a false signal. In order to avoid double counts, I want to trigger on the leading edge of the object and output a fixed length pulse to the counter.

The length of the pulse must = the length of the object (more or less) to avoid the false signal from the enter hole. I plan to use the "minumum duration" parameter to filter out short signals from dust and chips (this can be a constant 500 usec)and to use the "output duration" parameter to make the signal proportional to the object length, which will vary from batch to batch (5 to 50 msec), hence the need for user-adjustability.

I have some ideas for work arounds, but none are as perfect as using the pulse catch function.

Have a great T-day!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #3 on: November 25, 2009, 07:28:24 PM »
That would probably be a simple tweek to the firmware to read the duration value from a channel input. It would also take some work in workbench though, and we are up to our ears in alligators on the new PLC we are developing. That kinda bums me out though, because it really would be quite simple.

Sorry I don't have a better answer.

And you have a great Thanksgiving as well!
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #4 on: November 26, 2009, 12:49:17 AM »
Do the small parts come faster in terms of parts/minute than the larger ones?  If not, just set the output duration for the biggest parts.

Or, put two photos arranged at 90 degrees so they can't both see through the center hole at the same time, or however many photos is needed with the part geometry to make sure at least one of them will be blocked for the whole part length.

There are also ring shaped photos specifically designed for counting falling parts that probably work on a light curtain principle that might work.
« Last Edit: November 26, 2009, 12:50:57 AM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

JD in NJ

  • Newbie
  • *
  • Posts: 6
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #5 on: November 30, 2009, 01:55:47 PM »
Thanks for the advice. This machine is already in production, the physical design of the sensor is fixed. The system already has the one-shot pulse stretcher as a separate discrete device. I want to bring the unprocessed signal into the PLC and do all signal processing there. For solid objects (no hole) I want to add the ability to measure (time) the length of the object and the length of the gap between objects (one CTRIO), but still have the option of filtering out the center hole when needed (second CTRIO).

Too bad the pulse duration is a fixed value, otherwise I would be set to go. I will continue to look for a workaround.

JD in NJ

  • Newbie
  • *
  • Posts: 6
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #6 on: December 01, 2009, 05:07:25 PM »
Got it!

I want to stretch a short signal (usec) to a user adjustable duration (msec). I can't use the pulse catch feature because delay and duration are not programmable from ladder. While the edge timer is programmable for delay and duration,

--edit preset table entry, at preset value N pulse output on for T msec--

it won't produce an output signal that exceeds the length of the input signal. So I can't stretch a short signal...or can I?

Yes, and very easily. Jump the output back to the input. Works just like pulse out. Short signal comes in , turns on output which jumps back to the input, holding it on. Short signal ends, pulse output times out, output turns off.

I haven't tested it thoroughly yet (what does a choppy signal do to it?) but I thought I'd report back. I'm thrilled if the project is back on track.


Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #7 on: December 01, 2009, 05:32:31 PM »
Very slick!  I had thought of doing the same thing with solid state relays or transistors, but you said you wanted to do it in the PLC.  Never thought of doing the same thing in the CTRIO.  How does it ever unlatch though?  Disable the function from ladder after so many ms or interrupt the loopback with a relay fired from regular I/O?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

JD in NJ

  • Newbie
  • *
  • Posts: 6
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #8 on: December 01, 2009, 06:35:07 PM »
I've done some testing now. I guess I'm lucky it just works right. Even when I hold the raw input signal on, the output still turns off after the pulse times out. Does not restart until it sees a new leading edge input. Multiple leading edges that occur while the output is on do not affect the pulse duration since they are masked by the input being held in the on state. Works like a charm. I even have the "adjust via HMI" working.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: Pulse catch - can I write params CPU->CTRIO?
« Reply #9 on: December 02, 2009, 11:44:20 AM »
Very cool!

Glad you came up with a way to work it out. The CTRIO is a complex module, but in that complexity are many combinations that can do what you need done...if you can figure out how to do it. Sounds like you did.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO