LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous scan and recording

Hello,

I am very new to this program and I need help urgently. I need to edit this script so that the LC100 line camera will scan and save 20 pictures, pause for say 20s and repeat the task. It will be helpful if notes are added. Thanks.

permar.

Download All
0 Kudos
Message 1 of 20
(3,512 Views)

Hi Petmar,

 

You did not specify how you want to save the data, so I just assumed a text file is ok.  The sample.vi included is a good start. I just edited it so that the "start scan" and "get data" VIs run in a "for loop". A for loop works just like in other languages where it will run N times. Since you want it to run N times, then pause, then continue indefinitely, I have wrapped it in a while loop. 

 

In order to make the VI easy to stop or run code periodically (on timeout), I have added in an event structure. Event structures are a little more advanced, but this one only has two events so it should not be too difficult. 

 

I have left many comments for you to follow so you can get the VI working. Try to make sure you understand what every function does.

 

temp.png

Message 2 of 20
(3,481 Views)

Hello gregoryj,

I am studying what you sent me and will get back to you if I need further help. Thanks so much...

 

petmar.

0 Kudos
Message 3 of 20
(3,473 Views)

Hello gregoryj,

 

This is how far I have come. I have followed your instructions and have wired most, but I am still having a few errors. If I want to save the scan data as a text file does it simplify the vi? One more thing; with this vi do I need to change the operating/trigger mode? I am asking because with the sample vi, I was always getting errors when I changed the trigger mode from the SW (software trigger) to HW (hardware trigger) modes.

 

Petmar.

Download All
0 Kudos
Message 4 of 20
(3,451 Views)

Hi petmar,

 

I just picked a text file, but you can pick other formats. What you have is an array integers, not strictly an "image". You can form it into a picture and save it as a .png if you like, but this is more complicated and it really depends what you want to use the data for later on. If you are going to graph it using LabVIEW or something, then a .txt file (or .csv file) should be fine.

 

I'm sorry, I am not familiar with your instrument or setup, but I would assume since there is a "start scan" VI in your software that you would want to use a software trigger.

 

Your upload was in LV 2017 so I cannot view it, I only have LV 2016. To save for previous versions you can click file >> save for previous version...

0 Kudos
Message 5 of 20
(3,439 Views)

Hi,

Sorry for the late response. I want the data as a txt because I am going to graph and compare them. This is the latest version.

Petmar.

0 Kudos
Message 6 of 20
(3,418 Views)

Ok, you're getting there. Make sure to wire your "Data" into the "Array to Spreadsheet String". That will take your numeric data and convert it to a string appropriate for writing to a file. Also make sure to wire the selected folder path into the "Base Path" input of "Build Path". It's always good to wire the error wires through functions with error terminals, like the "Write File" vi.

 

Next, look at event [1], which triggers when you press stop. You'll need to wire the True constant out to the condition terminal of the while loop. This will stop the while loop, when you press "stop". Though if it's currently taking images you will have to wait until it's done.

0 Kudos
Message 7 of 20
(3,403 Views)

Hi Gregoryj,

I think I did all what you suggested. I am, however still having errors. Please check for me. Thanks

Petmar.

0 Kudos
Message 8 of 20
(3,391 Views)

When you say errors, do you mean run-time errors or you have a broken run arrow? Please examine them and post what those errors are (screenshots). I see a couple stray wires I can help with after lunch.

0 Kudos
Message 9 of 20
(3,386 Views)

Hello,

This is what I am referring to. By the way, did I get all the wiring right?

Petmar.

0 Kudos
Message 10 of 20
(3,381 Views)