10-29-2010 05:15 AM
The logging bit is fine, because if i use a sequence structure it works ok, in that it turns off teh device then logs 200 samples, it just logs too late.
I have attached an image of the measurment & automation config. --- Its set to give me 200 hardware timed samples @1kHz in one array.
Zac.
10-29-2010 05:19 AM
Here's a 2009 compatible version for you and the image. I sent the code to you so you can use context help to see what VIs I've used etc...
10-29-2010 05:35 AM
Can you also add the Merge Errors & Simple Error Handler VIs to your code so we can see if there are any errors along the way.
10-29-2010 07:58 AM
Thanks, i've been trying to get your code to work but i'm not sure about the "phsyical channels" box.
I normaly configure all that in the measurement & automation explorer. Is it just an actual channel like AI3 etc..
Or does it refer to something that has to be setup in measurement & automation explorer ?
And where do i find the box in the controls pallete?
I have attached an image of my attempt....
Thanks, Zac
10-29-2010 08:29 AM
You just have to choose the physical channel you want to measure from your device, e.g. USB 6210, AI0. You should easily be able to choose this from your front panel from the drop down menu.
The reason for your error wire is that you don’t have it connected to the correct input. If you bring up context help (Ctrl + H) and hover over you VI, you can see which terminal you need to use. Right click the Physical Channel input on the DAQmx Create Channel VI -> Create -> Control. You can just copy the piece of code I sent you too.
Don’t forget to use the same architecture that I suggested before, i.e use your error wire to control the data flow and make the 2 processes parallel. Also add a Simple Error Handler VI so you can see any errors appearing.
The most important thing to do once you have wired everything is to create an indicator for your DAQmx Read VI (as explained before). This will help us in monitoring the data readings. Let me know if you can see any data on this indicator.
11-01-2010 06:47 AM
Hi,
i tried the example you gave, but it didn't work.
I got a DAQmx error (see attached image) and the indicator just showed 0 (as it didnt get as far as aquiring data)
I have attached an image of the error msg, and the code.
Thanks, Zac
11-02-2010
10:34 AM
- last edited on
07-10-2024
09:13 AM
by
Content Cleaner
What happens if you just try running your data acquisition part of the code in isolation from the rest of your application? You can create a new VI with just your data acquisition code and run it on your USB 6210. Do you still get an error?
What have you chosen as your physical channel? What do you have connected to that channel?
I think you will need to use highlight execution (the light bulb at the top of your block diagram) to actually understand where your error is occuring. You should also put a probes on the wires you want to monitor to see the dataflow. For instance your error wire and data wire. SInce I do not have acceess to your whole set up it is very important that you try these debugging techniques.
It might also be a driver error, what version of the drivers do you currently have?
Please can you download the latest version of the DAQmx driver: https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html
Let me know how you get on with this.
11-02-2010 11:10 AM
Hi,
i don't think its a driver error, as when i use a sequence structure it turns off then loggs the data without any problems.
I will some de-bugging and get back to you....
Thanks, Zac
11-08-2010 04:40 AM
Hi,
i tried running the code as a seperate VI.
It allowed me to run, but still missed the first part of the data (ie it starts to log too late)
See attached.
Thanks, Zac
11-08-2010 05:57 AM
I re-wired the error wires to after the "start task" box, and it worked !
Is it possible to delay the "off" command further using the error wires, so it happens closer to the middle of the log file ?