Device Mapping
The Device Mapping dialog (see FIG. 148 on page 77) allows you to map files to System devices for file transfers. To access this dialog, select a System (in the Workspace tab of the Workspace Bar) and select Project > Device Mapping. Alternatively, use the Device Mapping command in the Source File, User Interface, and IR File context menus, or use the toolbar button.
Also, every time you select a file (to send or receive) via the Select Files For File Transfer dialog (Other tab), the program prompts you to enter (or verify) its device mapping information, in the Enter Device Mapping Information dialog. Use this dialog to define the Device:Port:System (D:P:S) address assignment for a target device as described in the
Creating Device Mapping
Assignments section on page 76
.
Device:Port:System (D:P:S)
A device is any hardware component that can be connected to the NetLinx bus. Each device must be assigned a unique number to locate that device on the bus. The NetLinx language allows numbers in the range 0-32767. Device 0 refers to the master; numbers above 32767 are reserved for internal use.
NetLinx requires a Device:Port:System (D:P:S) specification. The D:P:S triplet can be expressed as series of constants, as variables separated by colons, or as a DEV structure, to explicitly represent a device number, port, and system.
Here's the syntax:
DEVICE:PORT:SYSTEM
where:
- Device: 16-bit integer representing the device number
- Port: 16-bit integer representing the port number (in the range 1 through the number of ports on the device)
- System: 16-bit integer representing the system number (0 = this system) that the device belongs to. For example, 128:1:0 represents the first port on device 128 on this system.
DEV structure example: STRUCTURE DEV
{
INTEGER Number // device number INTEGER Port // port on device
INTEGER System // system device belongs to
}
Creating Device Mapping Assignments
- Right-click on a Source, User Interface or IR system file (in the Workspace tab of the Workspace Bar) and select Device Mapping from the system file context menu (FIG. 147).
FIG. 147 System File context menu - Device Mapping
- You can also access the Device Mapping command via the Project Toolbar as well as Source File, User Interface, and IR File context menus.
- The Device Mapping option is only available for Source files if the selected file is not designated as the Master Source Code file.
This selection opens the Device Mapping dialog. Use this dialog to map files to System devices for file transfers (FIG. 148).
FIG. 148 Device Mapping dialog
- In the Device Mapping dialog, select a System from the File View window (if different than the System already selected). The File View window presents a view of the Projects, Systems, and System Files contained in the open Workspace file in a tree structure similar to the one displayed in the Workspace tab of the Workspace Bar.
- Double-click the Project folders to show the System folders.
- Double-click to expand the System folders to show the System File folders (Source, User Interface, and IR only, since these are the only file types that can mapped).
- Double-click these folders to view the System files.
- Select the file you want to map.
- In the Device View window, select the target device for the selected file from the list of devices. The device list is based on the DEFINE_DEVICE section of the selected System's Master Source Code file, with their associated device numbers. There is also a <Custom> listing, which allows you to specify a D:P:S assignment other than what is specified within the Master Source Code file.
- Files can be mapped to multiple devices (Ctrl + click to select multiple devices).
- To map to a device that is not specified in the Master Source Code file, select <Custom>, and enter the device's D:P:S assignment in the Enter DPS dialog (FIG. 149).
FIG. 149 Enter DPS dialog
NOTE: The System's Master Source f ile will always be mapped automatically to 0:1:0 for NetLinx Masters.
- Click the Map button to map the selected file(s) to the selected device.
Once a file has been mapped to a device, the mapping assignment is indicated in the File View window of the Device Mapping dialog (FIG. 150).
FIG. 150 Device Mapping dialog indicating a mapping assignment for the UI file "1500VG"
Note that the mapping assignment is also indicated in the Workspace tab of the Workspace Bar (FIG. 151).
FIG. 151 Device Mapping dialog indicating a mapping assignment for the UI file "1500VG"
The file mapping information is saved with the Workspace file, and this association is maintained until the mapping information is removed (via the Remove option in the Device Mapping dialog, or the Delete command in the System File Device Map context menu.
NOTE: Workspace mappings are only updated when the source code f ile is saved.
Removing Device Mapping Information
- Select a device-mapping icon in the File View window of the Device Mapping dialog.
- Click the Remove button.
Viewing Offline Device Mapping Information in the Online Tree
Use the Show Device Mappings option in the Online Tree Context Menu to display device mapping information for devices that are defined in the Source Code, but are not presently on the network:
- In the Online Tree tab of the Workspace Bar, click Display to open the Online Tree context menu.
- Select Show Device Mappings. Any devices that are defined in the Source Code with device mapping information are listed beneath the online devices, under the heading Coded Devices Not Shown Online.
Editing Device Mapping Information
- In the File Transfer dialog, select a file in the Transfer List (either tab).
- Click Edit and select Device Mapping to open the Enter DPS dialog.
Enter the Device:Port:System (D:P:S) information for the selected file. See the
Device:Port:System (D:P:S) section on page 76
for details.
- Click OK to save the D:P:S assignment and close the dialog.