03-31-2017 09:22 AM
Hi, I'm running a PXIe 8840 with two 8234 cards (totaling 6x ethernet ports). All six are listed on the RT monitor and I know all six work.
My problem is that when I list all the local ports using Str to IP (no input wired and multiple outputs selected) it only returns the first 4 addresses. I know its not a 8234 card that is at fault as the last two ports missing from the list is one on the CPU card and one on the one 8234 card.
Is this a known bug in the Str to IP function?
Does anyone have any other way of listing all the local ip addresses?
Solved! Go to Solution.
03-31-2017 10:42 AM
What do you see if you type ipconfig into the command prompt?
03-31-2017 11:51 AM
I'm using RT on the Pxi so i cannot run ipconfig. However the RT display on the connected monitor lists all 6 addresses.
Any other ideas?
03-31-2017 12:22 PM - edited 03-31-2017 12:30 PM
AntonV,
You need to look at the Help option for this primitive and see the representation. The input consists of a string while the output is a single U32. Seeing how an IPv4 is 4 bytes in length, it can easily be represented by a U32 while an IPv6 being 6 bytes in length cannot. This will pass out the defined IPv4 address.
03-31-2017 03:19 PM - edited 03-31-2017 03:24 PM
@Minions wrote:
The input consists of a string while the output is a single U32.
I assume that the OP has it configured for "multiple output", i.e. an array of U32. I don't know if there is a limitation on the number of results.
(Sorry, I currently only have four local IPs, (some are virtualbox adapters))
03-31-2017 03:23 PM
Yep it is configured for multiple output. Seems to be internally limited to 4 addresses? Has anyone ever gone over 4? In case this is a bug, is there any other way to get a list of addresses on the host computer in RT?
03-31-2017 03:29 PM - edited 03-31-2017 03:30 PM
Yes, trying with e.g. microsoft.com, I get more than four (Windows 10, LabVIEW 2016).
Not sure if there is a limit on local IPs, though.
03-31-2017 03:30 PM
My point was that the number between each '.' of the IP address is a number from 0 to 255 - essentially a [U8]. If you were to take four of these and merge them together, you would get a [U32]. As the output of this primitive is limited to a [U32], it cannot handle the IPv6 addresses. Perhaps these primitives should be labeled with the IPv4 to limit their usage.
03-31-2017 03:42 PM - edited 04-02-2017 12:28 PM
@Minions wrote:
Perhaps these primitives should be labeled with the IPv4 to limit their usage.
LabVIEW does not currently support IPV6 so all this is irrelevant. (An IPv6 address is also 16 bytes, not 6).
@Minions wrote:
My point was that the number between each '.' of the IP address is a number from 0 to 255 - essentially a [U8].
This definition is backwards. An IPv4 address is defined as a U32 number, but it is often conveniently formatted as a period delimited set of four decimal octets. (see also)
03-31-2017 04:07 PM
I wonder if it is specifically my RT system that shows this behaviour or if it happens for all RT desktops.
As for an alternative method to get a list of system ip addresses, i recall that there is a file in system folder somewhere that lists the network configuration (basically all the network settings as set up in Max). I could parse that file for all the addresses but I'm hoping for an explaination of why STR to IP doesnt behave as expected.