LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous Acq using PXI 6552

Hi,

 

I am using PXI 6552 to acquire digital Inputs with respect to External clock falling edge. This card has onboard memory of 64 MB.

 

With this at 20 Mega Samples / Sec data rate I can hold 64/20 = 3.2 Sec Data in onboard memory. By reducing the data width to 2 Bytes (to hold only 16 channels) I can increase the on board acquisition buffer to 128MB and I can hold data for 6.4 Sec.

 

I can use “Initiate Acq VI” to start the acquisition process and once buffer is full; I can transfer the data to host memory by using Fetch memory. It means every 6.4 sec I have to transfer the data from on board memory to host and then start the new acquisition session.

 

But in some way I want to continuously acquire and stream the digital inputs to Hard Drive at a rate of 20 MB/sec for at least 10mins without any break; like continuous acquisition using DAQ AI channel.

 

Please let me know how I can achieve this functionality and if it is not possible with PXI 6552 which NI card supports this feature.

 

Thanks,

Venky

0 Kudos
Message 1 of 29
(4,738 Views)
Hello Venky,

You should be able to stream 20 MB/s to disk with the PXI-6552.  There is an existing example in LabVIEW called Continuous Acquisition - Stream to Disk.vi.  This example can be found in the Example Finder by selecting Help » Find Examples » Hardware Input and Output » Modular Instruments » NI-HSDIO » Dynamic Acquisition » Continuous Acquisition - Stream to Disk.vi.

I have also attached this example below, I hope this helps!

Regards,
Erik J.

0 Kudos
Message 2 of 29
(4,707 Views)

Hello Erik,

Thanks for the reply.

Actually with this kind of acquisition we need to specify "FetchOffset" which is an I32 number.

If I am calculating this "FetchOffset" continuously for long time, then after 2147483647 it rools back to hugh negative number.

Because of this I am getting following error

Error -1074115589 occurred at niHSDIO Fetch Waveform (1D U16).vi

Possible reason(s):
Driver Status:  (Hex 0xBFFA4BFB) DAQmx Error -200004 occurred:
Data requested has been overwritten in the device memory.

Status Code: -200004

Any sugession to correct this?

Thanks,

Venky

 

 

 

0 Kudos
Message 3 of 29
(4,695 Views)
Hi Venky,

I would suggest to set your FetchRelativeTo property to Current read position instead of First sample.  That way, you don't even need to use the FetchOffset property fetching will occur after the last fetched sample.

Regards,
Erik J.
0 Kudos
Message 4 of 29
(4,683 Views)

Hello Erik,

Once again thanks for the reply,

Actually I tried with this combination ( FetchRelativeTo = Current Read Position ) and removed the FetchOffset property with 10s timeout value. (Please refer the attached VI)

With this it is not even acquiring the first record.

Error -1074118624 occurred at niHSDIO Fetch Waveform (1D U32).vi

Possible reason(s):
Driver Status:  (Hex 0xBFFA4020) Some or all of the samples requested have not yet been acquired.
To wait for the samples to become available, use a longer read timeout or read later in your program. If your session uses a trigger, make sure that your trigger is configured correctly.

Status Code: -200284

I tried to use other options (Most RecentSamples..) but none was working except FirstSample with FetchOffset option.

Please let me know if you have any further sugession.

Thanks,

Venky

 

 

 

0 Kudos
Message 5 of 29
(4,676 Views)
Hi Venky,

You have made a very good point here!  It is a little tricky to get a continuous acquisition going with FetchRelativeTo set to Current Read Position.  Before you enter the loop, you must set FetchRelatveTo to First Sample and set the FetchOffset to 0.  This reinitializes the read pointer to the very beginning.  Then, we need to execute a Fetch before we update the read pointer to the Current Read Position, so that property node will come after the Fetch.

I tried your example and got the same error as you.  After the modifications above, the VI behaved like it did with updating the FetchOffset before - I hope it works for you too!

Regards,
Erik
0 Kudos
Message 6 of 29
(4,673 Views)
Thanks Erik, It works...
 
Thanks,
Venky
0 Kudos
Message 7 of 29
(4,667 Views)

Hello Erik,

Can you please post a copy of your solution in LabVIEW 7.1 format? Or a more detailed description of the fetch procedure before you hit the loop? I have not upgraded yet.

Thanks,

Kristen

0 Kudos
Message 8 of 29
(4,508 Views)
Hi Kristen,

Here is a copy of the solution in LabVIEW 7.1 format.  Let me know if you have any other questions.  Thanks!

Best Regards,
Erik


0 Kudos
Message 9 of 29
(4,483 Views)
Hi,
 
I am looking to do something similar to what is described below.  I'm using the 6552 I/O card with 8M mem.
I cannot run this latest VI at a 20MHz clock speed.  Is this possible or what is the limitation of the clock signal
speed.
 
Thanks,
Michael Collins
 
0 Kudos
Message 10 of 29
(4,186 Views)