LabVIEW Development Best Practices Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

IP Validation

Dear All Engineers,

You can validate user input IP address using the attached VI.

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
Download All
Comments
mini09
Active Participant
Active Participant
on

Can I`ve in LV11

LuI
Active Participant
Active Participant
on

Well,

in a limited way one can.

But your intention is ambiguous IMHO. It only accepts IP adresses in dot notation (1.2.3.4) on my system. If I provide a valid machine name ('pc1234') that can be resolved here, it returns 'Invalid'. Allthough the 'String to IP'-node returns a valid IP adress, but the 'IP to String'-node changes that to an IP in dot notation. And even if one changes that nodes control 'dot notation?' to false, it returns the complete machine name including the domain name (pc1234.mydomain.local) etc., which is not completely EQUAL to what was typed in. 

You should deside what you want to achieve, e.g. test for a well-defined adress or for an adress that could be resolved or whatever.

Just my € 0.02!

Greetings from Germany!

--

LuI

lcgswolf
Member
Member
on

Hello Everyone, I used the proposed solution above but I faced an unexpected issue, if the input value is an invalid IP Address (e.g. "42" or "hello") the VI take at least 2000 ms to execute, therefore I have to do it manually for a faster validation, the attached image shows my solution.

 

Check IP.PNG

It takes minimum execution time for almost any input value



 

Contributors