LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timing cDAQ

Hi
I have a relative simple question.... I have a cDAQ with a current output module and I have created a "task" with the daqassistant, but I cant choose the "hardware-timed" option??? oh well!! I have than choosen "1 sample on demand" and put the whole thing inside a while loop which I execute every 100 milisec. - PLEASE see attached screen shot - so does this mean that every 100 mili sec (10 hz) data is written to the current output module???? ------ just an additional question, what is the different between the 2 timing options I have illustrated in the attached VI??? pros/cons??
0 Kudos
Message 1 of 4
(2,877 Views)

Hi Viller,

I think your questions can be answered by I explain the difference between your timing option 1 & 2.

Timing option 1: When you put a "Wait (ms)" function in a while loop and wire a constant into the function, the loop will execute the code inside the loop and then wait that amount ms as you defined in the constant. If the code takes 30ms to execute and the constant is 100ms. Every While loop iteration will take 30+100=130ms.

Timing option 2: The "Wait Until Nex ms Multiple" function works a little different. With this function you can specifie how many milliseconds lapse when the VI runs. That means, if the constant is 100ms, the While loop iteration will take either 100ms or 200ms 300ms... It all depends the LV codes inside the loop.

You can read more about those timing functions in Labview help.

Best Regards!

 

-----------------------------------------------------
Dennis Morini
District Sales Manager
National Instruments Denmark
http://www.ni.com/ask
Message 2 of 4
(2,864 Views)

thank you very much for your explaination! ok so If I understand you right if I want "exactly" (I know it is nok hard real time) lets say 100 ms between every time data is written to the DAQ I should use the "wait until next.."? and the only limitation is that I cant choose a timing value less than the time it takes to execute the code!? --- but if I choose the "wait" it takes the amount of time I specify + the execution time?

But this only explains ½ of my question:-) I would appriciate if you also could answer the first part concerning the cDAQ timing

0 Kudos
Message 3 of 4
(2,860 Views)
Hi Viller,

You should be able to set up a hardware-timed task using the NI 9265.  Is that the module you are using?  Please make sure that you are using the latest released version of the driver, NI-DAQmx 8.5, which was announced today.  It is available here:

http://digital.ni.com/softlib.nsf/websearch/E2C96196892A649D86257291004F8EDC?opendocument&node=13206...


Please post more questions or problems that you encounter.

Regards,
Kyle
Message 4 of 4
(2,840 Views)