Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

TIO Edge Seperation 6601

I don't know what I'm doing. I need to calculate a machines running speed. I am using 1 counter to track the number of pieces run. I was told by someone (who can no longer give me further info) that I need to: "Measure speed: configure counter 2 with frequency signal of 100000, calculate speed using 36,000,000 per hour(or was it second?) as base." I found the TIO Edge Seperation VBP example and I'm trying to use it as a start. But if I change the frequency from anything but the '20,000,000' it originally has, it returns nothing. Also, the documentation says that if I set buffer mode to continous, the CWCounter1_AcquiredData event will be fired every time the value of NMeasurements is reached, but it is only firing once. I'm new to this, pl
ease help.
0 Kudos
Message 1 of 3
(5,721 Views)
Hi GearRunr,

One of the ways counters calculate speed is by counting the number of pulses it receives in a known period of time in the case of multiple events. You can also calculate speed or frequency of a device by measuring the number of pulses of a known frequency occur within a portion of the signal.

The best way to get started is to use the shipping examples with NI-DAQ (driver for the 6601 card). If you are using VB, you should have installed support for VB when installing NI-DAQ. You can also modify your installation now to include support for VB by going to Add/Remove Programs and modifying the insatllation. Once you have support installed, you should have shipping examples installed in the National Instruments/NI-DAQ directory.

Since c
ounters can measure and generate pulses, we will need a combination of both to take speed measurements. You will want to configure one counter (counter 0) to generate a pulse of known width (1 second for example). Then you would connect this output to the gate of a second counter. The gate effectively turns on or off the counter when it is counting. So if you connect your signal to be measured to the source of this counter the counter will count the number of pulses that occur in 1 second (in our example). Therefore if you read 2,500 counts, you know your speed is 2,500 counts/second.

Anyway, I've included a simple example that uses VB and the CW controls to count edges. Many times, you would only need to right-click on the control and adjust the counter properties through that method instead of programmatically adjusting them in code. Hope that helps. Have a good day.

Ron
0 Kudos
Message 2 of 3
(5,721 Views)
Thanks Ron,
I actually got it working about 5 minutes ago, doing pretty much exactly what you just said. Someone put me on the wrong track completely, but it's nice to see I can get an answer to a question so quickly. I'm still learning.
Thanks Again,
Rob
0 Kudos
Message 3 of 3
(5,721 Views)