N5 CANopen Online Manual V2.0.0

Configuration via Ethernet

Overview

Interface

The controller is equipped with a 10/100 MBit Ethernet interface on connector X1. It can thereby be operated with all common Ethernet components (switches, PCs) and configured via the NanoIP web interface or the Plug & Drive Studio software.

Hardware address

The controller initially has no IP address, but is instead addressed via the printed hardware address (MAC address). This address consists of 6 hexadecimal numbers in form44-AA-E8-xx-xx-xx.

The hardware address is unique and unchangeable and is assigned during production. In general, this is only needed during a firmware update. As soon as the boot loader has ended and the actual firmware begins to operate, subsequent communication takes place via the TCP/IP protocol.

IP address

The controller needs a valid IP address. This can be obtained in the following ways:

  • DHCP: A DHCP server assigns the IP address to the controller (default setting).
  • AutoIP: The controller automatically determines a suitable IP address. The prerequisite here is that the communication partners are in the same physical subnet and also use AutoIP.
  • Static IP address: This is defined by the user.

Which method is used depends on the network environment and is defined by the network administrator.

The IP address can be determined most easily using the ping tool. To do this, the NetBIOS service must be activated on the PC and the MAC address of the controller must be known.

Example

If controller with MAC address 44:AA:E8:00:02:9F is to be addressed, the tool is called in a shell or command line using:

ping MAC-44AAE800029F

Establishing connection with the controller

Setting the IP address

Each of the connected devices (controller and communication partners) in an Ethernet network or with a point-to-point Ethernet connection requires a unique IP address. This can either be obtained automatically (DHCP) or generated (Auto-IP) or assigned statically. In the following, "communication partner" refers to a PC or laptop.

You can integrate the controller in an existing Ethernet network. To do this, you only need to establish the physical connection with a standard Ethernet cable. Provided DHCP and UPnP are activated on the controller (factory setting), the controller is also automatically detected on the network and can immediately be operated via a PC located on the network.

Setting DHCP/Auto-IP

IP addresses can be obtained dynamically in a network from a DHCP server or, for example, in the case of a PC direct connection, can be automatically self-generated without DHCP by the two communication devices (e.g., PC and controller). DHCP and UPnP are preset in the controller at the factory for automatically obtaining an IP address from a DHPC server or for automatic IP address generation. To establish the connection to the controller, it may only be necessary to make a few settings on the communication partner (e.g., PC or laptop). Settings using the Windows 7 operating system as an example:

  1. Press the Windows Start button and select Control Panel.
  2. Select Network and Sharing Center.
  3. Select Change adapter settings.
  4. A list of the available network adapters is displayed. Open the properties on the adapter to which the controller is connected (e.g., click with the right mouse button).
  5. Select Internet Protocol version 4 (TCP/IPv4) and press the Properties button.
  6. Select the Obtain an IP address automatically option.
  7. Confirm acceptance of the entries with the OK button.

For the communication partner to automatically detect the controller in the entire network or for a point-to-point connection (PC direct connection), network discovery must be switched on and the UPnP service must be started on the communication partner (e.g., PC or laptop). No further settings are necessary on the controller. Settings using the Windows 7 operating system as an example:
  1. Switching on network discovery:
    1. Press the Windows Start button and select Control Panel.
    2. Select Network and Sharing Center.
    3. Select Change advanced sharing settings.
    4. Open the Public section.
    5. Under Network discovery, select the Turn on network discovery option.

  2. Activating the UPnP service:
    1. Press the Windows Start button and then right-click on Computer and select Manage.
    2. Open the Services and Applications node and select Services.
    3. Double-click the UPnP device host service to open.
    4. As Startup type, select Automatic and press the Start button.
    5. Confirm acceptance of the entries with the OK button.

Setting a static IP address

If static addresses are to be assigned to the controller and the communication partner, just a few settings need to be performed on the controller and the communication partner.

The controller can be assigned a static IP address and network mask (each IPv4) through OD entries. The following entries are relevant in the object dictionary:

Index Description
2010h

IP configuration, bit mask with the following meaning:

Bit 0: A static IP address from object 2011h and the network mask from object 2012h are used.

2011h Static IP address, 4 bytes in hex coding
2012h Static IP subnet mask, 4 bytes in hex coding
2014h Active IP address, 4 bytes in hex coding
2015h Active IP subnet mask, 4 bytes in hex coding
6503h Drive catalogue number / MAC address

