LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq and write to array

Hi there,

 

You can most certainly add data from different loops to the same queue.  There is a simple Example VI in the NI Example Finder called "Queue Multiplexer.vi".

 

I'm not sure if it's in the LabVIEW 8.6 Example Finder, so I saved as previosu version for you and attached it.

 

Best of luck!

Ryan C.
Applications Engineer
National Instruments
0 Kudos
Message 11 of 20
(550 Views)

This Link is no more available I am trying to resolve the same problem can you share an example?

0 Kudos
Message 12 of 20
(369 Views)

Please do not ask for "Me, too!" help on a topic that has been idle for more than a decade.  If you need help with your problem, press the "Start a Topic" button and clearly explain your problem/question.  It is best if you include your attempts.  Attaching your LabVIEW code is preferred to attaching a "picture of a VI", but many of the more-experienced Forum users are running LabVIEW 2019 or 2021 (I'm one of them), and won't be able to open LabVIEW 2023 or 2024 code unless you "Save for Previous Version" (on the "File" menu).

 

Bob Schor

0 Kudos
Message 13 of 20
(363 Views)
  • Actually I am not working with LabVIEW, currently I am using the ni daqmx library in python but was facing similar daq issues, didn’t knew if it was worth starting as a new topic on a LabVIEW forum if it is then I’ll be happy to start a new discussion where I can share my files too.
0 Kudos
Message 14 of 20
(355 Views)

The LabVIEW Forums are an excellent place to ask for help with LabVIEW issues.  If you are mainly using DAQmx in a Python environment, bypassing LabVIEW, you might want to ask in some Python forums ...

 

Bob Schor

0 Kudos
Message 15 of 20
(327 Views)

Use the built in logging features of DAQmx, data will be saved to a TDMS file. Python has an excellent, if not better, TDMS library that you can use to read the files or convert to another format.

 

you can post some of your python code here as the functions are similarly named.

Message 16 of 20
(322 Views)

Hey,

So I have attached the Python file that I am using currently to scan a 2d grid using a confocal microscope and DAQ, this program stores the result in the 2d matrix 'pmt_data' and gives me the desired output(image of the scan) however the program takes 30-40 minutes for just 200 pixels by 200 pixels grid, how do I optimize it? am I doing something wrong while writing and reading the data? 

 

0 Kudos
Message 17 of 20
(283 Views)

Nothing looks overtly incorrect in your python script.

 

How fast do you want this to go? 200 x 200 pixels is 40000 pixels. 40 minutes is 1000 pixels per minute.

0 Kudos
Message 18 of 20
(275 Views)

When I am using the ScanImage software through MATLAB if you are familiar with it, I am getting more pixels scanned in a matter of seconds which is why I was wondering if can get a similar run time in Python or LabVIEW using NI-DAQmx.

0 Kudos
Message 19 of 20
(269 Views)

@shahjenil wrote:

When I am using the ScanImage software through MATLAB if you are familiar with it, I am getting more pixels scanned in a matter of seconds which is why I was wondering if can get a similar run time in Python or LabVIEW using NI-DAQmx.


I am not familiar with ScanImage software. A long time ago, I was doing z-slices of florescent images and this is the basic algorithm,

  1. Move to Position
  2. Check if in Position, if false wait
  3. Take wide field Image
  4. Repeat

For your case, you have

  1. Move to position.
  2. Check if in position
  3. Readout PMT, Start Daq, stop Daq, Average values, etc

To speed this up adds possible programming complexity and bugs

  1. Start DAQ and continuously acquire Data
  2. Move to Position
  3. Check if in position
  4. Query DAQ for latest values now that you are in position. No need to start, stop daq, etc. That will save some time at the cost of programming complexity.

Does ScanImage take a single point at each pixel, multiple points, does it take data while the objective continuously moves and interpolates pixel positions? All of these things can speed up acquisition time at the cost of complexity of your program.

 

In your python script I see a simple raster scan that is easy to program, understand, and relatively bullet proof. It's cost is a long acquisition time.

 

 

0 Kudos
Message 20 of 20
(267 Views)