Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Stream to Memory with Advance trigger and scripting generation (SPI interface)

Hi All,

         I'm trying to gather data from a device (adc) using a 6541 card (8M) in continuous mode. I have been successful so far using scripting to generate the waveform and aquiring the required data using mulitrecords. However with mulirecords the on board memoty limits my acquisition size (# of adc samples).My samples must be contiguous.

     I have been trying to use the straming memory method (based on the HSDIO example) I've attached my code which gives me an error :(HSDIO Read Waveform)"you cannot perform this action when the session is in a running state"

        I'm not sure what is the cause. Is this method actuall possible? i.e. to Stream data while using the advance trigger?

 

Any suggestions/help most welcome.

 Thanks!

 

 

 

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

Hi ds_1,

 

I think that what you are looking for may be more along the lines of this HSDIO example attached.

 

Please take a look at this and let me know how you get on!

 

 

Liam A.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(3,761 Views)

Hi Liam,

              Thanks for your response, however I'm not sure it is quite applicable to my requirements. Perhaps I don't fully understand how tclks are being used here!

 However,  so far with my application I'm pretty happy for now with the generation side, and ensuring it is in sync with the datastream from the device.

Also on the aquicition side, I'm happy that I'm not missing any samples from my adc (by checking for glitches etc and ensureing that an input tone shows up in the correct freq bin of an fft etc.)

My problem is the size of my data acquisitions, required for large FFTs.

So far I have used Multirecord Read. My records are (128 samples) x (FFT size Records), e.g. 128 x 32768 = 4M memory.

This is the limit of what I have been able to achieve so far and I have a few specific questions on this.

Firstly, I notice that aquiring records that half my data reads either 1' or 0's, so I have to collect 65536 records and discard 32768 records that are full of 1's or 0's. I guess I must be doing something incorrectly?

Even so my target is a 131072 point FFT, this is beyond the 8M memory depth ( 128 x 131072 => 16M) So therefor I would need to stream the data.

Can I stream multirecords? If notshould I be able to stream 128 samples with the advance or pause triggers for such an aquisition?

 

0 Kudos
Message 3 of 7
(3,756 Views)

Hi ds_1,

 

I am doing the same project. can you  downgrade the Attached VI to LabVIEW 8.5

 

Regards

John

-John Theodore
Certified LabVIEW Architect, Certified TestStand Architect
0 Kudos
Message 4 of 7
(3,659 Views)

Hi John,

             LV 8.5 version of my as previous posted code. Still not been able to get 6541 to stream with either pause/advance.

          ds1 

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

Hi ds_1,

I am doing the Same project to acquire 14 bit samples of ADC. In my case, the SCLK and CONVSTART command comes from the Generation Phase of my code. The ADC responds back by sending only the ADC samples. So there is no RDY signal from the ADC. My Start Trigger is not triggering at the exact point. If you have any suggestion please post.

 

Anyways i am attaching my Code along with this post for your reference.

 

Regards

John

-John Theodore
Certified LabVIEW Architect, Certified TestStand Architect
0 Kudos
Message 6 of 7
(3,627 Views)

Hi John,

             I took a quick look at the code. Is your problem that your data coming from the device isn't always where you want it to be (i.e. out of sync and your first DOUT bit is in an unpredictable sample in the record)?

   Is the data active event PFI1 just linked to PFI2 to start trigger the acquisiton? Maybe you could try setting the start trigger to PFI1 also (the 6541 card will connect these internally) May be that the loop from the card out of PFI to your board and back to PFI2 could be a problem? I seem to be able to keep my aquistion sync'd well with this method.

        Let me know if this works, or if I've misunderstood your propblem.

           ds1 

 

0 Kudos
Message 7 of 7
(3,616 Views)