08-25-2016 07:42 AM
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?
08-25-2016 04:09 PM
I'm sure, time need not for write, but for configure.
You should move config and stop task functions out from this VI.
08-25-2016 04:18 PM
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
08-25-2016 04:49 PM
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?
08-26-2016 01:54 AM
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.
08-30-2016 02:52 AM
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 🙂
08-30-2016 10:44 AM
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.
08-31-2016 09:17 AM
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.
08-31-2016 10:28 AM
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.