02-04-2025 05:10 AM
ch hab auch noch einen Screenshot mit einer Übersicht des problems angehangen. Links unten ist das original SaveContinous.vi, in der mitte das teilweise adaptierte, in rot umrandet die von mir neu hinzugefügten IMAQdx Module und Verbindungen und in Blau der Teil der mir probleme macht. Soweit Ich verstanden habe, benötigt Imaq das IMAQ Create.vi, aber IMAQdx nicht. Darum kann ich die Module nicht eins zu eins ersetzen, und wie ich nun den blauen teil ersetze verstehe ich leider nicht.
I am trying to get n old labview program to work. Since in the newer versions IMAQ can not be used with third party cameras, I have to replace all IMAQ with IMAQdx modules. Most of them I managed on my own, but in one sub vi I have an issue with a specific part. he IMAQ create IV, which is not available in IMAQdx is part of some function, which I do not really understand (marked in blue in the screenshot). I already included some of he IMAQdx vis (in red) but since the IMAQ create VI does not exist in IMAQdx I do not know how to replace/adapt this part into IMAQdx.
Do you have any ideas or maybe tips what to do?
Best,
Jasper
02-04-2025 06:38 AM
Hi Jasper,
The VI "IMAQ Create.vi" is a VI to instantiate an image in memory and belongs to the common vision VIs. It has nothing to do with the acquisition driver used. Palettes "NI-IMAQ" or "NI-IMAQdx" are specific to the acquisition driver, the other ones ("Vision Utilities", "Image Processing", "Machine Vision") are for image management and processing and can be used whatever the acquisition driver. Also, "Vision RIO" is for doing vision with FPGA and lives in its own "ecosystem" of functions.
Also, why keeping the "IMAQ Init.vi" and "IMAQ Grab Setup.vi" on your diagram? Juste replace them respectively by "IMAQdx Open Camera.vi" and "IMAQdx Configure Grab.vi". And don't forget the "IMAQdx Close Camera.vi" when acquisition is not needed anymore.
Regards,
Raphaël.
02-04-2025 06:55 AM
Hi Raphaël,
so if I understand correctly I chould just keep the IMAQ CreateVI in the code, and just replace all other IMAQ VIs around it with respective IMAQdx?
I kept the old IMAQ VIs on the diagram just to get an idea how the original diagram looked like, they would be deleted once all new IMAQdx modules are in.
Best,
Jasper
02-04-2025 07:15 AM
It is very difficult to work with images of LabVIEW code, particularly when they are large, somewhat disorganized (larger than they need to be, wires running all over the place, rarely in a straight line). Some of us might have access to IMAQ functions, and might be able to suggest "how to do that with IMAQdx".
If I understand your question, it looks like the code outlined in blue is reserving buffers for saving frames for a video being acquired. What seems odd, to me, is that the code seems to imply that it acquires all the images for the video, and then "does something with them" (presumably it writes them to a Video file, but I didn't have the patience to follow the flow of data in that hard-to-read image of LabVIEW code).
When I acquire videos, I reserve a small number of buffers, many fewer than required to hold the entire video in memory all at once. Once acquisition starts, I start a parallel process that opens the Video file and starts pulling images from the buffers (maintained in a ring-like structure) until all of the images that have been acquired have been saved, at which point the file is closed.
I should mention that this is code I developed about a decade ago, and have not looked at it for at least 6-7 years. However, I think the major difference between IMAQ and IMAQdx is the hardware. I'm 99% certain that anything that IMAQ can do with its hardware, IMAQdx can do with Webcams and other video equipment that adheres to the GenICam standards.
To get "better help" than I have been able to provide here, please attach actual LabVIEW VIs, maybe with a large Image showing all of the Block Diagram so we can "guess at" the IMAQ functions being called, and if we can load IMAQ drivers ourselves, might be able to figure out the IMAQdx-equivalent code.
Bob Schor
02-04-2025 07:35 AM
Hi Bob,
I also understood this part to "reserve" a fixed number of frames for later acquisition, but also since I thought this is not necessary for IMAQdx I thought I would need to go around this somehow and find an alternative. Unfortunately, I never worked with LabView before, so even understanding some of your suggestions can be a bit tricky (e.g. I'm not sure if I understood Raphaels comments correctly, as probably detectable in my response)
As you suggested, I uploaded the VIs, due to file size limitations I uploaded them on dropbox (https://www.dropbox.com/scl/fo/0oo74d3vns4a969dviixv/AMzSG518-atbvdAfZtLZODM?rlkey=8cf2knmyzxm1l6qrq...). The Savecontinous is the original file, the SaveContinous_adjusted is the one with the blue and red markings, with IMAQdx modules already included (but potentially in a wrong way).
02-04-2025 08:10 AM
@jteuts wrote:
so if I understand correctly I chould just keep the IMAQ CreateVI in the code, and just replace all other IMAQ VIs around it with respective IMAQdx?
Replace everything from palette "NI-IMAQ", that is, VIs that have this symbol in their icon:
to their equivalent in palette "NI-IMAQdx", that is, VIs that have this symbol in their icon:
then keep the rest of the VIs.