MLoyd,
You are exactly right. The example program you are using ("
Dynamic Generation.vi")
uses the U32 version of the "niHSDIO Write Named Waveform"
function. When in this configuration, each bit in the U32 word
corresponds to a specific channel. That is, bit 0 corresponds
with channel 0, bit 23 with channel 23, etc. If you want to write
to channel 10, you need to put a 1 or 0 in the 10th bit of the U32 data
point. When you set your channel list to be 2-6, the NI 6541 will
only enable the outputs of those channels but since the waveform was
written using the U32 function, the lower bits of the count will start
on channel 0. If, instead, you used the waveform data type (WDT)
version of the function to write a digital waveform rather than the raw U32,
channel order will be associated with how the WDT is created.
This relates back to your question about "Number of Samples". If
the code is generating a count from 0 to 256 using the U32, then the
count will be presented on bits 0 to 7 of the U32 (channels 0 to
7). However, if you ignore bits 0 and 1 when you measure it
then you will get the observed divide by 4 effect. Since channel
0 is your LSB, it is toggling the fastest. Channel 1 toggles at
half the rate of channel 0 and channel 2 toggles at half the rate of
channel 1. In this fashion, if you are only probing from channel
2 up to 6, you are essentially ignoring the count of the two most LSB
and you get the results you have witnessed.
If, you do a logical shift on the data array by 2 then you will shift
bits from 0 to 4 into bit positions 2 to 6. Now, when you run the
program and probe on the channels 2 to 6, the LSB of your data pattern
is being generated on channel 2 so you'll better measure the full count.
I hope this helps! Happy Holidays.
Message Edited by Ryan M on 12-20-2005 04:59 PM