05-21-2009 06:59 PM
Hello,
I am new to the DAQmx and TDMS vi's and am hoping someone will be able to help me. The attached code contains several case structures, however only one of them has the DAQmx and TDMS vi's running through them. My intent is to record the voltage output from two photodetectors as I scan the current of a diode laser controller. When I run this code it does not always record the values while I am scanning and when I quit the program the TDMS file viewer will show me no data. Sometimes, but rarely, it will show me some data. The stacked sequence within the case structure is the code that runs the laser controller and a couple of translational mounts. The DAQmx and TDMS vi's that should record the data are just next to that.
Thank you!
Solved! Go to Solution.
05-21-2009 07:25 PM
I tried loading your code but I can't because you are missing several subVI's. I would suggest zipping up all of the files and posting them.
Looking over your code, I can't really tell what the problem is at first glance. I would suggest setting a break point at the TDMS Write node and putting in probes to see if 1) it ever executes and 2) if it has data when it does execute.
Not sure what you mean by "only one of them has the DAQmx and TDMS vi's running through them"
05-22-2009 10:07 AM
I just ran the code about 5 times and it only recorded the data I was expecting once even though I changed nothing. I am attaching the code with the subvi's.
What I mean by "only one of them has the DAQmx and TDMS vi's running through them" is that the data is only recorded using these vi's once only one of the many case structures is activated. I'm simply pointing out that the vi's are not used anywhere else.
Also in the DAQmxRead vi, should I have Analog 2D DBL or Analog 1D Waveform?
I think the problem with the inconsistency in my code might be because I have a Stached Sequence Structure within the Case Structure where the vi's are.
Thank you.
05-22-2009 10:12 AM
05-22-2009 01:19 PM
Got it! All I had to do was move the DAQmx Start Task vi into the Case Structure.
But, I still don't know if I should have Analog 1D Waveform or Analog 2D DBL. Which should it be?
05-22-2009 01:25 PM