Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

can I group different analog output channels in PXI 6733 without resetting the 6733

Hello,
 
I am trying to group 2 analog output channels 0 & 4 in 6733 using WFM_Group_Setup. It does generate the waveform I need. But when I try to group another channels(1 & 5, 2 & 6, 3 & 7), without resetting the DAQ6733, it gives me an error.
 
Can I group the analog channels independently. Do I have to reset the DAQ each time I group the channels.
 
I want to generate the waveforms from each channel one after the other and not at the same time.
 
Thanks,
Srikanth
0 Kudos
Message 1 of 7
(3,964 Views)
Hi Srikanth,

It sounds like you're using the Traditional NI-DAQ Driver since you're making calls to WFM_Group_Setup. Looking at the C API documentation for that function [1], you may want to try clearing the group before setting the group. To clear the group, use 0 as the value for the numChans argument.

I believe you should be able to modify your code to not need this call at all. The documentation says that the function is really only helpful for the AT-AO6/10 devices. Yours is a PCI-6733, and it's also supported under DAQmx [2]. If you have the time, I recommend using the new DAQmx driver. It offers system performance increases and simpler programming.

[1] WFM_Group_Setup
Traditional NI-DAQ (Legacy) C Function Reference Help » Traditional NI-DAQ (Legacy) Functions » Complete List of All Traditional NI-DAQ (Legacy) Functions

[2] NI-DAQmx
http://www.ni.com/dataacquisition/nidaqmx.htm

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 7
(3,941 Views)

Thank you Joe. It looks like the traditional NiDAQ drivers can only support setting up only 1 waveform group. Does the NiDaq mx support setting up more than 1 group.

Srikanth

0 Kudos
Message 3 of 7
(3,939 Views)
Hi Srikanth,

The architecture of DAQmx is quite different from the traditional NI-DAQ driver. Instead of grouping channels into groups, output channels are grouped in tasks. Below I've placed a quote from the DAQmx Help file (which is installed when you install the driver) that describes how tasks work.

I don't know a lot about your application, or why you're grouping two channels at a time, but the 6733 has one sample clock to use for all of the channels. Once a task is running with two output channels, that task must be stopped before another task with two different output channels can start. The board is fully capable of writing to all 8 channels at once, though, as long as all of the channels are placed in one task.

Please let me know what you think and if you have any other questions about migrating to DAQmx.


DAQmx Help File » NI-DAQmx Key Concepts » Channels and Tasks in NI-DAQmx » Tasks in NI-DAQmx
A task is a collection of one or more virtual channels with timing, triggering, and other properties. Conceptually, a task represents a measurement or generation you want to perform. All channels in a task must be of the same I/O type, such as analog input or counter output. However, a task can include channels of different measurement types, such as an analog input temperature channel and an analog input voltage channel. With some devices, you can include channels from multiple devices in a task. To perform a measurement or a generation with a task, follow these steps:
  1. Create or load a task. You can create tasks interactively with the DAQ Assistant or programmatically in your ADE such as LabVIEW or LabWindows/CVI.
  2. Configure the channel, timing, and triggering properties as necessary.
  3. Optionally, perform various task state transitions to prepare the task to perform the specified operation.
  4. Read or write samples.
  5. Clear the task.
If appropriate for your application, repeat steps 2 through 4. For instance, after reading or writing samples, you can reconfigure the virtual channel, timing, or triggering properties and then read or write additional samples based on this new configuration.\

If properties need to be set to values other than their defaults for your task to be successful, your program must set these properties every time it executes. For example, if you run a program that sets property A to a nondefault value and follow that with a second program that does not set property A, the second program uses the default value of property A. The only way to avoid setting properties programmatically each time a program runs is to use virtual channels and/or tasks created in the DAQ Assistant.



Message Edited by Joe F. on 04-23-2008 01:04 PM
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 4 of 7
(3,923 Views)

Hi,Joe,

 

Your reply for Srikanth just answered my question. But I have a problem on pxi 6733.Hope you can give me some advice.Our customer want to use the 8 channel at once,but they want the first four channel output the same wave from one hws file,the other four channel output another waveform from another hws file.How can I realize this for them with a best way?

Thank you very much!

0 Kudos
Message 5 of 7
(3,644 Views)

Hi Maevebj,

 

Are you using DAQmx to program the 6733?  If so, you will need to combine the data from each hws file into a single array.  You can input the data to DAQmx Write as a either a 1-D array of waveforms (each element corresponds to a single channel) or as a 2D array of voltages.  I like the 1D array of waveforms, the following code should give you an idea of what you need to do:

 

Concatenate Waveforms from Multiple HWS Files

 

 

 

If you run into any issues you are more than welcome to post back here and let us know what you have so far.  Are you using LabVIEW to program your application?

 

 

Best Regards,

John Passiak
0 Kudos
Message 6 of 7
(3,609 Views)

Hello,John,

 

Thank you very much for your reply.I am trying to learn from your example. I am using LabWindows/CVI to program.I will post back to you when I have any result.

 

Best Regards

 

0 Kudos
Message 7 of 7
(3,591 Views)