LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

digital graph mask

I think I found a bug in PlotPackedDigitalLines.  When using VAL_UNSIGNED_SHORT_INTEGER and a mask which will plot the most significant bit (bit 15 which is the sign bit on signed short integers), lines 16 through 31 are also plotted (which should not exist in any kind of short integer).  Does anyone know of a way around this?
0 Kudos
Message 1 of 7
(3,955 Views)
This may not be a bug. It is likely that CVI represents all short integers as 32-bit integers. This is an allowable approach to representing a short integer quantity under the ANSI C specifications. The specification states what is a minimum size for each integer type but does not preclude using a larger size to store the quantity.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 7
(3,952 Views)

While this is true, the help documentation for that parameter specifically mentions that this type is a 2-byte integer.  I suspect that the types of the parameters “Data Array”, “Data Type”, and “Mask” are not all consistent which might lead to the extension of one of your shorts to a long.  If all the types add up here, it might help if you post a small snippet of the code you are using, or a small CVI project which can reproduce the problem (without the use of hardware)…..

 

Hopefully we can help narrow down the problem, thanks for posting to the forums, and thanks for all those who have contributed or helped investigate!

Message Edited by Travis M. on 06-14-2006 02:24 PM

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 3 of 7
(3,943 Views)
It really should not matter how it is defined.  What does matter is the behavior.  When any bit (particularly bit 15) in a digital plot defined as VAL_UNSIGNED_SHORT_INTEGER is set, only that line should be displayed, not all the lines from 16 through 31 (because those lines are not supposed to exist, at least not in the plot).
0 Kudos
Message 4 of 7
(3,936 Views)
yeah, I corrected that post about it being defined as a 32-bit long since it was incorrect (sorry about that).  check out the edited post above and let me know what you think......
Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 5 of 7
(3,931 Views)
Attached is a small project which demonstrates the problem.
0 Kudos
Message 6 of 7
(3,925 Views)
Greg,
 
I have confirmed that this happens and it is definitely a bug. Unfortunately, I can't really think of a workaround outside of using a different type or using a different plotting function (PlotDigitalLines, etc.). I'll post again if we uncover any more information regarding this.
 
Sorry for the inconvenience,
 
-alex
0 Kudos
Message 7 of 7
(3,919 Views)