09-01-2011 10:31 AM
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.
Solved! Go to Solution.
09-01-2011 10:44 AM
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?").
09-01-2011 11:52 AM
that makes sense..
Thanks Yair
09-01-2011 12:09 PM - edited 09-01-2011 12:09 PM
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.
09-02-2011 02:48 AM
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.
09-02-2011 07:51 AM
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
09-02-2011 01:15 PM
--- 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...
09-02-2011 01:52 PM
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
09-02-2011 03:15 PM
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...