06-06-2015 05:31 PM
Hello,
The program below does not read the analog inputs, with the MAX i can read the voltage but i can not read anything in the indicators and the graphs.
Any advise? I don't know what I'm doing wrong? Thanks in advance.
06-06-2015 05:46 PM
Are you getting any error messages?
From what I can see, you should be. You should be gettint error -50103.
You can't have 4 DAQ assistants all pointing to different channels on the same device. You'll get an error about the resource being reserved.
You need to have one DAQ assistant that contains all of your channels in a single task.
06-06-2015 06:41 PM
When you set up MAX to read your device, you specify the device, the channel(s) you want to read, the sampling rate, the voltage range, number of samples, and whether or not you want continuous. Before you leave MAX, save all of those settings as a MAX Task and give it a name you'll remember. Now, when you configure your DAQ task, use the Task you just configured in MAX. Of course, this assumes that you are not using the DAQ Assistant, but instead are using the basic DAQ functions so well described here.
Bob Schor
06-06-2015 07:28 PM
Make sure your not trying to run it while MAX is running. I learned that one the hard way.
06-07-2015 07:13 AM - edited 06-07-2015 07:16 AM
hello all,
i tried already to make it with one daq assistant getting same result: just one error in the daqmx create virtual do channel error 20099 but not the error liste 500....
besides this in the daq assistant no error and no results shown in the indicators or graphs.
could you give me an example how to implement it with my program
i'll not runt it with max simultaneously . thank you
06-07-2015 09:40 AM
I don't have any hardware at home, so I created a simulated 6009 (which I think is very similar to the 6008). I created a Task called 4-line DO and wired it in to the Start DAQ function.
Something to note -- while the USB 6009 has a very good clock for sampling, I don't think it has a clock for timed outputs, depending on you delivering the points via USB (which isn't very fast). I'm pretty sure that Analog Output is limited to something like 100Hz.
Anyway, here is a simple DAQ Output routine:
Bob Schor
06-07-2015 10:46 AM
Are you sure about that error number 20099? My guess is that it is -200099, which means "Physical Channel not specified". Since your Digital I/O control is empty by default, I'm wondering if you are forgetting to enter a channel there before starting your VI.
You can usually help yourself in debugging by taking careful note of the error numbers, reading what they say, and putting probes on error wires so you can see exactly where the errors occur.
06-07-2015 01:53 PM
06-08-2015 12:48 PM
I apologize for not looking more carefully at what you are trying to do. I didn't see that you are doing both Digital Out and Analog In.
I now have my USB 6009 connected, so I can actually test things with MAX. I made a task, 4-Chan DO, that does a 1-sample On Demand write to port 0, lines 0 through 3 (all at once). I made a second task, 4-Chan AI, that samples AI0 through AI3 using Continous Samples, 1000 samples at 1KHz. The channels are set to ±10v, differential.
Here's the VI that handles this. I made the Chart Y scale fixed at ±0.1 v, as nothing is wired to my inputs so I'm only seeing "noise" -- if I let it autoscale, it jumps around and isn't pretty to view.
Some things to note:
Bob Schor