Notes:

  • If DHCP was activated and Auto-IP is not active, the controller uses the set static IP address if no address could be assigned via DHCP (e.g., because the DHCP service is temporarily unavailable).
  • If both objects 2010h and 2011h are set to the value "0", an incorrect configuration is assumed and DHCP, UPnP and Auto-IP are switched on.
  • If bit 0 is set in object 2010h, the static IP address is used. DHCP and Auto-IP are not used in this case.
  • If DHCP and Auto-IP are activated simultaneously, DHCP is used first to try and obtain an address. If this does not function, Auto-IP is executed.
  • If only DHCP is switched on and an IP address assignment did not function, an attempt is made independent of bit 0 to connect using the entered static IP address.
A static IP address is also assigned to the communication partner. Settings using the Windows 7 operating system as an example:
  1. Press the Windows Start button and select Control Panel.
  2. Select Network and Sharing Center.
  3. Select Change adapter settings.
  4. A list of the available network adapters is displayed. Open the properties on the adapter with which the controller is connected (e.g., right-mouse click and select Properties).
  5. Select Internet Protocol version 4 (TCP/IPv4) and press the Properties button.
  6. Select the Use the following IP address: option and enter the desired IP address and network mask in the IP address field.
  7. Confirm acceptance of the entries with the OK button.

REST web services

Introduction

The protocol used by the the web server is HTTP/1.0. The architecture here is realized according to REST (Representational State Transfer) which, in addition to access to the NanoIP web interface, also offers the possibility to access objects/resources. The values in the object dictionary are an example of this.

The operations supported here are:

  • GET: Request a resource
  • POST: Add a new resource
  • PUT: Create or change a new resource
  • DELETE: Delete a resource

Resource names

The name of a resource is always specified in the URI (Uniform Resource Identifier) notation familiar from the Internet. Via this URI, the controller supports access to the file system and the object dictionary. The identifiers for this are:

  • Od: Object dictionary
  • Fs: File system

Example

Accessing a value in the object dictionary:

GET /od/6040/00 HTTP/1.0

This string is used to access entry 6040h subindex 00h in the object dictionary.

The reply is made as a JSON string and reflects the content of this object:

HTTP/1.0 200 OK

Server: uip/1.0

Cache-Control: no-cache, no-store, private

Content-type: application/json

"0006"

Writing a value to the object dictionary:

POST /od/6040/00 HTTP/1.0

Content-Type: application/x-www-form-urlencoded

Form item: ""000F"" = ""(Key: "000F", Value:)

This string is used to write value "15(0Fh)" to object 6040h subindex 00h.

The controller receives confirmation with status code 200 OK:

HTTP/1.0 200 OK

Server: uip/1.0

Accessing the file system

The following URIs enable access to the file system:

<IP address>/fs
Lists the root directory.
<IP address>/fs/dir
Lists the subdirectory.
<IP address>/fs/dir/file.xxx
Requests file "file.xxx" from directory "dir".

Files are uploaded with the PUT command, GET is used to download and DELETE is used to delete.

Note: Deleting files may place the controller in a non-functional state.

Accessing the object dictionary

The following URIs enable access to the object dictionary:

<IP address>/od/xxxx/yy
Requests entry xxxx subindex yy from the object dictionary.
<IP address>/od/xxxx/Data
Requests entry xxxx with all subindices.

Example

Accessing a value in the object dictionary:

http://192.168.2.100/od/6040/00

This string is used to access entry 6040h subindex 00h in the object dictionary.

The reply is made as a JSON string and reflects the content of this object.

NanoIP

General

The controller is equipped with an integrated web server (NanoIP) that can be queried with a web browser. With NanoIP, the controller can be configured and parameterized, including access to the internal file system for loading sequence programs (NanoJ programs).

Note:

There are no guaranteed execution and response times when accessing the web server of the controller.

In extreme cases, these may vary by several seconds. Access via a web server is therefore not suited for directly controlling the motor and should only be used for commissioning/diagnosis or troubleshooting.

Starting NanoIP

  1. Connect controller (connector X1) and PC.
  2. Connect voltage supply to connector X6 of the controller.
  3. Wait until the boot process of the controller has concluded (LED L1 flashes once per second).
  4. The controller is depicted in the network area of Windows Explorer after the scan operation (naming convention is "N5-44AAE8" followed by 6 hexadecimal digits, e.g., "N5-44AAE8123456"). Network discovery and the UPnP service must be activated. Double-click to open the NanoIP web server in the web browser.

Parameter input

  1. Start the NanoIP web server.
  2. Select the OBJECT DICTIONARY menu item.
  3. Enter all values in the corresponding objects.
  4. Use the Download settings button to transfer the values to the controller.
  5. Select the SETUP->Configuration menu item
  6. Use the Save Complete Configuration button to permanently save the values in the controller.
▶   next

Contents