Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

thermocouples via SCXI-1102 + camera sony DFW-X710 1394

Hello

 

I am dealing with heat transfer measurements using thermocouples via SCXI-1102 and camera sony DFW-X710 1394. The idea is to write down thermocouple data and grab photos in time and at the end to know time point for thermocouple value and photos from camera.

I am junior Labview user. Never the less using example Cont Acq&Graph Voltage - Write Data to Spreadsheet File (CSV).vi

I managed to write thermocouple data in time but I have no idea how to deal with camera.

 

I need your advice how to proceed. Any help will be worthwhile for me.

 

Many thanks!

Best regards,

Igor.

0 Kudos
Message 1 of 11
(5,341 Views)

Igor, 

 

Thanks for your post. You'll need our Vision Acquisition Software to acquire images from the camera. You can then check out our Vision examples and integrate them into your current example being used. One example you may find helpful is Low-Level Snap.vi (Found in the NI Example Finder in the path Hardware Input and Output>>Vision Acquisition>>Low-Level). You can set a case structure after the thermocouple data is brought in and apply some case that would grab the image data. 

Blake C.
Applications Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 11
(5,326 Views)

Hello Blake,

 

Thank for your reply! That's really helpful.

I have done some good steps forward. Please see attached picture (voltage+snap.PNG). I have combined

Cont Acq&Graph Voltage –Write Data to Spreadsheet File (CSV).vi

Low level snap.vi

File I/O Snap and save to File.vi

How it works:

- voltage is acquired continuously while I do not click stop

- within the loop of voltage acquiring I have image snap and save it

But I need to specify the filename every time and I still do not know the time point of image. How can I automise it? Could you please advise the way how I can get it?

 

But it seems to me that snap does not fit me the best.  Looking through the examples I found Low-level sequence.vi . Here I can specify max 800 images to store  (if >800 than it fails, by the way how can I increase the number ?) But I have not managed to save the images from the buffer. Could you please advise the way how I can save it.

 

So I see two strategies here:

- snaping with auto naming and saving but there will be time gap between images which is spent for processing

- sequence, then the time gap will be between series of sequence

 

What could be the best way?

 

 

Many thanks for the help. Looking forward for more good advices)

BR,

Igor.

 

 

 

 

0 Kudos
Message 3 of 11
(5,304 Views)

Hi Jake, 

 

I have a few thoughts that may help you out with your code. 

 

Firstly, you should move the camera setup code outside of your while loop - there is no need to open, setup and close the camera each iteration, doing so is just costing you processing time. I think that you can still use the Snap.vi example code, and processing it each time an image is taken. For the timestamp you have a few options - you can programatically add the timestamp to the filename, which would help with having to rename the filename each time you save an image, or you could overlay text onto the image with the current time. For the latter please look into the DrawText Example.vi in the shipping examples. For the first, you should be able to use the Get Time/Date String and append it to your filename. 

 

Please let me know if this helps, 

 

-N

National Instruments
Staff Certification Engineer
0 Kudos
Message 4 of 11
(5,290 Views)

Hello Nathanael,

Many thanks for your inputs. Yes, that's really make sense to move the camera setup code outside of the while loop.
That would be great if I could programatically add the timestamp to the filename. But I am a juniour user, so could you
please share same example with such programatic timestamp for the filename.

Thanks and best regards,
Igor.

0 Kudos
Message 5 of 11
(5,285 Views)

Hi Jake, 

 

Something along the lines of the first example listed in this KB but instead of the 'New Name' string you could just use a Get Time/Date String function. Please let me know if that answers your questions. 

 

-N

National Instruments
Staff Certification Engineer
0 Kudos
Message 6 of 11
(5,278 Views)

Hello Nathanael,

 

Thank you for the help!

I realized that I would  need not the date and time but would rather need time im miliseconds after the start of VI.

Please see attached picture

It should ) automatically save image with the name from timer in.

But for the strange filenames, like 8.612119E+6.bmp, 7.267947E+6.bmp.

Please let me know what I do wrong.

 

Thanks and BR,

Igor

0 Kudos
Message 7 of 11
(5,269 Views)

Hi Jake, 

 

The Get MS timer value is probably not the best VI to use, as it is only a 32 bit counter and will roll over from 2^32 -1 to 0. It is also continually counting, so that is why you are seeing the strange filenames. To get the number of ms since the beginning of your VI you would have to get a MS timer value at the beginning and then subtract the current MS timer value each time you wrote a filename. However this may not work all the time, due to the nature of the MS timer value rolling over. 

 

Please let me know if this helps

 

-N

National Instruments
Staff Certification Engineer
0 Kudos
Message 8 of 11
(5,261 Views)

Thanks!

 

It seems that I am done with this prog)

Please see the picture attached. In my understanding it should plot and write to file voltage and snap pictures to file (with time point as a name) simultaneously.

Do I undestand it right? Any comments are welcome.

 

With snap I have roughly one picture per 1 second. In case I need more picutes per second then I should use sequence. Could you please let me know how I can save the array of images to files?

 

Thanks and BR,

Igor.

0 Kudos
Message 9 of 11
(5,251 Views)

Hi Jake, 

 

To save an array of images, you would have to go through the array in a for loop and then save each image individually. Does this make sense?

 

-N

National Instruments
Staff Certification Engineer
0 Kudos
Message 10 of 11
(5,237 Views)