ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reconfigure a IMAQdx continous acquisiton

Solved!
Go to solution

Hello everyone,

 

so i am trying quite some time now to figure out a problem with my code regarding reconfiguring an IMAQdx continous acquisiton. What i want to do is draw a ROI and crop my acquision to this ROI.

 

I got a routine figured out for this, which is working perfectly if i use the settings cluster and type the right settings into Camera Settings. But if i use the ROI calculation, which calculates correctly, for some reason IMAQdx Active Attributes gives me 0 as MaxDBL and MinDBL incase of OffsetX and OffsetY, therefor my frame always is in the left upper corner.

Attribute configurationAttribute configuration

 

If i draw my ROI and manually update one value in the Camera Settings cluster afterwards it takes the right ROI right away.

 

Somehow i struggle even explaining the problem 😉 Basically i do not understand what the diffrence is between updating it by writing values into the cluster or calculating the values via a ROI and using these calculated values and why does this affect my session attributes?

 

I uploaded the complet Delacor Modul, so feel free to start the tester and run the programm.

 

Stay healthy and all the best

 

Abongile

0 Kudos
Message 1 of 5
(2,315 Views)

Hi,

You should post you code in .zip format. The .rar format is proprietary and cannot be open without a specific software (winrar). Also, a lot of people don't have the latest version of LabVIEW, so saving the VIs in LabVIEW 18 is a good idea.

Yddet

0 Kudos
Message 2 of 5
(2,267 Views)

Here is the .zip file.

 

It's Labview 2017

0 Kudos
Message 3 of 5
(2,253 Views)

I took the time today to rebuild the VI as a simple example of how i am taking my pictures and uploaded it, so you dont have to look into the hole module.

 

I also included some hints for a better understanding of my problem. 

 

Never used a snippet before ;-)Never used a snippet before 😉

 

Maybe somebody knows about this/can help me.

 

All the best

 

Abongile

0 Kudos
Message 4 of 5
(2,224 Views)
Solution
Accepted by topic author AbongileViksVika

As always the problem sits behind the screen 😉 I did not make sure that the new width and height are set before the offsets are set, therefor the offsets min and maxdbl are 0 -  camera is in full width and height.

 

 

Simple solution:

Reorganize the settings cluster, so that width and height are on top and will be processed first and a shiftregister for the session in the for loop.

 

Anyway, thanks for the discussion 🙂 Sometimes just writing about it helps to clear the view.

0 Kudos
Message 5 of 5
(2,176 Views)