LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using counter inputer as the stop condition for a loop issues.

I am wanting to measure the data from one revolution from the sensor connected to my daq. I know that for each revolution there are 24 pulses. What I tried doing was using a counter input that is taken from the input, and set a stop condition for when the counter is equal to or higher than 24. The issue I'm having is that when I increase the number of samples taken the counter goes well beyond 24. I am using a sampling rate of 35,000. If I have the number of samples set to 100 it will stop when then counter is at 26. When the number of samples is at 1000 the count goes up to 55. At 10,000 it goes up to 370. I'm confused as to why it is increasing. By taking more samples it should increase the accuracy of the acquisition shouldn't it? I'd like to have the stop condition be controlled by the counter as the input frequency is not constant.

0 Kudos
Message 1 of 5
(2,749 Views)

Hi randomguy,

 

does your DAQ hardware allow to use the pulse input as external sample clock? (Which hardware do you use?)

This way it becomes easy to read your AI signal: just request 24 samples to get the data for one revolution…

 

When your hardware doesn't allow such sample clocks:

Does your hardware allow to read digital signals with hardware timing? Then read AI and DI with same sample rate and use some data analysis to find rising edges of your pulse and so select AI samples for each pulse…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,743 Views)

I'm using an Iotech daqboard 1000. It has an A/D Pacer Clock I/O. Would that be the external sample clock you're talking about?

0 Kudos
Message 3 of 5
(2,732 Views)

Hi guy,

 

I guess so from taking a short look into the manual.

Why don't you ask MCCDaq for clarification?

(It's a shame you don't find a good explanation for this "A/D pacer clock IO" in the whole manual. All they talk about is an "external clock"…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(2,721 Views)

Yeah some of the documentation for the board isn't the greatest. I'll give them a call. Thanks for your help.

0 Kudos
Message 5 of 5
(2,719 Views)