07-06-2018 01:46 AM
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.
How can I do that? which block or property node can I use?
Thanks a lot.
07-06-2018 02:00 AM
07-06-2018 02:28 AM
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
07-06-2018 02:39 AM
07-06-2018 02:41 AM
Exactly, but those numeric controls are input of which block, property node....????
07-06-2018 02:48 AM
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…
10-08-2018 01:41 AM
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.
10-08-2018 02:09 AM
10-08-2018 01:07 PM
I did the next steps:
1. I use enumerate attributes to get name of width atributte:
2. I try to set attribute with the next code and return this error:
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.
10-08-2018 02:20 PM
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