LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Polymorphic unit conflict in LabVIEW 8

It seems that LabVIEW 8 has introduced a bug when handling polymorphic units in a subVI which calls another subVI with polymorphic units. This bug was not present in version 7. I am using LabVIEW 8.0.1 on Mac OS X. It seems that if the first subVI passes a value with a polymorphic unit to a second subVI which uses the same polymorphic unit name, LabVIEW gets confused and removes the offending unit. See the attached example LLB file, which contains two files, "SubVI.vi" and "SubSubVI.vi". SubVI.vi has one numeric input with the polymorphic unit $1 and an output with the same unit. This VI passes this numeric input to the input of SubSubVI.vi which also has an input and an output with the polymorphic unit $1. In theory, in the block diagram of SubVI.vi we should get $1 as the unit of the output from SubSubVI.vi, but instead we get a number without units, and consequently we have a broken wire since the indicator correctly has the unit $1. If we change the units of either of the VIs to e.g. $2, the error disappears. Is there any bugfix, or will I have to change all my VIs and hope I don't run out of polymorphic units (since only $1 to $9 are allowed)? And please don't tell me to buy the latest upgrade.
0 Kudos
Message 1 of 5
(2,906 Views)
I just tried your code, and V8.2.1 exhibits the same effect.

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 2 of 5
(2,890 Views)

Hi Hugin,

I've confirmed what you've said - this seems to be an issue in other versions of LabView as well. Thank you for letting us know about the issue - we will work on looking into this for future releases.

In the meantime, whilst not ideal, I have a workaround to offer to you, which involves forcing it to set the polymorphic units on the output of the SubsubVI file using Cast Unit Bases.

I hope this helps you,

Regards,

Dan

0 Kudos
Message 3 of 5
(2,861 Views)
Thanks Dan. Although I can't open a LabVIEW 8.5 vi, I get what you mean. While I'm at it, I would like to complain about another unit related bug which has bugged me (!) since version 3. If you use units on a graph, and then change the base units (e.g. from m to s), the scaling factor on the graph gets wrong. Here's how to reproduce it:

1. Create an array with unit m.
2. Create a waveform graph and connect the array to the graph.
3. Show the graph units. It will show the unit m.
4. Change the graph unit to mm. It correctly gets a scaling factor of 1000.
5. Change the array unit to s. The graph will change the unit to s, but the scaling factor 1000 remains!

I am attaching a simple example vi.

/Tobias
0 Kudos
Message 4 of 5
(2,849 Views)

Hi again,

Thanks for letting me know of this other bug regarding units - I shall forward it on to the relevant people within the company to look into.

Regards,

Dan

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