LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

edit an on-board wave in pxi-6541 with nihsdio

Solved!
Go to solution

I want to edit an loaded on-board wave.  I can do that with niHSDIO_SetNamedWaveformNextWritePosition() and niHSDIO_WriteNamedWaveformU32().  I can only get this to work if edit starts on an even 32b address and I have to write the full-width 32 channels of the 6541.

 

I'd like to start the edit at an arbitrary address and edit only selected channels (i.e. mask off channels to not be disturbed).  Or as an alternate I could accomplish this if I could read the on-board wave content back in to memory.

 

Is there any hope?

0 Kudos
Message 1 of 7
(3,465 Views)

Thanks.  I explored those links and they refer to functionality that I'm already using.

The issue is that I need to edit a single channel on a non-32 bit boundary of the DIO.  So, I'm looking for nihsdio_writes that are channel selective and not restricted to 32 bit address boundary.

Or, an alternative is readability of the on-board DIO memory.

0 Kudos
Message 3 of 7
(3,422 Views)
Solution
Accepted by topic author bjasper

The issue you are facing is a hardware limitation.  The PXI-6541 generation data width is 4 bytes.  There is no way to change a single channel, without rewriting the entire waveform, because the card constructs the data using all channels.

 

KB: HSDIO Data Width and Memory

http://digital.ni.com/public.nsf/allkb/E5170A54988EF81A8625725A006103BB

 

Given this limitation, I'm interested what your use case is, to see if you have the correct hardware.

Message 4 of 7
(3,413 Views)

Thank you!

 

So that forces my work-around.  I'll have to keep an out-board image of all waves.  Edit that image.  Then write N 32-vector blocks to inboard memory with niHSDIO_WriteNamedWaveformU32().  A vector block is organized as 32b wide (32 DIO chnls = one vector=one sample).  Depth could be anything but apparently the 6541 only writes in 32 vector deep blocks.

 

My use case is to feed vectors that are serially programming a 16bit RF step attenuator.  I need to adjust the attenuator occasionally so I need to rewrite a piece of the wave.

 

You mention 'rewriting the entire waveform'.  I don't think that is necessary since the write function has a samples-to-write argument.  I've been using 32 samples successfully so far.  Please check me on that as I might be getting fooled. 

Thanks.

 

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

It sounds like you are doing it correctly.  I only mentioned the ‘entire waveform’ because I don’t know the full scope of your application.

 

Make sure to mark your solution, so others who find this thread will be able to find it quickly.

0 Kudos
Message 6 of 7
(3,397 Views)

Hi,red.free.   I can't open the KB.Showing my permission is not enough. Can you send it to me ?

Thank you very much.

0 Kudos
Message 7 of 7
(2,943 Views)