Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

WriteNamedWaveformWDT and NI6562 - samplesPerChannel must be multiple of 4?

Solved!
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):

 

"System.Runtime.InteropServices.ExternalException
HResult=0xBFFA4A6F
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
(1,029 Views)
Solution
Accepted by topic author BoilerBob

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

santo_13_0-1623339893198.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 3
(1,005 Views)

Thanks!  I obviously missed that.

0 Kudos
Message 3 of 3
(997 Views)