DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug/Problem with Reply of a Control Refnum of Image display

Solved!
Go to solution

Dear DQMH community, I have been using DQHM for a little while and really like it. Today I encountered a problem which could be a bug. I am creating a request event with a reply of a Control Refnum of image display. Although all files are created, but the main request VI diagram is not full completed. I tried the control refnum of numeric type, it works fine. I also tried vi server reference, it also works fine. Looks like it only happens for Control Refnum of image display. I attached a diagram to show the missing parts that I found. Might be more is missing; I just don't know it. It's easy to reproduce. I am wondering if anybody has encountered this problem before.

0 Kudos
Message 1 of 15
(1,491 Views)

I'm not familiar with the IMAQ/Vision API. When you say "image display", can you tell me the specific name of the control you're referring to from Quick Drop/palettes?

0 Kudos
Message 2 of 15
(1,463 Views)

Yes, I attached a screensnap which one I used. Thanks

0 Kudos
Message 3 of 15
(1,449 Views)

You can just pass the name (string) of the image you've created, and use that rather than a refnum.

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 4 of 15
(1,429 Views)

There is a VI written by another person that I will use, and it requires a refnum input. I would like to use that VI instead of rewrite that VI. And also, I am wondering if anyone has encountered the same problem. If so, this looks like a bug, so I want to report it. 

0 Kudos
Message 5 of 15
(1,407 Views)

It looks like LabVIEW isn't properly loading the IMAQ Image.ctl typedef into memory the first time you drop the Image Display indicator. I noticed that if I create a new dummy VI, and drop the Image Display indicator, and also drop an IMAQ Image.ctl from Quick Drop, then the DQMH event scripting works fine without errors.

 

Also, it might be more straightforward for you to drop the IMAQ Image.ctl as your request argument instead of the Image Display indicator, which is really only ever meant to be used on VI front panels... it doesn't really make sense to use it as a data type. To be clear, the terminal of the Image Display indicator is the same data type as IMAQ Image.ctl.

 

 

Message 6 of 15
(1,394 Views)

Thanks for your reply. Could you be more specific please? I still couldn't get it work even I connected an "IMAQ image.ctl" to the Image Display Indicator. I still got the same problem. I am not sure that's what you did.

 

And also, as I replied above, I have to get a return of the refnum instead of the other way around (feed in a IMAQ image.ctl as input) because there is another VI requires a refnum of image display as an input. 

0 Kudos
Message 7 of 15
(1,382 Views)

When defining the Reply Payload parameters, use an "IMAQ Image.ctl" instead of an "Image Display".

 

imaq_image.png

Message 8 of 15
(1,376 Views)

Thanks for your reply again, but unfortunately this is not what I need. I need the reply payload to be a control reference. (See the attached.) And the control reference refers to an image display indicator. I don't need a imaq image.ctl type because this is not another VI needs. 

 

More details: Another VI takes images and send those images to some display indicator, so it requires a control reference to know where it sends the images to be displayed. So, I am trying to create a request to the module to get the control reference of the modules' main.vi's image display indicator. I don't want to change the calling VI to feed in images because it's written by another person and being used by a number of other people. 

 

 

Download All
0 Kudos
Message 9 of 15
(1,370 Views)

The easiest steps to reproduce the problem:

 

(1) Start a DQMH project

(2) create a new request event, in the new request event dialog, choose the module, give it a name and select the event type to be "request and wait for reply", then the replay payload GUI will appear

(3) quick drop a control reference (hotkey is cr) on the reply payload page,

(4) then quick drop an "image display" into the control reference that was just placed on the reply payload page in step (3). So the control reference will refer to an image display type.

(5) click OK and wait for auto scripting to finish.

(6) the tester diagram will open, and you can see there is no output connector for a control refnum on the request API. And if you open it, you will see a number of things are missed as I posted earlier.

 

But for step 4, instead of an image display, if I drop a numeric control/indicator or Boolean control/indicator into the control reference, everything will work fine. 

0 Kudos
Message 10 of 15
(1,352 Views)