Ok - so the Imaq write doesn’t work. We need to use file i/o. The problem I have is how to actually feed the image into the file i/o.
I’m guessing that I should be using the text, but how do I extract the image string from the imaq image out and put it into the correct format?
I must be missing something basic.
I’ve tried feeding the “New image” node from the imaq into the text, but I pretty much knew that wouldn’t work since I have to extract the image from that .ctl - I’m just not getting how to do it.
P.S. - we DID finally figure this out. Here’s the skinny since I know a number of teams have asked for it:
NI has disabled the Imaq write because the CRIO team stated that the on board flash storage has a limited number of writes before failure (as do all solid state memory drives utilizing flash memory that are currently in use).
In their testing they saw failure after extended (and I mean extended extended extended extended) use. I’m not sharing the exact numbers because that’s probably protected / private info. In normal use I’d be shocked if a team hit the limit in many years of Crio use.
Now - getting it to work is not easy because you have to know how some of .vi’s function. But now that we know how to make it work, implementation is easy. You can find the write code in our posted labview code, but also note two things: #1 you have to modify the camera get image .vi by adding an output to it. This output should be wired to the string that is being passed into the .jpeg decode vi (all internal to the get image vi). That is your vision data.
Next, when you feed that into the string input on the text write vi from the file i/o palette, you have to right click on the write vi and turn off the check mark next to “EOL”, or you will get corrupted images.
Just tried this out a few minutes ago. Works great! Pay attention to the comment about the EOL setting, folks. The auto-incrementing filename suffix is a nice touch. One behavior I was not expecting (due to the presense of the one-shot filter on the trigger) is that a series of pictures suitable for AVI creation are collected if the trigger is held TRUE. That might have interesting applications in 2010 or beyond, considering the recent Dartfish beta evaluation, but it could also potentially overflow the available memory if the capture feature was left on too long.
For what its worth, the images I captured (320x240) translated to file sizes of about 8kb each.
Oooh - dinner time… Happy New Years everyone!