PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

pxi 6561 memory problem

Tim,

Another thought then is that you could combine the streaming approach we talked about earlier with a multi record acquisition.  MultiRecord acquisitions are a way to acquire multiple buffers using hardware timed triggering.  Essentially, once an acquisition is complete, if multirecord is turned on, then instead of the hardware stopping, it begins to wait on an advance trigger then starts another acquisition of the same size.  However, if you take the techniques used in the streaming application, you can have each iteration of the multi record acquisition be streamed.  This will give you the variable buffer sizes while making sure you arent acquiring data between the acquisitions that you may not care about.

With streaming you use a reference trigger and continuously fetch the pretrigger samples.  If the reference trigger never shows up then the data keeps getting stored into a circular buffer in onboard memory while you fetch it out into LabVIEW.  For multi record, you could have your PLD generate the serial pattern match trigger which would be used as the reference trigger.  The 656x would receive the reference trigger, capture its post trigger points (can be set to 0) then stop the current acquisition.  If you have an advance trigger configured then the acquisition will wait for that trigger to arrive before it starts the next acquisition which will again wait on the reference trigger.

There is a state diagram in the documentation that illustrates this multi record/advance trigger/reference trigger behavior:

>Devices>>NI 656x>>Acquisition>>Dynamic Acquisition>>Dynamic Acquisition State Diagram
Message 11 of 22
(4,375 Views)
Hi,

I think the technique you described will work for my application. A more basic question I would like to ask is what is the difference between reading and fetching a waveform. In reading a waveform, I start an aquisition, the acquisition acquires a number of specified samples, and then the waveform is fetched, and then control is returned to the program right?. What is the difference when I use the initiate and fetch functions.

Thank you,

-Tim
0 Kudos
Message 12 of 22
(4,357 Views)
Tim,

The read function calls both an intiate and a fetch.  You can call initiate and fetch yourself so you can control when the operations occur or you can use the read vi to just let the driver do both at once.
Message 13 of 22
(4,355 Views)
Hi,

I am using the digital waveform editor to write waveforms to send to device. Suppose I write waveforms that are 3 samples long. When I then use the niHSDIO allocate named waveform function, can I just allocate 4 samples in the onboard memory to this waveform to satisfy the requirement of the 4 sample waveform quantum.

Thank you
0 Kudos
Message 14 of 22
(4,337 Views)
When you read the waveform from the file you would need to append an additional sample to meet the waveform quantum requirement
Message 15 of 22
(4,336 Views)
Hi,

The approach that you suggest in reply number 11 may work.

I am thinking of the following implementation:

1. immediately generate data after a generation session and send out a data active event to PFI -1.

2. wire PFI-1 to PFI-2. Use the rising edge of PFI-2 to start the acqusition. The acquisition will have 0 pre-reference triggers.

3. I will then route the signal from my PLD into the PFI-3, so the acquisition will stop at the reference trigger and there will be no post-reference triggers.

4. I will then fetch out each time this routine runs.

The only concern now is that the computer may not be able to fetch out the data on the onboard memory of the 6561 fast enough, and the memory will be filled up.

I had originally implemented this by just using generating data and sending out a data active event to PFI-1 and then wiring this to PFI-2 where I used the rising edge of this signal as the start trigger to my acquisition session, and then I acquired 5000 samples. I obtained all my data, but needed to restart the acquisition and acquisition each time. There is no concern here about the computer not being able to acquire fast enough because the session does not end until all the samples are acquired and fetched. Is there any efficiency gain by fetching and using a streaming approach that is suggested here.

-Thank you,

-Tim
0 Kudos
Message 16 of 22
(4,313 Views)
Hi,

If I use the u16 data type for storing my data, when I acquire and generate waveforms, does it acquire and generate across all 16 channels regardless if I explicitly state this or not.

-Tim

0 Kudos
Message 17 of 22
(4,292 Views)
Tim,

For acquisition, a user can change the size of a sample by setting the data width property.  The default data width for the 6561 in single data rate mode is 2 bytes.  If the user changes the data width property to one byte, they will reduce the amount of data transferred from the HSDIO card to PC memory and increase the number of samples that can be stored in memory.  This comes at the cost of only being able to use channels to 0-7 for acquisition.

For generation, the sample size is fixed.  In the case of the 6561 each sample is two bytes.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
Message 18 of 22
(4,242 Views)
Hi,

So when I acquire a sample for say channels 1 - 15, and my data width is 2 bytes, then each bit in the sample corresponds to one of the channels, but bit 0 will not mean anything right. Also, will each sample take up 2 bytes of the entire device of the memory 16 channels* 16 mbytes = 256 m bytes or will it take up 2  bytes of each  channels  memory (2 bytes of the 16 mbytes for a particular channel). It seems to me that it would be 2 bytes of the entire memory of the device, but I wanted to confirm with you.

Also can you clarify this issue of dynamic acquisition and generation being done simultenously. I don't see how it would work that I could dynamically acquire and generate across just one channel.

Thank you,

-Tim
0 Kudos
Message 19 of 22
(4,230 Views)
Tim,

That's right, the 0th bit will be a don't care basically.  It would also take up 2bytes of the entire memory, there isn't individual memory for each channel, you just have total memory and total channels and you divide.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
Message 20 of 22
(4,210 Views)