Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

memory pxi-6561

Hi,

Is there a way I can check how much memory is remaining on a channel of the pxi-6561 while I am aquiring data.

Thank you,

-Tim
0 Kudos
Message 1 of 8
(5,132 Views)
Hello Tim,

You can use the fetch backlog property (under Dynamic Acquisition >> Fetch >> Fetch Backlog) and the total acquisition memory size property (under Device Characteristics >> Total Acquisition Memory Size) to determine how many samples you have in your backlog, and consequently how much more memory you have left.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
Message 2 of 8
(5,114 Views)
Thank you very much. This is exactly what I was looking for.

-Tim
0 Kudos
Message 3 of 8
(5,107 Views)
Hi,

Does this give the number of data points remaining in the memory for all channels or just for the number of channels selected. Also why is this output a signed integer instead of an unsigned integer? Is there a way to determine the amount of memory left on a channel by channel basis. What I would like to do, is know how much onboard memory I have while I am aquiring data so I can decide whether or not to continue acquiring data or if it is time to fetch data.

One more question. I am looking at the Dynamic Generation and Generation-Source Synchronous.vi Example. Here the acquisition session is started by a trigger from PFI-2 that is routed from PFI-1 when there is a data active event. If I want to save my PFI channels and not use any extra outside wires. Can I generate this trigger on PFI-1 and acquire it on PFI-1. I am sort of confused by the documentation in the help file that says channels can simultaneously be configured for both dynamic generation and dynamic acquisition. Does this mean they can appear at the same time or one appears followed by another. or does the device have a way of recognizing which data is coming out and which is coming in.  This is stated in the Programming Flow section of the help file for digital waveform analyzers and generators. I have a pxi-6561 by the way.

Thank you,

-Tim
0 Kudos
Message 4 of 8
(5,090 Views)
Hello Tim,

The Total Acquisition Memory Size specifies the total onboard memory size in samples for acquisition data.  This number is based on the default data width (which is 2 bytes for SDR and 1 byte for DDR).  If your default data rate is 2, and if you change this to 1 (and you are using less than 9 channels) you can store twice the number of samples in your buffer. 

Since this property returns how large your buffer is, and the fetch backlog returns how many acquired data points remain in the onboard memory you can simply take the total acquired memory size (adjusted to the data width you selected) and subtract the fetch backlog to determine the total memory available.

Finally, I believe you are referring to an example program that sends the data active event through PFI 1 and triggers the acquisition task on PFI 2.  You can generate a signal on PFI 1 and acquire that signal on PFI 1 to save yourself a PFI line, however if you are acquiring data based on that data active event it will not be aligned with the data.  This is because the data on the PFI lines are wired internally and available immediately, however the data has to pass through the front connector through a cable and back into the device.  On the setup I have, I acquired 1 data point too early.  However, the number of bad/early data points you read will be dependent on your setup.  Sending the PFI 1 through the same cables that you are sending you data allows the two signals to have the same delay.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
Message 5 of 8
(5,072 Views)
Hi,

When I am aquiring data, do I have to specify the number of samples that I am acquiring. For example if I wish to start acquiring data based on a data active event and then stop acquiring the data based on an external trigger, can I specify the number of samples to acquire to be an arbitrary number and then the acquisition of data will stop once the external trigger fires.

-Tim
0 Kudos
Message 6 of 8
(5,056 Views)
Sorry,

I think the earlier message might have been unclear, but what I meant to say is that if I just specify an arbitrary number of samples to acquire, will the acquisition just stop even before the specified number of samples is not reached, so that I could trick the device into starting and stopping based on triggers instead of stopping after a finite number of samples.

Thank you,

-Tim
0 Kudos
Message 7 of 8
(5,054 Views)
Hello Tim,

If you have setup a start and stop trigger, and you can acquire data for some arbitrary time.  If I setup an application to do this, I would use the fetch VI to read back the number of samples available in the backlog.  This way whenever the stop trigger occurs you read in only available samples.

You can see how to read in only available samples in the Continuous Acquisition - Stream to Disk.vi shipping example.  If you setup a read function to acquire more points than are available (because a stop trigger occurred), I would expect that read function to return with an error.  This is why using the fetch backlog property allows you to read only whats available.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
Message 8 of 8
(5,037 Views)