LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not a Refnum is true when telnet reference is valid

Solved!
Go to solution

I have seen a strange behavior with LabVIEW 2010.

 

I open a telnet session and get a refnum.  The refnum looks valid.  As a matter of fact, I can communicate with the target (send / receive).

However, I get a TRUE from "Not a number/path/refnum". 

 

According to the context help: "Returns TRUE if number/path/refnum is not a number (NaN), <Not a Path>, or not a refnum. Otherwise, this function returns FALSE."

 

Has anyone else seen this?  You require the internet addons for this function.

 

0 Kudos
Message 1 of 9
(3,070 Views)
Solution
Accepted by topic author Ray.R

This only applies to actual refnum. A telnet reference is not actually a LabVIEW reference, so it has a VI in one of the palettes to check whether a refnum is valid or not (called "Not a telnet connection?").


___________________
Try to take over the world!
Message 2 of 9
(3,064 Views)

that makes sense..

 

Thanks Yair

0 Kudos
Message 3 of 9
(3,054 Views)

You are correct... It even says so in the bottom section of the Context Help description.

 

However, the addons (telnet) that I have access to do not seem to have such a function 😞

 

 

 

In the meantime, I'll have a creative work-around.

0 Kudos
Message 4 of 9
(3,050 Views)

Even if it's not in the palette, it should still be on disk with the rest of the library VIs. If you want to protect yourself against using something not in the palettes, you can create a wrapper for it, which you can then modify internally in the future if NI ever changes this.


___________________
Try to take over the world!
Message 5 of 9
(3,031 Views)

It is in mine.

 

Just naviagte to the same location and inside the llb I find the VI Yair mentioned.

 

Thinking out loud:

 

Altough I like the look you get for the "ref" wire when you go through the process of type casting to file, it is misleading at first glance. I think the help window with wire tool for that wire gives the only hint that it is not a real ref.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 9
(3,024 Views)

---  I feel like an idiot ---

 

 

😞

 

 

Yes... there is was staring at me all the time...

Maybe I should listen to my wife and get some rest during the Labor Day weekend...

Message 7 of 9
(3,017 Views)

Here's a Kudos to help you feel beeter for now.

 

I suspect you are still on the wagon so while sampling some home-made Blue Berry hooch this evening, the wife and I will lift a glass in your behalf.

 

Cheers Ray!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 9
(3,012 Views)

Thanks Ben,

 

I should have known that... 😞

 

I appreciate the blueberry hooch..  I may cheat myself and taste some old fermented grapes..

Plus get some extra sleep...

Message 9 of 9
(3,002 Views)