Difference between revisions of "IP Address"

From SoftMC-Wiki
Jump to: navigation, search
(Syntax correction)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
 
There are three ways to define the IP address of softMC:
 
There are three ways to define the IP address of softMC:
 +
* DHCP - the recommended method
 
* Fixed IP address
 
* Fixed IP address
* DHCP - the recommended method
 
 
* Manual IP address - assigned by ControlStudio.
 
* Manual IP address - assigned by ControlStudio.
  
Line 46: Line 46:
  
 
Note that in the eth0 section, '''inet addr''' will show your MC's current IP address, and not '''10.4.20.210''' as in the example above.
 
Note that in the eth0 section, '''inet addr''' will show your MC's current IP address, and not '''10.4.20.210''' as in the example above.
 +
 +
= Getting the IP Address from DHCP Server =
 +
 +
{{Note| Host PC and SoftMC must get IP address from the same DHCP server, that is, reside at the same IP subnet }}
 +
 +
 +
'''Creating FWCONFIG File'''
 +
 +
Create FWCONFIG using Nano with the following content:
 +
 +
<pre>
 +
ipaddressmask dhcp
 +
sleep 20
 +
ramdisksize=64 mByte
 +
StringPreload=30000
 +
</pre>
 +
 +
For more information on setting up the FWCONFIG file, refer to: [[Debugging_softMC_Firmware_Linux#FWCONFIG | FWCONFIG syntax]]
 +
 +
Now you can reset the MC and it will boot up with the IP address from DHCP pool.
  
 
= Setting the Permanent Default IP Address =
 
= Setting the Permanent Default IP Address =
Line 75: Line 95:
  
 
Now you can reset the MC and it will boot up with the permanent IP address you chose.
 
Now you can reset the MC and it will boot up with the permanent IP address you chose.
 
= Getting the IP Address from DHCP Server =
 
 
{{Note| Host PC and SoftMC must get IP address from the same DHCP server, that is, reside at the same IP subnet }}
 
 
 
'''Creating FWCONFIG File'''
 
 
Create FWCONFIG using Nano with the following content:
 
 
<pre>
 
ipaddressmask dhcp
 
sleep 20
 
ramdisksize=64 mByte
 
StringPreload=30000
 
</pre>
 
 
For more information on setting up the FWCONFIG file, refer to: [[Debugging_softMC_Firmware_Linux#FWCONFIG | FWCONFIG syntax]]
 
 
Now you can reset the MC and it will boot up with the IP address from DHCP pool.
 
  
 
= Assign Manual IP Address via ControlStudio =
 
= Assign Manual IP Address via ControlStudio =

Revision as of 06:40, 1 September 2014

Introduction

There are three ways to define the IP address of softMC:

  • DHCP - the recommended method
  • Fixed IP address
  • Manual IP address - assigned by ControlStudio.


Cable Connections

Two connections are needed:

Serial:

  • Connect the MC COM1 serial port to the PC serial port using a serial cable.

Ethernet

  • Connect the MC Ethernet port 1 (LAN) to the network to which the PC is connected (or connect directly to the PC using a cross-cable)

Serial Communication Parameters

Open any serial console program. Putty, for example, can be downloaded from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
Configure the serial port with the following parameters and click 'open':

Putty Config0.JPG

Putty Config1.JPG

Connecting to Motion Controller

Once the communication parameters are set and the serial cable is connected between MC and PC, turn on the MC.

On the serial console screen you will see the boot printouts. After MC boot is complete, type:

/sbin/ifconfig

Putty Config2 1.JPG

You will see:

Putty Config3 1.JPG

Note that in the eth0 section, inet addr will show your MC's current IP address, and not 10.4.20.210 as in the example above.

Getting the IP Address from DHCP Server

NOTE-Info.svgNOTE
Host PC and SoftMC must get IP address from the same DHCP server, that is, reside at the same IP subnet


Creating FWCONFIG File

Create FWCONFIG using Nano with the following content:

ipaddressmask dhcp
sleep 20
ramdisksize=64 mByte
StringPreload=30000

For more information on setting up the FWCONFIG file, refer to: FWCONFIG syntax

Now you can reset the MC and it will boot up with the IP address from DHCP pool.

Setting the Permanent Default IP Address

The following steps describe how to set the fixed IP address.
Fixed IP address can be later changed from application or CONFIG.PRG, with the command SYS.IPADDRESSMASK

NOTE-Info.svgNOTE
Your PC must have an IP address in the same address space as you are assigning to the MC


Creating FWCONFIG File
Fixed IP Address is set in FWCONFIG file.
FWCONFIG can be created or edited with built-in text editor over serial (RS232) connection.
Type in the command line (case sensitive!):
nano /FFS0/FWCONFIG
Enter the text as it appears in the example with the following content:

ipaddressmask aaa.bbb.ccc.ddd:eee.fff.ggg.hhh
sleep 20
ramdisksize=64 mByte
StringPreload=30000

Putty Config7.JPG

Where aaa.bbb.ccc.ddd:eee.fff.ggg.hhh holds the permanent IP address and subnet mask you want to assign to the MC.
For more details on the FWCONFIG file refer to: FWCONFIG syntax

After you are done typing the text click ctrl+x. The lower menu bar will change, prompting you to save the new file.
Click y. Nano will save the file and exit back to the command line:

Putty Config8.JPG

Now you can reset the MC and it will boot up with the permanent IP address you chose.

Assign Manual IP Address via ControlStudio

Start the ControlStudio. Open the 'Settings' Tab. Under 'Controller Monitor' Set 'TCP/IP Connection' to 'Manual IP'

Putty Config4.JPG

At this point ControlStudio sends a broadcast over the network, looking for softMC's that are present. Those who don't have an IP address yet are assigned an IP from the 'IP Pool' file.

NOTE-Info.svgNOTE
IP pool file shall contain a list of IP addresses that are explicitly excluded from the DHCP range by network administrator and shall be used exclusively by SoftMCs. Host PC IP address shall be in the same subnet as addresses in ControlStudio IP pool

Open the 'Controller Monitor' Tab. All the softMC controllers that are present in the network will appear in the list, with the manual IP address that was assigned to to them.

Putty Config5.JPG

You can choose a softMC controller and connect to it by double clicking the controller's name.

Putty Config6.JPG