LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX refnum custom probe as numeric

Solved!
Go to solution

Hi all,

   Ok this may be simple or impossible but I can't figure it out. 

When you probe an ActiveX refnum wire on the diagram, it shows as a unique number (or 0 if its not valid).  This is useful if the refnum changes (like stepping thru a XML file using DOMDocument) 

   However when I tried to do a custom probe, the probe shows up as the refnum control icon so you can't see a number.  This doesn't help me.  I tried changing that control in the custom probe to a numeric but it breaks.  (actually when I tried to use a numeric array as the custom probe in LV2010 for a refnum array, it gave me a message about incompatible type and then it crashed)

  Is there a way to show the number of the refnum in a custom probe?  I guess that would be the same as showing the number instead of the control on a regular front diagram, so maybe it has to be separated out first but how does the simple builtin probe do it?

 

On a side note, using the Probe Watch Window, for 1D or 2D arrays, the Probe Display just shows a single element.  Is there a way to expand the array to show more than 1 element in that window? The values are all shown on the left side in a single line but with 2D arrays especially its hard to see where the next column starts.

 

Thanks for your help.

0 Kudos
Message 1 of 3
(2,434 Views)
Solution
Accepted by topic author TS9

TS9,

 

Please refer to the following Knowledge Base when attempting to display a refnum value in labview. Using type casting to U32 I was able to extract the refnum number and output to a indicator using the following code. I had to make the display format for the indicator hexadecimal; you can do this by right clicking the indicator and clicking display format.

 

2011-01-07_142320.jpg

 

You can use this idea when you create a custom probe. Make sure you select "new.." custom probe (and select new probe). This will create a vi with a block diagram and front panel. You could create a custom probe that does the same as this indicator. 

 

Hope this helps. 

 

<Joel Khan | Applications Engineering | National Instruments | Rice University BSEE> 

 


Message 2 of 3
(2,413 Views)

Cool.  That works great.  Thanks.

0 Kudos
Message 3 of 3
(2,395 Views)