DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

PICe-6259 with DasyLAB 9 - How to do Analog Output

Hi,
 
I'm trying to get a small project working in DasyLAB 9.0.2 and I need some serious help.
 
I'm working with a PCIe-6259 and NiDAQmx 8 is installed.  I simply want to create a program that uses a slider to adjust the analog output on 4 channels and read the slider value on a meter.  This is a fresh installation of DasyLAB.
 
Here's the program that I setup and the errors that I get.
 
I select:  Modules -> Input/Output -> NIDAQ -> Analog Output.
I adjust the properties of the DAC module to include channels 0,1,2,3 and select OK.  (I don't adjust any of the other properties)
 
I then select: Modules -> Control -> Slider
I adjust the properties of the slider to include the same channels as above.
 
I then select: Modules -> Display -> Analog Meter
I adjust the properties of the meter to include the same channes.
 
The meters and Analog output are wired in parallel.
 
I get the following errors:
NI-DAQmx: Error Message
Driver: Task DA00, Version: 0.15
Possibly Reason:
-> The module can process the number of "values to be written".
File: ProcessData_KONTINUIERLICH.H, Line: 39
 
When I press OK I get:
NI-DAQmx: Error Message
Driver: Task DA00, Version: 0.15
Possibly Reason:
-> The driver does not use all NI-DAQmx task channel names. This is not valid, reconfigure the module to use all task channels.
 
Note: A NI-DAQmx task for analog / digital / frequency output must not have more than 16 channels. If you need more than 16 channels for the output, you must use more NI-DAQmx tasks.
File: MODUL_DA.C, Line: 2131
 
Any help to point me in the right direction would be greatly appreciated.
The next part of my program will include acquiring data from the analog channels, but I need to get the AO working first.  I've run into some issues with Analog Input as well, but I thought I should start with AO first.
 
Thanks in advance!
 
Chris
0 Kudos
Message 1 of 19
(12,363 Views)
Here's what I did using the NI-DAQmx simulation mode:

    - create two tasks
            Analog Output - 4 channels, 1k output rate, 100 samples to write, Continuous
            Analog Input - 4 channels, 1k input rate, 100 samples to read, Continuous

    Save them. Start up or synchronize DASYLab (Under Measurement Boards Settings - NI-DAQmx - Synchronize with... in earlier versions, it's under Hardware Setup)

    - Create Slider. Open Slider properties, click on Options, Synchronize to the AO task that you created. This step is really important - it ensures that the data rate matches what NI-DAQmx is expecting.

    - Connect Slider to NI-DAQmx AO module, configured for 4 channels.

    - Create AI module. Connect to the AI task that you created.

    Press Start. It should run. I can't verify absolute accuracy in simulation mode, but, I received no errors.

    Your first error is probably the result of the timing being wrong - the Slider defaults to the "Driver" timebase. The rest of the errors seem to be a cascade off the first.

    Note - my simulation did not work without the Analog Input. It generated no data. That may be an artifact of the simulator, but, once I put an Analog Input on the worksheet, it ran okay.

    I hope this helps.


Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 19
(12,340 Views)

Hi CJ.....

My name is Ryan.... I have been working with Chris on troubleshooting this DasyLab application.  We followed your instructions and still receive the following error message: The module can process the number of "values to be written".

Is there a simple way to get the analog output module functioning?  We have tested the output ports using the MAX (Measurement Automation Explorer) interface and all is well in that regard.  Please get back to us as soon as possible, as our work relies on the use of DasyLab and the analog output funtion.

Thanks for your help.

Ryan

0 Kudos
Message 3 of 19
(12,295 Views)
Hi Ryan,

Can you post the worksheet and your NI-DAQmx configuration? I need to look at what you're doing. Use the Measurement & Automation Explorer (MAX) to Export your NI-DAQmx configuration. Export is under the File menu.

Thanks,

--cj




Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 4 of 19
(12,289 Views)

Hi CJ....

This forum will not let me attach the DSB or the NI configuration file....... I've attached a word file with a number of printed screens, but that is unlikely to help as much as the whole files would. I could e-mail you the files right away if you send me an address.

 

If you need anything else, just let me know.

 

Ryan

0 Kudos
Message 5 of 19
(12,283 Views)
Ryan,

Try the forum at http://chat.advances.net:8080/%7Edasylabnet

or

http://forums.mccdaq.com/index.php?showforum=26


Try zipping the files.


Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 6 of 19
(12,275 Views)
Ryan, thanks for posting them on the dasylab.net board

Problem 1 -- open the properties for the slider. Click on Options. Look at the Time Base Setup - it defaults to the Driver timebase. You want to change this to use the NI-DAQmx task for your Analog Output. That eliminates the error message.

Problem 2 - That didn't seem to be sufficient. I had to add an Analog Input and then have the Slider use "With Input" connected to the AI module.

Try the attached.
Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 7 of 19
(12,268 Views)

Hi CJ.... Thanks for getting back to us.  We appreciate your help.

I opened your file and the program seems to work, which is great.  However, I still have a couple smaller questions about the file you sent me...

When I click on the 'list' window after I start the experiment, the program stops and gives me an error message: "The generation of samples has stopped to prevent the regeneration of old samples.  Your application was unable to write samples to the background buffer fast enough to prevent old samples from being regenerated.  To avoid this error, you can do any of the following:

1. Increase buffer size

2. Increase number of samples you write

3. Write samples more often

4. Reduce the sample.

File: MODUL_DA.C, Line: 1897"

I would like to understand why the program works if I click anywhere else on the worksheet, but stops and presents this error message when I click on the 'list' window.

Also, when I select the "with input" option in the slider options menu as you suggested, should I connect this input to any AI channel, or is there one in particular that I should connect it to?  My assumption is that all AI channels acquire data at the same rate, and I can therefore connect any channel to my slider input.  Is this correct?

Again, thanks for your help CJ.  Talk to you soon. 

 

0 Kudos
Message 8 of 19
(12,239 Views)
Hi again CJ..... we have encountered a problem...
 
The DasyLab program will run now, but it does not transmit a signal to our output ports (we discovered this problem after scratching our heads while looking at some odd data collected for a few minutes this morning).  If we use the MAX program to change output voltages, we detect these changes.  However, if we use the slider control in the DasyLab program you sent us, we can't detect any voltage changes. 
 
Please get back to us again when you can.
 
Thanks,
 
Ryan.
0 Kudos
Message 9 of 19
(12,237 Views)
Sounds more complex than I expected.

Give me a call

508-946-5100

-cj
Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 10 of 19
(12,233 Views)