09-14-2017 04:41 PM
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?
Solved! Go to Solution.
09-15-2017 01:33 PM
Have you looked at this example?
or this KB?
http://digital.ni.com/public.nsf/allkb/14CE41C9CB9F10A88625766A005CEE47
09-18-2017 09:59 AM
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.
09-19-2017 03:53 PM
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.
09-19-2017 04:16 PM
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.
09-20-2017 09:55 AM
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.
07-02-2018 06:59 PM
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.