11-02-2010 01:03 PM
Hi,
Using LabView 8.6 SE on a 3GHZ Laptop with DAQ USB 6008. Two questions
1. The maxium toggle frequency of a single digital port is 500HZ, I have NI spec sheet in front of me and I do not see a MAX rate for a digital port.
2. Is the attached VI a reasonable method of attempting to toggle a digital port as fast as possible? Or is there a more elegant method?
Thanks
Alan
11-02-2010 01:12 PM
A USB-6008 is strictly software timed. I don't know what is the difference you are asking between the 500 Hz max. toggle frequency and a "max toggle rate". It sounds like the same thing to me.
I would use a boolean instead of a U8 number. But I don't think it would affect the rate. You will be able to toggle as fast as the software allows you to run. I would reduce that 40 msec wait down to 1 or even 0. Right now, you are pretty much limiting yourself to a 250 Hz toggle rate.
11-02-2010 01:24 PM
Thanks for the quick responce, sorry I left out part of the first question. I meant to say I am getting a Max frequency of 500Hz and I do not see the Max listed for a digital output on the spec sheet. So I was not sure if their was a faster method to toggle the port or if the method I am trying has just hit the limit of the 6008 device. I get to 500Hz by setting the wait down to "0". It seems to me the loop should run much faster and that I am limited by the 6008?
Alan
11-02-2010 01:37 PM
You could try to send it an array of booleans of alternate True and False, and use the the Nsample version of the DAQmx. See if you an error message.
You could also try setting it up as an analog output and see if you can write an analog waveform that is essentially a square wave.
11-02-2010 01:45 PM
The spec sheet says the analog port is limited to 150hz , so I didn't even try that. When I get a chance I will convert to booleans but I really doubt T/F would be faster than 1/0 's , I'll try it anyway!
Alan
11-02-2010 01:47 PM
You're right. I saw 10 kS/sec. But I now realize that was for analog input, not output.
11-02-2010 02:01 PM
I converted to booleans, the frequency is a few hz faster, I am pretty sure due to the fact that when I converted I got rid of the coerrsion dot on the data input to the write DAQ_mx, Then again the freq change is within a margin of error and may just have been a fluke.
Alan
11-02-2010 06:01 PM
I give you Kudos for the suggestion of Boolean over numeric as this was indeed a more elegant and more efficient toggle method for my VI. For some reason I just wanted to use 1/0 instead of T/F(my scope and analyzer are digital 1/0)
Alan
11-02-2010 11:36 PM
Thanks. I just realized I made a math error in that particular reply and that a 40 msec wait is actually a 25 Hz rate, not 250 Hz.