LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure an RT computer using DHCP

  I realize this may be a tough question because it really has more to do with networking and my network than with NI software, but here goes...
   I am using a PXI-8145.  I can assign it a name and either DHCP or a fixed IP.
   I have DSL service with a modest router and wired and wireless connections.  My host computer uses DHCP to connect to the network.  The host and the 8145 are connected to a hub that is connected to the router (wired).
   I started with my 8145 assigned a static address of 10.10.10.12 and my host assigned a static address of 10.10.10.10.  This works fine for using the 8145, but my host no longer sees the internet.
   If I leave the 8145 at the static address and set my host to DHCP, I can use the internet, and Max sees the 8145, but LabVIEW does not connect.  (Not surprising, since they are on separate subnets.)
   I then configured the 8145 for DHCP.  The host is still DHCP.  Now in Max, I see the 8145 and can find its IP.  If I plug that IP address into the LabVIEW project manager properties for the 8145, then LabVIEW can connect.  But this extra step is awkward and would be unacceptable for customer systems, since one cannot rely on the 8145's IP to remain constant after reboots.
   LabVIEW has an option for giving the 8145 a name rather than an IP.  I tried this, but LabVIEW still cannot connect.  Apparently my network doesn't have a name server.  (Sorry, I'm not much of a network guru.)
   I think the proper way of doing this is to give the 8145 a static IP and leave the host on DHCP, then have a gateway to connect the two disparate subnets.  I don't believe I have a gateway.
   Am I missing any options?  Is there an easy-ish way to implement a name server on an XP machine?  Can most home routers act as gateways?  (I have a Linksys WRT54G router.  It has an Advanced Routing configuration that looks promising, but when configuring a Static Route, it asks not only for the host IP, but for the Gateway IP that will be doing the routing.  So I am guessing that the WRT54G does not itself act as a gateway.)
   Thanks for any insight you can give.

Cheers,
   Dave
  
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 1 of 5
(7,124 Views)
I am not an expert on networking, but I have done some work with it.  A few questions:
 
If your host is set to DHCP, do an ipconfig in the command window.  See what subnet and default gateway it uses.  Then set the PXI RT system to be on the same subnet and gateway if you statically assign its IP address.
 

@dave Thomson wrote:
   If I leave the 8145 at the static address and set my host to DHCP, I can use the internet, and Max sees the 8145, but LabVIEW does not connect.  (Not surprising, since they are on separate subnets.)

This would surprise me because I thought MAX could only find a device if it is on the same subnet.  If it was on a different subnet, you would have to tell it where to go look for it.


@dave Thomson wrote:
  I   Am I missing any options?  Is there an easy-ish way to implement a name server on an XP machine?    


Have you looked at the Hosts file on your XP machine?  You can put an entry there that matches a name to an IP address.  That would work for a static IP address.  Of course if that IP address changes because it is assigned dynamically, then the Hosts file would have to be edited each time a new IP address got assigned.


Message Edited by Ravens Fan on 08-17-2007 11:30 PM

Message 2 of 5
(7,121 Views)
Ravens Fan,
   Thanks for the suggestions.
   First of all, I also am surprised that Max can see the 10.10.10.12 static address when the host is on DHCP in the 192.168.x.x range.  I thought that they would only see things in the same subnet, but somehow it works.  Which is really convenient, since you can then reassign the IP from Max so that things work outside Max.  The downside is that LabVIEW can't pull off this same trick.
  Secondly, I did the IPConfig as you suggested, and yes, it shows what my host Gateway is.  I tried using this Gateway IP to configure an advanced routing in my Linksys router, to try to connect the 10.10.10.x subnet to the rest of my network, but I must not have set it up right, since I still couldn't see my static 10.10.10.x 8145 from my DHCP host.
   Editing the Hosts file wouldn't really address my issue.  If the static 8145 were on a different subnet from the DHCP host, I still would need a gateway, regardless of a name server.  If I put the 8145 on DHCP, then a static entry in a name table wouldn't be of much use.
   Then I tried what you probably were actually suggesting:  instead of fixating on keeping the 8145 on 10.10.10.x, I assigned it a static IP in the same subnet as the dynamic IPs that my DHCP assigns.  So now the 8145 is 192.168.0.199, my host is DHCP on that same subnet, and all is happy!
   Thanks for the help.

Regards,
   Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 3 of 5
(7,113 Views)


@dave Thomson wrote:

   Then I tried what you probably were actually suggesting:  instead of fixating on keeping the 8145 on 10.10.10.x, I assigned it a static IP in the same subnet as the dynamic IPs that my DHCP assigns.  So now the 8145 is 192.168.0.199, my host is DHCP on that same subnet, and all is happy!
   Thanks for the help.

Regards,
   Dave


That is exactly what I was suggesting.

Smiley Happy I'm glad to hear it's working for you. 

One thing I would caution on is that is sounds like you have the RT target as a statically assigned .199 address.  A lot of times the statically assigned addresses are reserved for much lower numbers like .10 through .50.  Alhough I think this is a setting that can be changed in the router or DHCP server.  That, or the .199 can be blocked off as a static number.  You may not have issues on a small network, but if a device comes along and it gets dynamically assigned a .199 number (if the DHCP server/router is not setup properly and .199 is still in the dynamic pool), it could cause conflicts with the RT target .

Message Edited by Ravens Fan on 08-18-2007 12:08 AM

Message 4 of 5
(7,112 Views)
   Thanks for pointing that out.  I moved the RT target to a range that the DHCP doesn't use.

Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 5 of 5
(6,982 Views)