LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

system configuration error -2147220614

Solved!
Go to solution

I'm trying to write a program to use the system configuration vi's for my real time units (sbRio 9602).  When I'm trying to set the hostname it throws an error -2147220614 which is an illegal character in the host name, but funny thing I could set the hostname with the only api's in labview 2011.  

 

The hostname I'm trying to set is TS1.5, which I can use my old app and set it to that hostname, so, not for sure why it doesn't work here.  This is just an example, seems like lots of stuff you would think would work doesn't.

 

I am using LV 2012 sp1.

 

Thanks,

 

Eric.

0 Kudos
Message 1 of 7
(3,320 Views)

I'd guess that the period isn't allowed in a host name.  That is normally just used in the TCP/IP address.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(3,315 Views)
Solution
Accepted by topic author erfigge

 

 

 

Camilo V.
National Instruments
0 Kudos
Message 3 of 7
(3,277 Views)

Cavarval, thanks for that reply, I was looking to see what the "rules" really were.  What about spaces, I'm assuming those are not allowed as well.

 

 

0 Kudos
Message 4 of 7
(3,261 Views)

Right assumption, spaces are not allowed either.

Camilo V.
National Instruments
0 Kudos
Message 5 of 7
(3,254 Views)

Ok, a slight follow up to the original question.  Don't know if it is more appropiate to post a new one or not, but it is directly related.  I'm trying to validate the hostname before calling the function but I can't seem to figure out the match pattern vi.  Basically I need to verify the string only has A-Z, a-z, 0-9, and the - char.  How can I use the match pattern to do that?

0 Kudos
Message 6 of 7
(3,220 Views)

The idea is alright, but there are several things you need to change.

 

The Match Pattern function is currently looking a pattern in the form of one character from [A-Z], followed by one character from [a-z], followed by one character from [0-9], followed by a hyphen, somewhere in the string; that is [A-Z] AND [a-z] AND [0-9] AND [-]. So, first you need to change the regular expression from [A-Z][a-z][0-9][-] to [A-Za-z0-9"-"], so it will look for [A-Z] OR [a-z] OR [0-9] OR [-].

 

Also, the function only "iterates once", so it returns only the first character on [A-Za-z0-9"-"]. Basically, using a loop and the String Length to set the iterations count will do the trick.

 

If you still can't get it working, I would suggest you to create a new post about it.

 

P.D: you can in fact match a multi-character pattern match, but you need to know exactly what you are looking for. For example, if your string is "Test abc1 String", and you want to extract any combination of three lowercase letters and one number, you can use [a-z][a-z][a-z][1] you will get "abc1". However, in your particular case the approach I suggested above should be easier.

Camilo V.
National Instruments
0 Kudos
Message 7 of 7
(3,190 Views)