LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format for Predefined lists of repeated measurements with changing variables

Hi,

 

I am a scientist and trying to draw an instrument ("writing a script" sounded wrong for LabView ;)) that is supposed to perform repeated measurements in an imaging experiment.

 

I want to be able to give the instrument a list that defines the values for several variables for each repetition, because I want it to do different things in different episodes of the experiments and/or alternate different acquisition methods. In this way I can use the same script for a wide range of experimental paradigms.

 

I am trying to decide on the format in which I could write the sequence to LabView to read. I looked into XML, but the LabView scheme seems pretty useless. If I use a textfile I would have to program a parseing script myself. If I use binary files I need to program an editor.

 

I also thought about whether I want a line by line execution protocoll or just changing variables and leaving the execution protocoll integrated in the instrument. However, the latter would reduce the versatility.

 

What would you think is a good way to do it?

 

In general each measurement consists of:

0. wait for a defined time (always the same)

1. light on (different light sources)

2. acquire images (different durations, exposure times, frames numbers)

3. trigger a device (not in all repetitions, maybe changing devices in future)

4. turn on a channel (changing channels)

5. acquire images (different durations, exposure times, frames numbers - also different from step 2)

6. turn off the channel (same as in 4)

7. acquire images (different durations, exposure times, frames numbers - also different from step 2 and 5)

8. light off (same source as 1)

 

So there is basically a repetitive pattern. The image acquitisition 'epics' are performed by the same device, everything else is switching on and off channels of a NI PCI.

 

Dennis

 

 

P.S. I use LabView 2009
0 Kudos
Message 1 of 3
(1,971 Views)

Hi,

 

My first take would be to use simple CSV file, and have a parsing subroutine to take the data and put it into the appropriate LabVIEW arrays.  If it is just for you, then you know what the format of the data would be in the CSV.  You can use column or row headers to make the data more readable.

 

Using XML or INI, etc...   work great, they are a bit more work in the code (IMHO) but just as valid and they can be more human readable.

 

It all depends on how much you want to get into that part of LabVIEW, File I/O that is.

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 3
(1,967 Views)

I'm in agreement that your best bet would be a simple CSV or tab delimited file.  You can edit these in Excel, which makes the writing a lot easier.  There is the Read Spreadsheet File VI which can give you a 2D array for your steps and parameters.

 

So, to keep it simple, use a csv.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(1,962 Views)