LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daqmx write taking time to execute

Hello,
I am using the Daqmx to send JTAG commands to a controller and read them back. For that, i have made a VI for the DAQMX with sampling rate for the clock as 2MHz.This VI runs multiple times to read the data out of the controller.  This works but the Daqmx write VI is taking 6ms to execute and thus making the VI very slow. I am posting my VI below. Is there any way to reduce to execution time?

0 Kudos
Message 1 of 9
(4,165 Views)

I'm sure, time need not for write, but for configure.
You should move config and stop task functions out from this VI.

0 Kudos
Message 2 of 9
(4,104 Views)

Please attach your VI, not a PNG picture of it -- we can't closely inspect, execute, or modify a picture easily.

 

You talk about a 2MHz clock.  Are you sampling (A/D) and outputting (D/A) at the same rate?

 

Your DAQmx logic seems flawed to me (but, then, I don't know what device you are using because I don't think you told us).

 

Bob "Attach your VI" Schor

0 Kudos
Message 3 of 9
(4,098 Views)

If you are using for read the same clock as for write, then you must start read before write. Otherwise you might skip data that has been generated, but read has not started yet.

Also you do not need wait task done in read chain. If it can read, DAQmx read.vi will return data, if it can not, read will return timeout.

I guess you also do not need wait done in write chain - you clear write task after data are read, do they have different sizes?

0 Kudos
Message 4 of 9
(4,088 Views)

Sorry, i forgot to mention the device. I am using the PXIe 6363 card. i will implement the changes you guys have suggested and will upload the new VI soon. Thanks for the help.

0 Kudos
Message 5 of 9
(4,067 Views)

I have implemented some of the changes which you guys mentioned and have attached a simplified version of my VI. I am using the PXIe 6363 P0 pins. 
The changes have increased the speed but i was wondering if i could take the start and stop task outside the while loop and thus increase the speed of the while loop.
I have read about triggering, but for some reason I am unable to implement it. So can anybody please help me with the same.
I am comparatively new with labview and daqmx. So please forgive me for the lack of information given from my side. I hope i am clear this time 🙂

0 Kudos
Message 6 of 9
(4,024 Views)

Yes you will want to move the start and stop tasks outside the while loop.  I have not done much with triggering, but there should be examples in the help/ find examples in the labview environment.



-Matt
0 Kudos
Message 7 of 9
(3,991 Views)

No i cant find any suitable examples. I know i have shifted my question to Daqmx read rather than the topic started. So i am attaching my VI with this post. Can anybody please suggest where i am going wrong with the trigger. It doesnt work for finite samples. it works for continuous but i need to analyze the data. That i am unable to do in the continuous samples. 

0 Kudos
Message 8 of 9
(3,951 Views)

So rule of thumb for the forums is to select a correct answer for your question, if one is provided, then to start a new thread if you have a new question.  It helps to keep the forums more orginized so that users can look through the threads later and quickly find solutions to the topic.  I would suggest starting a new thread and explain how you would like to use the trigger.



-Matt
0 Kudos
Message 9 of 9
(3,942 Views)