Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Garyhlucas on March 29, 2019, 10:35:20 AM

Title: New High Speed Counter module
Post by: Garyhlucas on March 29, 2019, 10:35:20 AM
You guys are just plain FREAKING AWESOME!!!
Title: Re: New High Speed Counter module
Post by: BobO on March 29, 2019, 10:42:29 AM
You guys are just plain FREAKING AWESOME!!!

Well, I don't know about that, but glad you like it!  ;)

BX-HSIO is exactly the same features as the onboard...so how hard could it be?!? (Don't ask...it was much worse than we realized.) Only difference is a slight increase in interrupt latency due to it being across a backplane.

Check out the new AXSCRIPT instruction. Swiss Army knife of motion.
Title: Re: New High Speed Counter module
Post by: ddubs2248 on July 10, 2020, 04:44:59 PM
Maybe I am missing something in all the reading I am doing, but if you are leveraging the BX-HSIO2, how can you utilize all 8 input channels to count pulses?  In module configuration it seems you are limited to 4 input functions.  In this actual scenario I only need to use 5 inputs (of the 8.0).

I have 5 distinct devices that are providing a pulse and was hoping to leverage the HSIO to acquire the pulses and ultimately calculate the RPM of the 5 different impellers we are monitoring.

Can someone point me in the right direction?
Title: Re: New High Speed Counter module
Post by: BobO on July 10, 2020, 05:00:01 PM
Maybe I am missing something in all the reading I am doing, but if you are leveraging the BX-HSIO2, how can you utilize all 8 input channels to count pulses?  In module configuration it seems you are limited to 4 input functions.  In this actual scenario I only need to use 5 inputs (of the 8.0).

I have 5 distinct devices that are providing a pulse and was hoping to leverage the HSIO to acquire the pulses and ultimately calculate the RPM of the 5 different impellers we are monitoring.

Can someone point me in the right direction?

How fast are your pulses?
Title: Re: New High Speed Counter module
Post by: ddubs2248 on July 10, 2020, 05:13:19 PM
2000 RPM so we are expecting 4,000 pulses
Title: Re: New High Speed Counter module
Post by: BobO on July 10, 2020, 05:31:36 PM
2000 RPM so we are expecting 4,000 pulses

Per minute, or second? At 2000rpm, it's only 33hz, which could easily be handled by interrupt.
Title: Re: New High Speed Counter module
Post by: ddubs2248 on July 10, 2020, 05:36:17 PM
Sorry BobO. 4000pulses/min

Interrupt?  I?ll dive into that.
Title: Re: New High Speed Counter module
Post by: ddubs2248 on July 10, 2020, 05:45:22 PM
I?m not sure how I would implement interrupts.  Each sensor is monitoring one impeller (total of 5 sensors and impellers). The impellers have two pick up magnets and will be creating two pulses per revolutions.  Each device (impeller) is driven by flow and the end user has the ability to choke flow and change the speed of the impeller.  So even if I used interrupts I would need 5 events to execute an interrupt sub routine, right?  If I was trying to monitor each device independently....

2000 RPM or 4,000 pulses/min would be the max rotational speed we would see.
Title: Re: New High Speed Counter module
Post by: BobO on July 10, 2020, 09:31:56 PM
You have 4 counters. Use them for 4 of the 5. Use an interrupt for the 5th. Rising edge input event triggers an interrupt. In the interrupt, grab the microsecond tick time (MATH box TICKus() function) and use it and the last sample to calc the time, then calc the rate from the time. I'm out of town, but I'll be back Monday. I can throw it together when I get back.
Title: Re: New High Speed Counter module
Post by: brucek on July 13, 2020, 08:48:38 AM
Or if money isn't a problem buy another card.
Title: Re: New High Speed Counter module
Post by: Garyhlucas on July 13, 2020, 12:54:07 PM
I did this with an interrupt at my previous job where I needed just one more counter for a flow meter and it worked well.
Title: Re: New High Speed Counter module
Post by: ddubs2248 on July 15, 2020, 09:48:24 AM
Thanks for the suggestion guys...after BobO posted it all made more sense...we were running down to the wire for pushing a project out, but we were able to execute the interrupt and it is working well!  Thanks for all the support that Host gives and all those contributing to the forums to lend a hand in a time of need!