LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum frequency of 50Hz?

Hi,

 

I have made a little stimulation program in Labview 7.0, and I'm using NI SCB-68 (see printscreen of block diagram in attachment).The user can load a txt document of 1000 datapoints (between -1 and 1) which define a pulse, and specify the pulse duration, the stimulation frequency and the total number of seconds to stimulate.

To give the pulses at a certain frequency, I've connected the inverse of the frequency to the time delay button.

When I connect the output of the NI with an oscilloscope, I can see that the stimulation frequency is correct for all values until higher than 50Hz: the 50Hz stimulation gives pulses with an interpulse duration of 20ms, but when I try a higher frequency, the interpulse duration stays 20ms.

Does anyone know whether I've made a programming mistake or whether this is a hardware problem?

 

Thanks!

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

The NI SCB-68 is just a connector block - what data acquisition device do you have in your PC to generate these signals. 

 

Ken 

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

I'm using M series NI PCI 6251

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

My guess would be that you are hitting the software timing limits with your program.  Since you are using a time delay to control frequency that means that your program needs to be able to run faster than the frequency you want.  So it looks like the fastest your loop can run is 20ms since you  cant go above 50hz.  To go faster you will need to go to hardware timing or a digital signal.

 

Look at the example programs (help >> Find examples) and do a search, you should be able to find some useful examples.  I do not have LV 7 on my machine right now to check.

0 Kudos
Message 4 of 5
(2,624 Views)

I would recommend upgrading to DAQmx.  It is a much better API for data acquisition.  Also, setup the channel before you enter the main loop and don't close it out until after the main loop.  If you are trusting your software to give you a good, deterministic output interval, you are greatly mistaken.  You should be using the hardware timing whenever possible.  But maybe getting the setup and close out of the way will speed things up enough for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(2,620 Views)