Class: DNSettings

DNSettings

Provides properties for configuring DeviceNet


Members


baud :number

Gets/sets the baud rate used for CAN. Valid baud rates are 125, 250, and 500.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 125

deviceName :string

The name of the device that will appear in the identity object

Type:
  • string
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • uPDevice

deviceType :number

The type of the device that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0x0000

inputSize :number

The size of the input area in the IO memory map (server-centric)

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0
See:

mac :number

Gets/sets the MAC address that will be used on DeviceNet. Range is 0-63.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 63

mmap :string

Gets/sets the xml description of the memory map. When dn.DN#load is called, this description is used to create an object tree that can be used to directly access the attributes from JavaScript.

This is typically set using AJAX to retrieve an xml memory map file.

Type:
  • string
Since:
  • 1.0 (WAT 1.0)
Example
var $dn = $wat.load('dn')[0];

function initDN(mmap)
{
   $dn.settings.mmap = mmap;
   // set up the other eip settings here

   if ($dn.load() == false)
   {
      alert("Failed to load DN memory map");
      return;
   }
}

// called after the page loads, for example in the body onload
function getXML()
{
   xmlhttp = new XMLHttpRequest();
   xmlhttp.open("GET", "dn.xml", true);
   xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState==4) {
         initDN(xmlhttp.responseText);
      }
   }
   xmlhttp.send("");
}

mmapFile :string

The name of a file in the file system of the uP device (e.g. /wat/mmap.xml) to read the memory map from if mmap is empty when dn.DN#load is called.

It is often more convenient to use AJAX and mmap to load a memory map.

Type:
  • string
Since:
  • 1.0 (WAT 1.0)
See:

outputSize :number

The size of the output area in the IO memory map (server-centric)

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0
See:

productCode :number

The product code that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0x0001

serialNumber :number

The serial number that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0

vendorId :number

The vendor ID that will appear in the identity object

Type:
  • number
Since:
  • 1.0 (WAT 1.0)
Default Value:
  • 0x0032