cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

continuous scan and recording

Solved!
Go to solution
Highlighted

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.

0 Kudos
Message 1 of 15
(268 Views)
Solution
Accepted by topic author petmar
09-13-2017 12:15 PM

Re: continuous scan and recording

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



CLA | LabVIEW 2014 / 2016
Message 2 of 15
(237 Views)

Re: continuous scan and recording

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 15
(229 Views)

Re: continuous scan and recording

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.

0 Kudos
Message 4 of 15
(207 Views)

Re: continuous scan and recording

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...



CLA | LabVIEW 2014 / 2016
0 Kudos
Message 5 of 15
(195 Views)

Re: continuous scan and recording

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 15
(174 Views)

Re: continuous scan and recording

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.



CLA | LabVIEW 2014 / 2016
0 Kudos
Message 7 of 15
(159 Views)

Re: continuous scan and recording

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 15
(147 Views)

Re: continuous scan and recording

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.



CLA | LabVIEW 2014 / 2016
0 Kudos
Message 9 of 15
(142 Views)

Re: continuous scan and recording

Hello,

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

Petmar.

0 Kudos
Message 10 of 15
(137 Views)