05-08-2017 12:51 PM - edited 05-08-2017 12:55 PM
I have a USB6001 DAQ. I would like to have two synchronous analog signal from my DAQ (AO0 and AO1). I was able to form the signal in an array but I have been having issues for taking it out from the DAQ port.
In this VI (attachment), as a first step I'm trying to get one signal from one of the AO. But I get the error in the title.
Any help is greatly appreciated.
Best
Solved! Go to Solution.
05-08-2017 01:10 PM - edited 05-08-2017 01:12 PM
05-09-2017 02:32 AM
Hi GerdW,
I didn't get the Rube joke but that's fine.
This signals will be used for raster scanning. And I want both signal to be a step function. In later stage, I want to syncronise the two signal. That's the way I could think to satisfy the both.
I would appreciate any suggestion to make it more efficient.
I think I misinterpret the "1channel 1sample". Based on your suggestion I tried
1) Analog 1D DBL (Multiple Sample) and got the following error.
Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
How can I make sure that data channels and task channels are the same.
Thanks for any suggestion
05-09-2017 04:25 AM
Hi msoembl,
if you use multiple channels you should configure the DAQmx VI to multiple channels.
Also: A good way to get started is to not start from scratch but use examples. Use the example library located in help-> find examples. In your case you might wanna have a look at Voltage - Continuous Output. There you can see how DAQmx Tasks are properly handled. You would only need to make the adjustment to handle two instead of one channel.
05-09-2017 04:40 AM
@msoembl wrote:
I didn't get the Rube joke but that's fine.
05-09-2017 05:04 AM
Haha:)
Thx Mathan.
That's probably I'm still learning LV. I appreciate any more efficient way suggestions.
For the analog output. Based on previous comment I was able to get it run by changing Analog-Single Channel-Multiple Sample-1D DBL. And the Channel to AO0 at the DAQmx Create Channel. I think if I choose AO1, LV assumes there is also AO0 assigned.
Though, when connect the DAQ to my Scope I don't see any output. Any insight on that? could it be something related to Sample Clock?
Many thanks
05-09-2017 06:09 AM
In your attached VI the Channel constant contains a0:1. The "0:1" means you take the channels ranging from 0 to 1 so two channels. If you only want a1 type a1 instead.
Regarding your measurement: Again I recommend to start with an example to check wether your measurement result is not as expected because of the software or your hardware setup.
05-09-2017 10:24 AM
Thank you very much all for the suggestions. Especially, the suggestion for the examples saved my day.
That of course new questions. Below you will find the modified example.
VI works exactly as I wanted and I can see the generated signal from my scope and drive the mirrors. I have two questions:
1) To change the frequency of the signal (meaning time spend for every signal step of each function), I use sampling rate on the front panel. It may be a silly way to define the frequency but it works just fine for me. My DAQ 5KS/s capability and I was able to run the signal over my mirrors with 5kHz. But I wonder if it is a proper way to define the signal frequency or any possible disadvantages.
2) Now I would like to use trigger but when I select Digital Start, I don't see any signal output.
Any suggestions?
Many thanks
05-10-2017 04:42 AM
I figured out the Q.2 above. The reason was that I was thinking PFIx as an internal trigger but instead it is a pin that accept a trigger signal. When I connect a square wave to it then it operated as expected. So when the VI sees a a rising edge (I defined it for "Rising") it started generating the signal.
My Q.1 still yet to be figured out, though.
Thanks
05-15-2017 01:37 AM
Yes you can set the sampling rate in the front panel, but changes won't affect the output while the programm is running except if you are going to use loops which include the step of configuring the rate