LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

camera autosave image after pulse

Solved!
Go to solution

Dear sir,

I Made a medical application  to acquire an image after an extarnal trigger (from light source) and after a short delay (1ms)

I'm using Point grey camera grasshopper3 gs3-u3-51s5m.

The problem is i want to automatically  save my images to a folder called "Images" with the name "Test 0" and if it already exist name it "Test 1" and so on....

But can't really find a way to do so.

 

Hope you can help me out.

 

Thanks alot!

Chen.

0 Kudos
Message 1 of 12
(3,746 Views)

If I got it right you want to browse through files inside folder, find the file with the greatest number and save the incoming picture with increment numbering?

This should do the trick

0 Kudos
Message 2 of 12
(3,729 Views)

 


@AdamTrojak wrote:

If I got it right you want to browse through files inside folder, find the file with the greatest number and save the incoming picture with increment numbering?

This should do the trick


Hey Adam,

Thanks for your quick reply

I added your code to my Vi but i'm getting an error.

Also note that The images folder is empty, so if there is no file named Test no 0.TIFF Create it.

 

Thanks again,

Chen.

0 Kudos
Message 3 of 12
(3,710 Views)

You're gettin error because the folder doesn't exists. That's why I added case structure (if doesnt exists - create folder)

If there're files within the folder, or neither is named Test No ... then it will name the file Test No 0

 

BTW I'm not shure if you need to add extension by yourself (check if it's not duplicated)

0 Kudos
Message 4 of 12
(3,698 Views)

@AdamTrojak wrote:

You're gettin error because the folder doesn't exists. That's why I added case structure (if doesnt exists - create folder)

If there're files within the folder, or neither is named Test No ... then it will name the file Test No 0

 

BTW I'm not shure if you need to add extension by yourself (check if it's not duplicated)


But The "images" folder does exists as you can see.

After I use Check if the folder exists.vi i'm getting a Generic error.

I'm not sure what's wrong this time.

 

Thanks.

Chen

0 Kudos
Message 5 of 12
(3,684 Views)

Ok, I see: 

You need first strip the path form name_of_your_VI.vi

 

0 Kudos
Message 6 of 12
(3,676 Views)

@AdamTrojak wrote:

What does the error says?


 

Error 42 occurred at Create Folder in IMAQdxEx - HardwareTriggerLine0 [Labview v12]updated.vi

0 Kudos
Message 7 of 12
(3,670 Views)

I've edited previous post;)

0 Kudos
Message 8 of 12
(3,663 Views)

@AdamTrojak wrote:

I've edited previous post;)


Thanks alot Adam! i manage to acquire the Images successfully. 🙂

But it seems to create Test No 0 and skip "Test No 1" and goes straight to "Test no 2" and then just keep overwrite Test No 2.

 

Thanks again,

Chen

 

0 Kudos
Message 9 of 12
(3,650 Views)
Solution
Accepted by topic author Chen12

I've forgotten about extension again... Apologies. 

Here's on that should work. I've replaced the Match pattern vi with scan from string. Clearing error is in case there're othter files, that doesn't fullfil the pattern schema;)

Message 10 of 12
(3,642 Views)