Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

TPC-2106 fails to load static IP on hard reboot

Solved!
Go to solution

I am currently using a cRIO-9012 with a TPC-2106.  They are connected through a crossover cable and are both running on the same 24 VDC power supply.  I am using shared variables to transfer data between the two.  I wrote a small test program in which I am reading a Type K thermocouple with an NI-9211 module and turning on an LED with a digital output from an NI-9403 module.  The TPC-2106 front panel screen has a numeric indicator displaying the temperature value and a chart where it plots the data.  A stop button is used to stop the program on the TPC-2106 and cRIO.  When the cRIO boots up it sends a digital out to the LED and lights it up.  I am using the LED as a visual indicator to tell me the program on the cRIO is running.

 

I have set up the cRIO and TPC-2106 with the following Network Settings:

 

cRIO:

IP Address – 192.168.1.65

Subnet – 255.255.255.0

Gateway – 192.168.1.66

 

TPC-2106:

IP Address – 192.168.1.66

Subnet – 255.255.255.0

Gateway – 192.168.1.65

 

I entered the network settings on the TPC-2106 then went to Run > regsave to save the Registry.  When I perform a soft reboot, the TPC-2106 loads the network settings and I can read/write to my shared variables.  If you go to start > Programs > Configuration Utility on the TPC-2106 you can see the Network information.  After the soft reboot the IP address and subnet mask both read what I have listed above.

 

When I cut the 24 VDC power supply off, then turn it back on again, the cRIO boots up and begins running its program just fine.  However, the TPC-2106 does not load the network settings.  When I go back to the Configuration Utility, under the Network tab, the IP address and subnet mask read 0.0.0.0.

 

On the back of the TPC-2106 there is an on/off switch.  If I turn this switch off then back on again, the TPC-2106 reboots and loads the correct network settings and my shared variables begin working flawlessly again.

 

Any advice on how to get the network settings to load when I cycle the 24 VDC power on/off to the TPC-2106 would be much appreciated.

 

Thanks in advance.  Sorry for the lengthy post - just trying to cover as much info as possible.

0 Kudos
Message 1 of 7
(5,674 Views)

Hi CWT,

 

I'll have to locate a TPC-2106 to see if it can be replicated, but you may be able to get away with a startup batch file.  The batch file can use the "netsh" command to configure the network settings on boot.  Just place the batch file in the startup folder so that it will run everytime you reboot the 2106.

0 Kudos
Message 2 of 7
(5,658 Views)

Thanks for the reply Kyle.  I will try the batch file and see if I can get that to work.

 

Also, if you try to recreate this with your own TPC-2106 please take this into consideration.  When I cycle power to the device, Windows CE DOES save my static IP address settings (i.e. after turning power on, I can go to network settings and see that the "Specify an IP address" is selected, and my IP address, subnet mask, and gateway have all been saved).  However, these are not loaded because when I go to the Configuration Utility, under the Network tab the IP address and Subnet mask are 0.0.0.0.  It is not until I do a soft reboot, do the saved IP settings load.  Is this normal?

 

Regards,

 

Cory

 

 

0 Kudos
Message 3 of 7
(5,650 Views)

I tried creating a batch file with the netsh command and placed it in the startup folder. I rebooted the TPC and it ran the .bat file; however, it did not change the IP settings.

 

Here is the text of that file.  The file was saved as "netsh.bat".

 

netsh interface ip set address name="smsc91181" source=static addr=192.168.1.66 mask=255.255.255.0
netsh interface ip set address name="smsc91181" gateway=192.168.1.65 gwmetric=0

 

 

 

I then went into the MS-DOS command prompt and entered the following commands and received the same response everytime.

 

1) netsh interface ip set address name="smsc91181" source=static addr=192.168.1.66 mask=255.255.255.0 <enter>

response: Cannont execute netsh.exe.

 

2) netsh <enter>

response: Cannont execute netsh.exe.

 

3) netsh ? <enter>

response: Cannont execute netsh.exe.

 

Any thoughts???

 

Thanks,

Cory

0 Kudos
Message 4 of 7
(5,648 Views)

Hi CWT, 

 

netsh probably isn't available in Windows CE.  I'll try to get a 2106 to test this.

0 Kudos
Message 5 of 7
(5,646 Views)

UPDATE:

 

I have performed the following steps and have listed the results below:

1.) Load Registry Defaults - I did this and it said I have to reboot before any changes could be made, so selected OK to reboot.
2.) Save registry - After rebooting, I went to Run and entered regsave to save the registry.
3.) Soft reboot (reboot button on the Misc Tab of the Configurator) - I then did this step.
4.) Set custom IP - After the reboot, I went to the Network Connections folder and entered my custom IP settings on SMSC91181.
5.) Save registry - I then went to Run and entered regsave again.
6.) Soft Reboot (reboot button on the Misc Tab of the Configurator) - I did this step next.
7.) Check if the National Instruments Configurator has the new IP settings - The NI Configurator had the new IP settings loaded immediately after performing the soft reboot.
8.) Soft Reboot (switch on back of test panel.) - I turned the switch to the off position for ~ 5 seconds then back on again.
9.) Check if the National Instruments Configurator has the new IP settings - The NI Configurator had the new IP settings loaded immediately after performing the soft reboot with the switch on the back of the TPC.
10.) Hard Reboot - I cut all power to the TPC for ~ 5 seconds then turned the power back on.
11.) Check if the National Instruments Configurator has the new IP settings - The NI Configurator loads the default 0.0.0.0 IP settings initially, but after 3 minutes and 8 seconds, it loads the custom IP settings.  I have performed this hard reboot 10 times to check for consistency and repeatability.  After every hard reboot, the TPC takes 3 minutes to load the custom IP settings.  Below are some additional tests I ran to try and troubleshoot this.

    a) I unplugged the crossover cable from the TPC and performed a hard reboot. - The network settings defaulted to 0.0.0.0 and the custom IP settings never loaded. When I plugged the crossover cable back into the TPC from the cRIO, the custom IP settings never loaded until either a soft or hard reboot was performed.
    b) I plugged the TPC into a Netgear ProSafe 16 Port 10/100 Switch (FS116) which was also plugged into our network and my laptop. - The TPC loaded the custom IP settings immediately.
    c) The cRIO has a No App setting that I turned on such that my RT program did not load after performing the hard reboot. - I performed the hard reboot and the TPC loaded the default IP settings and then after 3 minutes, the custom IP settings loaded. 

 

A 3 minute delay is not exactly where I want to be, so if anyone has any advice on what to do next I would greatly appreciate it.  I have included an image below to give you a better idea of how my system is set up.

Regards,
Cory


System - labeled.JPG

0 Kudos
Message 6 of 7
(5,557 Views)
Solution
Accepted by topic author CWT

Cory,

 

You can fix this issue by going to the registry of your Touch Panel and changing the HKEY_LOCAL_MACHINE\Comm\SMSC91181\Parms\LinkMode key from 7F to 72. Then, Disable and Renable the Ethernet Adapter. This will set the ethernet port to be Full Duplex and should clear up your network issue.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Message 7 of 7
(5,414 Views)