Digital I/O

Showing results for 
Search instead for 
Did you mean: 

WriteNamedWaveformWDT and NI6562 - samplesPerChannel must be multiple of 4?

Go to solution

I'm relatively new to NI's PXIe boxes and the NI-6562 card, so I may be making a newbie mistake.


I'm using the niHSDIO_WriteNamedWaveformWDT command to generate a dynamic signal with an NI-6562 card.  (Note: I'm using C#.)


While experimenting with things, I've discovered that the command's samplePerChannel / samplesToWrite parameter apparently must be an integer multiple of 4.  (i.e. 4, 8, 12,...)  If I use anything other than an integer multiple of 4, I get an error similar to the following (In the interest of space, I've omitted the source and the stack trace):


Message=Requested waveform length is invalid, because the number of samples is not an integer multiple of the waveform length increment.

Requested Value: 6
Waveform Length Increment: 4

Status Code: -200400
 NationalInstruments.ModularInstruments.Interop.niHSDIO.WriteNamedWaveformWDT(String Waveform_Name, Int32 Samples_To_Write, Int32 Data_Layout, Byte[] Data) in "


I don't see anything in the documentation indicating that I had to use an integer multiple of 4 for the samplePerChannel.  Also, when I was experimenting with an NI-6556 card, that didn't appear to be the case.  For example, with the 6556 card, I could use a samplePerChannel value of 3.


Did I miss something in the documentation?  Could there be something in my code that's forcing the "samplePerChannel = integer multiple of 4" requirement?


I've attached my code to this post.

0 Kudos
Message 1 of 3
Accepted by topic author BoilerBob

Yes, it is HW requirement defined in the spec sheet pg.17



Semiconductor Validation & Production Test
Soliton Technologies
Message 2 of 3

Thanks!  I obviously missed that.

0 Kudos
Message 3 of 3