NetLinxStudio.OperationReferenceGuide (1) - 副本
NetLinxStudio.OperationReferenceGuide (1) - 副本
NetLinxStudio.OperationReferenceGuide (1) - 副本
NetLinx Studio
S of t w ar e D e s i g n T o ol s
This Agreement replaces and supersedes all previous AMX Software License Agreements and is governed by the laws of the State of Texas, and all disputes will be resolved in the courts in Collin County, Texas, USA. For any questions concerning this Agreement, or to contact AMX for any reason, please write: AMX License and Warranty Department, 3000 Research Drive, Richardson, TX 75082.
Table of Contents
Table of Contents
NetLinx Studio (v3.3 or higher) ..........................................................................1
Overview .................................................................................................................. 1 Supported OSs and Minimum PC Requirements....................................................... 2
Supported Operating Systems ........................................................................................ 2 Supported OS Languages ............................................................................................... 2 PC Requirements:............................................................................................................ 2 Networking Requirements .............................................................................................. 2 Other PC Requirements .................................................................................................. 2 Supported File Types ...................................................................................................... 3 MVP-5200i USB Driver .................................................................................................... 3 What's New Dialog ......................................................................................................... 4 WebUpdate..................................................................................................................... 4 AMX-PI (Product Information) ......................................................................................... 4 DIP Switch 2.0 ................................................................................................................. 4
Output Bar.............................................................................................................. 15
Output Bar Context Menu............................................................................................. 16
Table of Contents
File Transfer Tab Context Menu .................................................................................... 16 Output Bar - Notifications Tab ...................................................................................... 17 Output Bar - Diagnostics Tab ........................................................................................ 17
Watch Window........................................................................................................ 19
Watch Window Context Menu ...................................................................................... 19
Building the Workspace .......................................................................................... 29 Opening Workspace Files ....................................................................................... 29 Creating a New (Empty) Workspace ....................................................................... 29 Adding a Project to the Workspace ........................................................................ 29
Importing Projects Into a Workspace ............................................................................ 29
Deleting a Project From The Workspace ................................................................ 30 Saving The Workspace............................................................................................ 30 Exporting Workspace Files For Distribution ........................................................... 31
Importing Exported ("To Go") Workspace Files............................................................ 32
Deleting a System From A Project .......................................................................... 39 Building the Project ................................................................................................ 39 Viewing And Editing Project Properties ................................................................. 40
Project Folder Context Menu ........................................................................................ 40
ii
Table of Contents
Deleting a System From A Project.......................................................................... 45 System Status: Active vs. Inactive ........................................................................... 45
Designating The Active System..................................................................................... 45
iii
Table of Contents
Adding an Existing Include File To a System ................................................................. 68 Include File Folder Context Menu ................................................................................. 69 Include File Context Menu ............................................................................................ 69
File Extraction......................................................................................................... 81
SRC File Extraction ........................................................................................................ 81 ZIP File Extraction ......................................................................................................... 82
iv
Table of Contents
Programming ....................................................................................................87
Source Code Editor ................................................................................................ 87 Source Code Editor Windows ................................................................................. 87
Source Code Editor Context Menu ............................................................................... 88 Regular Expressions ...................................................................................................... 89 Regular Expression Special Characters.......................................................................... 89 Cut, Copy And Paste ..................................................................................................... 90 Undo/Redo.................................................................................................................... 90 Call Tips......................................................................................................................... 90 Case Inversion ............................................................................................................... 90 Code Folding................................................................................................................. 91 Syntax Highlighting....................................................................................................... 91 Default Syntax Highlighting Colors ............................................................................... 92 Insert Section ................................................................................................................ 93 Goto Section ................................................................................................................. 94 Goto Line ...................................................................................................................... 94 Goto Function Or Subroutine........................................................................................ 94 Block Comment - Uncomment....................................................................................... 95 Clipboard Text Buffer ................................................................................................... 95 Using The Clipboard Text Buffer................................................................................... 95 Find Matching Brace ..................................................................................................... 96 Renumber Selection ...................................................................................................... 96 Show Whitespace .......................................................................................................... 96 Show End Of Line.......................................................................................................... 96 Rescan Current Source File ........................................................................................... 96 AutoComplete and AutoSuggest .................................................................................. 96 Advanced Editor Commands......................................................................................... 97 Importing/Exporting Editor Preferences ....................................................................... 98
Table of Contents
Code Wizard Dialog - Send Command Tab ................................................................. 108 Code Wizard Dialog - IR Constant Tab ........................................................................ 109
vi
Table of Contents
Setting NetLinx Time and Date............................................................................. 131 Rebooting the Master Controller.......................................................................... 132 Connecting To an Axcess Master .......................................................................... 133 Terminal and Telnet Sessions................................................................................ 133
Terminal Window ........................................................................................................ 133 Terminal Window Context Menu................................................................................. 134 Using The Terminal Window........................................................................................ 134 Telnet Window ............................................................................................................ 134 Using the Telnet Window ............................................................................................ 135
Diagnostics .....................................................................................................137
Overview .............................................................................................................. 137 NetLinx Internal Diagnostics Messages ................................................................ 137
Buffering of the Notification and Diagnostic Tabs ...................................................... 137
NetLinx Device Emulation..................................................................................... 140 NetLinx Device Control......................................................................................... 142 NetLinx Device Addressing................................................................................... 143
Changing The Device/System Address On A NetLinx Device ..................................... 144 Restoring The Default Device and System Numbers On A NetLinx Device................. 144
ID Mode................................................................................................................ 145
Using ID Mode To Change The Device Address On a NetLinx Device ........................ 145
vii
Table of Contents
Debug .............................................................................................................151
Debugging Source Code Files .............................................................................. 151 Master Controller Debug Options ........................................................................ 151 Entering Debug Mode .......................................................................................... 152 Using Single-Step Mode ....................................................................................... 152 Changing the Value of a Watched Variable .......................................................... 152 Debug Mode Error Messages ............................................................................... 153 Using Current Length with Total Length Disabled ................................................ 153 Using Breakpoints (NetLinx Only) ......................................................................... 154
Setting A Breakpoint................................................................................................... 154 Clearing Breakpoints ................................................................................................... 154 Editing Breakpoints ..................................................................................................... 154
viii
Table of Contents
ix
Table of Contents
Cancelling File Transfers.............................................................................................. 189 Transfer Errors And Definitions ................................................................................... 189
Master Network Addressing ................................................................................. 203 Configuring the Default Communications Settings ............................................... 204 Configuring Terminal Communications Settings ................................................... 204 Configuring System-Level Communications Settings ............................................ 205 Defining a New TCP/IP Address ........................................................................... 206
Editing a TCP/IP Address ............................................................................................ 207 Deleting a TCP/IP Address .......................................................................................... 207
Table of Contents
Preferences Dialog - NetLinx Compiler Tab.......................................................... 211 Preferences Dialog - Editor - Display and Indentions Tab..................................... 213
Display Options........................................................................................................... 213 Tabs and Indentation Preferences............................................................................... 214 Printer Options............................................................................................................ 214 Clipboard Text Buffer Options .................................................................................... 215
Preferences Dialog - General Tab ......................................................................... 219 Preferences Dialog - Terminal - Telnet Windows Tab ........................................... 220
Terminal Input/Output Options .................................................................................. 220 Terminal Windows Colors Options ............................................................................. 220
Preferences Dialog - File Transfer Tab .................................................................. 221 Preferences Dialog - Diagnostics Tab ................................................................... 222
Notification/Diagnostics View Options ....................................................................... 222 Buffer File Options ...................................................................................................... 222 Diagnostics and Notifications Output Displays Options.............................................. 223
xi
Table of Contents
xii
Beyond creating, editing and compiling source code in two programming languages (Axcess and NetLinx), NetLinx Studio makes it easy to manage all of the files associated with an entire control system (i.e. Master Source Code/Source Code (.AXS), Include (*.AXI) files, Module (.AXS or .JAR) files, IR (*.IRL/*.IRV) files, User Interface (.TPD, .TP4, .KPD), and Other (any file type) files) into one centralized location, as a System. To maintain multiple systems, one or more Systems can be organized within a larger Project. A Project can contain as many Systems as are required for a job. The Workspace Bar organizes and displays all of these Project and System files in a logical hierarchical tree structure. To review a list of features that are new to this release, read the What's New document (opens by default on startup, or select Help > What's New to open). The on-line help program is designed to offer key information to help to learn about and use the NetLinx Studio program. Use the Table Of Contents on the left side of the help window to navigate to a particular help topic, or press the F1 key while any dialog is open to open the help topic associated with the active dialog. The Help menu also contains shortcuts to the Axcess and NetLinx Keywords help files. Each is a comprehensive listing of the commands included in each programming language. Additionally, you can view a brief description of each Axcess and/or NetLinx programming command by highlighting any reserved keyword in an open code file and pressing the F1 key. For example, highlight the reserved identifier "DO_PUSH" in a source code editor window and press F1. A help topic describing the DO_PUSH keyword opens automatically.
Use the Index and Search tabs to perform more detailed searches. Use the Browse Sequences to quickly browse related topics. Click the AMX.COM toolbar button to access the www.amx.com home page. Click the NetLinx Studio Online Help toolbar button to access an online version of this help file.
The online version of the help will always contain the most recent information, including any possible updates.
Supported OS Languages
NetLinx Studio supports operating system in the following language-specific versions: English German Spanish French Russian
PC Requirements:
1.00 GHz Processor 1 GB RAM 10 GB Free Disk Space
Networking Requirements
The PC on which NetLinx Studio is installed must have internet connectivity for the purpose of
application updates
The PC on which NetLinx Studio is installed must have either IP network connectivity or COM
port (RS-232) connectivity to the target master for the purpose of transferring system files to the control systems.
Other PC Requirements
NetLinx Studio requires Administrator privileges in order to be installed on the user's
computer.
Windows-compatible CD-ROM drive. Windows-compatible mouse (or other pointing device).
If the mouse wheel on your Microsoft IntelliMouse doesn't' work with NetLinx Studio, try downloading the latest IntelliMouse drivers from Microsoft.
The following file types are supported, but are edited using external AMX applications, as described below:
Type TPD file Associated AMX Application Extension TPDesign3 *.TPD *.TP4 *.KPD *.IRL, *.IRV
NetLinx Studio will attempt to open all other file types (*.*) using the application already associated with that file type in Windows.
1. Launch the Network Connections dialog (select Start > Programs > Accessories > Communications >
Network Connections).
2. Right-click on the Network Connection that indicates " AMX USB Device Link", and select Properties
from the context menu. This invokes the Local Area Connection Properties dialog.
3. Select Internet Protocol (TCP/IP), and click on Properties. This invokes the Internet Protocol (TCP/IP)
Properties dialog.
4. Select Use the following IP address, and enter the desired (static) IP Address and Subnet Mask for the
panel.
FIG. 2 What's New Dialog To prevent this dialog from being displayed every time the program is launched, select the Don't
WebUpdate
The AMX WebUpdate program is a stand-alone application that communicates with the AMX website, allows a user to select from a list of available AMX Software programs to choose for updating, determines the latest version of the selected applications, returns a listing of available updates, allows a user to download the selected installation files, and upon request, launches the installation of those downloads. The WebUpdate application is not installed by NetLinx Studio, and must be installed separately. If not found, NetLinx Studio will prompt you to download the application from www.amx.com.
Select Help > Web Update to launch this application. Refer to the WebUpdate on-line help for details and instructions.
Workspace Bar
Output Bar
Title Bar
Displays the name of the application, and the name of the currently active file. An asterisk (*) after the file name indicates that it contains unsaved changes.
Menu Bar
The Menu Bar is located along the top of the application window, between the title bar and the toolbars. Click on any of the main menu items to open the associated drop-down menu (FIG. 4).
If you are running NetLinx Studio in Windows 2000, NT or XP, you may have to press the ALT key to view the menu item hotkeys. The menus can be customized via options in the Preferences Dialog (Menu Tab). See the Customizing The Menus section on page 170 for details.
Toolbars
There are nine toolbars in NetLinx Studio. Hover the mouse cursor over any toolbar button (for about one second) to display a" tooltip" describing the button. Choose View > Toolbars to open the Toolbars sub-menu to view or hide the toolbars:
Standard toolbar Debug Watch toolbar Window Mgmt toolbar Edit toolbar Diagnostics toolbar Project toolbar Terminal toolbar Build toolbar Macros toolbar FIG. 5 Toolbars
Status Bar
Click View > Status Bar (or click the toolbar button) to toggle (hide/show) the Status Bar. The Status Bar displays general information, including communication status, a brief description of any option in the program, cursor location, last Push received, COM port currently being used, network IP address (NetLinx systems only) and current PC keyboard settings.
Push status Master Security status Master Connection status Keyboard Settings
Cursor Location
The elements of the Status Bar are described below, from left to right: Program Status/Quick descriptions of program options - The far-left side of the status bar displays quick descriptions of program options anytime you position the mouse cursor over a toolbar button or menu item. This field also displays the total number of replaced instances resulting from a search & replace operation. Notifications Messages Status - Displays the status of NetLinx notification messages (OFF/ON). Click this option to toggle NetLinx notification messages. Diagnostics Messages Status - Displays the status of asynchronous notification messages (OFF/ ON). Click this option to toggle Diagnostics messages. Last Push Message and History - Displays the most recently received Push (if Push is enabled via the Diagnostics > Enable Push Message Status Bar Display command), or Push status (Push Enabled/Disabled). Left-mouse click on the push message displayed to view a history of push messages. Then, right-mouse click within the list box to view the available options. Master Controller Connection Information - Displays the name and status of the active communications port. If a TCP/IP connection exists, the current IP address is displayed. If Virtual NetLinx Master is selected, then the Virtual NetLinx Master is displayed with its System number. Master Security Status - Indicates the current security status for the Master (locked = Authentication Enabled, unlocked = Authentication disabled). Cursor Location - Displays the cursor's location in the active Source Code Editor window (line and column numbers). Keyboard Settings - When a file is open (in a Source Code Editor window), the three boxes on the far-right side of the status bar indicate the status of the following keyboard settings:
OVR: Overwrite/Insert (OVR indicates that the keyboard is currently in overwrite mode - new characters will replace or overwrite existing characters in the Source Code Editor). CAP: Caps Lock (CAPS indicates that the keyboard is currently in Caps Lock mode - all letters typed will appear in upper case. NUM: Number Lock (NUM indicates that the 10-key number/arrow keypad is set to type numbers - arrow functions are disabled).
Workspace Bar
Use the Workspace Bar (FIG. 7) to manage Project files, System files and online devices. The Workspace Bar contains two tabs (Workspace and Online Tree), which display all open Workspace files (containing Projects and their associated System files), and all devices currently on-line, in a tree structure.
FIG. 7 Workspace Bar (by default, displays the Workspace tab) Click View > Workspace (or click the toolbar button) to toggle (show/hide) the Workspace Bar. Right-click inside the menu bar or menu area to display the View Control Context Menu, where you
Click on the "+" folder flags to expand the folders to expose any subfolders; click the "-" folder flags to collapse the folders. The hierarchical file structure of the Workspace tab is described below:
Workspace Folder
You can have one Workspace open at a time. A Workspace contains at least one Project, and each
Project Folders
Right-mouse click on any Project folder to open the Project Folder context menu. Expand any Project folder to display the System folder(s) contained in that Project.
System Folders
Each System has it's own platform (Axcess or NetLinx) setting along with the communication
information (i.e. IP address or COM port setting with the appropriate baud rate, etc.).
Right-mouse click on any System folder to open the System Folder context menu. Expand any System folder to display the six System File folders contained in that System (Source,
System Files
Right-mouse click on any System File to open the System File context menu associated with that
file type.
Double-click any code file (Master Source Code, Source Code, Module or Include) to open that file
(as a link) in the appropriate System File folder, based on it's file type.
You cannot have the same file referenced more than once within a system (i.e. cannot add the same
file name to the Source folder and the Other folder within the same System).
folder.
You have the ability to designate a single source code file as the Master Source Code file. Right-click on any open area inside the Workspace tab to open the Workspace Bar Context Menu.
Close Workspace Save Workspace Save Workspace As Build Workspace Export Workspace Files To Go
Import a Project
Workspace Properties
Online Devices
Device Ports
Total # of Masters Total # of Devices Total # of Ports FIG. 9 Workspace Bar - Online Tree Tab
10
This option is only available when a Device is selected in the online tree. To close the popup window, click again or wait approximately 10 seconds for it to close on it's own. Note: For EXB Modules, Friendly Name and Location are not displayed in the "Device Properties" balloon tip. Device Addressing Click to access the Device Addressing dialog, where you can view/edit the Device/System addressing information for the selected device. See the NetLinx Device Addressing section on page 143. Firmware Transfer Click to access the Send To NetLinx Device dialog, where you can select a .KIT file, and send it to a specific NetLinx master. See the Firmware Transfers section on page 190 for details. Click to open the Network Device Addressing dialog. This dialog allows you identify and configure network addressing for Network Devices (devices that are not on the AMX bus, but are connected to a NetLinx Master via the LAN). See the Network Device Addressing section on page 166. Network Bind/Unbind Device This item only appears if you have selected a device from the Unbound Devices folder. If the device is unbound, this option binds the device to a specific Master Controller (via the Bind/Unbind Device dialog). See the Binding/Unbinding Devices section on page 163. Check Port Status This item is enabled only if a Port item is selected in the Online Device Tree. The status of the selected port is displayed in the Status tab of the Output Bar. See the Viewing Online Devices and Ports section on page 162.
11
Refer to the Working With the Online Device Tree section on page 108 for more information.
12
Workspace folder Project folder System folder IR Files in the active Project/System
Click to insert this IR constants into the active source code file, at the cursor position (requires valid IR Constant Prefix)
With an IR File selected in the IR File list (the top window in this tab): The middle window displays the file properties for the selected IR file (Control, Model, Manufacturer, Description and File Name). The bottom window displays the Channels/Functions, with a descriptive name for each Constant in the selected IR file. Click the Insert IR Constants button to insert the displayed set of IR Constants in to the active Source Code file, at the cursor's position. You must provide a valid IR Constant Prefix in the text box in order to Insert IR Constants. Refer to the Working With IR Files section on page 62 for more information.
13
Sub - Devices
To populate the network device list, right-click anywhere within this tab to open the Zero-Config Context Menu, and select Refresh. Double-click on any entry in the Network Device List to open it's Web Configuration page. By default, Web Configuration pages are opened in your default browser. To open Web Configuration pages within NetLinx Studio, right-click anywhere within this tab to open the Zero-Config Context Menu, and de-select Launch Via Default Browser.
14
Refer to the Zero-Config Networking section on page 112 for more information.
Output Bar
Select View > Output (or click the toolbar button) to toggle (show/hide) the Output Bar (FIG. 12).
There are 6 tabs contained in the dockable Output Bar: Output Bar Tabs
Status Tab The Status tab displays build information pertaining to the last compilation of source code files, as well as port status information. Double click on a line containing an compiler error message to open the file in a Source Code Editor window, with the cursor positioned at the beginning of the line containing the indicated error. Note: The version number of the compiler (NetLinx or Axcess) is displayed in the Status tab, whenever source code is being compiled. Find In Files tab The Find In Files tab displays the results of a Tools > Find In Files search operation. Right-mouse click in the view to see the available options to save or copy the contents of this list. Find IR Files tab The Find IR Files tab displays the results of a Tools > Find IRL/IRV search operation. To add one or more of the listed IR files to a System in the open Workspace, select a file (or Ctrl + click to select multiple files), then drag and drop the file(s) into the System folder of the System that you want to add the file(s) to. This invokes the File Properties dialog, where you can change the Identifier, File Name and Description for each file that you are adding to the System. Double click on a listed file to open it for viewing/editing in the IREdit utility program. File Transfer Status tab The File Transfer Status tab of the Output Bar displays the status on the list of files that are have been or are being transferred. Notifications tab The Notification tab of the Output Display Window displays the asynchronous notification messages being received from the master controller. You can right-mouse click in the tab to see the available options to save or copy the contents of this list. Note: To clear this tab, select the Clear Notifications tab option in the Control a Device or Emulate a Device dialogs. See the NetLinx Diagnostics - NetLinx Device Notification section on page 114 for details.
15
As indicated, some of the options below are not relevant to all tabs. The options in this menu include: Output Bar Context Menu Options
Enable/Disable Asynchronous Notifications (Notifications tab only) Enable/Disable Diagnostics Messages (Diagnostics tab only) Copy All Items Copy Selected Items Save All Items Save Selected Items Compiler Error /Warning Report Stops or starts the asynchronous notifications messages that are sent by the NetLinx master controller without visiting the menu bar. Stops or starts the internal system diagnostics messages that are sent by the NetLinx master controller without visiting the menu bar. Copies all items in the list to the clipboard. Copies only the selected items in the list to the clipboard. Saves all items to a user-defined file. You will be prompted for a file name to save the contents of the tab. Saves only the selected items to a user-defined file. You will be prompted for a file name to save the contents of the tab. This option scans the contents of the Status tab, and then lists each compiler error and warning (one per line) in the Status tab. This option invokes the Compiler Error Warnings Report dialog, which allows you to specify wether you want to include compiler Errors, Warnings or both in the report. By default, Errors and Warnings are both selected. Find (Notifications and Diagnostics tabs only) Search for text within the tab, via the Find dialog. You may search up or down the tab based on the current cursor location within the tab. The search can be case sensitive. When the text is found in the tab, the program highlights the row and scrolls the row into view. Clear Clears all the items within the list.
16
Use the Source Code Editor windows to generate and edit Axcess and/or NetLinx code files. NetLinx Studio features a Code Wizard that steps you through the process of generating several different types of code.
17
Do not attempt to open .LIB or .SYC files for editing in the Source Code Editor. Doing so could cause program failure.
Code folding
Source Code Editor context menu Columnar Cut, Copy and Paste Insert Section Goto Section Undo and Redo Make Selection Uppercase and Make Selection Lowercase
18
Block Comment-Uncomment The Edit > Block Comment-Uncomment option allows you to block comment-uncomment selected text in the active Editor window. Indentation Other Features include: To indent a block of text, select text and press the Tab key. Use Shift + Tab to remove the indentation. Multiple clip-board buffer capabilities. Ability to print an entire file. Mouse wheel support.
Watch Window
The Watch window is displayed when Start Debugging is selected from the Debug menu (or the Debug Watch toolbar). The Watch window is a dockable window that allows you to view and edit the contents of specified variables within a compiled Axcess or NetLinx program. Also, you can control the execution of the mainline of a compiled Axcess or NetLinx program. The Watch window contains three tabs (Watch1-Watch3), which allow you to watch up to three separate sets/lists of specified variables. The Watch window consists of a table with several columns:
Name Enter the name of the watched variable in this column. Line (NetLinx only) Enter line number (in the Source Code file) where the variable is declared. Length Value Display This column displays the length of the watched variable. This column displays the value of the watched variable. This column displays the format of the variable (ASCII, Decimal, Hexadecimal, Octal, ASCII or Binary).
You can also drag and drop a variable from the Source Code Editor window into the debug window. Right-click inside the Watch Window to access the Watch Window context menu.
19
20
21
1. To start the Workspace Wizard, select File > New (or click the toolbar button). 2. In the New dialog, select Workspace Wizard and click OK (FIG. 14).
3. In the Workspace Wizard dialog (FIG. 15), enter a name (up to 128 characters) for the new Workspace file
in the text field (required).
To enter an optional text description (2000 characters max) for the new Workspace, click the Workspace File Description button, and enter the description in the Workspace File Description dialog (FIG. 16). Click OK to return to the Workspace Wizard.
22
4. Click Next to proceed to the Workspace File Location dialog (FIG. 17).
5. Specify the target location for the Workspace file in the text field, or click the Browse (...) button (to the
right of the text field) to locate and select a target directory via the Browse For Folder dialog.
7. Enter an identifier (name) for the new Project in the text field.
To enter additional information for the new Project, click the Project Information button, and fill in the Project Information (up to 128 characters) and Description (up to 2,000 characters) text fields in the Project Information dialog (FIG. 19). All fields in this dialog are optional).
23
9. Use the radio buttons to select which type of System to add to the Project (NetLinx or Axcess). This dialog
also includes the option to add the System later, in which case the Workspace Wizard is complete. Select either NetLinx or Axcess and click Next to proceed to the System Information dialog (FIG. 21).
10. Enter a name for the new System in the text field.
To enter an optional text description (2,000 characters max) for the new System, click the Workspace File Description button, and enter the description in the System Description dialog (FIG. 22). Click OK to return to the System Information dialog.
11. Click Next to proceed to the Assign System ID dialog (FIG. 23).
24
12. To associate a System ID to the new System, enter the System ID in the text field. By default the ID is set
to zero (0 = this System).
13. Click Next to proceed to the System Communications dialog (FIG. 24). This dialog displays the current
Master Communication Settings in a read-only text box.
14. Click Communication Settings to set the communication settings for this System, in the Communication
Settings dialog (FIG. 25).
25
These settings become the default communication settings for all new Workspace files, until they are manually changed.
15. Click Next to proceed to the Master Source Code File Selection dialog (FIG. 26).
16. Use the radio buttons to select the type of Master Source Code file to create for this System:
Create an empty AXS File - This option generates an AXS file that is totally empty (no templates used): a. Click Next to proceed to the Master Source Code File Name dialog (FIG. 27).
26
b. Enter a name (up to 128 characters) for the new (empty) Master Source Code File. c. Click Source Code File Description to enter a description (up to 2,000 characters) in the Source
Code File Description dialog, and click OK to return to the Master Source Code File Name dialog.
d. Click Next to proceed to the New File Location dialog (FIG. 28).
e. Specify the target location for the new file in the text field (click the Browse (...) button to locate and
select a target directory via the Browse For Folder dialog).
a. Click Next to proceed to the Existing Master Source File Location dialog (FIG. 29).
27
b. Enter a path and filename of the desired Master Source Code File, or click the Browse (...) button to
locate and select the desired AXS file via the Open dialog.
c. Click Source Code File Description to enter an optional description (up to 2,000 characters) in the
Source Code File Description dialog, and click OK to return to the Existing Master Source File Location dialog. d. Click Next to complete the Wizard. Create an AXS File using Templates - This option generates an AXS file using either the NetLinx or Axcess template, depending on the System type specified in Step 9. This option results in a Source Code file that is formatted with header/footer information and all of the main sections of a typical Source Code File of the selected type: a. Click Next to proceed to the File Template dialog (FIG. 30).
b. Enter a name (up to 128 characters) for the new Master Source Code File. c. Click Next to proceed to the New File Location dialog. d. Specify the target location for the new file in the text field (click the Browse (...) button to locate and
select a target directory via the Browse For Folder dialog).
e. Click Source Code File Description to enter an optional description (up to 2,000 characters) in the
Source Code File Description dialog, and click OK to return to the Master Source Code File Name dialog. f. Click Next to proceed to the New File Location dialog. g. Specify the target location for the new file in the text field (click the Browse (...) button to locate and select a target directory via the Browse For Folder dialog). h. Click Next to complete the Wizard. Add the Master Source Code File Later - This option allows you to exit the Workspace Wizard at this point, and manually specify the System's Master Source Code File later.
17. In the Wizard Completed dialog, click Finish to exit the Wizard.
The new Workspace (with your new Project containing the new System) is represented in the Workspace tab of the Workspace Bar.
28
1. Select Build > Build Workspace (or click the toolbar button).
Any errors detected by the program before the build operation starts are listed in the Pre-Build Errors dialog. This dialog gives you the option of ignoring the errors and continuing with the build.
2. The status and results of the build are displayed in the Status tab of the Output Bar.
2. Use the options in this dialog to locate and select a Workspace (.APW). 3. Click Open to open the selected Workspace file.
Since you can only have one Workspace open at a time, the program will prompt you to save any changes before closing the active Workspace and opening the selected one.
1. Right-click on the Workspace folder (in the Workspace tab of the Workspace Bar) and select Import a
Project from the Workspace context menu.
2. In the Open Workspace dialog, locate and select the Workspace (.APW) file that the Project you want to
import currently belongs to.
29
The same Project can be included in more than one Workspace file.
3. In the Import Components From a Workspace dialog, use the check boxes to select which Project(s)
contained in the specified Workspace file to import.
4. Click OK.
If the selected Project(s) contain any identifiers that are already being used by the target Workspace, the program prompts you to change them. In this case, use the Import Name Change dialog to specify a new identifier for the imported Project.
5. The specified Project(s) should now appear as part of the open Workspace.
1. Click to select the Project that you want to remove (in the Workspace tab of the Workspace Bar). 2. Select Delete Project from the Project menu, the Project Folder context menu, or click the toolbar button. 3. The program prompts you to confirm removing the selected Project. 4. Click Yes to remove the Project.
under a different name, the program will ask you wether you want to change the Workspace Identifier (the name that appears at the top of the Workspace tab of the Workspace Bar) to match the new filename.
30
1. Select Export Workspace Files To Go from the Project menu, the Workspace context menu, or click the
toolbar button to open the Export Workspace Files To Go dialog (FIG. 31).
2. By default, the name and target directory of the AXW file to be created matches the name of the open
Workspace file. Use the Name of the "To Go" File text field to change the name and target directory for the resulting AXW file, if desired. Use the Browse (...) button to navigate to a different folder.
3. By default, the name and target directory of the APW file to be created (and included in the AXW "To
Go" file) matches the name of the open Workspace file, with "_Exported" appended to the end (for example "NetLinx Boardroom.APW" becomes "NetLinx Boardroom_Exported.APW" once it is extracted from the AXW file). Use the "To Go" Workspace Filename To Create text field to change the name and target directory for the resulting AXW file, if necessary.
4. Use the radio buttons in the Export Options area of the dialog to specify exporting the Full Workspace
(all Projects and Systems included), or only the currently active Project (Only Active Project) or the currently active System (Only Active System). By default, the program is configured to export the entire Workspace file.
5. Use the checkboxes in the Export Options area to select additional options as desired:
Select the Include User IRN Database(s) checkbox to include any user-defined .IRN (IR database)
files in the resulting AXW file. If the selected Workspace file does not include any user-defined IRN files, this option is disabled. Select the Include Module Files that are not part of the Workspace checkbox to include AXS (*.TKO) and Duet (*.JAR) Module files that are needed for a successful NetLinx compile and link, but have not been added to the Workspace.
31
Module files are found by searching the "Module Files" directories defined on the NetLinx Compiler tab of the Preferences dialog. If the selected Workspace file does not utilize Module files, this option is disabled. Select the Exclude All Source Code/AXS and Duet Module Files checkbox to exclude source code and Duet module files from the resulting AXW file. Excluding AXS/AXI files will result in device mappings of the exported AXW file to be set to "Custom". Since no source files will be part of the exported AXW, all device mappings will need to be resolved in the newly created APW file. Naturally, the previous two options are mutually exclusive. If you select one, the other is disabled. Select the Include the Compiled TKN/TOK File checkbox to include the compiled TKN/TOK file in the exported APW file. Select the Include the Complied SRC File checkbox to include the compiled SRC file (in addition to the compiled TKN/TOK file). Note that this option is only enabled if the Include the compiled TKN/TOK file option is selected. The Progress bar indicates the progress of the export operation. Once the export operation is done, detailed results of the operation are listed in the Export Workspace Files Report dialog.
Importing Exported ("To Go") Workspace Files 1. Select Project > Import From Exported Workspace File (or click the toolbar button) to access the
Select AXW File dialog.
2. Locate and select the desired AXW file, and click Open. This invokes the Import From AXW File dialog
(FIG. 32).
3. In the Import From Exported Workspace File dialog , the file selected in the Select AXW File dialog is
listed in the AXW File to Extract From field. Use the Browse (...) button to locate and select a different file, if necessary.
4. The target directory indicated in the Extract To field matches the source directory for the selected file by
default. Use the Browse (...) button to locate and select a different target directory for the Workspace file, if necessary.
5. Click Extract to extract the selected Workspace file to the specified directory. If a file of the same name
already exists in the target directory, the NetLinx Studio Extraction Overwrite dialog prompts you to either overwrite the existing file (Yes or Yes To All), to preserve the existing file (No), or to cancel the operation.
6. Once the file is extracted, the Workspace file is automatically loaded, and is represented in the Workspace
tab of the Workspace Bar. If a Workspace file is open when the file is extracted, the program prompts you to close the currently open Workspace, as well as any associated System files.
32
To access this dialog, select Workspace Properties from the Project menu, the Workspace context menu, or click the toolbar button. You can edit the Identifier and Description fields, but the File Name and Creation Date are read-only.
Identifier File Name Description Creation Date Conversion Date The Workspace Identifier can have a maximum of 128 characters. The File Name cannot be changed and is only for display. The Description text is optional and can have a maximum of 2,000 characters. This read-only field indicates the creation date of the open Workspace. If a NetLinx Studio workspace file was converted from a NetLinx Studio v1.2 *.PJS file, the Conversion Date will also be displayed.
Close Workspace Save Workspace Save Workspace As Build Workspace Export Workspace Files To Go
33
Import a Project
Paste Project Collapse Tree Expand To System Level Docking view Hide Quick Load Workspace
Workspace Properties
This option is intended for file backups only, as opposed to creating a self-contained Workspace file for distribution to remote sites. To create a compressed and selfcontained Workspace file (with relative file path information intact), use the Project > Export Workspace Files To Go option instead.
1. Select Project > Backup Workspace File to access the Backup Workspace Files dialog. 2. By default, the target directory and file name for the Backup file match the directory and name of the
open Workspace file, with the .ZIP file extension. You can change the name and target location in the Backup File To text field, if necessary.
3. If the open Workspace includes one or more user-defined IR database (.IRN) files, select the Include
User IRN Database(s) option to include these files in the resulting ZIP file. This option is disabled if the Workspace does not contain any user-defined IRN files.
34
4. The Progress bar indicates the progress of the backup operation. 5. Once the export operation is done, detailed results of the operation are listed in the Backup Workspace
Files Report dialog (FIG. 35).
35
36
Opening Projects
In NetLinx Studio, Projects are always contained within a Workspace. So, rather than opening a Project directly (as you would have in NetLinx Studio v1.2), you must open the Workspace containing the Project you want to work on. See the Opening Workspace Files section on page 29.
1. Select New Project from the Project menu or the Workspace context menu (or click the toolbar button) to
open the New Project Properties dialog (FIG. 36).
37
2. Enter an Identifier (name) for the Project (required). The Identifier can have a maximum of 128
characters, and must be unique within the open Workspace file.
3. Enter Dealer, Designer, Sales Order, Purchase Order info (maximum of 128 characters each), and a
Description for the Project (maximum of 2,000 characters). These fields are all optional.
1. Open a Workspace (in the Workspace tab of the Workspace Bar) and click to select (highlight) a Project
folder.
2. Right-click on the Project folder and select Copy Selected Project from the Project Folder context menu. 3. Right-click on the Workspace file, and select Paste Project from the Workspace context menu.
1. Select (highlight) the Project that you want to add the imported System into (in the Workspace tab of the
Workspace Bar).
2. Right-click to access the Project folder context menu, and select Import a System to open the Open
Workspace dialog.
3. Use the options in this dialog to locate and select the Workspace (.APW) file that contains the System that
you want to import into the Project.
4. Click Open to access the Import Components From a Workspace dialog (FIG. 37).
38
5. Check each System that you want to import, and click OK to add the selected System(s) to the Project.
1. Click to select the System that you want to remove (in the Workspace tab of the Workspace Bar). 2. Select Delete System from the Project menu or the System Folder context menu. 3. The program prompts you to confirm removing the selected System. 4. Click Yes to remove the System.
1. Click to select and highlight the Project that you want to compile (in the Workspace tab of the Workspace
Bar).
3. The status and results of the build are displayed in the Status tab of the Output Bar.
39
To access this dialog, select Project Properties from the Project menu, the Project Folder context menu, or click the toolbar button. You can edit all of the information in this dialog:
Identifier Dealer Sales Order Designer Purchase Order Description The Project Identifier is required and can have a maximum of 128 characters. Optional, maximum of 128 characters. Optional, maximum of 128 characters. Optional, maximum of 128 characters. Optional, maximum of 128 characters. Optional, maximum of 2,000 characters.
40
Project Properties
41
42
1. Select the Project that you want to add the new System to in the Workspace Bar (Workspace tab). 2. Select New System from either the Project menu or the Project context menu (or click the toolbar button)
to open the New System dialog (FIG. 39). Use the options in this dialog to specify an Identifier, System ID and Description for the new System.
The System ID number only applies to NetLinx systems. If you are creating an Axcess system, ignore the System ID field.
3. Click Communication Settings to open the Communication Settings dialog, where you specify the
System platform, communications port settings or network settings as required: Click the Platform Selection radio buttons to select either Axcess or NetLinx as the system platform. Select a Transport Connection Option (TCP/IP or Serial). TCP/IP - To specify network TCP/IP settings (NetLinx systems only), select the TCP/IP radio button, and click Settings to open the TCP/IP Settings dialog, where you can enter the System's IP Address assignment.
43
Do not change the Port number! It should always be set to 1319 (default). Serial - Select the Serial radio button, and click Settings to open the Serial Settings dialog, where you can select and configure a Serial COM port to use.
1. Select (highlight) the Project that you want to add the imported System into (in the Workspace tab of the
Workspace Bar).
2. Right-click to access the Project folder context menu, and select Import a System to open the Open
Workspace dialog.
3. Use the options in this dialog to locate and select the Workspace (.APW) file that contains the System that
you want to import into the Project.
4. Click Open to access the Import Components From a Workspace dialog (FIG. 40).
5. Check each System that you want to import, and click OK to add the selected System(s) to the Project. Copying And Pasting Systems
NetLinx Studio allows you to easily copy and paste Systems (and all associated System Files) within a Workspace. This allows you to develop a set of core Systems which you can then copy, paste and modify as necessary. In cases where there are only minor variations from one System to the next, this can be a real timersaver. To copy and paste a System (within a Workspace):
1. Open a Workspace (in the Workspace tab of the Workspace Bar) and click to select (highlight) a System
folder.
44
2. Right-click on the System folder and select Copy Selected System from the System Folder context
menu.
3. Right-click on the Project that you want to paste the System into, and select Paste System from the
Project Folder context menu.
45
1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog.
The Available System(s) list in this dialog represents all Systems contained within the open Workspace (and their parent Projects).
2. Click to select a System from the Available System(s) list. 3. Click the Communication Settings button to access the Communication Settings dialog (FIG. 42).
4. Select the default Platform (NetLinx or Axcess). 5. Select a Transport Connection Option (TCP/IP, Serial, or Virtual NetLinx Master).
46
The TCP/IP and Virtual NetLinx Master options are only available if NetLinx is selected as the platform.
6. Click Edit Settings to specify the communication settings for the selected connection option:
For TCP/IP connections: Set the TCP/IP address (TCP/IP Settings dialog). For Serial connections: Specify the COM port, and set baud rate, data bits, parity, stop bits and flow
(Virtual NetLinx Master Settings dialog; default = 1). The default settings for Serial ports are:
Com Port Baud Rate Data Bits Parity Stop Bits Flow Control COM1 38400 8 None 1 None
Some combinations of settings may result in truncation in the Settings display text field (indicated by an ellipsis). If this is the case, simply hover the mouse cursor over the Settings display text field to view the full description.
7. Click OK to close the Communication Settings dialog. 8. Click OK to close the Master Communication Settings dialog. Alternatively, you can also access these System-level communications settings options via the System Properties dialog: 1. Select (highlight) a System in the Workspace tab of the Workspace Bar, and select System Properties
from either the Project menu or the System Folder context menu (or click the toolbar button) to open the System Properties dialog.
2. In the Communication Settings area (at the bottom of the dialog), click Communication Settings to open
the Communication Settings dialog.
3. Follow steps 4 through 8 (above) to specify communication settings for the selected System.
1. Select (highlight) the System that you want to add the file to. 2. Select Add File to System from either the Project menu, the System Folder context menu (or click the
toolbar button) to open the Add Existing File dialog.
3. In the Existing tab, locate and select the file to add to the selected System.
By default, the Files of Type option is set to look for Source (.AXS) files. Change this option to look for the desired file type if necessary.
47
Use the Recent tab to quickly locate and select recently used files.
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected file. If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
5. Edit the file information (if necessary). 6. If the file you are adding is to be used as the Master Source Code file, check the Master File option. 7. Click OK to add the file to the selected System. Alternatively, you can drag and drop files into a System in the Workspace Bar from Windows Explorer or from the Find In Files/Find IR Files tabs of the Output Bar. See the Drag and Drop Files into a System topic for details. Drag And Drop Files Into A System
NetLinx Studio allows you to drag and drop files into a System: In Windows Explorer, select a file that you want to add to a System in the Workspace Bar (Workspace tab). Drag and drop the file into the System folder. In the Output Bar, you can select any of the files listed as search results in either the Find In Files or Find IR Files tabs. Drag and drop the file into the System folder. Do not drop the file into the specific System File folder that matches its type. Regardless of type, all files must be dropped into the System folder to be added (imported) correctly into the System. When the file is dropped into the System folder, the File Properties dialog is invoked. Use the options in this dialog to rename the selected file, browse for a different file, and/or enter a description for the file (if desired). Click OK to add the file to the System. Note that the file is placed in the appropriate System File folder based on the file type.
1. Click to select (highlight) the file that you want to remove. 2. Select Remove File From System from either the Project menu or the System File context menu (or
click the toolbar button).
48
Alternatively, you can simply select a System file and press the Delete key for the same results.
1. Click to select (highlight) the System that you want to build (in the Workspace tab of the Workspace Bar). 2. Select Build System <System name> from the Build menu, or select Build System from the System
Folder context menu (or click the toolbar button). Any errors detected by the program before the build operation starts are listed in the Pre-Build Errors dialog. This dialog gives you the option of ignoring the errors and continuing with the build.
3. The status and results of the build are displayed in the Status tab of the Output Bar. Building The Active System
You can select to build (compile) only the System currently designated as the Active System, using the Build Active System command. When you compile a System, every Source Code, Include, and Module file contained in the selected System is compiled. The currently active System is indicated in bold (in the Workspace tab of the Workspace Bar). To compile the Active System:
1. Select Build Active System from the Build menu, or click the toolbar button.
Any errors detected by the program before the build operation starts are listed in the Pre-Build
Errors dialog.
Assuming that a Master Source Code file has been defined for the System, this dialog gives you the
2. The status and results of the build are displayed in the Status tab of the Output Bar.
49
To access this dialog, select System Properties from the Project menu, the System Folder context menu, or click the toolbar button. You can edit all of the information in this dialog:
Identifier System ID Description Required, and can have a maximum of 128 characters. Optional, the range is from 0 - 65535 Optional, and can have a maximum of 2,000 characters.
Communication Settings The Communication Settings window displays the current communications settings for this System. To change these settings, click the Communication Settings command button to open the Communication Settings dialog.
Delete System Build System Copy Selected System Add File To System
50
System Properties
51
52
In NetLinx Studio, all Projects and associated Systems and System files are linked to the Workspace, so that you can add and remove Projects and Systems without having to make copies of the files. NetLinx Studio also allows you to copy and paste Projects within the Workspace; in case you need to create several similar Projects you can quickly generate multiple Projects and modify each one as necessary. Since all System files are linked to the Workspace, when you open a file for editing, you are opening and editing the actual file, not a local copy. It is important to understand that in the event that the file is linked to multiple Systems, any changes made to the file will be reflected in every instance that the file is used (not just the System that you were in when the changes were made). Even if you don't have multiple links to the same file, and instead have only a single link, you still need to be careful about altering the file. If you are linking to a file that other people might use, they will be affected by the changes you make to the file. So, if you intend to make changes to a System file, and you want those changes to be specific to only one System in the Workspace, you should make a copy of the original file (under a different name), make your changes, then remove the original file from the System and link the new file to the System.
53
System Files
System Files represent the actual files that are needed to operate a particular controlled device in the named System. System files include Source Code, Include files, NetLinx Module files, IRLib files, User-Interface (UI) files and any other (*.*) files that you might want to include. System files are placed in the appropriate System file folder (in the Workspace tab of the Workspace Bar) as links only. System file types are described below: System Files
Master Source Code file This is the Source Code file that defines the devices in the System. Master Code files are sent only to the Axcess or NetLinx Master Controller. Master Source Code files are placed in the Source file folder. Source Code files These include all code files (.AXS) that are not Master Code Files. Source Code Files are created in NetLinx Studio, and are sent to specific devices on the bus. Source Code files are placed in the Source file folder. These are Axcess or NetLinx code files (.AXI) that are separate from the main Master and Source Code files, but are included in the compile process. These files are created in NetLinx Studio. Include files are placed in the Include file folder. Module Files These files provide pre-fabricated (.AXS) code or compiled (.TKO) code to control a specific device on the bus. NetLinx Studio supports Duet (.JAR) Module files. Module files cannot be designated as master files. When the System is being compiled, these Module files are compiled first, then copied to the directory where the designated Master Source code file resides. Module files are placed in the Module file folder. User-Interface (UI) files These are (.TPD/.TP4) or (.KPD) files that are imported into Projects. TPD/TP4 touch panel UI files define the look and functionality of touch panel pages. TPD files are touch panel UI files created in TPDesign3 (for use with G3 level firmware touch panels), TP4 files are created in TPDesign4 (for use with G4 level firmware touch panels, i.e. Modero series panels). KPD files are created in the KPDesign KeyPad Design program, and define the buttons and functionality of PLK-DMS and PLKIMS Keypads. UI files represent the user-interface for the control system. UI files are placed in the User Interface file folder. These files (.IRL or .IRV) are created in IR Edit and contain infrared (IR) control functions for IR controlled devices. IR files are placed in the IR folder. IRN files provide links to the AMX IR Database and/or user-defined IR Database files. In many cases, it is helpful to save document and image files (for example, .TXT, .DOC, .BMP) with the other system files, even if they are not directly utilized by the control system. "Other" files are placed in the Other file folder.
Include files
54
Use the Project > Add File To System command to add the file to a System. To create new System file:
1. Select New from the File menu, or click the toolbar button to open the New dialog (FIG. 45).
2. Select the type of file that you want to create (Source File, Include File, Block File, or Standard Text).
The Workspace Wizard option launches the Workspace Wizard, which steps you through the process of creating a new Workspace with a Project and one System.
3. Click OK to open an empty Source Code Editor window. 4. Develop the file as needed in the Source Code Editor window, and select File > Save (or click the toolbar
button).
5. Specify a name and target location for the new file in the Save As dialog.
55
1. Select (highlight) the System that you want to add the file to. 2. Select Add File to System from either the Project menu, the System Folder context menu (or click the
toolbar button) to open the Add Existing File dialog.
3. In the Existing tab, locate and select the file to add to the selected System.
By default, the Files of Type option is set to look for Source (.AXS) files. Change this option to look for the desired file type if necessary. Use the Recent tab to quickly locate and select recently used files.
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected file (FIG. 46).
If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
5. Edit the file information (if necessary). 6. If the file you are adding is to be used as the Master Source Code file, check the Master File option. 7. Click OK to add the file to the selected System.
Alternatively, you can drag and drop files into a System in the Workspace Bar from Windows Explorer or from the Find In Files/Find IR Files tabs of the Output Bar. See the Drag And Drop Files Into A System section on page 48 for details. See the following sections for details on adding specific file types: Adding a New Source Code File To a System section on page 59 Adding an Existing Source Code File To a System section on page 61 Adding a New Include File To a System section on page 68 Adding an Existing Include File To a System section on page 68 Adding a New Module File To a System section on page 70 Adding An Existing Module File To A System section on page 71 Adding An Existing User Interface File To A System section on page 74
56
Adding an Existing IR File To a System section on page 76 Adding an IR File From the AMX IR Database section on page 77 Adding An IR File From an IREDIT User Database (*IRN) File section on page 77 Adding an Existing "Other" File To a System section on page 80
1. Click to select (highlight) the file that you want to remove. 2. Select Remove File From System from either the Project menu or the System File context menu (or
click the toolbar button).
Device Mapping
The Device Mapping dialog 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. See the Device Mapping section on page 185 for details.
57
The fields in the File Properties dialog include: File Properties Dialog Options
Identifier File Name Relative Path The File Identifier can have a maximum of 128 characters, and must be unique within a System. You can change the file name in this text box. Use the Browse (...) button to navigate to the desired file you want. This (read-only) field represents the location of the file, relative to the Workspace file that is currently open. All files are linked to the workspace (not copied over to the workspace directory). Description Master File The Description text is optional and can have a maximum of 2,000 characters. This check box designates that this file is the Master Source Code file. When checked, the Compile As combo box will be grayed out. The Master File will be compiled for the platform designated in the System Properties dialog. Compile As This combo box allows you to compile a source code file to a platform (Axcess or NetLinx) different than the System's designated platform. This option is available if the Master File check box is deselected (unchecked). Creation Date The date the file was created (read only).
58
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the Source folder to access the Source File Folder context menu, and select Add New
Source File to open the File Template dialog (FIG. 49).
Alternatively, you can also either select File > New, and select Source File (in the New dialog), or click the New toolbar button.
59
4. In the File Template dialog, select a template to use to create the file (NetLinx Standard, Axcess Standard
or User-Defined), and click Next to proceed. If you select to use the NetLinx or Axcess templates, the new Source Code file will include all of the sections and headings (i.e. DEFINE_DEVICE, DEFINE_CONSTANT, DEFINE_TYPE, etc.) that differentiate the various sections contained in a typical Source Code file for the indicated system type.
5. Enter a file name for the new Source Code file, and select wether to assign this new file as the System's
Master Source Code file via the Make this the Master Source Code file option checkbox (FIG. 51):
6.
Click Next to proceed. the NetLinx Studio directory. Use the Browse (...) button to navigate to another folder if necessary (FIG. 52).
7. In the New File Location dialog, specify a target directory for the file. By default, the target directory is
60
8. The program notifies you that the file was created (FIG. 53).
9. Click Finish to close the File Template dialog. The new file should now appear in the Source folder,
under the selected System.
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the Source folder to access the Source File Folder context menu, and select Add Existing
Source File.
3. In the Add Existing Source File dialog, locate and select the Source (.AXS) file that you want to add to the
selected System.
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected file. If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
61
6. If the file you are adding is to be used as the Master Source Code file for the System, check the Master
File option.
7. Click OK to add the file to the selected System. 8. The file should now appear in the Source folder under the selected System, as the Master Source Code
file (indicated by the letter "M" on the file icon in the Workspace tab).
Creating a Source Code File 1. Select New from the File menu, or click the toolbar button to open the New dialog. 2. Select Source File and click OK. 3. In the File Template dialog (FIG. 49 on page 59), select whether to use an existing template to create the
file:
If you click Yes, you will be prompted to select a template (NetLinx, Axcess or User Defined).
If you select the User-Defined Template option, click the Browse (...) button to open locate and select any Source file (.AXS) to use as the template (via the Open dialog). Select the desired template or file and click Next to proceed to step 4. If you click No, you can start developing the file immediately, in a new Source Code Editor window. If you select to use one of the existing templates (NetLinx or Axcess), the new Source Code file will include all of the sections and headings (i.e. DEFINE_DEVICE, DEFINE_CONSTANT, DEFINE_TYPE, etc.) that differentiate the various sections contained in a typical Source Code file for the indicated system type.
4. Enter a name for the new Source Code file. 5. The program notifies you that the file was created. 6. Develop the file as needed in the Source Code Editor window, and select File > Save (or click the toolbar
button).
7. Specify a name and target location for the new file in the Save As dialog.
Existing Source Code files can be added to Systems via the Project > Add File To System command.
62
FIG. 54 File Properties dialog - Master File option Alternatively, you can designate any Source Code file in the System as the Master Source by right-
clicking on a Source Code file (in the Workspace tab of the Workspace Bar), and selecting Set As Master from the Source Code File context menu.
File Revisions
The Save File Revision option allows you to save the active Source Code files with file revision information included in the file. This feature allows you to specify a revision number (or other identifier), and add text comments to assist in managing multiple revisions of the same file. Additionally, the program automatically includes a date/time stamp in the revision information. This file revision information is then added as a block of text to the top of the source code file when the revision is saved. Use the options in the Save File Revision dialog (File > Save File Revision) to view/edit the PROGRAM_NAME, revision number (or identifier), file name, and add any comments associated with this revision that you would like to include (FIG. 55).
1. Select File > Save File Revision to open the Save File Revision dialog. 2. Enter/edit the information in this dialog as desired:
63
3. Click Save to save the file revision. Note that the specified revision information is added to the top of the
file, as can be seen in the Source Code Editor window. The file that was replaced with the new file revision will not be deleted from your hard drive. The program will insert the file revision information specified here at the top of the source code file, before any other revision information that already exists in the file (if any exists). The example below shows file revision information, as it appears in the source code file after two revision have been saved:
In this case, the Update Name With Revision Text option was enabled, as is indicated by the "Rev2 " that follows the comma delimiter in the PROGRAM_NAME line.
64
1. Choose Edit > Find (or click the "Find" toolbar button) to open the Find dialog (FIG. 57):
2. Enter a search string in the Find What text box. 3. Click one or more of the checkboxes to set any additional search criteria, as desired.
Match whole word only Searches for instances of the search string that exist as whole words only. For example, a search for "yell", only finds the word "yell", as opposed to any instance of the search string (i.e. "yellow"). Match case Loop Searches only for instances that match the case (UPPERCASE or lowercase) of the characters in the search string. Start the search at the cursor's position, and automatically loop the cursor to either the top or bottom of the file (depending on the Direction setting) to finish searching the entire file, to the cursor's position. Start the search at the top of the file (regardless of the cursor's position). Click the radio buttons to specify whether to search Up (backward) or Down (forward) relative to the cursor's current position in the file (default = Down).
4. Click the Direction radio buttons to specify the direction of the search (Up or Down). 5. Click Find Next to perform the search and close the Find dialog. The first instance of the search string is
highlighted in the Source Code Editor window.
6. Choose Edit > Find Next (or click the "Find Next" toolbar button) to continue the search after the first
instance of the search string is found.
1. Choose Edit > Replace to open the Replace dialog (FIG. 58).
2. Enter a search string in the Find What box. 3. Enter the replace string in the Replace With box.
65
5. Click Find Next to perform the search. The first instance of the search string is highlighted in the Source
Code Editor window.
6. Click Replace to replace the highlighted instance of the search string with the replace string, or click
Replace All to replace all instances of the search string. The total number of replaced instances is indicated in the Status bar (on the left-hand side).
66
File Properties
1. Select New from the File menu, or click the toolbar button to open the New dialog (FIG. 59).
2. Select Include File and click OK. 3. An (empty) Include file is created in a new Source Code Editor window. By default, this file is named
AXI<n>.axi.
4. Develop the file as needed in the Source Code Editor window, and select File > Save (or click the toolbar
button).
5. Specify a name and target location for the new file in the Save As dialog.
Existing Include files can be added to Systems via the Project > Add File To System command.
67
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the Include folder to access the Include File Folder context menu, and select Add New
Include File.
3. In the New Include File dialog, specify a File Name and target location for the new Include file (FIG. 60).
4. Click OK to create the file. The new file should appear in the Include folder, under the selected System. Adding an Existing Include File To a System
To add an existing Include file to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the Include folder to access the Include File Folder context menu, and select Add Existing
Include File.
3. In the Add Existing Include File dialog, locate and select the Include (.AXI) file that you want to add to
the selected System.
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected file. If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
5. Edit the file information (if necessary). 6. Click OK to add the file to the selected System. 7. The file should now appear in the Include folder under the selected System.
68
Refer to the Cafe Duet online help file for details on creating JAR module files. JAR module files are also stored in the Module folder (in the Workspace tab of the Workspace Bar), and the same basic rules apply to JAR module files that were true for NetLinx modules: Module files cannot be designated as Master Source Code files. When the System is being compiled, first the Module files are compiled and then the Master Source Code (.AXS) file is compiled. NetLinx Studio constructs a composite TKN file when Duet module(s) are included in the Workspace and are referenced in the NetLinx Source code. The composite TKN file is a DynaZip file containing the compiled TKN file as well as the JAR modules that need to be transferred to the NetLinx master in order for the TKN file to execute properly.
69
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the Module folder to access the Module File Folder context menu, and select Add New
Module File.
3. In the File Template dialog, select whether to use an existing template to create the file (FIG. 61).
FIG. 61 File Template dialog If you click Yes, you will prompted to select the template (NetLinx or Axcess).
You can select to create a module file using the "module standard" template ("NetLinx Module.axs"). The module standard template file is located in the same directory as the NetLinx Studio application .EXE file (FIG. 62).
FIG. 62 File Template dialog If you click No, you will proceed directly to the New File Location dialog (FIG. 63).
70
If you select to use one of the existing templates (NetLinx or Axcess), the new Source Code file will include all of the sections and headings (i.e. DEFINE_DEVICE, DEFINE_CONSTANT, DEFINE_TYPE, etc.) that differentiate the various sections contained in a typical Source Code file for the indicated system type.
4. In the New File Location dialog, enter a File Name, and specify a target directory for the module file. Use
the Browse (...) button to navigate to another folder, if necessary.
5. The program notifies you that the module file was created. 6. Click Finish to close the File Template dialog. The new file should appear in the Module folder, under the
selected System.
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). Double-click the folder
to view the System File folders.
2. Right-click on the Module folder to access the Module File Folder context menu, and select Add
Existing Module File (or click the toolbar button).
3. In the Add Existing Module File dialog, locate and select the Module (.AXS, .TKO or .JAR) file that you
want to add to the selected System.
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected module file. If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
5. Edit the file information (if necessary). 6. Click OK to add the file to the selected System. 7. The file should now appear in the Module folder under the selected System.
71
Where:
Module_Name Virtual_Dev Real_Dev StrFileName DMS-IMSMod.tko A virtual device you define. The device number of the DMS or IMS panel. A string variable (CHAR array) containing the file name of the KPD file to run.
StrVarTextArray A two-dimensional array to store variable text in. The first dimension should be the largest variable text number you want to use. The second dimension should be the maximum size of the string you want displayed (maximum is 40 characters).
For example, a NetLinx module for a DMS keypad would look like:
DEFINE_MODULE "DMS-IMSMod" mdlDMS (dvDMS, dvDMS_R, strFILE_NAME, StrVartextArray)
Where:
DMS-IMSMod MdlDMS DvDMS DvDMS_R StrFILE_NAME The name of the compiled TKO file. The module name. The module ID device number (ex 32768). The device number of the keypad. Exact name of the KPD file.
StrVarText Array Description of the parameters for the variable text buffer.
or
DEFINE_MODULE DMS-IMSMod mdlIMS (
For example:
(**********************************************) (* DEVICE NUMBER DEFINITIONS GO BELOW *) (**********************************************) DEFINE_DEVICE DvVIRT = 33001:1:0 DvDMS = 6020:1:0 (**********************************************) (* VARIABLE DEFINITIONS GO BELOW *) (**********************************************) DEFINE_VARIABLE CHAR strFileName[100] (**********************************************) (* STARTUP CODE GOES BELOW *) (**********************************************) DEFINE_START StrFileName = avcnt11.kpd (**********************************************) (* VARIABLE DEFINITIONS GO BELOW *) (**********************************************) DEFINE_VARIABLE CHAR strVarTextArray[100][40]
72
Where:
DVVirt DvDMS StrFileName StrVarTextArray an arbitrary Virtual Device number you define (range for keypad panels = 32768 -36863). the real device number of the DMS or IMS panel. a string variable (CHAR array) containing the file name of the KPD file to transfer or run. a two-dimensional array to store variable text in. The first dimension should be the largest variable text string number you want to use. The second dimension should be the maximum size of the string you want displayed (maximum is 40 characters). When using two or more keypad panels, you can create a single threedimensional array for a keypad panels, instead of separate two-dimensional arrays for each keypad panel.
File Properties
73
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the User Interface folder to access the User Interface File Folder context menu, and select
Add Existing User Interface File.
3. In the Add Existing User Interface File dialog, locate and select the UI (.TPD, TP4 or .KPD) file that you
want to add to the selected System. .TPD = Touch panel UI files created in TPDesign3 .TP4 = Touch panel UI files created in TPDesign4 .KPD = Keypad UI files created in KPDesign
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected file. If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
5. Edit the file information (if necessary). 6. Click OK to add the file to the selected System.
74
7. The file should now appear in the User Interface folder under the selected System. Configuring NetLinx Source Code for KPD Files
You need to configure your NetLinx code to accommodate using KPD files. Before beginning, either use or write a new program (in NetLinx Studio) that: Defines the Virtual devices Defines the Keypad devices Associates the KPD file with defined devices Once you have a program:
1. In the DEFINE_DEVICE section of the code, verify that the dvDMS is set to any user-defined value
within the range of 32768 - 36863.
2. In the REALS section of the program, re-write the dvDMS_R to equal the value of the new Device
number set in the Device Addressing Tab of the Tools > NetLinx Diagnostics dialog. An example is if the Changed Device number value is set to 6001, the dvDMS_R value would now read 6001:1:0. Each consecutive keypad device would become:
dvDMS_R 6002, 6003, 6004 +.
3. In the STARTING CODE GOES HERE / CREATE FILE section of the program, the StrFILE_NAME
must equal the exact name of the KPD file being used in the compile.
4. Add the KPD file to the project by choosing Project > Add File To System. This opens the Add Existing
File dialog.
5. Locate and select for the desired KPD file. 6. Click OK to close the Add Existing File dialog. The file is added to the project file in the UI system folder
(in the Workspace tab of the Workspace Bar).
75
IREdit
IREdit is a separate application that works in conjunction with NetLinx Studio. The IREdit software application allows you to view and edit IR files. Once IREdit is installed, you can double-click on any IR file in the Workspace tab of the Workspace Bar or the Find IR Files tab of the Output Bar to open the selected IR file for viewing and editing in IREdit. For instructions on using IREdit to view and edit IR files, refer to the IREdit on-line help.
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the IR folder to access the IR File Folder context menu, and select Add Existing IR File. 3. In the Add Existing IR File dialog, locate and select the IR (.IRL or .IRV) file that you want to add to the
selected System.
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected file. If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
5. Edit the file information (if necessary). 6. Click OK to add the file to the selected System. The file should now appear in the IR folder under the selected System. Working With IREdit Database (*.IRN) Files
NetLinx Studio supports IR Database (*.IRN) files generated in the IREdit application. IRN Database files contain many individual IR files, organized by Manufacturer, Device Category, Device Model #, and Hand Control Model #. To launch the IREdit program double-click on an IR file in the Workspace tab of the Workspace Bar or doubleclick on an IR file in the Find IR Files tab of the Output Bar (results of a search). For detailed instructions on using IREdit, refer to the IREdit online help file. The options in the Select IR From a Database dialog allow you to locate and select IR file(s) from within either the (read-only) AMX IR Database, or a user-defined IR database (*IRN file).
76
The AMX IR Database is read-only. To add an IR file from the AMX IR Database to your Project:
1. Select Project > Add From AMX IR Database to open the Select IR From a Database dialog, with the
AMX IR Database displayed.
2. In the IR Database Navigator Window (on the left side of this dialog), start by picking the Manufacturer
of the device associated with the desired IR file, and drill down through the subfolders (Product Category, Product Model Number and Hand Control Model Number) to locate and select the desired IR file (FIG. 64).
3. Double-click on the file (or select the file and click the Add To List button) to add the file to the Selected
IR List.
4. Repeat steps 2 and 3 as often as necessary to populate the Selected IR List, and click OK to close the
Select IR From a Database dialog.
5. The selected IR files are add to the selected System (in the IR system file folder).
The file(s) will be added to the selected (highlighted) System in the Workspace tab, which is not necessarily the active system.
1. Select Add From User IR Database from the Project menu, the IR File Folder context menu, or click the
toolbar button to open the Select IRN User Database dialog.
2. Locate and select the *IRN file that contains the IR file(s) that you want to add to the selected System. 3. Click Open to open the selected IRN file in the Select IR From a Database dialog. 4. Select the Manufacturer, Product Category, Model #, Hand Control Model # and then select the IR file to
add to the System.
5. With the desired IR file selected, click Add to add the file to the Selected IR File(s) list. 6. Repeat steps 4 and 5 as many times as is necessary to add the desired files to the Selected IR File(s) list.
To remove a file from the Selected IR File(s) list, select a file and click Remove.
7. Click OK to close the Select IRN User Database dialog and open the File Properties dialog, where you
can change the selected file's name (Identifier) and Description if necessary. You can assign multiple different identifiers, file names and descriptions to the same file for use in different Projects and Systems, as needed.
8. Click OK to add the file to the selected System (which is not necessarily the active system). The file
appears in the IR System File Folder (in the Workspace tab of the Workspace Bar).
77
1. Choose Tools > Find IRL/IRV Files (or click the toolbar button) to access the Find IR Files dialog
(FIG. 65).
Hand Control Model # Enter the model number for the hand-held IR remote associated with the file you are searching for. Device Model # Where To Search Enter the manufacturer's model number for the IR device associated with the file you are searching for. Use the radio buttons to select one of three ways to specify where to search for IR files: IR Files in Folder - Use this option to specify a target directory to search. Click the Browse (...) button to select the directory to search in the Browse For Folder dialog. The first time you search within any given directory, NetLinx Studio generates an index file of all IR files in that directory. The status of this operation is indicated in the Status dialog. This only happens the first time a directory is searched. AMX IRN Database - Use this option to search the AMX IRN Database. User's IRN Database - Use this option to search for IR files within an existing User IR Database (*.IRN) file. IRN files are generated in the IREdit utility program.
Once you have entered one or more items in the search criteria fields, you can use the down arrows to the right of these fields to open and select from a list of previously entered items. For example, once you have typed "Sony" in the Manufacturer field, the next time you need to search for Sony devices, just select "Sony" from the dropdown list.
3. Click OK to begin the search, based on the specified criteria. 4. The results of the Find IRL/IRV search operation are listed in the Find IRL Files tab of the Output Bar.
The information in this tab includes the search criteria entered in the Find IR Files dialog. Double-click any item in the Find IR Files tab to open the selected IR file in the IREdit application. Right-click in the Find IR Files tab to open the Output Bar context menu.
78
Do not attempt to open .LIB or .SYC files for editing in the Source Code Editor. Doing so could cause program failure.
79
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Bar). 2. Right-click on the Other folder to access the Other File Folder context menu, and select Add Existing
Other File.
3. In the Add Existing Other File dialog, locate and select the file that you want to add to the selected
System. The Add Other dialog is set to look for .TXT files by default; change the Files of Type option to All Files (*.*) to look for other file types.
4. Click Open to access the File Properties dialog, where you can view/edit general file information for the
selected file. If you select multiple files to add to the System, the program will prompt you to edit the file properties for each file before adding them.
5. Edit the file information (if necessary). 6. Click OK to add the file to the selected System. 7. The file should now appear in the Other folder under the selected System. Creating a Text File
To create a Standard Text (.TXT) file:
1. Select New from the File menu, or click the toolbar button to open the New dialog. 2. Select Standard Text and click OK. 3. An (empty) Standard Text file is created in a new Source Code Editor window. By default, this file is
named TXT<x>.txt.
4. Develop the file as needed in the Source Code Editor window, and select File > Save (or click the toolbar
button).
5. Specify a name and target location for the new file in the Save As dialog.
Existing Text files can be added to Systems via the Project > Add File To System command.
80
File Extraction
SRC File Extraction
NetLinx Studio can generate a compressed version of NetLinx program files anytime they are compiled or transferred. The compressed NetLinx files are called Source Files, and have the extension .SRC. To generate NetLinx Source Files at compile time, enable the Build With Source option in the NetLinx Compiler tab of the Preferences dialog (FIG. 66).
If this option is not enabled, a dummy file is zipped and named "NOSOURCE.TXT". The Build With Source option also allows you later send the Source files to another Master, with the ability to debug the code. The Extract From SRC File command allows you to extract these files:
1. Select Tools > File Extraction > Extract From SRC File to open the Select SRC File for Extraction
dialog.
2. Locate and select the SRC file you want to extract, and click Open.
81
This is the directory containing the actual program file (.AXS). Source files only exist in the directory if the program file has been successfully compiled (using the Build With Source option).
3. In the Extract NetLinx Source From a SRC File dialog, the selected file (with full directory path) is
indicated in the SRC File To Extract From field.
4. In the Extract To field, specify the target directory for the extracted NetLinx Source files, and click
Extract to extract the files. When extracted, the program will always replicate the directory paths associated with the compressed files when the file was created. To use the original directory paths, enter C:\ as the destination directory. For example if you enter C:\ as the destination directory, you know that the NetLinx.AXI file will be copied into the proper directory for compiling (C:\Program Files\Common Files\AMXShare\AXIs). If a file with the same name already exists in the specified target directory, the program alerts you, and prompts you to overwrite it or pick a different target directory. If you enter non-existent folders, the program will create them for you. The error "Dynazip Unzip Error: Bad or missing decryption key (Problem extracting file(s))" indicates a mismatch between the password assigned to the file (via the Build With Password option), and the NetLinx password entered in the NetLinx Compiler tab of the Preferences dialog (Password field). If you receive this error message, click OK in the error message dialog to access the Enter Password dialog, and re-enter the password exactly as it was entered when the file was compiled.
1. Select Tools > File Extraction > Extract From ZIP File to access the Select ZIP File For Extraction
dialog.
2. Locate and select the ZIP file you want to extract, and click Open.
While this feature exists primarily to allow you to unzip exported Workspace files, you can use this feature to unzip any .ZIP file.
3. In the Files From a ZIP File dialog, the selected file (with full directory path) is indicated in the ZIP File
To Extract From field. Select the Extract using original directory path(s) option to preserve the original directory paths of the files (default = disabled).
4. In the Extract To field, specify the target directory for the extracted Workspace files, and click Extract to
extract the files. If a file with the same name already exists in the specified target directory, the program alerts you, and prompts you to overwrite it or pick a different target directory.
82
1. Select Tools > File Compare Utility to open the File Compare Utility dialog. 2. In the File #1 to Compare text field, enter the file path and name of the file that you want to compare the
other file against.
3. In the File #2 to Compare text field, enter the file path and name of the file that you want to compare
against File #1. Use the Browse buttons (...) to locate and select the desired files via the Open dialog. If you have opened files in this dialog before, you can use the down arrows next to each text field to select from a list of recent files.
5. Click Compare to begin the compare operation on the two selected files, using the Compare Options
specified. This action invokes the File Compare dialog. In the File Compare dialog, File #1 is displayed in the left window, and File #2 is presented in the right window. Any differences between the two files are indicated via the color codes defined at the top of this dialog: Changed lines are highlighted in Green Deleted lines are highlighted in Red Added lines are highlighted in Blue
These colors can be changed via options in the File Compare Attributes dialog.
83
Search Operations
Using The Edit And Search Functions
The Edit and Search functions are accessible via the Edit menu: The Edit > Cut, Copy and Paste options work the same in NetLinx Studio as they do in any other Windows program. The Edit > Find, Find Next and Replace options allow you to perform search and replace operations. You can search and search/replace within the active Source Code file, or search across multiple files.
1. Choose Tools > Find In Files (or click the toolbar button) to open the Find In Files dialog (FIG. 68).
2. Enter a search string (up to 255 characters) in the Find What text box.
If you select text in a Source Code Editor window before opening the Find In Files dialog, the selection appears in the Find What text box.
3. Click the In files/file types down arrow to open a list of file types to search. This selection limits the
search to a specific file type. To search all files, select the *.* option from this list. You can also manually enter any three-character file extension to search for a specific type of file.
4. Specify a folder to search in the In Folder text box: a. Click the down arrow to open a list of recently searched folders. b. Click the Browse (...) button to open the Browse For Folder dialog. Use this dialog to navigate to the
desired folder and click OK to return to the Find In Files dialog.
5. Select the checkboxes to enable other search options, as desired (Match whole word only, Match case,
Regular Expression, Look in subfolders, and Include Hidden and System Files).
6. Click Find to perform the search. The first instance of the search string is highlighted in the Find In Files
tab of the Output Bar.
To cancel a Find in Files search, click Stop Find In Files (in the Tools menu).
7. The results of the Find In Files operation are displayed in the Find In Files tab of the Output Bar, along
with the total number of instances of the search string that were found in the specified directory.
8. Double-click on any file listed in the Find In Files tab to open it in a Source Code Editor window, with the
cursor positioned at the beginning of the line containing the search string.
84
Printing Files
You can print the active file in the Source Code Editor using the Print option in the File menu.
1. Choose File > Print Preview to open the Print Preview window, to preview the file, as it will be printed. 2. Choose File > Print Setup to open the Print Setup dialog, to choose and configure your printer (FIG. 69).
3. Choose File > Print (or click the toolbar button) to print the file. Print Preview Window
This option displays a preview of the file or code block in a separate window, as it will appear when printed (FIG. 70).
85
If a block of text (in a Source Code Editor window) is selected, the highlighted block of text will appear in the Print Preview window. Otherwise, the active file will appear for preview. The options in the Print Preview window toolbar include:
Print Next Page Prev Page One Page/Two Page Zoom In Zoom Out Close Prints the current page view Displays the next page of the selected file Displays the previous page of the selected file Toggles the page view to one or two pages. This option is enabled only if the active file is longer than one page. Zooms in on the page view Zooms out from the page view Closes the Print Preview window
If you don't have a printer installed on your PC, the Print and Print Preview options invoke a message alerting you to install a printer.
Print Dialog
Select Print from the File menu (or click the toolbar button) to access the Print dialog (FIG. 71).
Use the options in this dialog to set preferences for your printer, and send the file in the currently active Source code Editor window to a specified printer.
Name Properties Print Range Click the down arrow to display a list of available printers. Select the target printer from this list. Click to open the Printer Setup dialog to set options specific to the selected printer. Use the radio buttons to specify the range of the active file to be printed: All - Click to print the entire file Pages - Click to enable the from: and to: fields where you can specify the pages that you want to print. Selection - Click to print only the currently selected (highlighted) text in the file. This option is only available if a block of text is selected in the active Source Code Editor window. Copies - Click the up and down arrow buttons to specify the number of copies to print.
86
Programming
Programming
Source Code Editor
Use Source Code Editor windows (FIG. 72) to display, view and edit Axcess and NetLinx source code files. You can have multiple files open at any time. Each code file is opened in a separate Source Code Editor window.
Refer to the Source Code Editor Window - Features section on page 16 for a list of supported features.
Do not attempt to open .LIB or .SYC files for editing in the Source Code Editor. Doing so could cause program failure . Source Code Editor window features include: Drag and drop any supported file type from Explorer into the Source Code Editor to open that file in a new Source Code Editor window. Drag and drop selected text to another Editor window (at the cursor location), or to another location within the same Editor window.
87
Programming
Source Code Editor windows are moveable and resizable. Use the options in the Window menu to
windows. This feature allows you to view and edit different locations in a large code file.
Right-click anywhere within a Source Code Editor window to open the Source Code Editor context
menu.
Hold down the Alt key and select text with the left mouse button for columnar Cut, Copy, and Paste
operations.
The Edit > Undo and Redo commands allow unlimited Undo/Redo operations. Use the Edit > Make Selection Uppercase and Make Selection Lowercase commands to
indentation.
Multiple clip-board buffer capabilities. Ability to print an entire file. Mouse wheel support. Refer to the Advanced Editor Commands section on page 97 for a listing and description of
open the Source File Context Menu, with the additional option to Open Include File. This option opens the associated Include file in a new Source Code Editor window.
Bookmark
88
Programming
Regular Expressions
Regular expressions are notations used for describing patterns of text. They are a form of metacharacters, or characters that define other characters. The regular expressions supported by NetLinx Studio are described below: Supported Regular Expressions
Regular Expression ^ $ . * Description Represents the beginning of a line. For example, "^x" only matches an "x" that occurs at the beginning of a line. Represents the end of a line. For example, "$x" only matches an "x" that occurs at the end of a line. Represents any character. For example, " x.y" matches " xay" and " xzy" but not " xy" or " xyxy". Specifies zero or more occurrences of the previous "." or literal character. For example, x*y matches " xzy" or " xy".
89
Programming
Undo/Redo
NetLinx Studio supports Undo and Redo functionality in the Source Code Editor: Click Edit > Undo (or click the toolbar button) to undo the last action. Click Edit > Redo (or click the toolbar button) to redo (repeat) the last action.
Call Tips
Call tips are similar to the AutoComplete and AutoSuggest functions, except that Call Tips assist you with adding declared functions by displaying a list of parameters that are valid for the particular function you are adding. Call Tips are shown for declared functions when: A function name is followed by an open parenthesis. A single-quoted call name is followed by an open parenthesis. A single-quoted system call name is followed by an open parenthesis. The application displays a list of calls when the word "CALL" is followed by a single quote. It displays a list of System Calls when the word "SYSTEM_CALL" is followed by a single quote as shown in FIG. 73:
The list of calls is in alphabetical order (with the very first item highlighted by default) - type the first letter of the desired call to jump to that point in the list. Use the scroll bar to scroll through the list of calls and click to select the item that you want to insert at the cursor's position. Double-click, or press the Tab key (or Enter on your keyboard) to insert the selection. In the example below, the user entered SYSTEM_CALL, then selected 'LDP1F', and added a space and an open single-quote to receive the following Call Tip:
The Call Tip displays a list of parameters that are valid for the particular function you are adding (separated by commas), with the current parameter being entered in bold (DEV DECK in the example above). You may enable or disable this feature by toggling the Enable Call Tips checkbox in the Editor tab of the Preferences dialog.
Case Inversion
Use the case inversion tools in the Edit menu (or the Edit toolbar) to quickly switch selected characters in the Source Code Editor window: Make Selection Uppercase - Changes all selected characters in the file to uppercase. Make Selection Lowercase - Changes all selected characters in the file to lowercase. Invert Case - With text selected in the Source Code Editor window, click this option to invert the case of the selected text. All uppercase characters become lowercase, and vice-versa.
90
Programming
Code Folding
Fold levels can be used to simplify the view in the Source Code Editor windows by allowing you to "fold" each major section of the code (DEFINE_DEVICE, DEFINE_CONSTANT, DEFINE_TYPE, etc.) so that only the header row is visible. This way, you only see the section(s) that you are actually working in. Fold levels can be collapsed and expanded, in much the same way as the tree structures that occur in the Workspace Bar. Fold levels that are collapsed are indicated by a blue plus sign (+) to the left of the line containing that section's header row. Fold levels that are expanded are indicated by a red minus sign (-) to the left of the line containing that section's header row. In FIG. 75, all fold levels are collapsed except DEFINE_CONSTANT (in this example there are no data type definitions).
In order to use fold levels, you must first enable the option in the Editor tab of the Preferences dialog (by default, this option is disabled). Once the Enable Code Folding option is enabled, use the Expand All Fold Levels and Collapse All Fold Levels options (via either the Edit menu or the Edit toolbar) to control the fold levels (FIG. 76):
Expand All Fold Levels -Select this option to automatically expand all fold levels in the active file. Collapse All Fold Levels - Select this option to automatically collapse all fold levels in the active file. FIG. 76 Code Folding options If the Enable Code Folding option has not been enabled, these two options are unavailable. Also note that the application will remember your last code folding settings when the file is closed,
so they will still be in place the next you open the file.
Syntax Highlighting
When a source file is loaded in the editor, it is read line by line. Each line is broken up into its constituent words. Technically the line is broken into tokens, but the concept of a word is more familiar to most people. Different words and groups of words are handled differently. Here is a breakdown of the mechanism used: Syntax Highlighting
Comments Any portion of the line that initiates or falls within a comment is considered to be one comment (essentially it's treated as one big word). The comment is then syntax highlighted using the color specified in Preferences > Editor > Comment. Language Reserved Words When NetLinx Studio is started it loads two files: NetLinx.rw and Axcess.rw. These are the "reserved word" files. These files contain all of the words that NetLinx Studio will consider to be "Language Reserved Words". Language Reserved Words are syntax highlighted using the color specified in Preferences > Editor > Language Reserved Word. If a partial word that is typed is recognized as a reserved word, the editor will suggest its closest match.
91
Programming
92
Programming
Insert Section
The Insert Section option allows you to insert a particular section heading in your code, at the cursor's position. This option is available via the Edit menu, the Source Code Editor context menu, or the Edit toolbar.
This command only works on the open Source Code Editor window.
1. Select Edit > Insert Section to access the Insert Section sub-menu (FIG. 77).
2. Position the cursor at the beginning of the line that you want to add the section heading to. 3. Select the section heading that you want to add from the sub-menu.
The available options are:
NetLinx: DEFINE_DEVICE DEFINE_CONSTANT DEFINE_TYPE DEFINE_VARIABLE DEFINE_LATCHING DEFINE_TOGGLING DEFINE_VARIABLE DEFINE_LATCHING DEFINE_TOGGLING Axcess: DEFINE_DEVICE DEFINE_CONSTANT
DEFINE_MUTUALLY_EXCLUSIVE DEFINE_MUTUALLY_EXCLUSIVE DEFINE_CONNECT_LEVEL DEFINE_START DEFINE_MODULE DEFINE_EVENT DEFINE_PROGRAM DEFINE_PROGRAM DEFINE_CONNECT_LEVEL DEFINE_START
93
Programming
Goto Section
The Goto Section option allows you to jump to a particular section in your code. This option is available via the Edit Menu, the Source Code Editor context menu or the Edit toolbar.
1. Select Edit > Goto Section to access the Goto Section sub-menu (FIG. 78).
2. Select the section that you want to jump to from the sub-menu.
The Insert Section and Goto Section sub-menus may include sections that are not defined in the Source Code file being edited. The valid commands for the System type will be available whether they are actually in the file or not.
3. The cursor jumps to the top of the selected section in the open Source Code Editor window. Goto Line
Select Goto Line from the Edit menu, the Source Code Editor context menu (or click the toolbar button) to jump to a particular line number in your code. To display line numbers in the Source Code Editor windows, select the Show Line Numbers option in the Editor Options tab of the Preferences dialog.
1. Right-click inside a Source Code Editor window to access the Source Code Editor context menu, and
select Goto Line to access the Goto Line dialog (FIG. 79).
2. Enter the line number in the Enter Line Number field and click OK to jump to the specified line number
in the open Source Code Editor window.
1. Click the Goto Function or Subroutine toolbar button to access a list of functions contained within the
active Source Code file.
2. Select the function or subroutine that you want to jump to from the list. 3. The cursor jumps to the top of the selected section in the Source Code Editor window.
94
Programming
1. Copy (or cut) a selection from a code file (in a Source Code Editor window). 2. Position the cursor in the file at the point that you want to insert the copied text.
You can copy and paste across files, so you don't have to paste it into the same file it was copied from.
3. Select Edit >Clipboard Buffers (or click the toolbar button). This displays a list of all items currently
stored in clipboard memory. Any text that has been cut or copied to clipboard memory is shown in the list, starting with the most recent entry.
4. Click on the item in the list that you want to insert into the active code file. The selected clipboard item is
inserted into the active file at the cursor's position.
1. Highlight a selection of code in a Source Code Editor window. 2. Press Ctrl+C to copy the selection to the clipboard. 3. Highlight another selection of code in a Source Code Editor window. 4. Press Ctrl+C to copy this selection to the clipboard as well. 5. Place the cursor in the location that you want to paste one of the copied items (in a Source Code Editor
window).
6. Click the Clipboard Text Buffer toolbar button (Edit toolbar) to access a list of items in the Clipboard
Text Buffer (FIG. 80).
7. Click an item in the list to paste it into the active Source Code Editor window, at the cursor location.
95
Programming
Renumber Selection
Click Edit > Advanced > Renumber Selection (or click the toolbar) to re-arrange the selected text in the Source Code Editor window to make all numbers in the code (i.e. device numbers, channel numbers, etc) fall into ascending sequential order.
Show Whitespace
Select Edit > Show Whitespaces (or click the toolbar button) to place dots in the Source Code Editor window to indicate "whitespaces" (spaces and tabs) in the code. By default, this option is disabled.
FIG. 81 Autocomplete And Autosuggest example Note that AutoComplete/AutoSuggest is case-sensitive. Typically section headings are
reserved identifier, the program will suggest a name that has been previously defined within the source code.
96
Programming
When the editor makes a suggestion, you may choose to accept the suggestion by hitting the TAB
key (or a different keystroke as defined in the Keyboard tab of the Preferences dialog). However, if the suggestion is not what you intended, you may choose to have the editor display it's next suggestion. You can cycle through all of the suggestions by using the keystroke defined in the Keyboard tab of the Preferences dialog (the Next Suggestion item in the Advanced Editor category). There is no default keystroke assignment for Next Suggestion (to avoid conflicting with preexisting custom keystrokes). You must set your own keystroke to take effect. Use the Edit > Rescan Current Source File option to rescan the active file to rebuild the symbol information used by the AutoComplete and AutoSuggest features. Stack Variables/Parameters only auto-suggest when they are within the scope of the CALL, FUNCTION or EVENT that they were declared in.
Select Word Right selects from the cursor to the end of the word Select Line Select Line Left Select Line Right Delete Word Delete Word Left selects the current line at the cursor selects from the cursor to the beginning of the line selects from the cursor to the end of the line deletes the current word at the cursor deletes from the cursor to the start of the word
Delete Word Right deletes from the cursor to the end of the word Delete Line Delete Line Left Delete Line Right deletes the current line at the cursor deletes from the cursor to the beginning of the line deletes from the cursor to the end of the line
None of these commands have default keyboard hotkeys assigned. To assign hotkeys, use the Keyboard tab of the Preferences dialog (select Advanced Editor from the Category drop-down list).
97
Programming
1. Select Tools > Export Editor Preferences. This opens the Export Preferences dialog (FIG. 82):
2. In the Export File Name field, specify a name and target directory for the resulting *.EPX file. 3. Under Export Preferences Options, select Editor, and click OK. To import an existing *.EPX file: 1. Select Tools > Import Preferences. 2. The program will prompt you to acknowledge that the imported settings will overwrite your current
Editor preferences (FIG. 83).
3. Click Yes to proceed. 4. In the Open dialog, locate and select the desired *.EPX file, and click Open. The Editor tab of the Preferences dialog should now reflect the preferences specified in the imported *.EPX file.
98
Programming
The Code Wizard consists of a series of dialogs that help you quickly generate various types of Axcess and NetLinx code segments. The wizard can help construct the following type of code segments: BUTTON_EVENTs CHANNEL_EVENTs LEVEL_EVENTs DATA_EVENTs SEND_COMMANDs (including G3 and G4 Send Commands) IR Constants A source file must be open in Source Code Editor window in order to use the Code Wizard.
Creating Events With the Code Wizard 1. In the first Code Wizard dialog, select the appropriate radio button for the type of event you want to create
- BUTTON_EVENTs, CHANNEL_EVENTs, LEVEL_EVENTs or DATA_EVENTs (FIG. 85).
99
Programming
2. Click Next to proceed to the next Code Wizard dialog. The options in the Wizard dialogs are different for
each event type. The Next button is enabled in each dialog as the required information is supplied (FIG. 86).
IR Constant options
3. Specify the Device for which you want to create this event, and (optionally) enter a comment to include in
the generated code (FIG. 87).
100
Programming
4. Click Finish to exit the Code Wizard. The new event is placed in the active Source Code file, in the
DEFINE_EVENT section. The Code Wizard also automatically updates the DEFINE_PROGRAM section, and any other parts of the source code that are affected by the addition of the new code segment.
Creating SEND_COMMANDs With the Code Wizard 1. In the first Code Wizard dialog, select the I want to generate a SEND_COMMAND radio button. 2. Click Next to proceed to the next Wizard dialog, where you can specify the type of SEND_COMMAND
to create (select either to Make a New Page (PAGE) or to Make a New Popup Page (@PPN)), and specify the name of the new page or popup page. This dialog also contains the option to change the text on a specified button on a touch panel, in which case you must specify the Variable Text Channel, and the replacement Text for that button. Click Next to proceed.
3. Specify the Device for which you want to create this event, and enter a comment to include in the
generated code (optional).
4. Click Finish to exit the Wizard. The new SEND_COMMAND is placed in the active Source Code file, at
the current cursor location.
Generating Constants From an IR File With the Code Wizard 1. In the first Code Wizard dialog, select the I want to generate constants from an IR file radio button. 2. Click Next to proceed to the next Wizard dialog, where you can specify the IR file to generate constants
from (use the Browse (...) button to locate and select the file via the Open IR File dialog). Specify a comment to add to the generated code segment containing the IR constants (optional), and specify a prefix to be added to each IR constant generated (also optional).
3. Click Finish to exit the Wizard. The new IR constants from the specified file are placed in the active
Source Code file, in the DEFINE_CONSTANT section.
101
Programming
When the Wizard generates a new code segment, it is inserted in the active Source Code file, in the appropriate section of the code.
FIG. 89 Code Wizard dialog - Button tab In NetLinx, button events are always created using the BUTTON_EVENT handler in the
DEFINE_EVENT section.
In Axcess, PUSHes, RELEASEs and feedback assignments are generated in the
DEFINE_PROGRAM section. The items in the Button tab are described below:
102
Programming
GET_LAST()
103
Programming
Channel Index
104
Programming
105
Programming
Insert
106
Programming
Comment
107
Programming
108
Programming
109
Programming
PUSH Messages
Select Diagnostics > Enable Push Message Status Bar Display (or click the toolbar button) to display Push message status (Enabled/Disabled):
By default, Push Messages are disabled, as indicated in the Status Bar. Push Messages are enabled via the Diagnostics menu or the Diagnostics toolbar. Once the Push Message Status Bar display is enabled, you can send Push messages to the Master, via the Emulate a Device dialog. The Push Message Status Bar display then shows the D:P:S and Channel information for the most recently received Push
Left- click within the Push Message Status Bar display to view a list of recently received Push messages: FIG. 95 PUSH Messages
110
Programming
1. Check the Enable _WC Preprocessor (UniCode) option in the NetLinx Compiler tab of the Preferences
dialog.
2. Add an Include statement to your code to include the "UnicodeLib.axi" Include file:
By default, this file is installed with NetLinx Studio to the following path: C:\Program Files\Common Files\AMXShare\AXIs\UnicodeLib.axi
3. Save your source file with the Encoding option in the Save As dialog set to UTF-8. Including the Unicode Library
111
Programming
The Unicode Library is implemented in a NetLinx Include file, UnicodeLib.axi, that must be included in your program in order to access the Unicode functions. The Unicode Library is located in an Include file located in the C:\Program Files\Common Files\AMXShare\AXIs directory. Because this location is the default Include search path, you do not need to specify the directory in the include statement. To include the Unicode Library to your program add these lines to your program:
(***********************************************************) (* INCLUDE FILES GO BELOW *)
Unicode Characters
To insert unicode characters into the active Source Code file, at the cursor's position:
1. Select Unicode Edit from the Edit Menu or the Source Code Editor Context Menu to access the Enter
Text... dialog.
2. Type one or more characters in the upper text field to display the characters' unicode send command value
in the lower (read-only) window.
3. Press OK to insert the unicode send command value in the code, at the cursor's position. Working With WIDECHAR Arrays and Unicode Strings
Working with WIDECHAR arrays and Unicode strings is very similar to working with CHAR arrays and ASCII strings. Most operation that can be performed on a CHAR array can be performed on a WIDECHAR array. For instance, to assign a string to a variable use this syntax:
wcMyString = _WC('My String')
The string functions defined for CHAR arrays have been defined for WIDECHAR array for use in Unicode programming. These functions allow you to operate on strings similar to the way you would with CHAR array. For instance, to remove the first 3 characters from a WIDECHAR array and return those characters as a WIDECHAR array, use WC_GET_BUFFER_STRING:
wcRemoved = WC_GET_BUFFER_STRING(wcMyString,3)
You will find that most other function work exactly as their CHAR counterpart do except they work on and return WIDECHAR arrays. The list of Unicode compatible functions is:
WC_COMPARE_STRING WC_GET_BUFFER_CHAR WC_GET_BUFFER_STRING WC_LEFT_STRING WC_FIND_STRING WC_LENGTH_STRING WC_LOWER_STRING WC_MAX_LENGTH_STRING WC_MID_STRING WC_REMOVE_STRING WC_RIGHT_STRING WC_SET_LENGTH_STRING WC_UPPER_STRING
112
Programming
For example:
wcMyString = CH_TO_WC('Any ASCII string') wcMyString = CH_TO_WC(cMyString) cMyString = WC_TO_CH(_WC('Any Unicode string')) cMyString = WC_TO_CH (wcMyString) When converting from WIDECHAR to CHAR, Unicode characters are converted to '?'. Any ASCII or extended ASCII characters, i.e. 8-bit characters, contained in the WIDECHAR array
All Unicode string literals must be wrapped in the _WC macro. Failing to wrap a Unicode string in the _WC macro will result in a compiler error.
The "wc" prefix is Hungarian notation for widechar. This is simply a programming convention and is completely optional. Hungarian notation helps you better identify your variables while you are programming and is a general recommended standard. For more information, see Wikipedia's Hungarian Notation page.
Compiler Errors
The most common type of compiler errors you will encounter while programming for Unicode are caused by not wrapping Unicode string literals in _WC, passing a WIDECHAR to a function that take a CHAR array or passing a CHAR array to a function that takes a WIDECHAR array. If you forget to wrap a Unicode string in _WC, expect to see the following compiler error: On the line where the string is defined:
113
Programming
following compiler error: On the line where the function call is made:
C10585: Dimension mismatch: [1] vs. [0] and Type mismatch in call for parameter [WCDATA] If you try to pass a WIDECHAR array to a function that expects a CHAR array, expect to see the
following compiler error: On the line where the function call is made:
C10585: Dimension mismatch: [1] vs. [0] and Type mismatch in call for parameter [A]
Concatenating String
Unicode strings and WIDECHAR array cannot be concatenated using the same syntax that ASCII strings use. In NetLinx, string expressions are enclosed in double quotes and can only contain 8-bit strings. To concatenate Unicode strings and WIDECHAR arrays, you must use the WC_CONCAT_STRING function:
wcMyString = WC_CONCAT_STRING(_WC('First name'),_WC(' SurName'))
If you attempt to concatenate Unicode strings or WIDECHAR arrays using NetLinx string expressions, expect data loss.
Using FORMAT
The NetLinx Unicode library does not include a Unicode compatible FORMAT function. In NetLinx, the format function is used to convert numbers to text. To use FORMAT with Unicode string, use FORMAT to convert the number to a CHAR array and then use CH_TO_WC and WC_CONCAT_STRING to combine the result with an existing WIDECHAR array. The following two syntaxes are functionality equivalent:
fTemperature = 98.652 cMyString = FORMAT('The current temperature is%3.2f',fTemperature) -----------------------------------------------------------------------fTemperature = 98.652 cTempString = FORMAT('%3.2f',fTemperature) wcMyString = _WC('The current temperature is ') wcMyString = WC_CONCAT_STRING(wcMyString,CH_TO_WC(cTempString))
114
Programming
following constants can be used for specifying or checking the file format: WC_FORMAT_UNICODE, WC_FORMAT_UNICODE_BE, WC_FORMAT_UTF8. The Unicode file format, specified by the constant WC_FORMAT_UNICODE, is the fastest to encode and decode. You should use this format unless you have a particular application that requires either UTF-8 or Unicode BE encoding. The WC_FILE_READ/WRITE functions take the number of characters that will be read or written to the file. However, the functions return the number of bytes read or written to the file, not the number of characters. For Unicode and Unicode BE encoding, there are 2 bytes for every character. For UTF-8 encoding, the number of bytes for every character varies depending on the character. Unicode filenames are not supported. The parameter for the file name is a CHAR array. Always use a nonUnicode name for the file. The following file functions support WIDECHAR arrays:
WC_FILE_OPEN WC_FILE_CLOSE WC_FILE_READ WC_FILE_READ_LINE WC_FILE_WRITE WC_FILE_WRITE_LINE
Right-to-left languages are not stored differently than left-to-right languages, they are simply rendered differently than right to left languages. However, note that the functions WC_LEFT_STRING and WC_RIGHT_STRING remove a number of characters from the start and end of a string respectively. Using WC_LEFT_STRING on a right-to-left language will return the number of right-most, i.e. first, characters you requested, not the left-most, i.e. end, characters. WC_LEFT_STRING returns the number of characters request from the front of the string and WC_RIGHT_STRING return the number of characters requested from the end of the string, regardless of the language's orientation.
115
Programming
NetLinx Studio Macros Files use the file extension *.NSM. The options in the Macros sub-menu/toolbar are as follows:
Pause Recording
Cancel Recording Click to cancel the current macro recording. Stop Recording Run Click to stop recording the current macro. By default, new macro files (*.NSM) are saved to the xxxxx directory. Click to play the currently active macro. If you have just finished recording a macro, that macro will be run. Otherwise, use the Load Macros and Select Macro options to load and select a different macro, then select Run. Click to load one or more macro files. This option invokes the Open dialog to locate and select the macro file(s) to be loaded. Once one or more macro files are loaded, they can be selected to run via the Select Macro option. Click to open the Select a Macro dialog. Use this dialog to select a macro to run. Click to open the Edit Macros dialog. Use the options in this dialog to delete existing macros. Click to save all currently loaded macro files, via the Save As dialog.
Load Macros
Recording a Macro
To record a new macro:
1. Select Edit > Macros to access the Macros sub-menu, and select Record (alternatively, click the Start a
New Recording toolbar button in the Macros toolbar). This opens the New Macro dialog (FIG. 97).
2. Enter a Name and (optionally) a Description for the new macro. 3. Click OK to close the dialog and begin recording. All keystrokes that are used within the open Source
Code Editor windows will be recorded as part of this macro. To Pause the recording, click the Pause Recording toolbar button (or select Edit > Macros > Pause Recording). To Cancel the recording, click the Cancel Recording toolbar button (or select Edit > Macros > Cancel Recording). To Stop the recording, click the Stop Recording toolbar button (or select Edit > Macros > Stop Recording).
4. Once the macro has been recorded, it can be Played. When a macro is played (via the Play Current
Macro toolbar button or Edit > Macros > Play Current Recording), all keystrokes recorded in the currently loaded macro are repeated at the cursor position in the active Source Code File.
116
Programming
Unless you have selected a different macro (via the Load Macros toolbar button, or Edit > Macros > Load Macros), the last recorded macro is the current macro and therefore will be played when Play Current Macro is selected.
Playing a Macro
To play the currently loaded macro:
1. Place the cursor in a Source Code Editor window, at the point in the code that you want to play the current
macro.
2. Select Edit > Macros > Play Current Macro (alternatively, click the Play Current Macro toolbar
button in the Macros toolbar). Unless you have selected a different macro (via the Load Macros toolbar button , or Edit > Macros > Load Macros), the last recorded macro is the current macro and therefore will be played when Play Current Macro is selected.
To play a different macro, you'll need to first load a different macro, via the Edit > Load Macros
option. See the Loading a Macro section on page 117 for details. If several macros have been loaded, select the macro you want to run via the Select a Macro dialog (Edit > Macros > Select Macros).
Saving NetLinx Studio Macro Files (*NSM) 1. Select Edit > Macros to access the Macros sub-menu, and select Save Macros (alternatively, click the
Save Macros toolbar button in the Macros toolbar). This opens the Save As dialog.
2. Specify a target directory and filename for this macro file. 3. Click Save.
Once the macro file is saved, it can be opened via the Load Macros option in the Macros sub-menu or toolbar.
Loading a Macro
Macros must be loaded before they can be selected and run in the current session. To load an existing NetLinx Studio Macro (*.NSM) file:
1. Select Edit > Macros to access the Macros sub-menu, and select Load Macros (alternatively, click the
Load Macros toolbar button in the Macros toolbar). This invokes the Open dialog.
2. Locate and select the desired *.NSM file and select Open. This closes the dialog and loads the selected
macro.
3. Once the macro is loaded, it can be run via Edit > Macros > Run '<macrofilename>', or by clicking the
Play Current Macro toolbar button.
4. If several macros have been loaded, select the macro you want to run via the Select a Macro dialog (Edit
> Macros > Select Macros).
Selecting Macros
If more than one macro file has been loaded in the current session, you can select which particular macro to run via the Select a Macro dialog (FIG. 98):
1. Select Edit > Macros > Select Macro (or click the toolbar button) to open the Select a Macro dialog. 2. All currently loaded macros are listed in the Available Macros list. 3. Select the macro that you want to run, and click Select. This closes the Select a Macro dialog, and the
selected macro is now the current macro.
4. Click Edit > Macros > Run '<macrofilename>', or the Play Current Macro toolbar button to run the
selected macro.
117
Programming
118
Build Operations
Build Operations
Overview
The options in the Build menu allow you to compile source code into executable code that the Axcess or NetLinx control system can understand. NetLinx Studio v.2 has the ability to compile and link all the source code (.AXS and .AXI) files at the Workspace, Project, System or File level, plus the ability to compile a single file as either an Axcess or NetLinx type source code file. To send the compiled code to the Master Controller, use the File Transfers option in the Tools menu. The Preferences dialog provides the ability to configure both the Axcess and NetLinx compliers if desired: See the Preferences Dialog - Axcess Compiler Options section on page 209. See the Preferences Dialog - NetLinx Compiler Tab section on page 211.
2. The status and results of the build are displayed in the Status tab of the Output Bar.
1. Click to select and highlight the Project that you want to compile (in the Workspace tab of the Workspace
Bar).
Errors dialog.
This dialog gives you the option of ignoring the errors and continuing with the build.
3. The status and results of the build are displayed in the Status tab of the Output Bar.
1. Click to select (highlight) the System that you want to build (in the Workspace tab of the Workspace Bar). 2. Select Build System <System name> from the Build menu, or select Build System from the System
Folder context menu (or click the toolbar button). Any errors detected by the program before the build operation starts are listed in the Pre-Build Errors dialog. This dialog gives you the option of ignoring the errors and continuing with the build.
3. The status and results of the build are displayed in the Status tab of the Output Bar.
119
Build Operations
1. Select Build Active System from the Build menu, or click the toolbar button.
Any errors detected by the program before the build operation starts are listed in the Pre-Build
Errors dialog. Assuming that a Master Source Code file has been defined for the System, this dialog gives you the option of ignoring the errors and continuing with the build.
2. The status and results of the build are displayed in the Status tab of the Output Bar.
2. Select the appropriate compile command. There are several ways to access the compile commands - via
the Build menu, the System File context menus (in the Workspace tab of the Workspace Bar), the Source Code Editor context window, or via the toolbar buttons. If you create a new non-Project related file, without a Workspace file open, the Compile command compiles the file using the compiler (NetLinx or Axcess) associated with the file when it was created. If you open an existing non-Project related file, with a Workspace open, the Compile command compiles the file using the compiler specified in the System communication settings for the currently active System. The Compile as NetLinx command compiles the selected file using the NetLinx compiler. The Compile as Axcess command compiles the selected file using the Axcess compiler. Any errors detected by the program before the build operation starts are listed in the Pre-Build Errors dialog. This dialog gives you the option of ignoring the errors and continuing with the build.
3. The status and results of the build are displayed in the Status tab of the Output Bar.
See the Compiling Source Code Files section on page 64. See the Compiling Module Files section on page 73.
120
Build Operations
Compiler Errors
When the compiler finds an error during the compilation process, it informs the programmer. Most of the time these errors occur due to a typographical error or incorrect syntax of a particular command. Unlike warnings, errors must be corrected before your program can be executed. Compilation errors are described below: Compiler Errors
A "<symbol>" was expected Active keyword expected Allowed only in DEFINE_START Attempted CALL to undefined subroutine Comment never ends, EOF encountered Conditional compile nesting too deep Constant type not allowed The compiler is expecting a certain symbol at this particular place. An ACTIVE keyword is not present after a SELECT keyword. A keyword that is only allowed to appear in the DEFINE_START section of the program was encountered elsewhere. A CALL statement refers to a subroutine that has not been defined with a DEFINE_CALL statement. A comment begins but never ends. Place a close comment, * ) at the end of the unfinished comment. There are too many nested #IF_DEFINED or #IF_NOT_DEFINED conditional compilation statements. The limit is 20 nested conditional compilation statements. A constant value was declared as latching, toggling, or mutually exclusive, as shown below:
DEFINE_CONSTANT PLAY = 1 DEFINE_LATCHING PLAY (* Error: PLAY is a constant *)
DEFINE_CALL must have a name DEFINE_CALL name already used Device values must be equal Duplicate symbol Evaluation stack overflow Evaluation stack underflow Identifier expected Identifier is not an array type
DEFINE_CALL must have a name after it. For example, DEFINE_CALL 'VHS'. The name of the DEFINE_CALL has already been used. This name cannot be the same as an already declared identifier of any type. In a range specification, the devices (or their defined identifiers) must be equal. For example, ([1,1]..[1,5]) is valid; ([1,1]..[2,5]) is not. Duplicate definitions of variables or constants are found. All variables and constants must have unique identifiers. The expression is too complicated. Try breaking it up into smaller pieces. The compiler is expecting an identifier after a #DEFINE statement or after an integer declaration in the DEFINE_VARIABLE section. A non-array variable was treated as an array.
121
Build Operations
122
Build Operations
To not allowed within DEFINE_START To not allowed within MAINLINE To not allowed within RELEASE To not allowed within WAIT Too few parameters in CALL Too many Include files Too many parameters in CALL Type mismatch in function CALL Undefined identifier Unmatched #END_IF Unrecognized character in input file Use SYSTEM_CALL [INSTANCE] 'NAME' Variable assignment not allowed here WAIT not found
There are not enough parameters being passed to the subroutine. A program may only contain up to 20 Include files. There are too many parameters being passed to the subroutine. A function was called with a parameter of the wrong type. For instance, attempting to use ITOA with an array as a parameter will result in an error. An attempt was made to reference an identifier that has not been defined previously in the program. An #END_IF keyword was found, but no #IF_DEFINED or #IF_NOT_DEFINED was previously compiled. An invalid character was found during compilation. This error occurs if a SYSTEM_CALL statement is written incorrectly as SYSTEM_CALL 'NAME' [INSTANCE NUMBER]. Variables may not be assigned a value when they are defined in the DEFINE_VARIABLE section. A statement references a WAIT by a name that does not exist. For example, CANCEL_WAIT 'CASS' will produce this error if there is no WAIT named CASS.
Compiler Warnings
Sometimes the compiler generates a warning message instead of an error message; these warning messages always start with w. A warning about a particular statement means that the statement is not technically an error, but you should be careful doing it. Warnings, unlike errors, do not stop the program from compiling. Some types of warnings can be disabled in the Compiler Options tab of the Preferences dialog. Common compiler warnings are described below: Compiler Warnings
(w) Cannot assign unlike types This warning occurs when a variable or value of one type is assigned to a variable of a different type. Here are some examples: Assigning a string literal, string expression, or array to a non-array variable Assigning a non-array variable to an entire array Assigning an integer array to a non-integer array Assigning a two-dimensional array to a one-dimensional array, or vice versa Assigning the result of a function that returns an array type to a non-array variable or to a two-dimensional array variable (for example, X = ITOA(12), where X is a nonarray variable or two-dimensional array variable) Assigning the result of a function that returns a non-array type to a one- or twodimensional array variable (for example, X = ATOI('AMX'), where X is a one- or twodimensional array variable) This message is a warning and not an error, because X = ITOA(12) works correctly when X is a simple variable, since the result is a single value between and 65,535. The generation of this warning can be turned on or off in the Compiler Options tab of the Preferences dialog.
123
Build Operations
FIG. 99 Compiler Error Warnings Report Dialog Use the options in this dialog to specify what you want to include in the report (Errors, Warnings or
124
Build Operations
The warning number is 10571. Add the line to the beginning of the code file:
#DISABLE_WARNING 10571
The code will now compile without generating the specified warning.
Run-Time Errors
In many cases, a program is compiled and sent to the Master Controller error-free, but the System does not act in the way it should. If the program code is correct, you should check for run-time errors. These errors occur in the Master Controller, usually when it could not perform a particular operation in the program. Run-Time errors are errors that occur during program execution, and are described below: Run-Time Errors
Bad assign 2dim... Bad assign Call... These errors occur if an attempt is made to assign a two-dimensional array to a different type (such as a variable or one-dimensional array), and vice versa. These errors occur if the Master Controller cannot assign a parameter in a CALL statement to the parameter in the corresponding DEFINE_CALL statement.
Bad element assign... These errors occur if an assignment is attempted past the end of an array, or to the location of an array (for example, ARRAY[]). Bad Off... Bad On... Bad To... Bad re-assign Call... These errors indicate that the device-channel or variable that is being referenced by an OFF, ON, or TO keyword is out of range. These errors occur when the Master Controller attempts to re-assign the parameter variables in a DEFINE_CALL to the parameters in the corresponding CALL statement, and the assignment cannot be made. This error occurs when the Master Controller does not understand a piece of data in the program it is executing. These errors occur if the SET_LENGTH_STRING keyword tries to set the length value of an array to a value greater than the array's storage capacity. This error occurs whenever a WHILE loop terminates due to the half-second timeout imposed on WHILE loops.
125
Build Operations
126
Network Configuration 1. Select Settings >Master Communication Settings to open the Master Communication Settings dialog
(FIG. 101 on page 128).
2. Click the Communication Settings button to open the Communication Settings dialog (FIG. 102 on
page 129): a. Select NetLinx for the platform and then select either a COM port (if the networking is not already configured) or an IP address (if it is currently on the network). b. Select OK when complete.
3. Select Diagnostics > Network Addresses item to open the Network Addresses dialog (FIG. 100).
a. b. c. d.
Select the Networking tab from the tabs along the top. Enter 0 for both System and Device. Then press Get IP Info. Then press Get DNS Info.
127
4. Is there a supplied Host name for the IP address assigned to the NetLinx master?
If so, enter under Host Name. If no name is supplied, enter NetLinx.
5. Is your IP address dynamic (DHCP) or fixed (Static)? Select the Use DHCP or Specify IP Address
according to your network information. If you selected Use DHCP, then press Set IP Info and then press Reboot. When the master restarts, it will contact the DHCP server to fill in any missing network information. You are now finished with your NetLinx Network Setup. If you selected Specify IP Address, enter the IP address supplied by the network administrator. If you do not have an IP address, contact the network administrator to obtain one. If you enter the incorrect number, the NetLinx master and very likely another device on the network will not be able to communicate on the network.
6. Enter your Subnet Mask. This value determines the scope of your network. If you did not receive a value
for this, enter 255.255.255.0. It is a very common default. Do not leave this blank.
7. Enter your Gateway. This value determines a path to computers not on your network. If you did not
receive a value for this, enter your IP address. Do not leave this blank.
8. Enter your Domain Suffix. If you did not receive a value for this, leave it blank. 9. Enter up to 3 DNS IP. This values help your master find other network resources. If you did not receive a
value for these, leave them blank.
10. Press Set IP Info, followed by Set DNS Info. 11. Press Reboot.
When the master restarts, it will use the new network settings. You are now finished with your NetLinx Network Setup.
Selected System Communication settings for the selected System Click to open the Communications Settings dialog, to configure settings for the selected System
Refer to the Master Communication Settings Dialog section on page 199 for descriptions of the options presented in this dialog.
128
Refer to the Communication Settings Dialog section on page 200 for descriptions of the options presented in this dialog.
1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog
(see FIG. 101 on page 128).
2. Click Communication Settings to access the Communication Settings dialog. 3. Select NetLinx Master as the Platform Selection. 4. Select TCP/IP as the Transport Connection Option. 5. Click the Listen button to open the Listen For Masters dialog (FIG. 103).
129
6. Click the Start Listening button to listen for "blink" (UDP) messages from NetLinx Masters on the same
subnet.
7. As NetLinx Masters are detected on the subnet, they are displayed in the List of Active NetLinx Master
Controllers window.
8. Click Select To Add to add the selected Master(s) to the List of Addresses in the Communications
Settings dialog.
9. Click OK to close the Master Communications dialog. 10. In the online tree (displayed in the Online Tree tab of the Workspace Bar), click Display to open the
Online Tree sub-menu, and select Refresh Network Online Tree to refresh the online tree display.
11. Double-click the System icon to expand the tree to show the NetLinx master (FIG. 104).
130
1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog
(see FIG. 101 on page 128).
2. Click Communication Settings to access the Communication Settings dialog (see FIG. 102 on
page 129).
3. Select NetLinx Master as the Platform Selection. 4. Select Serial as the Transport Connection option. 5. Click Edit Settings to open the Serial Settings dialog. 6. Select a COM port and specify the communication settings for serial port communications.
The default settings are:
Comm Port Baud Rate Data Bits Parity Stop Bits Flow Control COM1 38400 8 None 1 None
7. Click OK to return to the Communication Settings dialog. 8. Enter the user name and password assigned to the Master (case-sensitive), if required. 9. Click OK to return to the Master Communication Settings dialog. 10. Click OK to close the Master Communications dialog. 11. In the online tree (displayed in the Online Tree tab of the Workspace Bar), click Display to open the
Online Tree sub-menu, and select Refresh Network to refresh the online tree display.
12. Double-click the System icon to expand the tree to show the NetLinx master.
1. In the Master Controller ID text box, enter/edit the target System number (if necessary). 2. To retrieve the current Time/Date settings for the specified target Master, click Get Time/Date. The
Master's current Time/Date settings are displayed in the (read-only) text field.
131
3. To change the target Master's date setting, click the down arrow next to the Date field to open the calendar
window. To change the system's date, click to select the desired day. Use the forward and back arrow buttons to change the month. When you select a new date, the calendar closes and the new date is represented in the Date field. To set the system to today's date, click Today at the bottom of the calendar.
4. To change the target Master's time setting, select a field within the time display (hours, minutes, seconds,
or AM/PM) and click the up and down arrows to adjust the selected field. Alternatively, you can highlight the field in the Time display that you want to adjust and type the desired number in its place. If no field is selected within the time display, the up/down arrows affect the hours setting.
5. To set the specified Time/Date settings for the target system click Set Time/Date.
If the target Master has security applied, NetLinx Studio will prompt you for a User Name and Password in order to change these settings.
1. The left side of this dialog lists the Projects and Systems that are included in the currently open
workspace. By default, the currently active System is highlighted. The Master specified in the active (highlighted) System is the one that will be rebooted.
2. Click on any other System to select a different Master to reboot. 3. Once the desired System has been selected (highlighted), click the Reboot button to reboot the Master
associated with the selected System. All communications to the Master are stopped in order to activate a connection and initiate the reboot process. Allow 20-30 seconds for the reboot. You can reboot more than one Master before closing this dialog.
132
1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog
(see FIG. 101 on page 128).
2. Click Communication Settings to access the Communication Settings dialog (see FIG. 102 on
page 129).
3. Select Axcess Master as the Platform selection. 4. Select Serial as the Transport Connection option. 5. Under Serial Connection Options, select a COM port and specify the communication settings for serial
port communications. The default settings are:
Comm Port Baud Rate Data Bits Parity Stop Bits Flow Control COM1 38400 8 None 1 None
6. Click OK to save changes and close the Communication Settings dialog. 7. Click OK to save changes and close the Master Communication Settings dialog. 8. In the online tree (displayed in the Online Tree tab of the Workspace Bar), click Display to open the
Online Tree sub-menu, and select Refresh Network to refresh the online tree display.
9. Double-click the System icon to expand the tree to show the Axcess master.
133
The Terminal window does not support: Cut operations. Editing operations within the window, other than to input characters at the cursor (the text in the terminal window actually reflects what has been received from the device. Text that is typed in the window will not appear unless echoing is currently enabled on the device).
Telnet Window
NetLinx Studio provides a Telnet interface to NetLinx and Axcess devices. NetLinx Studio supports multiple simultaneous Telnet sessions. Select Tools > Telnet Session (or click the toolbar button) to invoke the Telnet Window. Use the Telnet window to communicate directly with the Master Controller in situations where a Terminal session is not desirable. To use the Telnet window with NetLinx systems, you must be able to access the LAN on which the Master resides via TCP/IP. Otherwise, you can use a Terminal session for terminal control of NetLinx systems. You cannot use the Telnet window while a communication port is in use for a file transfer or debug operation. Type "ECHO ON" in the Telnet window to display messages. Right-click inside the Telnet window to access the Telnet Window context menu.
134
Using the Telnet Window 1. Select Tools > Telnet Session (or click the toolbar button). This action invokes the Telnet Settings dialog
(FIG. 107).
2. In the Telnet Settings dialog, specify the IP Address of the Master with which you want to establish a
Telnet session. Alternatively, select the address from the list of IP Addresses that have already been defined, or use the Listen function to locate the desired IP Address. Once the target IP Address has been specified or selected, click OK to close the dialog.
3. At this point, the Telnet session with the specified Master is established, and the Telnet window is opened.
135
136
Diagnostics
Diagnostics
Overview
The Diagnostics menu contains options that allow you to run various diagnostics operations on NetLinx systems. The options in this menu are enabled only if the communications platform is set to NetLinx in the Communication Setting dialog.
137
Diagnostics
1. Select Diagnostics > NetLinx Device Notification Options to open the NetLinx Device Notifications
Options dialog.
2. Select a device in the Device list and click the Edit button to open the NetLinx Notification Properties (Edit) dialog. Alternatively, you can double-click on a device in the Device list to access this dialog (FIG. 109).
3. Check or un-check the notification types as desired. Note that the target device's Device, Port and System
settings are read-only. This option allows you change the selected device's notification options only. A very large amount of data may be generated if all options are enabled for every device in a large System.
4. Click OK to save your changes and return to the NetLinx Device Notifications Options dialog. The new
notification options are indicated (as ON) in the notifications list.
5. In the NetLinx Device Notifications Options dialog, select Enable Asynchronous Notifications to
enable/disable NetLinx asynchronous notification messages being sent by the master controller. These are low-level strings of raw data, used primarily for troubleshooting the NetLinx master. This option is intended for use in conjunction with AMX Technical Support.
138
Diagnostics
6. Click Done to save changes and close the NetLinx Device Notifications Options dialog. Adding A Device To The Device Notification List
In order to edit, add or remove devices from the list you must be connected to a NetLinx master controller.
1. Select Diagnostics > NetLinx Device Notification Options to open the NetLinx Device Notifications
Options dialog (see FIG. 108 on page 138).
2. Click Add to open the NetLinx Notification Properties (Add) dialog (FIG. 110 on page 139).
3. Specify the Device, Port and System numbers for the NetLinx device that you want to set notification
options for. The D:P:S combination of 0:0:0 is the default setting and will show up as "All Devices".
4. Check each notification type that you want to enable for that device.
To set the selected set of notifications as the default notifications for this device, click the Set As
Defaults button.
Once you set the default notifications, you can use the Use Defaults button to recall the default set.
5. Click OK to close the NetLinx Notification Properties (Add) dialog and return to the NetLinx Device
Notifications Options dialog. The new target device specified has its own line in the notifications list. The Device:Port:System values (for example, 1:0:0) identify the device in the Device column. The selected notification option(s) are labeled as ON in the associated column(s). Repeat steps 2-5 to configure NetLinx Notifications for as many additional devices as is necessary.
6.
A very large amount of data may be generated if all options are enabled for every device in a large System. Select Enable Asynchronous Notifications to enable/disable NetLinx asynchronous notification messages being sent by the master controller. These are low-level strings of raw data, used primarily for troubleshooting the NetLinx master. This option is intended for use in conjunction with AMX Technical Support. Click Done to save the changes and exit the NetLinx Device Notifications Options dialog.
7.
139
Diagnostics
1. Select Diagnostics > NetLinx Device Notification Options to open the NetLinx Device Notifications
dialog.
2. Select a Device from the list and click the Remove command button.
The program will not allow you to remove the All Devices (0:0:0) listing.
To clear the Diagnostics and Notification tabs, select the Clear Diagnostics tab option in the Control a Device or Emulate a Device dialogs.
1. Select Diagnostics > Emulate a Device (or click the toolbar button) to access the Emulate a Device
dialog (FIG. 111).
2. Enter the Device, Port and System <D:P:S> combination of the device you wish to emulate (real or 3.
fictitious). The <D:P:S> value ranges are 0 - 65535. To emulate a channel (push/release), enter a valid Channel number to emulate Channel messages (i.e., Push/Release, CHON, and CHOFF) for the specified <D:P:S> in the Channel text box. The Channel number range is 0-65535.
140
Diagnostics
Select the Push button to emulate a push/release on the channel specified. You may click and hold
down the Push button to see how the master controller responds to the push message.
Select the On or Off buttons to emulate Channel ON (CHON) and Channel OFF (CHOFF)
4. To emulate a level, enter the desired Level (number), Value and data Type (BYTE, CHAR, WIDECHAR,
INTEGER, SINTEGER, ULONG, LONG, FLOAT, or DOUBLE), and click Send to emulate the specified level and value. The Level number range is 0-65535. The list below indicates the valid level data types and their ranges:
Data Type Min Value CHAR INTEGER SINTEGER LONG SLONG FLOAT 0 0 -32768 0 -2147483648 Max Value 255 65535 32767 429497295 2147483647
-3.402823466e+38 3.402823466e+38
5. To emulate sending a String or Command, type a String or Command in the Message(s) To Send text box.
Use the Return key within the text box to enter a new line for the next message. When entering a send command (in the context of this dialog) do not include the "send c" or "send_command" in the statement - only type what would normally occur within the quotes, but don't include the quotes either. For example to send the "CALIBRATE" send command, simply type CALIBRATE (no quotes) rather than SEND_COMMAND <dev> "CALIBRATE". Hold down the Shift key to select a specific range of lines to send to the controller instead of all the lines within the edit control.
a. Click the Message Type radio buttons (String or Command) to specify the type of message you are
sending.
b. Click Send To Master to send the messages in the Message(s) to Send text box to the master. If none
of the messages are selected (highlighted), all messages are sent. If you have selected a line or a range of lines, only the selected messages will be sent. Check the Messaging Options checkboxes to Enable Asynchronous Notifications and/or Enable Internal Diagnostic Messages.
6.
It is recommended that you enable NetLinx Notifications to view the results in the Notifications tab of the Output Bar. For example, in order to view a string sent to a device (via the Emulate Device dialog), you must first enable the Strings to Device notification (in the NetLinx Device Notifications Options dialog). Additionally, to view any strings returned from the device, you must enable the Strings From Device notification.
141
Diagnostics
1. Select Diagnostics > Control a Device (or click the toolbar button) to access the Control a Device dialog
(FIG. 112).
2. Enter the Device, Port and System <D:P:S> combination of the device you wish to control. The <D:P:S>
value ranges are 0 - 65,535.
3. To emulate a channel (push/release), enter a valid Channel number to emulate Channel messages (i.e.,
Push/Release, CHON, and CHOFF) for the specified <D:P:S> in the Channel text box. The Channel number range is 0-65535. Select the Push button to emulate a push/release on the channel specified. You may click and hold down the Push button to see how the master controller responds to the push message. Select the On or Off buttons to emulate Channel ON (CHON) and Channel OFF (CHOFF) messages for the specified <D:P:S>. To emulate a level, enter the desired Level (number), Value and data Type (BYTE, CHAR, WIDECHAR, INTEGER, SINTEGER, ULONG, LONG, FLOAT, or DOUBLE), and click Send to emulate the specified level and value. The Level number range is 0-65535. The list below contains the valid level data types and their ranges:
Data Type Min Value CHAR INTEGER SINTEGER LONG SLONG 0 0 -32768 0 -2147483648 Max Value 255 65535 32767 429497295 2147483647
4.
142
Diagnostics
FLOAT
-3.402823466e+38 3.402823466e+38
5. To emulate sending a String or Command, type a String or Command in the Message(s) To Send text box.
Use the Return key within the text box to enter a new line for the next message. When entering a send command (in the context of this dialog) do not include the "send c" or "SEND_COMMAND" in the statement - only type what would normally occur within the quotes, but don't include the quotes either. For example to send the "CALIBRATE" send command, simply type CALIBRATE (no quotes) rather than SEND_COMMAND <dev> "CALIBRATE". Hold down the Shift key to select a specific range of lines to send to the controller instead of all the lines within the edit control.
a. Click the Message Type radio buttons (String or Command) to specify the type of message you are
sending.
b. Click Send To Master to send the messages in the Message(s) to Send text box to the master. If none
of the messages are selected (highlighted), all messages are sent. If you have selected a line or a range of lines, only the selected messages will be sent. Check the Messaging Options checkboxes to Enable Asynchronous Notifications and/or Enable Internal Diagnostic Messages.
6.
It is recommended that you enable NetLinx Notifications to view the results in the Notifications tab of the Output Bar. For example, in order to view a string sent to a device (via the Emulate Device dialog), you must first enable the Strings to Device notification (in the NetLinx Device Notifications Options dialog). Additionally, to view any strings returned from the device, you must enable the Strings From Device notification.
FIG. 113 Device Addressing dialog Use the set of options on the left side of this dialog to specify the Device and System assignments,
when you know the current address assignments as well as the address that you want to change the device to. Alternatively, you can use the set of ID Mode options on the right side of this tab to change the address assignment for a specified NetLinx device, using Identity (ID) Mode. The Start Identify Mode button places the entire NetLinx system (specified in the Destination System text box) in ID Mode.
143
Diagnostics
If the target Master has security applied, NetLinx Studio will prompt you for a User Name and Password in order to change these settings.
1. 2. 3. 4. 5. 6.
Enter the target device's current Device number in the (Device to Change) Device text box. Click the Change Device checkbox and enter the new Device number in the New Device text box. Enter the target device's current System number in the (System to Change) System text box. Click the Change System checkbox and enter the new System number in the New System text box. Click the Change Device/System Number command button to set the new address information for the specified device. The master must be rebooted to accept the new System number assignment. To reboot the master, select Reboot Master from the Tools menu.
Allow the master 20-30 seconds to reboot. Alternatively, you can use the ID (Identification) Mode options on the right side of this tab to change the address assignment for a specified NetLinx device. Use ID Mode when you don't know the current address assignments. The Start Identify Mode button places the entire NetLinx system (specified in the Destination System text box) in ID Mode.
1. Select the target device/system in the Online Device Tree. 2. Right-click to access the Online Tree context menu. 3. Select Set Device/System to Factory Default.
144
Diagnostics
ID Mode
ID Mode means that the entire system is put on hold while it waits for an event from any NetLinx device in the named system (for example, a button push on a NetLinx Touch Panel). The device that generates the first event is the device that gets "identified". Once a device has been identified, it will be set (or changed to) the Device/System Address specified.
1. Enter the Device and System numbers that you want to assign to the device in the (Change to Device)
Device and System text boxes. The Destination System number must be a System that is defined in the URL List dialog.
2. Enter the Device and System numbers that you want to assign to the device in the (Change to Device)
Device and System text boxes.
3. Click the Start Identify Mode button to place the named System in ID Mode. The text box below this
button displays a WaitingPress Cancel to Quit message. The Start Identify Mode button changes to Cancel Identify Mode (click to cancel ID Mode). Generate an event from the device that you want to assign the new Device and System numbers to: For NetLinx control panels, press any button to generate a Push. For NetLinx Masters, press the ID button on the rear panel. The device that generated an event is assigned the new Device and System numbers. The Online Device Tree will refresh to represent the new device address.
4.
5.
145
Diagnostics
URL Lists
Use the URL Listing dialog to create a URL List for the specified master. The URL List identifies all NetLinx devices present in the same System as the Master that you are connected to (FIG. 114).
You must enter a URL for each device in the System before you can use ID Mode on other devices. Only devices defined in the URL list will appear in the On-line device tree (with the exception of the Master that you are connected to).
Creating a URL List 1. Select Diagnostics > URL Listing (or click the toolbar button) to access the URL Listing dialog. 2. Enter the System and Device numbers for the Master that you are connected to in the appropriate text
boxes. The range is 0-65535.
3. To add a device to the URL List, click Add. This opens the Add URL dialog. 4. Enter the web address (URL or IP Address) of the device in the URL text box and click OK to return to
the URL List dialog.
If you enter a valid URL for a device, the program generates the device's IP Address.
5. Initially the connection status reads Looking up URL. Once found, the new device appears in the URL
List with its IP Port assignment = 1319. Do not change the IP Port number! An IP Address is assigned to this URL and is displayed in the IP Address column.
6. Click Get URL List to refresh the URL List after adding a device. 7. Repeat steps 1-5 for as many additional devices as are required.
To retrieve a list of all URL's in the list, click Get IRL List. The URL List is populated with all
previously set URL's. To remove a URL from the list, select the URL and click Remove. To clear all URL's from the list, click Remove All.
146
Diagnostics
Network Addressing
Use the options in the Networking Addresses dialog to change the network settings for a specified NetLinx master (FIG. 115).
FIG. 115 Networking Addresses dialog NXI masters are always set to Device = 0. If the target Master has security applied, NetLinx Studio will prompt you for a User Name and
Password in order to change these settings. See the NetLinx Master Security section on page 192 for details.
Reboot Device Click to reboot the specified device. IP Address: Host Name - Use this field to view/edit the target master's current Host Name. Use DHCP/Specify IP Address - Use these radio buttons to specify whether to use DHCP, or to Specify an IP Address for the target master. If you select DHCP, the IP Address and Subnet Mask fields are disabled for editing. IP Address - Use this field to view/edit the target master's current IP Address. Subnet Mask - Use this field to view/edit the target master's current Subnet Mask assignment. Gateway - Use this field to view/edit the target master's current Gateway assignment. Get IP Information - Populates the IP Address fields with the current Host Name and Gateway assignments. Set IP Information - Sets new IP information, as indicated in the IP Address fields of this dialog. Set Default Communication Settings with this IP - This option allows you to add the IP address indicated in this dialog to the default master communications settings. Once this button is pressed, and the dialog is closed, the IP address listed in this dialog will be included in the default communication settings (listed as "No Active System - Default Settings" in the Master Communications dialog).
147
Diagnostics
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network Addresses 2. 3.
dialog (see FIG. 115 on page 147). At the top of the dialog, specify a new System number in the System text box. Click the Reboot Master button to reboot the master and accept the new changes. Allow 20-30 seconds for the master to reboot.
Setting the IP Address for a NetLinx Master 1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network Addresses
dialog (see FIG. 115 on page 147).
2. At the top of the dialog, enter the specified devices System and Device numbers in the text boxes
(range = 0-65535).
3. Click Get IP Information to populate the IP Address fields with the current Host Name, IP Address,
Subnet Mask and Gateway assignments.
4. Click the Specify IP Address radio button, and enter the new IP Address, Subnet Mask and Gateway
assignments in the text boxes, as necessary.
5. Click Set IP Information to set the new IP Address assignment. 6. Click Reboot Master to reboot the master and accept the new changes. Allow 20-30 seconds for the
master to reboot.
Setting the DNS Address for a NetLinx Master 1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network Addresses
dialog (see FIG. 115 on page 147).
2. Enter the specified devices System and Device values in the text boxes at the top of the dialog
(range = 0-65535).
3. Click Get DNS Information to populate the DNS Address fields with the current Domain Suffix, DNS IP
Address #1, DNS IP Address #2 and DNS IP Address #3 assignments (as applicable).
4. Edit the DNS Address assignments and/or add new DNS address information as needed. 5. Click Set DNS Information to set the new DNS address assignments. 6. Click Reboot Master to reboot the master and accept the new changes. Allow 20-30 seconds for the
master to reboot.
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network Addresses
dialog (see FIG. 115 on page 147).
2. Enter the specified devices System and Device values in the text boxes at the top of the dialog
(range = 0-65535).
3. Click Get IP Information to populate the IP Address fields with the current Host Name and Gateway
assignments.
4. Select Use DHCP, and enter a new Host Name in the text box, if necessary. 5. Click the Set IP Information button to set the new Host Name assignment. 6. Click Reboot Master to reboot the master and accept the new changes. Allow 20-30 seconds for the
master to reboot.
148
Diagnostics
Changing the IP Address on a NetLinx Master (Specify IP Address) 1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network Addresses
dialog (see FIG. 115 on page 147).
2. Enter the specified devices System and Device values in the text boxes at the top of the dialog
(range = 0-65535).
3. Click Get IP Information to populate the IP Address fields with the current Host Name, IP Address,
Subnet Mask and Gateway assignments.
4. Select Specify IP Address, and enter the new IP Address, Subnet Mask and Gateway assignments in the
text boxes, as necessary.
5. Click Set IP Information to set the new IP Address assignment. A message will be displayed indicating
that the Master has accepted the new settings.
6. Click Reboot Master to reboot the Master and accept the new changes. Allow 20-30 seconds for the
Master to reboot.
149
Diagnostics
150
Debug
Debug
Debugging Source Code Files
NetLinx Studio contains several useful options for debugging your Master Controller and Source Code files. The Debugging feature allows you to view variables declared within the scope of a Function and or Call procedure. However, stack and parameter values are not editable. If you attempt to edit either the stack or parameter values, a warning message is displayed. In order to begin debugging, your computer must be connected to a Master Controller, and you must have a compiled Source Code file active. To use debugging, the Build With Source option must be selected in the Axcess Compiler and/or NetLinx Compiler tabs of the Preferences dialog, before the file is compiled. You cannot compile, send/receive files, or change port settings while the program is in debug mode. Avoid declaring variables as volatile whenever possible, since volatile variables will not display their contents during the debug session. NetLinx character strings by default are displayed in current length mode, while all other strings (including Integer strings) are displayed in total length mode.
Step Mode:
The following options are only needed for debugging code located on a NetLinx master controller:
Run: Run To Cursor: Break: To continue execution after a Single Step operation or from a toggled break point. Execute the program and break on the line of code where the cursor is residing on the screen. Stop execution of the program and highlight the line of code on the screen.
Edit Breakpoints: A dialog box appears listing all the break points within the code. Toggle Break Point: Clear Break Points: Toggle a break point on the screen where the cursor is residing. A red diamond appears next to the line of code to signify a break point. Clears all the break points within the source code file.
151
Debug
2. Choose Debug > Start Debugging (or click the toolbar button) to open the Watch window. If this option
is disabled, make sure your Master Communications Port settings are set to connect to your Master Controller.
3. Right-click inside the Watch window to open the Watch Window context menu. 4. Click Add to insert a new variable in the Watch window. A box appears in the window, with a cursor
blinking in the Name column.
5. Type the syntax of the variable exactly as it is defined in the code and press the Enter key. The value of the
specified variable appears next to the variable (in the Value column).
6. You can select different view formats for the Value by right-clicking on the line containing the variable/
value, and clicking on Display in the Watch window context menu. This opens the Display sub-menu, containing the following view options:
ASCII Display Decimal Display Hexadecimal Display Octal Display Binary Display displays the value of the watched variable in ASCII format. displays the value of the watched variable in decimal format. displays the value of the watched variable in hexadecimal format. displays the value of the watched variable in octal format. displays the value of the watched variable in binary format.
To exit Debug mode, select Debug > Stop Debugging. or close the Watch window.
1. Right-click on a watched variable and choose Debug > Single Step (or click the toolbar button) to put the
Master into single-step mode.
2. With the watched variable selected, select Debug > Single Step (or click the toolbar button). This
command executes mainline one time and breaks. In NetLinx, you can use breakpoints with single-step mode. When the breakpoint is encountered (and the program is suspended), you can single-step without a watched variable reference.
1. Select a watched variable in the Watch window. 2. To change the variable's value, double-click on the desired variable's value to change the value to an edit
field, which you can modify as desired.
152
Debug
1. No Debug Information:
The source code file was not compiled with debug information - this can usually be ignored if you're only watching variables, but if you're getting weird behavior, recompile with Compile with Debug Info enabled (in the NetLinx Compiler tab of the Preference dialog). You will always need debug symbols for breakpoint debugging.
If you've made any changes to the source file, including a re-save, you'll get a message similar to the one above. It can often be safely ignored, but select No if you've done any significant editing.
3. Missing files.
in debug, Total Length = 3 and Current Length = 0. If you modified the code as:
CHAR cat[3] = 'CAT'
in debug Total Length = 3 and Current Length = 3. If you modified the code like this:
CHAR cat[3]
in debug Total Length = 3 and Current Length = 0, because setting values using array indexing does not set the current length.
153
Debug
Note that semicolons are used in the example to terminate each line in a breakpoint. The only time that the semicolon is absolutely necessary is when a breakpoint is set at the last line of code. To keep things simple, consider terminating each breakpoint with a semicolon.
Setting A Breakpoint 1. Place the cursor on a line of code in the DEFINE_PROGRAM section (other than a comment). 2. To insert the breakpoint at the cursor position, right-click to open the Source Code Editor context menu,
and select Toggle Breakpoint, or use the Toggle Breakpoint toolbar button.
3. A red arrow appears in the Source Code Editor window, to the left of the cursor position.
A green bar highlighting the line of code, and the execution arrow (a little green arrow) indicate the
If you are not currently debugging, you won't see execution break until you start debugging (Debug > Start Debugging).
Clearing Breakpoints
You clear an individual breakpoint, or clear all breakpoints in a file: To clear an individual breakpoint - Place the cursor on a line of code containing a set breakpoint, and choose Debug > Toggle Breakpoint, or use the Toggle Breakpoint toolbar button to unset the breakpoint on that line. To clear all breakpoints in a file - Choose Debug > Clear All Breakpoints, or use the Clear All Breakpoints toolbar button.
Editing Breakpoints
Select Debug > Edit Breakpoints (or click the toolbar button) to access the Breakpoints dialog. Use the options in this dialog to toggle any breakpoints set in the active (NetLinx) Source Code file (FIG. 118).
154
Debug
Troubleshooting Debugging
NetLinx Debugger Not Stopping On A Breakpoint
Symptoms - A breakpoint is set on a line of code, but the code does not stop execution on this line. The line of code in question contains a SEND_COMMAND, SEND_STRING, or SEND_LEVEL. Cause - The debugger will not stop on a line of code that sends a command, string, or level because of a device declared as an integer instead of a DEVICE:PORT:SYSTEM (D:P:S) structure. Example:
DEFINE_DEVICE VCR = 2 TP = 128 DEFINE_EVENT BUTTON_EVENT[TP,101] { PUSH: { SEND_COMMAND VCR," 'SP', 9" //The debugger will not stop if you put a breakpoint here } }
Resolution - Declare devices using the full D:P:S structure. In fact, you should always do this in NetLinx. Example:
DEFINE_DEVICE VCR = 2:1:0 TP = 128:1:0 DEFINE_EVENT BUTTON_EVENT[TP,101] { PUSH: { SEND_COMMAND VCR," 'SP', 9" //The debugger will now stop if you put a breakpoint here } }
This error is cause by passing a parameter that is not of type DEV to the DEVICE_ID keyword. This usually occurs when converting AXCESS code to NetLinx. To fix this error, try the following: Look for all references to the DEVICE_ID function Make sure the value passed to the function is of type DEV. If this appears inside a DEFINE_CALL or DEFINE_FUNCTION and a parameter is passed to the DEVICE_ID function, make sure that parameter is of type DEV.
1. Select the file in the Project Navigator window (Workspace tab), and right-click to open the Source Code
File Context Menu.
2. Select File Properties to open the File Properties dialog. 3. Change the Compile As selection to Axcess. 4. Click OK to save the change and close the File Properties dialog. 5. Recompile the file (as Axcess) and download.
155
Debug
when the code executes. The 13 characters to the left of the message are called the "time stamp" or "tic time". Also, by default, the master will append a carriage return and line feed to the end of each string. If the master is v2.10.81 or higher, there are additional MSG ON modes:
1. All messages with tic time. This is the same as 'MSG ON' with no type. 2. SEND_STRING 0 only (no tic time in front of string and no CR and LF appended). 3. SEND_STRING 0 with tic time pre-pended to string.
Example:
MSG ON 2<enter> sets the message mode to 2.
To turn off these messages type 'MSG OFF'<enter>. The SEND_STRING 0 message is obviously completely customizable - whatever is typed in will be what you are going to get. This can be used as a way to see the value of variables at specific points in the code, by sending that information from that point, instead of stopping execution with a breakpoint. This is especially useful if programmers have to watch non-printable data bytes that only show as blank boxes in Windows programs, the SEND_STRING 0 code can reformat the data as a string of printable ASCII characters. The 'debug.axi' file (attached to Technote #461) contains 16 subroutines useful for this type of debugging and other purposes, e.g. DPS_TO_STRING and STRING_TO_DEV are useful for passing DEV information between masters via a virtual device in a master-to-master scenario. Theses subroutines were created as an AXI so programmers could use a single #INCLUDE at the top of the program rather than having to dig through the old programs and find the appropriate code to cut and paste.
2.
3.
4.
6.
156
Debug
157
Debug
the local system (see TN435), an IP device, serial device, etc. STR1 is a header sent with each line - this is a good place to use DEV_TO_STRING. STR2 is data. All data bytes are formatted as 3 digit decimal and separated by commas. As of v2.01, a space ($20) is no longer added between STR1 and STR2. nLine is the line length. This may need to be changed if a terminal with a line length other than the typical 80 characters is being used. If not, just leave it as 0 for the defaults. If nMode is 2, nLine defaults to 80, else nLine defaults to 67 to allow 13 characters for the tic time. nMode is the mode, if "MSG ON 2" mode is being used to set it to 2; otherwise, use 0 for the defaults. 14. CALL 'SEND INTEGER TO DEBUG' (dvDEBUG,STR1[],STR2[],nLine,nMode) dvDEBUG is the destination device for the string. It could be the local master, a virtual device on the local system (see TN435), an IP device, serial device, etc. STR1 is a header sent with each line - this is a good place to use DEV_TO_STRING. STR2 is data. Data bytes are not formatted. As of v2.01, a space ($20) is no longer added between STR1 and STR2. nLine is the line length. This may need to be changed if a terminal with a line length other than the typical 80 characters is being used. If not, just leave it as 0 for the defaults. If nMode is 2, nLine defaults to 80, else nLine defaults to 67 to allow 13 characters for the tic time. nMode is the mode, if "MSG ON 2" mode is being used to set it to 2; otherwise, use 0 for the defaults. 15. CALL 'SEND ITOHEX TO MASTER' (STR1[],STR2[]) SEND_STRING 0's are formatted into 67 character lines. Since the tic time sent with MSG ON mode 81(default) and mode 3 prepends 13 characters to the string, each line fills the typical 80 character line (67 + 13 = 80). STR1 is a header sent with each line - this is a good place to use DEV_TO_STRING. STR2 is data. All data bytes are formatted as hex and separated by commas. As of v2.01, a space ($20) is no longer added between STR1 and STR2. 16. CALL 'STRING TO DEV' (Txt[], dvDEV) Takes ASCII string Txt[] of the form '<dev>' or '<dev>:<port>:<sys>' and stores this as a DEV. The dev data in Txt[] can be embedded in other non-numeric characters. If Txt[] does not contain any numerals, dvDEV will default to 0:1:0 (the local master). In order to use these subroutines, debug.axi must be in the compile path. It is suggested that an "AXIs" folder in the My Documents folder be created, save debug.axi there, then add that path to NetLinx Studio "Edit/Preferences/NetLinx Compiler Options/Include Files". Then add the line:
#INCLUDE 'debug.axi'
to the source code. "Debug.axi" and example code are attached to Tech Note #461. To access AMX Tech Notes, go to www.amx.com, log in as a dealer and go to Tech Center > Tech Notes.
158
Online Devices
Online Devices
Total number of Ports available in the System Number of online System Devices Number of online Master Controllers FIG. 119 Online Device Tree The online devices are organized according to the System they belong to. Double-click any System folder to display a list of System devices (and their firmware version) that
device. Sub-devices are hardware components contained within a parent device, which may require their own firmware. For example, and NXI Master Controller contains three components, each of which require firmware.
159
Click the Display command button (or right-click anywhere within the Online Tree tab) to access
General tab.
System Number IP Address (of Master Controller) FIG. 120 Online Device Tree - System element Master Controller: The next element down from the System is the Master Controller element. This
element indicates the Master Controllers device number, device name and indicates the Master firmware version currently loaded (FIG. 121):
Device Number Device Name Firmware Version
Port Listing (right-click to check port status) FIG. 121 Online Device Tree - Master Controller element
Click the plus sign to expand the view to show sub-devices and ports on the Master. Sub-devices are indicated with red icons, and give a description and firmware version info (in parenthesis) for each. Below the sub-devices is a listing of Ports on the Master. To check the status on any port, rightclick on a port and select Check Port Status from the context menu. The results of this status check are indicated in the Status tab of the Output Window (see FIG. 123 on page 162). Devices: The elements below the Master Controller in the device tree represent devices in the system. These elements indicate the device number, device name and the device firmware version currently loaded (FIG. 122): Click the plus sign to expand the view to show sub-devices and ports on the Master. Sub-devices are indicated with red icons, and give a description and firmware version info (in parenthesis) for each. Below the sub-devices is a listing of Ports on the Master. To check the status on any port, rightclick on a port and select Check Port Status from the context menu. The results of this status check are indicated in the Status tab of the Output Window (FIG. 123).
160
Device Number
Device States
There are several possible "states" for devices listed in the online device tree:
Unbound Device: An Unbound (or "Orphan") device is one that has not been bound to a NetLinx Master. It may or may not have been assigned a Device Number. A device will live in this state until it is explicitly bound to a master. A device is "Searching" if it has been bound to a NetLinx Master in the past, but is not currently communicating with the Master. After 10 minutes with no communication with the NetLinx Master, a "Searching" device is moved into the "Lost" state. Lost: Found: A device is "Lost" if it has been bound to a NetLinx Master in the past, but it has not communicated with the Master for over 10 minutes. A device is "Found" if the device has been bound to a NetLinx Master and is communicating with that NetLinx Master. Found devices inherit the System Number of the NetLinx Master it is "Found" by. If the device has been configured with a valid Device Number, it will communicate with the NetLinx Master as that Device Number. If it has not been configured with a valid Device Number, it will request a Dynamic Device Number from the NetLinx Master and use the Dynamic Device Number to communicate with the NetLinx Master.
Searching:
161
1. If the Workspace Bar is not visible, select View > Workspace. 2. Open the Online Tree tab. 3. Click the Display command button to open the Online Tree Context Menu, and select Refresh Network
Online Tree.
4. All devices currently connected to the Master are displayed in the Online Device Tree.
The number of Masters in this System, total number of devices online, and the total number of ports in the System are indicated in the (read-only) Master(s), Devices and Ports fields a the bottom of this tab.
5. Double-click any device to expand the Device folder, to show the device port count and any sub-devices
that require firmware (with firmware information listed). Sub-devices are hardware components contained within a parent device, which may require their own firmware. For example, and NXI Master Controller contains three components, each of which require firmware.
Checking Port Status 1. Click the plus-sign (+) next to any device in the Device Tree to expand the view to show all of the ports
for that device (as shown in FIG. 119 on page 159).
2. Right-click on any Port in the list to access the Device Tree context menu. 3. Select Check Port Status. 4. The results of the status check are displayed in the Status tab of the Output window. An example is shown
in FIG. 123:
FIG. 123 Example result of Check Port Status (displayed in the Status tab of the Output window)
162
Binding/Unbinding Devices
The Unbound Devices folder in the device tree (FIG. 119) indicates all devices in the system that are not currently bound to a Master. These are "orphan" devices, until they are assigned to communicate to a specific Master. An Unbound (or "Orphan") device is an NDP-capable device which has not yet been assigned (bound) to communicate with a specific Master. Unbound devices can be associated (bound) to a Master for communications via the Bind/Unbind Device option in the Device Tree context menu. A Bound device is one which has established communication with a specific Master.
To Bind an Unbound Device 1. Right-click on a device contained in the Unbound Devices folder of the Device Tree to access the Device
Tree context menu.
2. Select Bind Device to open the Bind/Unbind Device dialog (FIG. 124).
Selected Unbound Device (click down-arrow to select a different unbound device) The information here indicates: [device number], device name and firmware info Check the Master that you want to bind the device to The information here indicates: [device number], device name and firmware info
3. By default, the selected device is displayed in the Device to Bind/Unbind window at the top of the dialog.
If there is more than one Unbound device in the system, click the down arrow to select which device you want to bind.
4. Check the checkbox next to the Master that you want to bind the device to. If there is more than one
Master in the system, check the specific Master that you want to bind the device to.
5. Select Refresh System (in the Device Tree context menu). The device should now appear in the device list
(indicated with a green device icon).
To Unbind a Bound Device 1. Right-click on the device that you want to unbind in the Device Tree. 2. Select Unbind Device to open the Bind/Unbind Device dialog (FIG. 124). 3. De-select the checkbox next to the Master that the device is currently bound to. 4. Select Refresh System (in the Device Tree context menu). The device should now appear in the Unbound
Devices folder (indicated with a green device icon).
163
3. Click OK to generate the report and close this dialog. Example Online Device Tree Report - Text File Format
The following is an example of an Online Tree Text File Report:
--------------------------------------------------------------------------NetLinx Studio - V3.3.0.500 01-18-2011 13:41 --------------------------------------------------------------------------System 4561 Devices 192.168.224.184 {00:60:9f:90:b3:4f} 00000 - NI Master + Version........: v3.40.399 + Manufacturer...: AMX Corp. + Manufacturer ID: 1 + Serial Number..: 210502x2243188 + Firmware ID....: 296 + Device ID......: 285 + Port Count.....: 1 + NDP Device.....: TRUE + IPAddress......: 192.168.224.184 + [OID=1] - vxWorks Image + Version........: v3.40.399 + Firmware ID....: 296 + [OID=2] - BootROM + Version........: v3.00.316 + Firmware ID....: 298 + [OID=3] - AxLink I/F uController + Version........: v2.00.118 + Firmware ID....: 270 00128 - COLOR LCD TOUCH PANEL + Version........: v5.12m + Manufacturer...: AMX Corp. + Manufacturer ID: 1 + Serial Number..: 0000000000000000 + Firmware ID....: 32778 + Device ID......: 188 + Port Count.....: 1 05001 - NI-3000 + Version........: v1.00.118 + Manufacturer...: AMX Corp. + Manufacturer ID: 1 + Serial Number..: N/A
164
+ + + + 10002 + + + + + + + + +
Firmware ID....: Device ID......: Port Count.....: Device Mapping.: NX-CV7 Version........: Manufacturer...: Manufacturer ID: Serial Number..: Firmware ID....: Device ID......: Port Count.....: IPAddress......: Device Mapping.:
299 286 17 dvDirecTVHR21_1 [5001:1:0] dvSwitcher1 [5001:2:0] v2.86.30 AMX LLC 1 225801S1540346 309 291 10 192.168.224.193 TP2_GLOBAL [10002:1:0] TP2_CDA [10002:2:0] TP2_DVDA [10002:3:0] TP2_RCVR1 [10002:5:0] TP2_DISPLAY1 [10002:6:0] TP2_ARQ [10002:7:0] TP2_DVR1 [10002:8:0]
165
FIG. 127 Network Device Addressing dialog - Individual Device Settings tab
166
Network Device Addressing dialog - Individual Device Settings tab options (Cont.)
Device Properties Change Device: System Numbers: If selected, then the New Device and New System values will be used as the new device:system combination for the selected device. New Device: Enter the new device number for the selected device (enabled only if Change Device:System Numbers is selected). New System: Enter the new system number for the selected device (enabled only if Change Device:System Numbers is selected). Change Device Properties: If selected, then the Friendly Name and Location values are sent to the selected device. A maximum of 32 characters are allowed for each property. Friendly Name: Enter the new friendly name for the selected device (enabled only if Change Device Properties is selected). Location: Enter the new location for the selected device (enabled only if Change Device Properties is selected). Note: An EXB device's "friendly name" and "location" will not be shown in the 'Device Properties' information balloon (accessible from the Online Device Tree, via the right-click menu) when the device is not in NDP mode (for example, when in TCP/URL mode). Network Addressing Change IP Addressing: If selected, you can set a static IP address ("Specify IP Address" button) or have the device use DHCP ("Use DHCP" button) to set the appropriate IP addressing information. Host Name: Enter the host name for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). IP Address: Enter the IP address for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). Subnet Mask: Enter the Subnet mask address for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). Note: See the Valid Subnet Masks section on page 170 for a listing of valid Subnet Masks and the maximum number of IP Hosts allowed for each. Gateway: Enter the gateway address for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). Use DHCP - Select this option to use DHCP addressing for the selected device. This selection disables the other fields in the Device IP Addressing section of this dialog. Specify IP Address - Enter a static IP address for the selected device using the Host Name, IP Address, Subnet Mask and Gateway fields. Change DNS Addressing: Done If selected, you can set a Domain Suffix and three DNS IP Addresses (DNS IP #1-3). Click to save your changes and close this dialog. When this dialog is launched, the "Target Device/System" values are set to the device that was
167
FIG. 128 Network Device Addressing dialog - Set Identification Mode tab
Identification Mode is used to automatically set device:system IDs and/or IP Addressing information as the user presses the ID button on their network devices. When the user has started the "Identify Mode" process, new values are sent to the device once a device has been identified. See the Identification Mode section on page 171 for details. Network Device Addressing dialog - Set Identification Mode tab options
Network Device Processing Options Selected Device: New Device: New System: The device:system combination indicated here represents the device to change. Enter the new device number for the selected device. Enter the new system number for the selected device.
Continuous Increment Mode Continuous Increment Mode: If this option is selected, then a new device ID and/or IP Addressing values are incremented and are available for the next device to be identified. Using this option, the user can set the starting "New Device" number and specify increment values depending if the Change Device:System Numbers and/or the Change IP Addressing options (see below) are selected. Note: If Continuous Increment Mode is selected, then the "Device Properties" values cannot be changed. Next Device Increment Value: Enter the increment value to be used to automatically increment device numbers (enabled only if the Auto Identification Mode and Continuous Increment Mode options are both selected). Device increment ranges are from 1 to 100.
168
Network Device Addressing dialog - Set Identification Mode tab options (Cont.)
Continuous Increment Mode (Cont.): IP/Host Name Increment Value: Enter the increment value to be used to automatically increment IP/Host Name addresses (enabled only if the Auto Identification Mode and Continuous Increment Mode options are both selected). When the user selects the "Specify IP Address" option when they want to change the IP Addressing, then this value will be applied to the IP Address specified. (i.e. if the current IP Address value is 192.168.224.20, then the next device identified would get an IP address of 192.168.224.30). IP/Host Name address increment ranges are from 1 to 20. IP Addressing Change IP Addressing: If selected, you can set a static IP address ("Specify IP Address" button) or have the device use DHCP ("Use DHCP" button) to set the appropriate IP addressing information. Host Name: Enter the host name for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). IP Address: Enter the IP address for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). Subnet Mask: Enter the Subnet mask address for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). Note: See the Valid Subnet Masks section on page 170 for a listing of valid Subnet Masks and the maximum number of IP Hosts allowed for each. Gateway: Enter the gateway address for the selected device (enabled only if Change IP Addressing and Specify IP Address options are both selected). Use DHCP - Select this option to use DHCP addressing for the selected device. This selection disables the other fields in the Device IP Addressing section of this dialog. Specify IP Address - Enter a static IP address for the selected device using the Host Name, IP Address, Subnet Mask and Gateway fields. DNS Addressing Change DNS Addressing: Identify Mode Status Start Identify Mode / Cancel Identity Mode If selected, you can set a Domain Suffix and three DNS IP Addresses (DNS IP #1-3). Indicates the current state of Identification Mode (Not Active, Waiting... etc). Click to put this dialog into Identity Mode, waiting for a device on the network to have their ID button pushed. Once the dialog has received the device ID message, then the program will set the appropriate properties depending on which of the options are checked. Note: This button changes to Cancel Identify Mode, so that you can cancel this process at anytime. Reboot Device After Changes Select this option to reboot the selected device after all the information has been changed. Done Click to save your changes and close this dialog.
1. Right-click on a device in the Online Device Tree, and select Network Device Addressing from the
context menu. Alternatively, click the Display button to access the context menu. This opens the Network Device Addressing dialog.
2. Under Network Device Processing Options, select Manual Device Mode. This option enables the Target
Device and Target System fields. These fields are populated with the current Device and System information for the selected device.
169
3. To specify the Device Addressing information for the selected device: click in the Change
Device:System Numbers checkbox to enable the New Device and New System fields. Enter the desired Device and System numbers in these fields.
4. To specify the Device Properties information for the selected device: click in the Change Device
Properties checkbox to enable the Friendly Name and Location fields. Enter the desired Friendly Name and Location values in these fields. An EXB device's "friendly name" and "location" will not be shown in the 'Device Properties' information balloon (accessible from the Online Device Tree, via the rightclick menu) when the device is not in NDP mode (for example, when in TCP/URL mode).
5. To specify the Device IP Addressing information for the selected device: click in the Change IP
Addressing checkbox to enable the Use DHCP and Specify IP Address options. If Specify IP Address is selected, then the Host Name, IP Address, Subnet Mask and Gateway fields are enabled. Enter the desired values in these fields.
6. Click Set Device Information to apply the device address information from this dialog to the selected
Device.
170
Identification Mode
The Identification Mode option in the Network Device Addressing dialog allows you to identify Network Devices that are located throughout a system, and change their device addressing information if necessary. Network Devices are devices that are not on the AMX bus; instead they connect to a NetLinx Master via the LAN. Select Network Device Addressing from the Online Device Tree context menu to access the Network Device Addressing dialog. For a Single Network Device: To use Auto-Identification Mode to identify and change values for a single device on the network, do not check the Continuous Increment Mode checkbox. This allows you to change the Device:System numbers, Friendly Name/Location values and/or IP Addressing as desired. For Multiple Network Devices: The Continuous Increment Mode option provides a method for identifying and changing values for multiple devices on the network. The following examples illustrate using Auto Identification Mode in conjunction with the Continuous Increment Mode option to identify and change device address values for multiple Network Devices:
1. Under Network Device Processing Options, select the Identification Mode option. 2. Select the Continuous Increment Mode option. 3. Select the Change Device:System Numbers option. This directs the program to auto-increment the
Device and System Number assignments for the network devices, using the Next Device Increment Value to increment the Device values when a device has been identified. For example, with a starting New Device value of "10010", and 10 as the Next Device Increment Value, the program will set the first device identified to "10010", and set the next device identified to "10020", etc.
4. Select the Change IP Addressing option. 5. Select the Specify IP Address option. This directs the program to auto-increment the static IP addresses
for the network devices, using the IP/Host Increment Value to increment the IP address and Host Name when a device has been identified. For example, with a starting IP Address of "192.168.xxx.10", and 10 as the IP/Host Name Increment Value, the program will increment the IP address to "193.168.xxx.20" for the next device identified. The next device identified would be "193.168.xxx.30" , etc. Similarly, with a starting Host Name of "EXB DEVICE-", and 10 as the IP/Host Name Increment Value, the program will increment the Host Name to "EXB DEVICE-10" for the next device identified. The next device identified would be " EXB DEVICE-20", etc.
6. Click the Start Identify Mode button. This puts the program into Identity Mode, waiting for a device on
the network to have it's ID push-button pressed, which sends a device ID message for that device to the program. Once the program has received the device ID message, it will set the appropriate properties.
7. Proceed to a network device and push the ID push-button on the device. By pressing the ID push-button
on the device, NetLinx Studio will set that device's network address information (Device Addressing and Device IP Addressing values) according to the settings in this dialog. The program remains in "Identify Mode".
8. Proceed to the next network device within the system (no need to return to your PC) and press the ID
push-button on the second device. NetLinx Studio will set the network address information (Device Addressing and Device IP Addressing values) on the second device according to the settings in this dialog. The program remains in "Identify Mode".
171
9. Proceed to all the devices within the system resetting the network devices, without having to return to the
PC.
10. When all Network Devices have been identified and updated as desired, click the Done button to
terminate "Identify Mode" and close this dialog.
1. Under Network Device Processing Options, select the Identification Mode option. 2. Select the Continuous Increment Mode option. 3. Select the Change Device:System Numbers option. This directs the program to auto-increment the
Device and System Number assignments for the network devices, using the Next Device Increment Value to increment the Device values when a device has been identified. For example, with a starting New Device value of "10010", and 10 as the Next Device Increment Value, the program will set the first device identified to "10010", and set the next device identified to "10020", etc.
4. Select the Change IP Addressing option. 5. Select the Use DHCP option. This directs the program to use DHCP to establish an IP Address for each
device identified. Note that this selection disables the IP Addressing fields.
6. Click the Start Identify Mode button. This puts the program into Identity Mode, waiting for a device on
the network to have it's ID push-button pressed, which sends a device ID message for that device to the program. Once the program has received the device ID message, it will set the appropriate properties.
7. Proceed to a network device and push the ID push-button on the device. By pressing the ID push-button
on the device, NetLinx Studio will set that device's network address information (Device Addressing and Device IP Addressing values) according to the settings in this dialog. The program remains in "Identify Mode".
8. Proceed to the next network device within the system (no need to return to your PC) and press the ID
push-button on the second device. NetLinx Studio will set the network address information (Device Addressing and Device IP Addressing values) on the second device according to the settings in this dialog. The program remains in "Identify Mode".
9. Proceed to all the devices within the system resetting the network devices, without having to return to the
PC.
10. When all Network Devices have been identified and updated as desired, click the Done button to
terminate "Identify Mode" and close this dialog.
172
Zero-Config Networking
The Zero-Config tab of the Workspace Bar (FIG. 129) provides Zero-Config (also known as "Bonjour") networking functionality within NetLinx Studio. Zero-Config networking provides the ability to automatically discover devices that are present on the LAN.
Sub - Devices
FIG. 130 Zero-Config Tab and Configuration Page for selected device
173
By default, the selected device's Web Console (HTML) is displayed in your default browser. To force the Web Console pages to open in a window within NetLinx Studio instead:
1. Open the Preferences dialog to the General options. 2. Under Zero-Config Options / Launch Browser Window, select Via NetLinx Studio Window. Configuring Devices via Zero-Config Networking
Once you have generated a listing of devices of Zero-Config devices on the network (right-click inside the Zero-Config tab and select Refresh List), you can access any device in the list simply by double-clicking on it's entry. This action invokes the device's Web Console (HTML). Use the Web Console pages to configure the device as desired. Refer to the device's Operation/Reference Guide for detailed configuration instructions and descriptions of settings.
174
USB Transfers
NetLinx Studio 2 supports file transfers to several G4 touch panels via USB connection, for situations where the target panel is not connected to a NetLinx Master. In this situation, you will use a USB connector on your PC to connect directly to the panel, using your PC as a Virtual NetLinx Master. When you select Virtual NetLinx Master as the Transport Connection Type (in the Communications Settings dialog), you can perform direct transfers to a touch panel via either TCP/IP or USB connection. USB transfers require that you configure the Master Connection setting on the panel itself to USB prior to attempting a USB transfer. Refer to the Virtual NetLinx Master USB Transfers section on page 194 for details.
175
FIG. 131 File Transfer dialog (Send tab) Send The options in this tab are specific to sending files to the Master Controller or System
devices on the bus. The differences between the two tabs are that in the Receive tab, the Quick Load command button is disabled, and there is a Receive button rather than the Send command button. Both tabs of the File Transfer dialog contain a set of command buttons: File Transfer dialog - Command Buttons
Up/Down With a file in the Files To Send/Files to Receive tables, use these buttons to move the file up and down in the list. The order in which the files are represented in this table is the same order in which the files will be sent. Add Click to add a new file to the Files To Send/Files to Receive tables. This option opens the Select Files For Transfer dialog, where you can select to send all files contained in a Project or System, an individual Project/System file (assuming the Project/System is contained within the currently open Workspace), or any other file (not contained in the open Workspace). Select a file in the Files To Send/Files to Receive tables, and click to remove the file from the list. Click to remove all files from the Files To Send or Files to Receive tables, depending on which tab is open when the button is clicked. With a file selected in the Files To Send table, click the Edit command button to open the File Transfers Edit sub-menu. Click to send the file(s) in the Files To Send table (in the Send tab) or the Files To Receive table (in the Receive tab) to/from the specified device(s). Click to exit this dialog.
176
Both tabs of the dialog also share the following Load Options: File Transfer dialog - Load Options
Quick Load Load List Click to open the Quick Load dialog, where you can specify particular file types to load into the Send list. See the Using The Quick Load Dialog section on page 178 for details. This option allow you to select and open an .FTL file (see below), via the Open dialog. When an .FTL file is opened, the Send list is populated with the files specified in the .FTL file for transfer. Save List This option saves the list of files currently displayed in the Send list as an .FTL file (specify a name and target directory to save the .FTL file in the Save As dialog).
Remember Last When selected, this checkbox will cause the list of transferred files to be automatically Items Transferred reloaded the next time the File Transfer dialog is opened. This is useful if you transfer the same files repeatedly. That way, you dont have to re-add the items over and over again. De-selecting the checkbox clears the remembered list of files and prevents file transfer from reloading the files the next time the dialog is displayed.
Other features of the File Transfer dialog include: Multi-Select - You can select multiple items (Ctrl + select) from the Send/Receive list and perform the following operations: Check/uncheck for transfer Remove items from the Send/Receive lists. Sorting - You can sort rows in the Send/Receive lists by clicking on the column headers. The first click sorts the data in ascending order; the second click sorts the data in descending order. Cancel Transfers - You can cancel any transfer (other than the file that is currently being transferred) via the File Transfer Status tab of the Output window.
Canceling during a file transfer may leave the target device in an unstable state.
177
178
The Quick Load dialog is not used for receiving files. There are several possible ways to access the Quick Load dialog: Click the Quick Load command button. If there is not already a Workspace file open, then the Quick Load dialog will indicate that no (zero) projects are open (no Project file/file path indicated in the top text field, and "New Workspace: 0 Project(s)" indicated in the main window. You should first open a Workspace file, then use the options in the Quick Load dialog to select the files within that Workspace file to add to Files To Send queue. Without having a workspace file open, you cannot select files for transfer via the Quick Load dialog. By default, FileTransfer2 opens the Quick Load dialog when a Workspace file is opened (via the Load Workspace button, or the File > Open Workspace/AXW/FTL (File menu) option. With at least one Workspace file open, the options in the Quick Load dialog allow you to specify which of the files contained in the Workspace file(s) to add to the Files To Send queue: You can disable the Quick Load dialog from automatically opening by de-selecting the After opening a Workspace file. Visit the Quick Load option in the Preferences dialog.
1. Selection Options menu - Click the down arrow to access the following load options:
Active System - Loads only the files from the active System. Entire Workspace - Loads all files from the Workspace. Select System - Select an individual System from the Workspace to load.
2. File type checkboxes - The checkbox options in this dialog allow you to simplify the transfer operation
by only sending only specific file types (including TKN, TOK, SRC, IRL, KPD, TP4 and TPD files). Use the Select All and Deselect All command buttons to streamline the selection process. Note that there are additional options associated with TP4 and TPD files. If you select TP4 Files, you also have the option of enabling Smart Transfer for those files. Similarly, if you select TPD files, you have the additional options of including Bitmaps, Icons, and/or Fonts for those files.
3. Remove Duplicates When Loading - Enable this option to prevent having any duplicate entries in the
Files To Send queue (default = enabled).
179
Adding All Files Contained In the Workspace To The Files To Send Queue 1. With a Workspace open, select Tools > File Transfer to open the File Transfer dialog. 2. The system files contained in the Workspace are listed in the Files To Send list. By default, all files are
selected to be included in the transfer (FIG. 134).
Checkmarks indicate that each file is selected to be included in the transfer
FIG. 134 File Transfer dialog (Send tab) - Files To Transfer List
1. With a Workspace open, select Tools > File Transfer to open the File Transfer dialog. 2. In the Send tab, click the Add command button to open the Select Files For File Transfer dialog, by
default open to the Current Workspace tab (FIG. 135).
FIG. 135 Select Files For File Transfer dialog - Current Workspace tab
This tab consists of a display of the (compiled) Source Code (.AXS), Token (.TKN), User-Interface (.TPD/.TP4) and IR (.IRL) files contained in the currently open Workspace. Use this tab if the file(s) you want to transfer are included in the open Workspace.
3. Click in the checkboxes to select individual files to include in this transfer. 4. Click OK to add the selected file(s). 5. If any of the selected files have not already been mapped to a device, the Enter Device Mapping
Information dialog is presented, to allow you to enter mapping information for each file (FIG. 138). Files cannot be added to the Files To Send list without device mapping information. If presented with this dialog, enter the device mapping information and click OK to proceed.
180
1. With a Workspace open, select Tools > File Transfer to open the File Transfer dialog. 2. In the Send tab, click the Add command button to open the Select Files For File Transfer dialog. 3. Open the Other tab (FIG. 137).
FIG. 137 Select Files For File Transfer dialog - Other tab
Use this tab if the file(s) you want to transfer are not included in the open Workspace. This tab consists of a display of the different types of files that can be transferred to the Master or System devices on the bus: IR Codes (*.IRL/*.IRV) NetLinx Source Code (*.SRC) Compiled NetLinx Source Code (*.TKN) Compiled Axcess Source Code (*.TOK) Touch Panel Design File (*.TPD) TP4 Touch Panel (*.TP4) KPD Keypad Touch File (*.KPD) Duet Jar File (*.JAR)
4. Select the type of file that you want to add to the Transfer List.
181
5. Click the Add button. This invokes the Open dialog, with the Files of Type selection already set to the
selected file type.
6. Locate and select the file that you want to add. 7. If the selected file has not already been mapped to a device, the Enter Device Mapping Information dialog
is presented, to allow you to enter mapping information for the selected file (FIG. 138).
FIG. 138 Enter Device Mapping Information dialog Files cannot be added to the Files To Send queue without device mapping information. If presented with this dialog, enter the device mapping information and click OK to proceed.
8. Click Open to add the selected file to the Files To Send queue. Adding Files To The Files To Receive Queue
1. Select Tools > File Transfer to open the File Transfer dialog. 2. Open the Receive tab (FIG. 139).
3. Click the Add command button to open the Select Files For Transfer dialog (FIG. 140).
182
FIG. 140 Select Files For File Transfer dialog (via the Receive tab)
4. Select the type of file you want to receive from the system device (IRL/IRV, TPD, SRC, AXS, DMS or
TP4), and click Add (opens the Save As dialog). The file types that are available for selection depend on the selected Platform (Axcess or NetLinx), Send/Receive selection and Communication settings.
5. Specify a name and target directory for the retrieved file. Click Save to close this dialog and open the
Enter Device Mapping Information dialog (FIG. 141).
6. Enter the Device, Port and System numbers for the source device, and click OK to close the dialog and
add the to the File list at the bottom of the Select Files To Transfer dialog.
7. Select Edit > Communications Settings at the bottom of the dialog to open the Communication Settings
dialog and specify the communication settings for the source device. See the Configuring Communications Settings section on page 184 for details. Note that in the Select Files For File Transfer dialog, communication settings apply to every file in the File list (since in this case the communication settings are relating to a system device that is the source for files you are receiving, not to individual files that may be sent to any of several devices in the system).
8. Click OK to close the Select Files For File Transfer dialog. The files you added should now appear in the
Files To Receive queue of the Receive tab.
183
9. Repeat steps 2 - 7 to add files to retrieve from different system devices to the Files To Receive queue.
Communication Settings
Use the options in the Communication Settings dialog to set the communication settings for connecting to a NetLinx or Axcess master controller (FIG. 142).
FIG. 142 Communication Settings dialog A connection can be made to a NetLinx master controller via TCP/IP, Serial, or Virtual NetLinx
Master. A connection can be made to a Axcess master controller via Serial. Refer to the Communication Settings section on page 199 for details on configuring communication settings.
1. Select a file (Send or Receive tabs). 2. Click the Edit command button and select Communication Settings from the Edit menu to open the
Communication Settings dialog.
3. Configure the communication settings for the selected file as desired. See the Communication
Settings section on page 199 for details.
184
Device Mapping
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 (FIG. 143).
Use this dialog to define the Device:Port:System (D:P:S) address assignment for a target device.
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 Axcess language allows physical device numbers in the range 0-255. 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 where Axcess expected only a device number. This D:P:S triplet can be expressed as series of constants, 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 INTEGER Port INTEGER System }
In Axcess, Master Source Code files are always mapped to the Master Controller (device = 0), and cannot be mapped to any other device. This does not apply to NetLinx Master Source Code files.
185
FIG. 144 Device Mapping dialog 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.
The Device View window (on the right) presents a view of devices specified in 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. With a file selected (in the File View window), select a target device for the file in the Device View window, and click the Map button to map that file to the selected device. If you select <Custom>, the Enter DPS dialog (FIG. 145) will prompt you to enter the D:P:S assignment of the device to which you want to map the file.
186
Files can be mapped to multiple devices (Ctrl + click to select multiple devices). In Axcess, Master Source Code files are always mapped to the Master Controller (device = 0), and
cannot be mapped to any other device. This does not apply to NetLinx Master Source Code files. Once a file has been mapped to a device, the mapping assignment is indicated in the File View window of the Device Mapping dialog as well as in the Workspace tab of the Workspace Bar. 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.
Workspace mappings are only updated when the source code file is saved.
Device Mapping 1. Select and open the Project containing the Source Code file to be mapped to a device (in the Workspace
tab of the Workspace Bar).
2. Select the System containing the file. 3. Select Device Mapping from the Project menu (or use the toolbar button) to open the Device Mapping
dialog (FIG. 144 on page 186). You can also access the Device Mapping command via the Source File, User Interface, and IR File context menus. The Device Mapping option is only available if you have selected a Source Code file that is not designated as the Master Source Code file.
4. In the Device Mapping dialog, select a System from the File View window on the left side of the dialog (if
different than the System already selected).
5. Double-click to expand the System folder to view the System File folders (Source, User Interface and
IR).
6. Double-click to expand the System File folder containing the file you want to map to a device, and select
the file you want to map.
7. In the Device View window (on the right side), select the target device for the selected file from the list of
devices (as specified in the in the DEFINE_DEVICE section of the System's Master Source Code file). 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. 145 on page 186). The System's Master Source file will always be mapped automatically to 0:1:0 for NetLinx Masters, and 0 for Axcess Masters.
8. Click the Map button to map the file to the target 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 as well as in the Workspace tab of the Workspace Bar. 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.
Workspace mappings are only updated when the source code file is saved.
187
Editing Device Mapping Information 1. Select a file in the Transfer List (Send or Receive tab). 2. Click Edit to open the Edit menu, and select Device Mapping. This opens the Enter DPS dialog. 3. Enter the Device:Port:System (D:P:S) information for the selected file. See the DEVICE:PORT:SYSTEM
(D:P:S) section on page 185 for details.
4. Click OK to save the D:P:S assignment and close the dialog. Removing Device Mapping Information
To Remove Device Mapping Information from a File:
1. Select a device-mapping icon in the File View window of the Device Mapping dialog. 2. 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:
1. In the Online Tree tab of the Workspace Bar, click the Display button to open the Online Tree Context
Menu.
2. Select Show Device Mappings. 3. 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.
1. Added the desired file(s) to the File To Send Queue, 2. Configured the communication settings for the files in the list, and 3. Specified the device-file mapping information for the files in the list,
...you are ready to begin transferring the file(s) to devices in the system: Click the Send command button. This initiates the transfer of every file listed in the Transfer (Send) List, in the order in which they are listed (top to bottom). The progress and status of each file transfer is indicated in the File Transfer Status tab of the Output Bar.
1. Added the desired file(s) to the File To Receive Queue, 2. Configured the communication settings for the files in the list, and 3. Specified the device-file mapping information for the files in the list,
...you are ready to begin receiving the file(s) from devices in the system: Click the Receive command button. This initiates the transfer of every file listed in the Files To Send List, in the order in which they are listed. The progress and status of each file transfer is indicated in the Transfer Status Window.
188
1. In the Receive tab, click to select a file in the Files to Receive queue. 2. Click Edit to open the Edit menu and select Device Mapping. This opens the Enter DPS dialog. 3. Enter the Device:Port:System (D:P:S) information for the selected file. 4. Check the Connect directly to the device - No Master... option. 5. Click OK. File Transfer Status Information
Once you have started a file transfer operation, the following types of status information are displayed in the File Transfer Status tab of the Output Bar: File Transfer Status Information
Type: Status: Connection: Mapping: File: Path: The type of transfer (sending or receiving). The current state of the transfer (Pending, Transferring, Complete or Failed). The communications settings used to establish communication with the target device. The number(s) used to identify the target device on the bus or the message "Direct to Device (No Master)" if the target device does not reside behind a master. The name and extension of the file being transferred. The full path of the file being transferred.
Bytes Transferred: The number of bytes transferred, and the total number of bytes left to transfer. Error: Last Transfer: An error message if an error has occurred. The time and date of the last transfer.
Canceling during a file transfer may leave the target device in an unstable state.
189
After processing all supplied parameters and options, there was nothing to Nothing to transfer! [Project Identifier invalid?] transfer. That is, no files could be found or nothing was specified for transfer. [System Identifier invalid?] Additionally, if you specified a project identifier and/or a system identifier, you may have inadvertently requested an empty or nonexistent set of files. Failed to open workspace! Failed to open workspace! No APW file AXW file does not contain an APW.
Firmware Transfers
NetLinx Studio provides the ability to transfer KIT and TSK firmware files to a NetLinx or Axcess master controller. To send firmware files, select Tools > Firmware Transfers, then select either Send to NetLinx Device, or Send to Axcess Device from the sub-menu.
1. Choose Tools > Firmware Transfers > Send to NetLinx Device to open the Send To NetLinx Device
dialog (FIG. 146).
190
2. Click the Browse (...) button to navigate to the target directory (in the Browse For Folder dialog). The
selected directory path is displayed in the Location text box. Assuming that the specified target directory contains one or more Kit files, the Kit files in the selected directory are displayed in the Files list box (with the file's last modified date and time).
3. Select the appropriate .KIT file from the list. 4. Enter the Device and System ID numbers for the target NetLinx Device in the Device and System text
boxes. If the Kit file is determined to be specifically for the target Master, the Device number is forced to zero. If the Kit file is for an unspecified device, you must enter the correct Device ID number. You can use the Online Device Tree to determine the device's assigned ID.
5. Review the File, Connection, Address, and Target Device information before you send.
Check the Reboot option (if required by the target device - see note below). Click the Send button to send the selected KIT file to the specified device. You can watch the
progress of the transfer in the Send to NetLinx Device dialog. When the transfer is finished, and the reboot is complete, press the Close button. If the device is a NetLinx Master or NXI, then the Reboot option is valid. Other NetLinx devices need to be given the command to reboot (if they support it). Allow 20-30 seconds for NetLinx Masters to reboot. When the Master has rebooted, the Status LED on the front panel blinks once a second to indicate that it is functioning properly. Once it has rebooted, click OK.
1. Choose Tools > Firmware Transfers > Send To Axcess Device to open the Send To Axcess Device
dialog (FIG. 147).
2. Click the Browse (...) button to navigate to the target directory (in the Browse For Folder dialog). The
selected directory path is displayed in the Location text box. Assuming that the specified target directory contains one or more TSK files, the TSK files in the selected directory are displayed in the Files list box (with the file's last modification date and time).
3. Select the desired TSK file from the list. 4. Click the Query command button to populate the Devices list with a list of all Axcess devices currently
online and capable of receiving the firmware.
5. Select the target AXlink device from the list. 6. Review the File, Connection, and Target Device information before you send.
Click the Send button to send the selected TSK file to the specified device. You can watch the progress of the transfer in the Send to Axcess Device dialog. Once the TSK file has been transferred, the program prompts you to reboot the Master.
7. Click Yes to reboot, and the program initiates the reboot sequence.
When the Master has rebooted, the Status LED on the front panel of the Master blinks once a second to indicate that it is functioning properly.
191
192
1. Queue up one or more files in the File Transfer dialog. 2. Click to select a file transfer from the list of files in the queue. 3. Click the Edit button and select Communication Settings from the drop-down menu to open the
Communication Settings dialog. The settings you specify here are applied only to the selected File Transfer operation.
4. Click to select the Authentication Required option. 5. Click the User Name and Password button to open the Master Controller User Name and Password
dialog, and enter the User Name and Password combination that the program will require in order to start this file transfer. Once security is applied, if the correct User Name and Password are not entered when prompted, NetLinx Studio will display an "Authentication Failure" message in the Error column of the File Transfer Status window, and the transfer will not complete.
1. Select Settings > Communication Settings to open the Communication Settings dialog and select
NetLinx as the platform, and select a Transport Connection type.
2. Click Edit Settings to configure the selected transport type. 3. Click OK to save the TCP/IP, or Serial settings (depending on the transport type selected). 4. Click the Authentication Required checkbox. This enables the User Name and Password button. 5. Click on User Name and Password to enter the User Name and Password that are set for this NetLinx
Master (in the Master Controller User Name and Password dialog). These are case sensitive.
6. Click OK to close the Master Controller User Name and Password dialog. 7. Click OK to close the Communication Settings dialog. 8. Click OK to close the Master Communication Settings dialog. At this point you should be able to connect to the Master.
193
Configuring NetLinx Studio for Virtual NetLinx Master Transfers 1. Select Settings > Master Communications to open the Master Communication Settings dialog. 2. Make a selection in the Available Systems list to specify the scope of this communication setting:
Select <No Active System-Default Settings> to set Virtual NetLinx Master as the default
communication setting. To set Virtual NetLinx Master as the communication setting for a particular system in the active project, select one of the Systems listed under NetLinx Project.
3. Click Communication Settings to access the Communication Settings dialog. 4. Verify that NetLinx Master is selected as the Platform Selection, and select Virtual NetLinx Master as
the Transport Connection option.
5. Click Edit Settings to access the Virtual NetLinx Master Settings dialog. 6. The System Number field is set to 1 by default. Assuming that the actual NetLinx Master is set to 0 (via
the System Properties dialog - System ID field), this default setting will work. However, if you have designated any other number as the System ID, be sure to set this System Number to a different number than the System ID, to avoid a conflict with the actual NetLinx Master (range = 1-65535). As indicated in the Virtual NetLinx Master dialog, changes made to the system number field will not take effect until all communications are stopped and restarted.
Configuring the Touch Panel for Virtual NetLinx Master USB Transfers
Connect the Panel to Your PC Via USB:
1. Apply power to the panel by plugging in the power supply. 2. Wait for the splash screen to disappear, then use a (Type A) USB cable to connect the panel to an
available USB port on your PC. Plug the USB cable into the panel first, then connect to the PC. Configure the Panel for USB Virtual NetLinx Master Transfers:
1. Press and hold the grey Front Setup Access button (below the touch screen) for 3 seconds to access the
Setup page.
2. Press the Protected Setup button to access the Protected Setup page. 3. Use the on-screen keyboard to enter the password (the default password is 1988). 4. Press the System Connection button to access the System Connection Setup page. 5. Select USB as the Master Connection. 6. Press the Back button to return to the Protected Setup page and press the Reboot button to reboot the
panel.
194
After several seconds, the panel should appear in the online device tree, listed as Virtual NetLinx Master. Once you can see the device online, you may transfer panel files directly to and from the G4 device.
1. Go to www.amx.com and log in as a Dealer. 2. Go to the Tech Center (via the link at the top of the main page). 3. Click the Application Files link in the menu on the left side of the screen. 4. Click the NetLinx Design Tools link at the top of this page. 5. Click on the AMX USB LAN link to view the AMX License Agreement. 6. Click I Accept to download the AMX_USBLAN_v0x_xx_xx_xx.ZIP file (Save to Disk).
To install the AMX USB LAN application:
1. Open the AMX_USBLAN_v0x_xx_xx_xx.ZIP file. There are two files included in the ZIP: 2. The Installation Details.HTM file (open to read detailed installation instructions) 3. Open the AMX_USBLAN_SETUP_v0x_xx_xx_xx.EXE file to install the AMX USB driver. MVP-5200i USB Driver
New USB driver for MVP-5200i device: The MVP-5200i utilizes a native RNDIS USB driver. This driver utilizes Ethernet-over-USB. When the MVP-5200i device is connected to the computer, it should create a new LAN connection (see My Computer | My Network Places | View network connections). It is necessary to supply a static IP address for this LAN connection. To enter a static IP address for the connection, you must edit the properties of the TCP/IP interface of the connection itself, via Windows Network Connections settings:
1. Launch the Network Connections dialog (select Start > Programs > Accessories > Communications >
Network Connections).
2. Right-click on the Network Connection that indicates "AMX USB Device Link", and select Properties
from the context menu. This invokes the Local Area Connection Properties dialog.
3. Select Internet Protocol (TCP/IP), and click on Properties. This invokes the Internet Protocol (TCP/IP)
Properties dialog.
4. Select Use the following IP address, and enter the desired (static) IP Address and Subnet Mask for the
panel.
1. Select Tools > File Transfer to open the File Transfer dialog (open to the Send tab). 2. Click the Add button to open the Select Files for File Transfer dialog.
195
3. Click the Other tab, and select the type of file you want to transfer (only IRL/IRV, TP4 or IRN files can be
transferred via a Virtual NetLinx Master connection).
4. Click the Add button. This invokes the Open dialog, where you can locate and select the file you want to
transfer.
5. Select the desired file and click OK to close this dialog and invoke the Enter Device Mapping
Information dialog.
6. Review the mapping information, and click OK to return to the Select Files for File Transfer dialog. 7. Click OK to return to the File Transfer dialog, where the new file should appear in the Files to Send list. 8. Click inside the checkbox to the left of the file you just added. Keep in mind that any files with a
checkmark will be included in this transfer. Note that the Connection column indicates that the file you just added is using Virtual NetLinx Master.
Configuring NetLinx Studio For Virtual NetLinx Master TCP/IP Transfers 1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog. 2. Select the System that you want to set communication settings for (from the Available System(s) list. 3. Click the Communication Settings button to open the Communication Settings dialog. 4. Select [Virtual NetLinx Master] as the Transport Connection Option. 5. Click the Edit Settings button to access the Virtual NetLinx Master Settings dialog, which displays the
System number of the Virtual NetLinx Master (default = 1). Assuming that the actual NetLinx Master is set to 0 (via the System Properties dialog - System ID field), this default setting will work. However, if you have designated any other number as the System ID, be sure to set this System Number to a different number than the System ID, to avoid a conflict with the actual NetLinx Master (range = 1-65535). As indicated in the Virtual NetLinx Master dialog, changes made to the system number field will not take effect until all communications are stopped and restarted.
6. Click OK to close the Virtual NetLinx Master Settings dialog. 7. Click OK to close the Communication Settings dialog. Configuring The Touch Panel For Virtual NetLinx Master TCP/IP Transfers
If it is not already powered up and connected, apply power to the G4 panel and verify that it is connected to the LAN via the TCP/IP connector on the rear (or side) of the panel.
1. Press and hold the grey Front Setup Access button (below the touch screen) for 3 seconds to access the
Setup page.
2. Press the Protected Setup button to access the Protected Setup page. 3. Use the on-screen keyboard to enter the password (the default password is 1988). 4. Press the System Connection button to access the System Connection Setup page. 5. Select Ethernet as the Master Connection.
196
6. Set the System Number to 0 (zero). 7. Select the Master URL / IP input box and enter the IP address of your PC.
To get your PC's IP address, select Start > Run and type cmd to open a DOS window. Then, enter ipconfig to display the IP address of your PC.
8. Press the Back button to return to the Protected Setup page and press the Reboot button to reboot the
panel.
9. After several seconds, the panel should appear in the online device tree, listed as Virtual NetLinx Master.
Once you can see the device online, you may transfer panel files directly to and from the G4 device.
1. Select Tools > File Transfer to open the File Transfer dialog (open to the Send tab). 2. Click the Add button to open the Select Files for File Transfer dialog. 3. Click the Other tab, and select the type of file you want to transfer (only IRL/IRV, TP4 or IRN files can be
transferred via a Virtual NetLinx Master connection).
4. Click the Add button. This invokes the Open dialog, where you can locate and select the file you want to
transfer.
5. Select the desired file and click OK to close this dialog and invoke the Enter Device Mapping
Information dialog.
6. Review the mapping information, and click OK to return to the Select Files for File Transfer dialog. 7. Click OK to return to the File Transfer dialog, where the new file should appear in the Files to Send list. 8. Click inside the checkbox to the left of the file you just added. Keep in mind that any files with a
checkmark will be included in this transfer. Note that the Connection column indicates that the file you just added is using Virtual NetLinx Master.
197
198
Communication Settings
Communication Settings
Overview
The options in the Master Communication Settings and Communication Settings dialog allow you to define various communication settings, to allow you to connect NetLinx Studio to both NetLinx and Axcess Masters. In the case of NetLinx Masters, you can connect via TCP/IP, Serial or Virtual NetLinx Master. Axcess masters communicate via Serial. Refer to the Master Communication Settings Dialog section below for a detailed description of the options provided in the Master Communication Settings dialog. Refer to the Communication Settings Dialog section on page 129 for a detailed description of the options provided in the Communication Settings dialog.
Selected System Communication settings for the selected System Click to open the Communications Settings dialog, to configure settings for the selected System
The options presented in this dialog are described below: Master Communication Settings Dialog Options
Available Systems Select the system or systems for which you will configure communication settings: <No Active System Default Settings> - Select to configure the default communication settings for NetLinx Studio. The default settings will be used when there is not a Workspace file open, or when the open Workspace does not have an active System. See the Configuring the Default Communications Settings section on page 204 for details. <Terminal Settings> - Select to configure the dedicated communications settings for Terminal window communications. See the Configuring Terminal Communications Settings section on page 204 for details. Project/System Folders - Each System can have its own dedicated communication settings. These System-level settings override the default communications settings. See the Configuring System-Level Communications Settings section on page 205 for details.
199
Communication Settings
The options presented in the top area of the Communication Settings dialog are described below: Communication Settings Dialog - Common Options
Platform Selection Click the radio buttons to specify the platform (NetLinx or Axcess). Default = NetLinx If Axcess is selected, only Serial is available as the Transport Connection Option. Transport Connection Click the radio buttons to specify the transport option (TCP/IP, Serial or Virtual Option NetLinx Master). This selection determines which options are presented in the lower part of this dialog. See the TCP/IP Communication Settings section on page 201 for details. See the Serial Communication Settings section on page 202 for details. See the Virtual NetLinx Master Communication Settings section on page 203 for details. OK Cancel Click to save your changes and close this dialog. Click to discard your changes and close this dialog.
200
Communication Settings
The options presented in this dialog depend on the Platform Selection (NetLinx or Axcess), as well as the Transport Connection Option (TCP/IP, Serial or Virtual NetLinx Master) selected, as described in the following sections:
The TCP/IP communication settings in this dialog are described below: Communication Settings Dialog - TCP/IP Options
List of Addresses: This table lists all TCP/IP Addresses that have been configured and saved in NetLinx Studio. This table presents the following information for each address in the list (as entered in the New TCP/IP Setting dialog when each address is defined. TCP/IP:URL - This is the address information entered in the TCP/IP Address field. Description - This is the description entered in the Description field. Since this property is optional, there may not be a description for every address in the list. Port - This is the Port assigned to each address (in most cases, 1319). Ping Host - This value indicates wether the address is configured to automatically ping the Master Controller to ensure availability (True or False). User - This value indicates the User Name entered for this address. Password - This value indicates the Password entered for this address. Since User and Password are optional (depending on wether authentication is required on the target NetLinx Master), there may not be entries in these columns for every address in the list. New: Select: Edit: Listen: Click New to define a new TCP/IP address, in the New TCP/IP Setting dialog. See the Defining a New TCP/IP Address section on page 206 for details. With an address selected in the List of Addresses table, click Select to select that address for use, or to edit or delete. Click Edit to edit the selected address, in the TCP/IP Properties dialog. See the Editing a TCP/IP Address section on page 207 for details. With an address selected in the List of Addresses table, click Listen to listen for "blink" (UDP) messages from NetLinx Masters on the same subnet (in the Listen For Masters dialog. See the Listening For NetLinx Masters On The Subnet section on page 207 for details. Delete: With an address selected in the List of Addresses table, click Delete to remove it from the List of Addresses. See the Deleting a TCP/IP Address section on page 207 for details. Delete All: Click Delete All to clear the List of Addresses.
201
Communication Settings
The Serial communication settings in this dialog are described below: Communication Settings Dialog - Serial Options
Comm Port: Baud Rate: Data Bits: Parity: Stop Bits: Flow Control: Select a COM port for serial communications from the drop-down list. Default = COM1. Select a baud rate for the selected COM port from the drop-down list. Default = 38400. Specify a data bit setting from the drop-down list. Default = 8. Specify a parity setting from the drop-down list. Default = None. Specify a stop bits setting from the drop-down list. Default = 1. Specify a flow control setting from the drop-down list. Default = None. Authentication: The Authentication options are only displayed if NetLinx Master is selected as the Platform Selection. If the target NetLinx Master requires authentication, then enter the User Name and Password that will in these fields. User Names and Passwords are case-sensitive. OK: Cancel: Click to save your changes and close this dialog. Click to discard your changes and close this dialog.
202
Communication Settings
The Virtual NetLinx Master communication settings in this dialog are described below: Communication Settings Dialog - Virtual NetLinx Master Options
Master System Number: Enter the System Number for the Virtual NetLinx Master. Default = 1. Range = 1-65535 Assuming that the actual NetLinx Master is set to 0 (via the System Properties dialog - System ID field), this default setting will work. However, if you have designated any other number as the System ID, be sure to set this System Number to a different number than the System ID, to avoid a conflict with the actual NetLinx Master. Note: As indicated in the Virtual NetLinx Master dialog, changes made to the system number field will not take effect until all communications are stopped and restarted. Current Connection: Available Connections: The current connection information (IP Address) is displayed here (read-only) A listing of available Virtual NetLinx Master connections is provided in this table. Click on a connection in this list and click Select to set that connection as the current Virtual NetLinx Master connection. OK: Cancel: Click to save your changes and close this dialog. Click to discard your changes and close this dialog.
Some combinations of settings may result in truncation in the Settings display text field (indicated by an ellipsis). If this is the case, simply hover the mouse cursor over the Settings display text field to view the full description.
203
Communication Settings
1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog. 2. Click to select <No Active Settings-Default Settings> from the Available System(s) list (FIG. 153).
3. Click the Communication Settings button to access the Communication Settings dialog (FIG. 149 on
page 200).
4. Specify the default communication settings as desired. Refer to the Communication Settings
Dialog section on page 200 for details.
5. Click OK to save your changes and close the Communication Settings dialog, returning you to the Master
Communication Settings dialog.
6. Verify that the settings are as expected, and click OK to close the Master Communication Settings dialog.
1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog. 2. Click to select Terminal Settings from the Available System(s) list (FIG. 154).
204
Communication Settings
3. Click the Communication Settings button to access the Communication Settings dialog (FIG. 149 on
page 200).
4. Specify the Terminal communication settings as desired. Refer to the Communication Settings
Dialog section on page 200 for details.
5. Click OK to save your changes and close the Communication Settings dialog, returning you to the Master
Communication Settings dialog.
6. Verify that the settings are as expected, and click OK to close the Master Communication Settings dialog.
1. Select Settings > Master Communication Settings to open the Master Communication Settings dialog. 2. Click to select a System (contained within a Project folder) from the Available System(s) list (FIG. 155).
3. Click the Communication Settings button to access the Communication Settings dialog (FIG. 149 on
page 200).
4. Specify the selected Systems communication settings as desired. Refer to the Communication Settings
Dialog section on page 200 for details.
5. Click OK to save your changes and close the Communication Settings dialog, returning you to the Master
Communication Settings dialog.
6. Verify that the settings are as expected, and click OK to close the Master Communication Settings dialog. Alternatively, you can also access these System-level communications settings options via the System Properties dialog: 1. Select (highlight) a System in the Workspace tab of the Workspace Bar, and select System Properties
from either the Project menu or the System Folder context menu (or click the toolbar button) to open the System Properties dialog (FIG. 156).
2. In the Communication Settings area (at the bottom of the dialog), click Communication Settings to open
the Communication Settings dialog.
3. Follow the steps above to specify communication settings for the selected System.
205
Communication Settings
1. Click New to open the New TCP/IP Setting dialog (FIG. 157):
2. In the TCP/IP Address field, enter the TCP/IP Address of the master. 3. In the Description field, enter a descriptive, friendly name for the master.
The Port should always be set to 1319 (default setting). Do not change the Port assignment.
4. The Automatically Ping the Master Controller to ensure availability option (selected by default) will
automatically ping the specified address to verify connectivity. De-select this option if you do not want to ping the address.
5. Optionally, enter a User Name and Password (required for masters that require authentication). User
names and passwords are case-sensitive.
6. Click OK to save changes and close this dialog. This new TCP/IP Address is included in the List of Addresses in the Communication Settings dialog.
206
Communication Settings
1. Select an address in the List of Addresses, and click Edit to open the TCP/IP Properties dialog
(FIG. 158):
2. Edit the fields as desired and click OK to save your changes and close the dialog. Deleting a TCP/IP Address
In the Communication Settings dialog, with NetLinx Master selected as the Platform Selection, and TCP/IP selected as the Transport Connection Option:
1. Select an address in the List of Addresses, and click Delete. 2. The deleted address is removed from the List of Addresses.
Click Delete All to clear the List of Addresses.
1. Click the Start Listening button. 2. As NetLinx Masters are detected on the subnet, they are displayed in the List of Active NetLinx Master
Controllers window.
3. Click Select To Add to add the selected Master(s) to the List of Addresses in the TCP/IP Settings dialog.
207
Communication Settings
208
Warnings Options
Click these checkboxes to specify which warnings to display in the Build tab of the Output Window, after compile operations: Axcess Compiler Tab: Warnings Options
Integer on non-arrays This warning appears when the keyword INTEGER is applied to a non-array type of variable. Doing this is not an error, because non-array variables are already integers, but it is redundant.
209
Source Options
Click these checkboxes to enable the following build (compile) options: Axcess Compiler Tab: Source Options
Build with Source Check to compile the source code with the executable code so that you may later retrieve the source code from the device you send the compiled code to. If Build with Source is disabled, only the executable code is sent when the file is transferred to the master. Select this option to apply a password to the Source file. Once you retrieve the source code file from the master, you will be prompted for a password to unlock the file. The last password you entered in this dialog will be used to open the locked file first. If that fails, then you will be prompted for a correct password. Note: When building with source, only the files needed for the compilation process are compressed. Though the APW may contain many files, if the source file only uses one axi file, then only 2 files will be compressed.
210
211
212
Display Options
These options offer display-oriented options for the Source Code Editor window: Editor - Display and Indention Tab: Display Options
Show Line Numbers Enable AutoComplete/ Suggest This option displays line numbers along the left-hand edge of the Source Code Editor window (default = enabled). With this option enabled, the application examines the first few characters in a variable name, device name or a reserved identifier, and automatically finishes typing it for you (default = enabled). In some cases, the program will suggest the rest of the word. With option enabled, the program will automatically finish typing many common terms for you, to save time and effort. This option causes the program to draw vertical lines indicating the tab stops in the Source Code Editor window (default = enabled). Note that indentation guides only appear if there are tabs present in the code. This option enables the Call Tips function. Call Tips assist you with adding declared functions by displaying a list of parameters that are valid for the particular function you are adding.
213
Printer Options
These options let you control how to best print source files that use color-coding: Editor - Display and Indention Tab: Printer Options
Print Black on White Print Color on White Print Color on White but Invert Light Colors Print all text as black on a white background. Print all text using the same colors displayed in the Source Code Editor window, on a white background. This is the same as "Print Color on White", except that light colors are automatically be inverted for better readability on a white background.
214
Highlighting Options
These options allow you to customize syntax highlighting within the Source Code Editor windows. The term Syntax Highlighting refers to the fact that various terms in the code file (including Reserved Identifiers, Constants, Devices, Types and Variables) are automatically highlighted (displayed in a specific foreground and/or background) in the Source Code Editor windows. Editor - Highlighting and Fonts Tab: Highlighting Options
Document Type Select the type of document that you want to set highlighting options for (Axcess/NetLinx Source code files or Text Files).
215
216
Display Options
Workspace Tab - Display Options
Restore Workspace On Startup This option (on by default) automatically restores the workspace file upon startup of the application. With this option enabled, all files that were opened and the dockable windows that were displayed when you closed the application will be restored when you restart the program. Display System Configuration This option (ON by default) displays the System Configuration settings as part Setting in the Identifier of the System identifier (as displayed in the Workspace tab of the Workspace Bar). Show IR Tab Show Zero-Config Tab
217
Saving Options
Workspace Tab - Saving Options
Enable Auto Save Toggles the timed auto-saving of text files and the duration of time between auto saves.
Auto Save Every <x> Minutes This field is only enabled when the Enable Auto Save option is selected. The range is 1-120 minutes, the default setting is 5. Automatically Save File Before Compile Toggles auto-saving of code files before a compile (default = enabled).
Automatically Stamp File with Automatically stamps all Workspace files with Creation and Last Modified dates when the file is closed (default = disabled). Creation and Last Modified Date
Enable Window Close Button This option toggles the Window Close button.
218
219
220
The options on this tab include: Automatically select reboot when sending a TKN file (default = enabled). When sending a TKN, automatically send the associated SRC (default = enabled). Automatically choose "Smart Transfer" when sending a TP4 file (default = disabled). By default, select "Send Bitmaps" when sending a TPD file (default = enabled). By default, select "Send Icons" when sending a TPD file (default = enabled). By default, select "Send Fonts" when sending a TPD file (default = enabled). By default, connect directly to a touch panel (no master) whenever transferring TPD files (only available for Serial connections) (default = disabled). Show "Load List" Summary (default = enabled). By default, select "Send Glyph" when sending a KPB file (default = disabled). By default, select "Send Font" when sending a KPB file (default = disabled).
221
222
Your TEMP or TMP environment variables are used to determined the drive used for the two buffer files. Available Disc Space on drive C - this read-only field indicates the current amount of free disc space available on your local hard disc (c:). Use this number as reference if you are increasing the buffer file size.
Click to display the firmware ID for each device in the Online Device Tree, (default = disabled).
223
1. Select Tools > Export Preferences. 2. In the Save As dialog, specify a name and target directory for the resulting *.EPX file, and click OK.
To import an existing *.EPX file:
1. Select Tools > Import Preferences. 2. The program will prompt you to acknowledge that the imported settings will overwrite your current
Editor preferences - click OK to proceed.
3. In the Open dialog, locate and select the desired *.EPX file, and click Open. The Preferences dialog should now reflect the preferences specified in the imported *.EPX file.
224
Troubleshooting
225
3000 RESEARCH DRIVE, RICHARDSON, TX 75082 USA 800.222.0193 469.624.8000 469-624-7153 fax 800.932.6993 technical support www.amx.com
9/11
2011
AMX. All rights reserved. AMX and the AMX logo are registered trademarks of AMX. AMX reserves the right to alter specifications without notice at any time.