Configuring the DeviceNet system

DeviceNet® devices are created under the I/O node via CreateChild. DeviceNet® boxes can be created under a DeviceNet® master; these boxes, in turn, contain process image variables on their input and output nodes. The SubType determines the device. Variables are created with their data type as vInfo parameters.

Requirements

C# sample

The DeviceNet® configuration has a hierarchical set-up. The master is created under the I/O node TIID, the box under the master, and the process variables under the box’s Inputs and Outputs nodes. When using CreateChild for a variable, the data type is passed as the fourth parameter, vInfo.

ITcSmTreeItem devices = sysManager.LookupTreeItem("TIID");

// Create DeviceNet master (SubType 88 = EL6752)
ITcSmTreeItem dnMaster = devices.CreateChild("Device 4 (EL6752)", 88);

// Create DeviceNet box under master (SubType 5203)
ITcSmTreeItem dnBox = dnMaster.CreateChild("Box 11 (EL6752-0010)", 5203, "", "");

// Add variables to the box process image
ITcSmTreeItem inputVars = sysManager.LookupTreeItem(
    @"TIID^Device 4 (EL6752)^Box 11 (EL6752-0010)^Inputs");
inputVars.CreateChild("TestVar1", 0, null, "BIT");
inputVars.CreateChild("TestVar2", 0, null, "BOOL");

PowerShell sample

$devices = $sysManager.LookupTreeItem("TIID")

# Create DeviceNet master (SubType 88 = EL6752)
$dnMaster = $devices.CreateChild("Device 4 (EL6752)", 88, $null, $null)

# Create DeviceNet box under master (SubType 5203)
$dnBox = $dnMaster.CreateChild("Box 11 (EL6752-0010)", 5203, "", "")

# Add variables to the box process image
$inputVars = $sysManager.LookupTreeItem("TIID^Device 4 (EL6752)^Box 11 (EL6752-0010)^Inputs")
$inputVars.CreateChild("TestVar1", 0, $null, "BIT")
$inputVars.CreateChild("TestVar2", 0, $null, "BOOL")

SubType overview

Device

SubType

DeviceNet master EL6752 EtherCAT

88

DeviceNet slave EL6752-0010 EtherCAT

99

DeviceNet master FC52xx PCI

41

DeviceNet slave FC52xx PCI

62

DeviceNet master CX1500-M520 PC104

73

DeviceNet slave CX1500-B520 PC104

74

DeviceNet® monitor FC52xx PCI™

59

Configuring the DeviceNet system 1:

The data type of a variable is passed as the fourth parameter vInfo to CreateChild, for example "BIT", "BOOL", or "INT". If a device is missing from this list, the SubType can be determined from the XML description of an existing Tree Item.