LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Width/Height Left/Top of Ni Max in Labview programmatically.

Hi to all.

I would like to change Width/Height Left/Top of NI MAX (see picture) from my programm in Labview programmatically, so that user will be able to change that values without enter in NI MAX.

image.png

 

How can I do that? which block or property node can I use?

Thanks a lot.

0 Kudos
Message 1 of 10
(3,297 Views)

Hi Alvaro,

 

why do you want your users to use MAX in parallel to your VI?

And why don't you set the ROI in your VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(3,296 Views)

Hi GerdW:

I would like to change those values in my program, not in NI MAX.

Those values are not a ROI itself, those values are image size (Heigth/widht) and offset image (Left/Top)

 

Thanks again

0 Kudos
Message 3 of 10
(3,287 Views)

Hi Alvaro,

 

I would like to change those values in my program, not in NI MAX.

So you need just 4 numeric controls!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(3,283 Views)

Exactly, but those numeric controls are input of which block, property node....????

0 Kudos
Message 5 of 10
(3,280 Views)

Hi Alvaro,

 

those numeric controls are input of which block, property node....????

What do you want to achieve with those values?

Where do you need them?

Which functionality should your VI provide?

Are you working with IMAQ/Vision?

 

As long as you don't provide information you will only get generic answers…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(3,278 Views)

What do you want to achieve with those values?

I would like to change image atributes (height and width) and camera offset (left and right) (see image first post) programatically with a control that user can change because sometime usar wants to see a bigger image displaced image.

 

Where do you need them?

I need controls that user can change in the front panel. These controls have to do the same things that the controls in NI max (height width left and right) (see first post image).

 

Are you working with IMAQ/Vision?

Yes, I am working with this toolbox in labview.

 

Coud you help me?

 

Thanks a lot.

0 Kudos
Message 7 of 10
(3,170 Views)

Hi Alvaro,

 

unfortunately I cannot help you with IMAQ issues.

I guess there are functions or properties/methods you can use in IMAQ…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(3,166 Views)

I did the next steps:

1. I use enumerate attributes to get name of width atributte:Sin título.png

 

 

2. I try to set attribute with the next code and return this error:Sin título2.png

 

 

It make sense because in enumerate attributes it says that width attribute is only readable.

 

However I can change this attibute in NI MAX (see first post image) because when I change this attribute in NI MAX and then I go to my labview program and read width attribute, the value has changed....

 

So why can't I change this value in labview program with imaqdx properties? How could I do this?

 

Thanks a lot.

 

 

0 Kudos
Message 9 of 10
(3,158 Views)

There are two basic ways to "influence" hardware with LabVIEW.  One is to use MAX, an interactive (meaning "manually controlled by a Human through a User Interface") program that, in turn, "talks to" various NI Drivers that, in turn, interact with the hardware.  The other method is to write LabVIEW code that also interacts with the Drivers (that interact with the Hardware).

 

The first "MAX" method is designed to be interactive, and hence not "programmable".  The second "LabVIEW" method is completely programmable, although there are some "shortcuts" called Express VIs that do some of the simple programming for you.

 

So while it is easy to do what MAX does with LabVIEW (i.e. open a Camera, Snap an Image, display it on an Image Display, and drop a rectangular Region of Interest (ROI) on it, you need to write some LabVIEW code to do this!  Once you have done this, you can Query the ROI for its properties and even set them programmatically.

 

A word of caution -- acquiring and processing Image Data using LabVIEW is somewhat more complicated, less-well documented, and more difficult than other forms of data acquisition and processing in LabVIEW (such as VISA or DAQmx).  I would advise having a few months of LabVIEW experience (or access to an experienced LabVIEW developer) before venturing too far into these less-well-charted waters.

 

Bob Schor

0 Kudos
Message 10 of 10
(3,152 Views)