Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

"Group by Channel" and "Group by Scan number".

What is meant by "Group by Channel" and "Group by Scan number" in using the function "DaqmxWriteAnalogF64(  )".
0 Kudos
Message 1 of 7
(4,325 Views)
Hi Amruth,
 
There's some great information about all DAQmx functions in the NI-DAQmx C Reference Help reached via the start menu in the National Instruments » NI-DAQ folder. For a further explanation, you deciding how the  elements in your array are grouped. If you choose GroupByChannel, you should have your array arranged so that if you're ouptuting 100 pts per channel, the first 100 points correspond to ch.0, the next 100 to ch.1, the next 100 to ch.2 and so on. If you choose GroupByScanNumber, you are going to arrange the array so that the first group of numbers correspond to each channel's first sample to output. The next group will be the second point to output for each channel and so forth. So if you want to output on two channels, one channel going up in voltage, the other going down for 10 samples, here's an example.
 
Desired output:
Ch1: 1 2 3 4 5 6 7 8 9 10 <-- Ramp up
Ch2: 10 9 8 7 6 5 4 3 2 1 <-- Ramp down
 
GroupByChannel:
[1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1]
 
GroupByScanNumber:
[1 10 2 9 3 8 4 7 5 6 6 5 7 4 8 3 9 2 10 1]
PBear
NI RF
0 Kudos
Message 2 of 7
(4,305 Views)

Hi PBeer,

 

 

0 Kudos
Message 3 of 7
(4,298 Views)

Hi PBeer,

  Thanks for your

 

0 Kudos
Message 4 of 7
(4,298 Views)

Hi PBeer,

  Thanks for your valuable

 

0 Kudos
Message 5 of 7
(4,297 Views)

Hi PBeer,

Thank you for your reply,

By reading your message I understood that there is no much differance in using "Group by channel" and "Group by scan number". The only difference is the arrangement of samples in the write array, please confirm this.

I have one more doubt, I have assigned 3 analog output channels of one device to a single task (as we cannot assign multiple Analog Output channels of one device to multiple tasks, please confirm this statement), can I produce waveforms in all three channels with any individual frequencies I like to? for Example 55 Hz in Channel0, 57 Hz in channel1 and 61 Hz in channel2.

Please provide your valuable information.

Thank you.

0 Kudos
Message 6 of 7
(4,296 Views)
Hi Amruth,
 
Yes, the arrangement is what matters.
 
You can create any waveform you desire and output them through your DAQ device. Please note that there is a relationship to the waveform length, the sampling rate, the frequency of the signal and being phase continuous in the buffer. For example, a sine wave (one period) that is 2000 samples in length, it needs to be output at a rate of 2000 samples per second in order to be 60Hz. If you output at 4000 samples per second, you will have a 120Hz signal. If you are going to output put multiple waveforms, you will need to find the common denominator that will allow for this. You may need to continuously write to the buffer in order to keep phase continuity by turning off buffer regeneration.
PBear
NI RF
0 Kudos
Message 7 of 7
(4,269 Views)