LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Create SubVI" moves labels of IMAQ image controls (LV2013)

Solved!
Go to solution

Hello,

 

I noticed a strange behaviour in LV2013 (x64 and x86) when creating SubVIs from a selection containing IMAQ Image wires:

The resulting SubVI features out-of-place labels on IMAQ Controls/Indicators, see illustration below.

This VI

LV2013IMAQsubviBug#1.png

is altered by creating a SubVI for the copying and masking like so

LV2013IMAQsubviBug#3.png

The created SubVI has a resulting Front Panel that looks like this:

LV2013IMAQsubviBug#2.png

 

All the labels of IMAQ controls/indicators are completely out of place. I couldn't figure out yet, what the new label position seems to be depending on. At any rate, this is quite annoying, as sometimes the labels move way out of the main visible portion of the FP and you have to go and search for them (via Navigation window). What's more - you need to identify any label with the corresponding control/indicator to put everything back into place.

 

A colleague of mine confirmed this behaviour on a different windows PC, using the same LV version in x64 and the same Windows version (7 Pro)

Of course, a simple MoveToDefaultLocation method on all FP elements would cause them to go where they are expected to be, but how tedious...I can't remember any such behaviour in LV2011 where I used "Create SubVI" loads of times with IMAQ Vision functions.

 

I'd be glad if someone coul dlook into this. Thanks a lot.

0 Kudos
Message 1 of 11
(4,249 Views)

I've seen similar behavior with terminal labels when the terminals were, for instance created from outputs of another subVI.  Then when they were placed on the created subVI BD, the labels were placed as if they were indicators and not controls.  Same type of error happens with the created terminals from inputs to a subVI.

 

I wonder if this is the same kind of thing?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 11
(4,218 Views)
Solution
Accepted by topic author comrade

Create SubVI performs a front panel cleanup, but it doesn't explicitly try to change the position of control and indicator labels. There appears to be a bug in VI Server when setting the position of IMAQ refnums. This bug is independent of the Create SubVI feature. When writing the 'Position' property of an IMAQ refnum control, the label seems to get thrown into a weird position. I haven't seen this with any other control types...with other controls, their labels always stay in the same relative position when the control is moved.

 

I'm going to file a CAR against the Position property and IMAQ refnums. In the meantime, you can use the VI attached to this post to fix the problem. Follow these steps in LabVIEW 2013 or later:

 

1. Copy the attached VI to the following location: [LabVIEW 20xx]\resource\plugins\CreateSubVI

2. Restart LabVIEW.

 

Once you've done this, the IMAQ refnum label position should be corrected whenever you perform a Create SubVI operation.

Message 3 of 11
(4,207 Views)

Another thought: You aren't mucking around with the front panel default label position options are you?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 11
(4,198 Views)

@mikeporter wrote:

Another thought: You aren't mucking around with the front panel default label position options are you?


No. As I said, this problem is reproducible outside of Create SubVI. Drop one of those IMAQ refnums on a front panel, then from another VI, change its position. Its label will shoot off somewhere.

0 Kudos
Message 5 of 11
(4,196 Views)

Thanks for:

  • looking into the matter so quickly
  • filing the CAR
  • providing us with the short-time-scope remedy

Kudos on the way. Thanks, Darren.

0 Kudos
Message 6 of 11
(4,180 Views)

Just out of curiosity: Is there a specific reason why IMAQ Image.ctl changes its Decal from a file icon to "I/O" when changing from a control to an indicator? Seen on LV2013, x64, x86

IMAQCtrl,Indctr.PNG

0 Kudos
Message 7 of 11
(4,172 Views)

@comrade wrote:

Just out of curiosity: Is there a specific reason why IMAQ Image.ctl changes its Decal from a file icon to "I/O" when changing from a control to an indicator? Seen on LV2013, x64, x86

 


I have no idea why it does this. But judging from the positioning issue, I'm not surprised that there's other weirdness with these IMAQ refnums... 😕

0 Kudos
Message 8 of 11
(4,159 Views)

seems like something quite similar is happening to the labels of BD terminals as well. Just wanted to point you to it in case these two behaviours are linked and thus let you clear up two CARs with one swipe....

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Edit-gt-Create-SubVI-should-respect-label-positions/id...

0 Kudos
Message 9 of 11
(4,147 Views)

@comrade wrote:

seems like something quite similar is happening to the labels of BD terminals as well. 


That was a different issue, and it is fixed in LabVIEW 2014.

0 Kudos
Message 10 of 11
(4,143 Views)