From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Scope - Using PXI-5142 & PXI-5154 together

I am trying to write a vi that samples all four available channels (two on the 5142 and two on 5154) at the "same time" and stream all the data to a binary file.  I am having an issue setting up the channels properly where they fetch the data at the correct rate.

 

My overall need is to sample each channel at 2MHz - so Im not breaking any speed records.  The 5142 will have a 20V vertical setting while the 5154 has a 5 volt vertical.  The sampleing can go direct to a file, but I would like one file for each channel if possible.  Though if I combined each card to one file or even all four to one then its fine as well - I just dont want to impede the sampling speed due to file write.  The file I have been working with is binary, as I find it fairly fast.  I am open to other options.

 

Triggering is not an issue, as I would use the "start aquisition" method to start everything.  While the four channels dont have to be exactly in sync, they need to be within a few micro seconds in order to keep things together when I go to do some analysis.

 

Any help would be appreciated.

0 Kudos
Message 1 of 2
(2,189 Views)

Hi RyanBattelle,

 

So these two cards can far exceed the 2MHz acquisition that you are looking for.  I recommend starting with some of our examples on a single channel, bring that channel up to the desired speed making sure that it is processing the data in the speed you want it to and then expand your program to have multiple channels accross multiple cards.  One good example that can be found in the NI Example Finder is "niScope Ex Binary Acquisition.vi".  That is a tested program that shouldn't give you unexpected sample rates.  Another example if you are looking to stream to disk is "niScope Stream to Disk.vi".  

 

You say that you don't want them synchronized, but to have them close you want to try to synchronize them.  This isn't hard with PXI and LabVIEW, you will look to share a sample clock and start trigger.  The "niScope Export Signal.vi" makes this really easy because this subVI will export both trigger and clock accross a desired line, even the backplane of the PXI chassis.  How to set this up would be to configure one acquisition line, then export the clock and trigger and then when you configure the other lines you can choose this exported clock and trigger as the sample clock and start trigger for that line.

Peter T
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,144 Views)