0% found this document useful (0 votes)
5 views170 pages

Net Linx Manual

The document is an instruction manual for NetLinx Studio version 2.2, detailing the software license agreement, intellectual property rights, and warranty information. It includes a comprehensive table of contents covering system requirements, software features, workspace management, project handling, programming, and online device operations. The manual emphasizes the non-exclusive licensing of the software, restrictions on use, and the conditions under which the license may be terminated.

Uploaded by

toponovs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views170 pages

Net Linx Manual

The document is an instruction manual for NetLinx Studio version 2.2, detailing the software license agreement, intellectual property rights, and warranty information. It includes a comprehensive table of contents covering system requirements, software features, workspace management, project handling, programming, and online device operations. The manual emphasizes the non-exclusive licensing of the software, restrictions on use, and the conditions under which the license may be terminated.

Uploaded by

toponovs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 170

instruction manual

NetLinx Studio
v 2.2

So ftw are
Software License and Warranty Agreement
LICENSE GRANT.
AMX grants to Licensee the non-exclusive right to use the AMX Software in the manner described in this License. The AMX Software
is licensed, not sold. The AMX Software consists of generally available programming and development software, product documenta-
tion, sample applications, tools and utilities, and miscellaneous technical information. Please refer to the README.TXT file on the
compact disc or download for further information regarding the
components of the AMX Software. The AMX Software is subject to restrictions on distribution described in this License Agreement.
YOU MAY NOT LICENSE, RENT, OR LEASE THE AMX SOFTWARE. You may not reverse engineer, decompile, or disassemble the
AMX Software.

INTELLECTUAL PROPERTY.
The AMX Software is owned by AMX and is protected by United States copyright laws, patent laws, international treaty provisions,
and/or state of Texas trade secret laws. Licensee may make copies of the AMX Software solely for backup or archival purposes. Lic-
ensee may not copy the written materials accompanying the AMX Software.

TERMINATION. AMX RESERVES THE RIGHT, IN ITS SOLE DISCRETION, TO TERMINATE THIS LICENSE FOR
ANY REASON AND UPON WRITTEN NOTICE TO LICENSEE.
In the event that AMX terminates this License, then Licensee shall return all copies of the AMX Software to AMX and certify in writing
that all copies have been destroyed.

PRE-RELEASE CODE.
Portions of the AMX Software may, from time to time, as identified in the AMX Software, include PRE-RELEASE CODE and such
code may not be at the level of performance, compatibility and functionality of the final code. The PRE-RELEASE CODE may not
operate correctly and may be substantially modified prior to final release or certain features may not be generally released. AMX is
not obligated to make or support any PRE-RELEASE CODE. ALL PRE-RELEASE CODE IS PROVIDED "AS IS" WITH NO WAR-
RANTIES.

LIMITED WARRANTY.
AMX warrants that the AMX Software will perform substantially in accordance with the accompanying written materials for a period of
ninety (90) days from the date of receipt. AMX DISCLAIMS ALL OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUD-
ING, BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE,
WITH REGARD TO THE AMX SOFTWARE. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. Any supplements
or updates to the AMX SOFTWARE, including without limitation, any (if any) service packs or hot fixes provided to you after the expi-
ration of the ninety (90) day Limited Warranty period are not covered by any warranty or condition, express, implied or statutory.

LICENSEE REMEDIES.
AMX's entire liability and your exclusive remedy shall be repair or replacement of the AMX Software that does not meet AMX's Lim-
ited Warranty and which is returned to AMX. This Limited Warranty is void if failure of the AMX Software has resulted from accident,
abuse, or misapplication. Any replacement AMX Software will be warranted for the remainder of the original warranty period or thirty
(30) days, whichever is longer. Outside the United States, these remedies may not available.

NO LIABILITY FOR CONSEQUENTIAL DAMAGES. IN NO EVENT SHALL AMX BE LIABLE FOR ANY DAMAGES WHATSOEVER
(INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS
AMX SOFTWARE, EVEN IF AMX HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/
COUNTRIES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAM-
AGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

U.S. GOVERNMENT RESTRICTED RIGHTS. The AMX Software is provided with RESTRICTED RIGHTS. Use, duplication, or dis-
closure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of The Rights in Technical Data and Com-
puter Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software Restricted
Rights at 48 CFR 52.227-19, as applicable.

This Agreement replaces and supercedes 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. Should you have any
questions concerning this Agreement, or if you desire to contact AMX for any reason, please write: AMX Corporation,
3000 Research Drive, Richardson, TX 75082.
Table of Contents

Table of Contents
Introduction ...............................................................................................................1
Supported Operating Systems and Minimum PC Requirements ...................................... 2
Supported operating systems: ................................................................................................. 2
PC Requirements:.................................................................................................................... 2
Other PC requirements: ........................................................................................................... 2
What’s New Dialog ............................................................................................................ 2
WebUpdate ....................................................................................................................... 3
Software History 2 Application .......................................................................................... 3
DIP Switch 2.0................................................................................................................... 3
The NetLinx Studio Workspace Wizard............................................................................. 3
The NetLinx Studio Code Wizard ...................................................................................... 3
Workspace, Projects and Systems.................................................................................... 4
Converting NetLinx Studio v1.2 Project Files .................................................................... 5
NetLinx Studio v2.x Work Area ......................................................................................... 6
Title Bar.................................................................................................................................... 7
Status Bar ................................................................................................................................ 7
Menu Bar.................................................................................................................................. 8
Toolbars ................................................................................................................................... 8
Workspace Window........................................................................................................... 9
Workspace Window - Workspace tab ...................................................................................... 9
Workspace Folder .................................................................................................................. 10
Workspace Context Menu...................................................................................................... 10
Project Folders ....................................................................................................................... 11
Project Folder Context Menu ................................................................................................. 11
System Folders ...................................................................................................................... 12
System Folder Context Menu................................................................................................. 12
System File Folders ............................................................................................................... 13
Workspace Window - Online Tree tab ................................................................................... 14
Online Tree Context Menu ..................................................................................................... 15
Output Display Window ................................................................................................... 15
Output Display Window - Diagnostics tab .............................................................................. 15
Output Display Window - File Transfer Status tab ................................................................. 15
Output Display Window - Find In Files tab ............................................................................. 16
Output Display Window - Find IR Files tab ............................................................................ 16
Output Display Window - Notifications tab ............................................................................. 16
Buffering of the Notification and Diagnostic Tabs .................................................................. 16

NetLinx Studio v2.2 i


Table of Contents

Output Display window - Status tab ....................................................................................... 17


Output Display Window Context Menu .................................................................................. 17
Source Code Editor Windows ......................................................................................... 18
Supported Keyboard Movements........................................................................................... 19
Syntax Highlighting ................................................................................................................ 20
AutoComplete and AutoSuggest............................................................................................ 21
Source Code Editor Context Menu ........................................................................................ 21
Terminal Window ............................................................................................................ 22
Paste Operations ................................................................................................................... 22
Configuring Terminal Communications Settings .................................................................... 22
Using the Terminal Window ................................................................................................... 23
Setting Terminal Preferences (Terminal Options tab)............................................................ 24
Terminal window Context Menu............................................................................................. 24
Watch Window ................................................................................................................ 24
Debugging AXCESS Files...................................................................................................... 25
Watch Window Context Menu................................................................................................ 25
Notes on using Current Length (when the Total Length option is disabled): ......................... 26
Dockable Windows.......................................................................................................... 26
Toggling the Windows............................................................................................................ 26
Working With Workspace Files ............................................................................. 27
Using the Workspace Wizard.......................................................................................... 28
Opening Workspace Files ............................................................................................... 30
Creating a New (Empty) Workspace............................................................................... 30
Adding a Project to the Workspace........................................................................................ 30
Importing Projects Into a Workspace ..................................................................................... 31
Deleting a Project From the Workspace ................................................................................ 31
Building the Workspace .................................................................................................. 31
Exporting Workspace Files for Distribution ..................................................................... 32
Backing Up The Workspace File (to ZIP file) .................................................................. 32
ZIP File Extraction.................................................................................................................. 33
Viewing and Editing Workspace Properties .................................................................... 33
Workspace Context Menu...................................................................................................... 34
Working With Projects ........................................................................................... 35
Opening Projects in NetLinx Studio ................................................................................ 35
Creating a New Project ................................................................................................... 35
Adding a Project to the Workspace........................................................................................ 36
Deleting a Project From the Workspace ................................................................................ 36
Importing Projects Into a Workspace ..................................................................................... 36
Copying and Pasting Projects ................................................................................................ 36

ii NetLinx Studio v2.2


Table of Contents

Adding a System to a Project .......................................................................................... 36


Deleting a System From a Project................................................................................... 36
Importing Systems Into a Project .................................................................................... 37
Copying and Pasting Systems ........................................................................................ 37
Building the Project ......................................................................................................... 37
Viewing and Editing Project Properties ........................................................................... 38
Project Folder Context Menu ................................................................................................. 38
Working With Systems and System Files ............................................................39
Creating a New System................................................................................................... 40
Adding a New System To a Project................................................................................. 41
Deleting a System From a Project................................................................................... 41
Importing Systems Into a Project .................................................................................... 42
Copying and Pasting Systems ........................................................................................ 42
System Status: Active vs. Inactive .................................................................................. 42
Designating the Active System .............................................................................................. 42
Changing the System Platform (Axcess / NetLinx) ......................................................... 43
Configuring System-Level Communications Settings ..................................................... 43
Adding a File To a System .............................................................................................. 44
Drag and Drop Files into a System ........................................................................................ 45
Removing a File From a System ..................................................................................... 45
Building the Selected System.......................................................................................... 46
Building the Active System.............................................................................................. 46
Viewing and Editing System Properties ................................................................................. 46
System Folder Context Menu................................................................................................. 47
System Files.................................................................................................................... 48
Creating New System Files ............................................................................................. 49
File Types and Extensions ..................................................................................................... 49
Identifiers vs. Disk Filenames ................................................................................................ 50
Viewing and Editing System File Properties .......................................................................... 50
System File Folder Context Menus ........................................................................................ 51
System File Context Menus ................................................................................................... 51
Working With Source Code Files .................................................................................... 52
Adding a New Source Code File to a System ........................................................................ 52
Adding an Existing Source Code File to a System................................................................. 52
Creating a Source Code File.................................................................................................. 53
Designating the System's Master Source Code File .............................................................. 54
Compiling Source Code Files................................................................................................. 54
SRC File Extraction................................................................................................................ 54

NetLinx Studio v2.2 iii


Table of Contents

Working With Include Files.............................................................................................. 55


NetLinx .AXI File .................................................................................................................... 55
Adding a New Include File to a System ................................................................................. 55
Adding an Existing Include File to a System .......................................................................... 56
Creating an Include File ......................................................................................................... 56
Working With NetLinx Modules ....................................................................................... 57
Minimum Support Requirements for NetLinx Modules........................................................... 57
Source Code Entry................................................................................................................. 57
Adding a New Module File to a System ................................................................................. 58
Adding an Existing Module File to a System.......................................................................... 58
Compiling Module Files.......................................................................................................... 59
Working With User Interface (UI) Files............................................................................ 59
Adding an Existing User Interface File to a System ............................................................... 60
Configuring NetLinx Source Code for KPD Files ................................................................... 60
Sample NetLinx Code ............................................................................................................ 61
Working With IR Files...................................................................................................... 62
Adding an Existing IR File to a System .................................................................................. 62
Working With IREdit Database (*.IRN) Files ................................................................... 63
IREdit ..................................................................................................................................... 63
Adding an IR File From the AMX IR Database ...................................................................... 63
Adding an Existing IR File From an IREdit User Database (*IRN) File .................................. 64
Export to IRL File ................................................................................................................... 64
Searching for IR Library (IRL/IRV) Files................................................................................. 65
Working With "Other" Files.............................................................................................. 66
Creating a Text File................................................................................................................ 66
Adding an Existing "Other" File to a System .......................................................................... 66
Programming .......................................................................................................... 69
Source Code Editor Windows ......................................................................................... 69
Source Code Editor Context Menu ........................................................................................ 70
Regular Expressions .............................................................................................................. 71
Syntax Highlighting ................................................................................................................ 71
AutoComplete and AutoSuggest............................................................................................ 72
Searching Within the Active Source Code File ...................................................................... 73
Using the Code Wizard ................................................................................................... 73
Creating Events with the Code Wizard .................................................................................. 74
Creating SEND_COMMANDs with the Code Wizard............................................................. 74
Generating Constants From an IR File with the Code Wizard ............................................... 74
Code Wizard - Advanced Options................................................................................... 75
Code Wizard Dialog - Button tab............................................................................................ 75
Code Wizard Dialog - Channel tab......................................................................................... 76

iv NetLinx Studio v2.2


Table of Contents

Code Wizard Dialog - Level tab ............................................................................................. 77


Code Wizard Dialog - Data tab .............................................................................................. 78
Code Wizard Dialog - Send Command tab ............................................................................ 79
Code Wizard Dialog - IR Constant tab ................................................................................... 79
Insert Section ......................................................................................................................... 80
Goto Line................................................................................................................................ 80
Goto Section .......................................................................................................................... 81
Goto Function or Subroutine .................................................................................................. 81
Using the Clipboard Text Buffer ............................................................................................. 81
Working With Bookmarks....................................................................................................... 82
Debugging Source Code Files ........................................................................................ 82
Using Single-Step Mode.................................................................................................. 83
Using the Terminal Window ............................................................................................ 83
Master Controller Debug Options.................................................................................... 84
Changing the Value of a Watched Variable ........................................................................... 84
Using Breakpoints (NetLinx Only) ................................................................................... 85
Setting a Breakpoint............................................................................................................... 85
Clearing Breakpoints.............................................................................................................. 85
Goto Line................................................................................................................................ 86
Goto Section .......................................................................................................................... 86
Goto Function or Subroutine .................................................................................................. 87
Printing Files.................................................................................................................... 87
Print Preview Window ............................................................................................................ 87
Compile Operations ...............................................................................................89
Building the Workspace................................................................................................... 89
Building the Project ......................................................................................................... 89
Building a Selected System............................................................................................. 90
Building the Active System.............................................................................................. 90
Compiling an Individual File ............................................................................................ 91
Compiler Errors and Warnings ........................................................................................ 92
Compiler Error Types ............................................................................................................. 92
Compiler Errors ...................................................................................................................... 92
Compiler Warnings................................................................................................................. 95
Run-Time Errors..................................................................................................................... 96
Working With Online Devices ................................................................................97
Connecting To a NetLinx Master..................................................................................... 97
Connecting to a NetLinx Master via TCP/IP........................................................................... 97
Connecting to a NetLinx Master via Serial Port ..................................................................... 97
Connecting to a NetLinx Master via Modem .......................................................................... 98

NetLinx Studio v2.2 v


Table of Contents

Connecting To an AXCESS Master ................................................................................ 99


Connecting to an AXCESS Master via Serial Port ................................................................. 99
Connecting to an AXCESS Master via Modem.................................................................... 100
Viewing Online Devices and Ports ................................................................................ 100
Diagnostics.................................................................................................................... 101
Using NetLinx Diagnostics ................................................................................................... 101
Using NetLinx Device Notification ........................................................................................ 101
Adding a Device to the Device Notification List.................................................................... 101
Editing Device Notification Settings ..................................................................................... 102
Removing Devices From the Notifications List..................................................................... 103
NetLinx Device Emulation ............................................................................................. 103
Using NetLinx Device Emulation.......................................................................................... 103
NetLinx Device Control ................................................................................................. 104
Using NetLinx Device Control .............................................................................................. 104
NetLinx Device Addressing ........................................................................................... 106
Changing the Device/System Address on a NetLinx Device ............................................... 106
Restoring the Default Device and System Numbers on a NetLinx Device........................... 107
Using ID Mode to Change the Device Address on a NetLinx Device .................................. 107
URL Lists....................................................................................................................... 108
Creating a URL List.............................................................................................................. 108
Network Addressing ...................................................................................................... 109
Changing the System Number on a NetLinx Master............................................................ 109
Changing the IP Address on a NetLinx Device Using DHCP............................................... 109
Setting the DNS Address for a NetLinx Master.................................................................... 109
Setting the IP Address for a NetLinx Master ........................................................................ 110
Changing the IP Address on a NetLinx Master (Use DHCP) ............................................... 110
Changing the IP Address on a NetLinx Master (Specify IP Address) .................................. 111
Setting NetLinx Time and Date ..................................................................................... 111
NetLinx Diagnostics ............................................................................................. 113
Using NetLinx Device Notification ................................................................................. 113
Adding a Device to the Device Notification List.................................................................... 113
Editing Device Notification Settings ..................................................................................... 114
Removing Devices From the Notifications List..................................................................... 114
Viewing Push Results ................................................................................................... 115
Using NetLinx Device Emulation................................................................................... 115
Using NetLinx Device Control ....................................................................................... 116
NetLinx Device Addressing ........................................................................................... 118
Changing the Device/System Address on a NetLinx Device ............................................... 118
Restoring the Default Device and System Numbers on a NetLinx Device........................... 118

vi NetLinx Studio v2.2


Table of Contents

Using ID Mode to Change the Device Address on a NetLinx Device .................................. 119
Network Addressing ...................................................................................................... 119
Changing the System Number on a NetLinx Master............................................................ 119
Changing the IP Address on a NetLinx Device Using DHCP............................................... 120
Setting the DNS Address for a NetLinx Master.................................................................... 120
Setting the IP Address for a NetLinx Master ........................................................................ 120
Changing the IP Address on a NetLinx Master (Use DHCP) ............................................... 121
Changing the IP Address on a NetLinx Master (Specify IP Address) .................................. 121
Setting NetLinx Time and Date ..................................................................................... 122
Checking the Port Status On an Online Device ............................................................ 122
Device Mapping ....................................................................................................123
To Remove Device Mapping Information from a File........................................................... 124
Device Mapping dialog......................................................................................................... 124
System File Device Map context menu................................................................................ 125
Device:Port:System (D:P:S) .......................................................................................... 125
Communication Settings .....................................................................................127
Communication Settings ............................................................................................... 127
Configuring the Default Communications Settings............................................................... 127
Configuring System-Level Communications Settings .......................................................... 128
Configuring Terminal Communications Settings .................................................................. 129
Tested Modems List............................................................................................................. 130
File Transfer Operations ......................................................................................131
Sending Workspace Files to the Master Controller or System Device.......................... 131
Sending Other Files to the Master Controller or System Device................................... 134
Receiving Files from the Master Controller or System Device ...................................... 135
File Transfer Status Information .................................................................................... 136
Removing Inactive File Transfer Requests ................................................................... 137
Canceling Transfers ...................................................................................................... 137
Exiting NetLinx Studio During a File Transfer Operation............................................... 137
Rebooting the Master Controller ................................................................................... 137
Quick Load dialog.......................................................................................................... 137
Firmware Transfers ..............................................................................................139
Sending Firmware to a NetLinx Device (KIT file) .......................................................... 139
Sending Firmware to an Axcess Device (TSK file)........................................................ 140
Setting Program Preferences ..............................................................................141
Setting the Default Control Platform.............................................................................. 141
Setting the Default Communication Settings................................................................. 141
Preferences Dialog........................................................................................................ 142

NetLinx Studio v2.2 vii


Table of Contents

Setting General Program Preferences (General tab)........................................................... 142


Setting AXCESS Compiler Preferences (AXCESS Compiler tab) ....................................... 143
Setting NetLinx Compiler Preferences (NetLinx Compiler tab) ............................................ 144
Setting Editor Preferences (Editor tab) ................................................................................ 145
Setting Commands Preferences (Commands tab) .............................................................. 146
Setting Toolbars Preferences (Toolbars tab) ....................................................................... 147
Adding/Removing Commands From the Toolbars ............................................................... 147
Creating Custom Toolbars ................................................................................................... 147
Setting Tools Preferences (Tools tab).................................................................................. 148
Adding/Removing Application Shortcuts In the Tools Menu ................................................ 148
Setting Keyboard Preferences (Keyboard tab) .................................................................... 148
Creating Custom Shortcut Keys........................................................................................... 149
Setting Menu Preferences (Menu tab) ................................................................................. 149
Customizing the Menus........................................................................................................ 150
Setting Options Preferences (Options tab) .......................................................................... 150
Setting Diagnostics Preferences (Diagnostics tab) .............................................................. 150
Setting Terminal Preferences (Terminal tab) ....................................................................... 151
Setting File Transfer Preferences (File Transfer tab)........................................................... 152
Setting Workspace Preferences (Workspace tab) ............................................................... 152

viii NetLinx Studio v2.2


Introduction

Introduction
NetLinx Studio v2.0 (and higher) is a 32-bit Windows® application that allows you to program and
maintain entire control systems. NetLinx Studio fully supports both NetLinx and Axcess system
programming.
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) 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 Window organizes and displays all of these Project and System files in a logical
hierarchical tree structure.
NetLinx Studio v2.x features many functional improvements and a refined user-interface. A few
key differences between v1.2 and v2.x are described below:

One important difference in functionality relative to version 1.2 is the concept of the
Workspace. A Workspace represents a set of Projects and Systems and associated System
files. Projects, Systems and System files are all linked to the Workspace to afford a high
degree of flexibility while helping you manage large numbers of files. Since all files are
linked to the Workspace, you can easily re-use System files without creating copies.

NetLinx Studio v2.x also allows you to copy and paste Projects within the Workspace; in
the case that 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.

Another key difference is the ability to support NetLinx Module files (.AXS),
TPDesign4-generated UI (.TP4) files and G4 touch panels.

NetLinx Studio v2.x uses Wizards to help simplify the process of setting up your
Workspace, and to quickly generate programming code.

NetLinx Studio v2.2 1


Introduction

Supported Operating Systems and Minimum PC


Requirements
Supported operating systems:

Windows XP® Professional (service pack 1 or greater, running on a Pentium 233 MHZ
processor (minimum requirement); 300 MHZ or faster recommended.

Windows 2000® (service pack 3 or greater) Professional (running on a Pentium 233


MHZ processor (minimum requirement); 300 MHZ or faster recommended.

Windows NT 4.0® Workstation or Server (service pack 6B or greater).

If you are installing NetLinx Studio on a Windows XP, 2000 or NT machine, you must
have Administrator rights to install and run all required System files.

Windows 98® SE.

PC Requirements:

Pentium 233 MHZ processor (minimum requirement); 300 MHZ or faster recommended.

75 MB of free disk space (minimum requirement); 150 MB recommended.

128 MB of installed memory (RAM).

Minimum (VGA) screen resolution of 800x600.

Other PC requirements:

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.

What’s New Dialog


The What’s New dialog is displayed when NetLinx Studio is launched. This dialog provides a
(read-only) text file describing the features that are new to this release.

To prevent this dialog from being displayed every time the program is launched, select
the Don't Show Me Again option at the bottom of the dialog.

This dialog can always be accessed via the Help > What's New option.

2 NetLinx Studio v2.2


Introduction

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.

Select Help > Web Update to launch this application.

Refer to the WebUpdate on-line help for details and instructions.

Software History 2 Application


The Software History 2 Application provides the ability to search for and display detailed
information on AMX hardware and software.

Click Tools > Software History to launch the application.

Refer to the AMX Software History Application on-line help file for details and
instructions.

DIP Switch 2.0


DIP Switch 2.0 is an AMX application that graphically displays the dip switch settings necessary to
address Axcess, NetLinx and TXC+ devices and configure communications settings.

Click Tools > DIP Switch to launch the application.

Refer to the DIP Switch 2.0 on-line help file for details and instructions.

The NetLinx Studio Workspace Wizard


A key feature of NetLinx Studio v2.x is the Workspace Wizard. The Workspace Wizard quickly
steps you through the process of creating a new Workspace, with a Project and System.
See Using the Workspace Wizard section on page 28 for details.

The NetLinx Studio Code Wizard


Select Tools > Code Wizard to launch the NetLinx Studio Code Wizard. 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

IR Constants
The wizard can be toggled to display individual dialogs for all the above functionality for use by
advanced programmers.

NetLinx Studio v2.2 3


Introduction

When the Wizard generates a new code segment, it is inserted in the active Source Code file, in the
appropriate section of the code.
See Using the Code Wizard section on page 73 for details.

Workspace, Projects and Systems


NetLinx Studio v2.x utilizes three levels of organization: Workspace, Projects and Systems, as
represented in the Workspace tab of the Workspace Window (FIG. 1):

FIG. 1 Workspace tab of the Workspace Window

A Workspace represents at least one Project (containing at least one System), however a
Workspace can contain multiple Projects. Each Project in turn can contain multiple
Systems. A Workspace file represents not only the files currently open in the NetLinx
Studio workspace, but the window and template settings as well. Once you create, save
and then close a Workspace file, you can re-open that Workspace file to recall the
NetLinx Studio workspace, exactly as it was when the Workspace file was created. All
Workspace information is saved in an XML formatted file with the .APW file extension.

A Project represents at least one System (entire set of files needed to operate a Master
Controller, and the controlled devices on an AXlink or NetLinx bus). You can have
multiple Projects contained within a Workspace file, and each Project is represented by a
Project folder in the Workspace. Any Project may contain multiple Systems.

4 NetLinx Studio v2.2


Introduction

A System represents a set of files associated with a complete control system, comprised
of an Axcess or NetLinx Master Controller, one or more user-interface devices (i.e.
Touch Panels), and various types of controlled devices on the bus. Each System is
represented by a System folder contained within a Project in the Workspace.

Each System contains several System File folders; one for each of the file types used in
the System. System files include Source Code files, Include files, Module files, User
Interface files, IR files, and Other files that you want to include as part of a control
system.
The following table describes the file types represented in the Workspace tab of the Workspace
Window:

File Type File extension


Source Code file .AXS
Include file .AXI
NetLinx Module file .AXS
User Interface file .TPD (TPDesign3 files), TP4 (TPDesign4 files) and KPD (KPDesign
files)
Infrared (IR) file .IRL
Other *.*

Converting NetLinx Studio v1.2 Project Files


NetLinx Studio v.2 (and higher) supports Project (.PJS) files created in NetLinx Studio v1.2, via the
File > Open or File > Open Workspace commands. The program converts the .PJS file into an
.APW Workspace file that can be used by the NetLinx Studio v.2 application.

The original NetLinx Studio v. 1.2 file is not altered during this conversion process.

To convert NetLinx Studio v1.2 Project Files for use with NetLinx Studio v2.x:
1. Select File > Open Workspace (or use the toolbar button) to open the Open Workspace dialog.
2. Change the Files of type option (at the bottom of the dialog) to NetLinx Studio V1.2 PJS File
(*.pjs) files.
3. Locate and select the desired NetLinx Studio v1.2 Project file (*.PJS).
4. The program prompts you to proceed with the conversion process. Click Yes to continue to the
PJS to APW Project File Conversion dialog.
5. Click Convert to start the process.
6. The program prompts you when the conversion is complete (click OK in the Conversion
Succeeded dialog).
7. Once the file has been successfully converted, the program prompts you to change the
Communication Settings for the converted file. For Projects with multiple systems, the
program prompts you to change the communication settings for each System individually.

NetLinx Studio v2.2 5


Introduction

Click Yes to change the System-Level Communications Settings for each System contained in
the converted Project (via the Master Communications Settings dialog), or click No to leave
the communication settings alone for this Project/System.

The converted file now exists as a .APW file, in the same folder that contained the
original .PJS file under the same name, but with the .APW file extension.

The new Workspace file is automatically opened in the Workspace Window - Workspace
tab.

At this time, any open Workspace files are automatically closed. If there have been any
unsaved changes made to the open Workspace, the program prompts you to save your
changes before the Workspace is closed.

The converted file now appears as a Workspace with one Project, and one System, and
can be treated like any other NetLinx Studio v2.x Workspace file.

When converting NetLinx Studio v1.2 Projects that contain Module Files, all Module
files will appear in NetLinx Studio v.2's Source folder, as opposed to the Module
folder. Any TKO files resulting from compiling those files will be placed in the Module
file folder. This is only true for converted files, and doesn't apply to Module files added
to a new Workspace file created in NetLinx Studio v.2.

NetLinx Studio v2.x Work Area


The NetLinx Studio work area (FIG. 2) contains the elements of the NetLinx Studio user interface.
Before jumping into a project, take a few moments to familiarize yourself with the main user
interface elements.

FIG. 2 NetLinx Studio v2.x Work Area

6 NetLinx Studio v2.2


Introduction

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.

Status Bar
The Status Bar (FIG. 3) 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.

FIG. 3 Status Bar

The elements of the Status Bar are described below, from left to right:

• Communication Status/quick The far-left side of the status bar displays quick descriptions of
descriptions of program program options anytime you position the mouse cursor over a
options: toolbar button or menu item.
• Notifications Messages Status: Displays the status of NetLinx notification messages (OFF/ON).
• Diagnostics Messages Status: Displays the status of asynchronous diagnostics messages
(OFF/ON).
• Last Push Message and Displays the most recently received Push (if Push is enabled via
History: 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: Displays the name and status of the active communications
Information port. If a TCP/IP connection exists, the current IP address is
displayed. If Virtual NetLinx Master is selected, that the Virtual
NetLinx Master is displayed with its System number.
• 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 cur-
rently 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).

NetLinx Studio v2.2 7


Introduction

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 (File, Edit, View, Project, Build, Diagnostics, Debug,
Tools, Settings, Window or Help) to open the associated drop-down menu.
The main menu bar contains the following menus:

• File: Contains typical File menu options (Save, Save As, Print, Exit), plus several
options relating to file conversion and file transfer.
• Edit: Contains typical Edit menu options (Undo/Redo, Cut/Copy/Paste, Delete), plus
Selection tool options, and access to the Program Preferences dialog.
• View: Contains options for configuring the workspace (i.e. show/hide toolbars and win-
dows).
• Project: Contains various Project-level options (New Project, Add/Remove System, etc).
• Build: Contains options relating to compile operations (Build Workspace, Build System,
Compile As NetLinx/Axcess, etc).
• Diagnostics: Contains options relating to diagnostics operations, including Device Notifications,
Device Emulation/Control, Device Addressing, etc).
• Debug: Contains commands associated with variable watching (Start/Stop Debugging,
Step Mode, Break, etc).
• Tools: Contains options relating to file transfer (send/receive) operations, communica-
tions settings, and links to external programs. The bottom of the Tools menu is a
list of external programs loaded in the Tools list.
• Settings: Contains options for communications settings and program preferences.
• Window: Contains options for window control (stack/cascade/put most recent on top).
• Help: Contains options to access this on-line help program and the About NetLinx Studio
splash-screen.

·Refer to the NetLinx Studio online help for detailed descriptions of each menu item.

Refer to the Setting Menu Preferences (Menu tab) section on page 149 for information on
customizing the menus.

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.

Toolbars
There are eight toolbars in NetLinx Studio (FIG. 4)

Choose View > Toolbars to open the Toolbars sub-menu to view or hide the toolbars.

Refer to Setting Toolbars Preferences (Toolbars tab) section on page 147 for information
on customizing the toolbars.

Refer to the NetLinx Studio online help for detailed descriptions of each toolbar button.

Hover the mouse cursor over any toolbar button (for about one second) to display a
tooltip describing the button.

8 NetLinx Studio v2.2


Introduction

Standard toolbar
Debug Watch toolbar

Window Mgmt toolbar

Edit toolbar

Diagnostics toolbar

Project toolbar

Terminal toolbar

Build toolbar

FIG. 4 NetLinx Studio toolbars

Workspace Window
Use the Workspace Window (FIG. 2) to manage Workspace files and associated Project files,
System files and online devices. The Workspace Window 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.
Use the Workspace Window to view the Workspace file. Workspace files contain Project(s) and
their component System files and devices. The Workspace Window is visible when enabled via the
View menu.

De-select Workspace in the View menu to hide the Workspace Window.

Right-click inside the title bar to display the View Control context menu, where you can
select to hide or display the NetLinx Studio toolbars.

Workspace Window - Workspace tab


The Workspace tab (FIG. 5) contains a tree structure of all the available Projects (and Systems)
contained within a Workspace file. You may create multiple Projects within a Workspace. Within a
Project, you can create multiple Systems.
The Workspace view can be expanded to show all of the various elements within each opened
Project file, as shown below.
Click on the "+" folder flags to expand the folders to expose any subfolders; click the "-" folder
flags to collapse the folders.

The first level within the open Workspace is the Project folder level.

The next level is the System(s) contained within the Project, each represented by a
System folder.

The third level contains the System File folders (Source, Include, Module, User Interface,
IR and Other).

The fourth level contains all of the actual files that make up the System (.AXS, .AXI,
.TPD, .TKO, .TP4 .IRL/.IRV, and *.*).
The hierarchical file structure of the Workspace tab is described in the following sub-sections:

NetLinx Studio v2.2 9


Introduction

FIG. 5 Workspace Window - Workspace tab

Workspace Folder
You can have one Workspace open at a time. A Workspace contains at least one Project, and each
Project contains at least one System.

Workspace Context Menu


Right-mouse click anywhere within the workspace tab to open the Workspace context menu,
containing various Workspace-level commands and options, including:

• New Workspace Closes the currently open Workspace, and starts a new (empty) work-
space (no Project/System associated until you add them manually).
• Workspace Wizard Launches the Workspace Wizard, which steps you through the pro-
cess of creating a new Workspace with a Project/System.
• Open Workspace Opens the Open Workspace dialog, where you can locate and select
an existing Workspace (.APW) file. You can have only one Workspace
open at any time, so in the event that you have a Workspace open, it
will be replaced by the one you open.
• Close Workspace Closes the Workspace file. The program prompts you to close the
files associated with the Workspace before closing them.
• Save Workspace Saves the Workspace file, under its current name and location.
• Save Workspace As Opens the Save Workspace As dialog, where you can specify a new
name and/or location for the saved Workspace file.

10 NetLinx Studio v2.2


Introduction

• Build Workspace Builds (compiles) the Workspace (including all contained Projects).
The progress and results of the build can be viewed in the Status tab
of the Output Display window.
• Export Workspace Files Opens the Export Workspace dialog, which allows you to export the
Workspace file as a ZIP file. The options in this dialog allow you to
specify the name of the resulting ZIP file, the target folder for the ZIP
file, and whether to include the full directory paths within the ZIP file.
• Import From Exported Opens the Select AXW File dialog, where you can select a previously
Workspace File exported "To Go" (AXW) file to import into the program.
• New Project Opens the New Project Properties dialog, which allows you to assign
an Identifier and general properties for a new Project. Once created,
the new project is added to the Workspace.
• Import a Project Opens the Open Workspace dialog, where you can locate and select
a Workspace (.APW) file. This invokes the Import Components From
a Workspace dialog. Use the dialog to select a specific Project con-
tained in the Workspace.
• Paste Project You can copy and paste Projects by selecting Copy Project from the
Project Folder context menu, and selecting the Paste Project com-
mand.
• Collapse Tree Collapses the Project/System/File tree to show only the Workspace
and its Project(s).
• Expand To System Level Expands the Project/System/File tree to show the Workspace,
Project(s) and System(s).
• Docking view Changes the Workspace Window to a dockable window that can be
resized and moved to anywhere within the NetLinx Studio work area.
• Hide Hides the Workspace Window
• Quick Load Workspace This option allows you to access the File Transfer dialog, already con-
figured to send all files in the Workspace (active Project/System only)
to the Master associated with the active System.
• Workspace Properties Opens the Workspace Properties dialog, where you can view the
basic properties of the Workspace. The options in this dialog also
allow you to edit the Workspace Identifier and Description.

Project Folders
Double-click any Project folder to display the System folder(s) contained in that Project.

Project Folder Context Menu


Right-click on any Project folder (in the Workspace tab of the Workspace Window) to open the
Project Folder context menu. This context menu contains various Project-level commands and
options, including:

• New Project Opens the New Project Properties dialog. The options in this dialog
allow you to specify information for the new Project, including Project
Identifier, Dealer, Sales Order, Designer, Purchase Order and
Description.
• Remove Project Removes the selected Project from the Workspace. This option does
not delete the Project or its associated files from the disk.
• Build Project Builds (compiles) the Project (including all contained Systems and
System files). The progress and results of the build can be viewed in
the Status tab of the Output Display window.
• Copy Selected Project Copies the selected Project to clipboard memory, so it can be pasted
(within the same Workspace only), via the Paste Project command in
the Workspace context menu.

NetLinx Studio v2.2 11


Introduction

• New System Opens the System Properties dialog, which allows you to assign an
Identifier, System ID, and Description for a new System. The System
Properties dialog also contains options that allow you to set custom
communication settings for the new system. Once created, the new
system is added to the Project.
• Import a System Opens the Open Workspace dialog, where you can locate and select
the Workspace (.APW) file that contains the System you want to
import into the Project. Once you select an APW file, the Import Com-
ponents From a Workspace dialog is invoked. Use this dialog to select
specific Systems contained in the selected Workspace.
• Paste System You can copy and paste Systems (within a single Workspace) by
selecting Copy Selected System from the System context menu, then
opening the target Project, and selecting the Paste System com-
mand.
• Collapse Tree Collapses the Project/System/File tree to show only the Workspace
and its Project(s).
• Expand To System Level Expands the Project/System/File tree to show the Workspace,
Project(s) and System(s).
• Docking View Changes the Workspace Window to a dockable window that can be
resized and moved to anywhere within the NetLinx Studio work area.
• Hide Hides the Workspace Window.
• Quick Load Project This option allows you to access the File Transfer dialog, already con-
figured to send all files in the active Project to the Master associated
with the active System.
• Project Properties Opens the Project Properties dialog, where you can view and edit the
basic properties of the Project (Project Identifier, Dealer, Sales Order,
Designer, Purchase Order and Description).

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.).

Double-click any System folder to display the six System File folders contained in that
System (Source, Include, Module, User Interface, IR and Other).

System Folder Context Menu


Right-click on any System folder (in the Workspace tab of the Workspace Window to open the
System Folder context menu. This context menu contains various System-level commands and
options, including:

• Set as Active System Sets the currently selected System as the Active System.
• New System Opens the New System dialog. The options in this dialog allow you to
specify information for the new System, including System Identifier, Sys-
tem ID, Description and Communication Settings.
• Remove System Removes the selected System from the selected Project. This option does
not delete the System or its associated files from the disk.
• Build System Builds (compiles) the active System (including all contained System files).
The progress and results of the build can be viewed in the Status tab of
the Output Display window.
• Copy Selected Copies the selected System to clipboard memory, so it can pasted into
System another Project (via the Paste System command in the Project Folder
context menu).

12 NetLinx Studio v2.2


Introduction

• Add File To System Opens the Add Existing File dialog, which allows you locate and select an
individual file to be added to the active System. The selected file will auto-
matically be added to the appropriate System File folder, based on file
type.
• Collapse Tree Collapses the System/File tree to hide all System files.
• Expand System Tree Expands the System/File tree to show all System files contained in the
System File folders.
• Docking View Changes the Workspace Window to a dockable window that can be
resized and moved to anywhere within the NetLinx Studio work area.
• Hide Hides the Workspace Window.
• Quick Load System This option allows you to access the File Transfer dialog, already config-
ured to send all files in the active System to the Master associated with
the active System.
• System Properties Opens the System Properties dialog, where you can view and edit the
basic properties of the active System (System Identifier, System ID,
Description and Communication settings).

System File Folders

Double-click on any System File folder to display the System File(s) contained in that
folder.

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 for viewing and/or editing in a Source Code Editor window.

Double-click any TPD file to open the TPDesign3 program (if it is installed).

Double-click any TP4 file to open the TPDesign4 program (if it is installed).

Double-click any KPD file to open the KPDesign program (if it is installed).

When you add a file to a System (Project > Add File To System), the file is automatically
placed (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).
Other key functions and features of the Workspace tab include:

You can drag and drop files from Explorer into the appropriate sub-folders within a
System.

All files are linked files associated with a system, not copies of files from one location to
another.

For TPD/4, IR files and other source code files, you have the ability to map multiple
devices to the selected file.

The Master Source Code file will always be mapped automatically to device address
0:1:0 for NetLinx masters or 0 for Axcess masters.

You have the ability to copy a selected System folder to paste into another or the same
Project folder.

You have the ability to designate a single source code file as the Master Source Code file.

NetLinx Studio v2.2 13


Introduction

Workspace Window - Online Tree tab


The Online Tree tab of the Workspace Window (FIG. 6) displays an Online Device Tree for either
the NetLinx or Axcess Master Controller. The Online Device Tree only works when you are
connected to a Master. This tab displays a list of devices detected to be currently online by the
Master Controller (and the firmware version for each).

FIG. 6 Workspace Window - Online Tree tab

The Online Device tree is only a snap shot and is not updated in real time as devices
come on/off line. Select Refresh System or Refresh Network from the Online Tree
Context Menu (described below) to update the 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 are currently online.

Double-click any online device in the list to display the ports and sub-devices associated
with the device.

14 NetLinx Studio v2.2


Introduction

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.

Online Tree Context Menu


Right-click on any device or folder, or click the Display command button (in the Online Tree tab of
the Workspace Window) to open the Online Tree context menu. This context menu contains
various commands and options relating to online devices, including:

• Refresh System Click to refresh the Online Device Tree for the local system (the system
containing the Master Controller that your PC is connected to). For
NetLinx systems, it is the Master Controller identified in the Network
field of the Communication Settings dialog. The Connection Status to
the Master Controller dialog may appear, if communication to the mas-
ter has not already been established.
• Refresh Network Click to refresh the entire online tree.
• Device Addressing Click to access the Device Addressing dialog, where you can view/edit
the Device/System addressing information for the selected device.
• 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 Display window.
• Expand Tree Click to expand all of the folders in the Online Device Tree to show all
devices, ports and components.
• Expand to Device Level Click to expand the Online Device Tree to show all devices in the Sys-
tem.
• Collapse Tree Click to collapse the Online Device Tree to the top-level System
Devices folder.

Output Display Window


Select View > Output to display the Output Display window (see FIG. 1). There are 6 tabs
contained in the dockable Output Display window (described in the following sub-sections):

Output Display Window - Diagnostics tab


The Diagnostics tab of the Output Display Window displays all the internal system diagnostic
messages that are generated by a NetLinx master controller. You can right-mouse click in the tab to
see the available options to save or copy the contents of this list.

Output Display Window - File Transfer Status tab


The File Transfer Status tab of the Output Display Window displays the status on the list of files
that are have been or are being transferred:

• Type The type of transfer (sending or receiving).


• Status The current state of the transfer (Pending, Transferring, Complete or Failed).
• Connection The communications settings used to establish communication with the tar-
get device.
• Mapping 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.
• File The name and extension of the file being transferred.

NetLinx Studio v2.2 15


Introduction

• Path 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 An error message if an error has occurred.
• Last Transfer The time and date of the last transfer.

Output Display Window - Find In Files tab


The Find In Files tab of the Output Display Window displays the results of a Tools > Find In Files
search operation. You may right-mouse click in the view to see the available options to save or copy
the contents of this list.

Output Display Window - Find IR Files tab


The Find In IR tab of the Output Display Window 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.

Output Display Window - Notifications tab


The Notifications tab 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.

Buffering of the Notification and Diagnostic Tabs


The Notification and Diagnostic tabs are capable of handling a large number of messages without
adversely affecting the system. There is a buffer file for each view and you can define the combined
size of the two buffer files that are used to handle the large number of messages being sent from the
master controller. Please visit the Diagnostics Tab help topic for more information about the buffer
file options.
As the buffer files are filling with messages from the master controller, the program will read in a
message and display it into the appropriate list view every quarter of a second. This will allow you
to view the messages at a reasonable rate versus what is being loading into the buffer files.

The buffer files that are used by the Notification and Diagnostic tabs can become full.
When this happens, the program will disable the appropriate option. You will need to
clear the appropriate list before you can start the option again. You may copy the text
from the list view or save the content of the list view to a file.

16 NetLinx Studio v2.2


Introduction

Output Display window - Status tab


The Status tab of the Output Display Window 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.

The version number of the compiler (NetLinx or Axcess) is displayed in the Status tab,
whenever source code is being compiled.

Output Display Window Context Menu


Right-click inside any of the Output Display window tabs (Status, Find In Files, Find IR Files, File
Transfer Status, Notifications or Diagnostics) to open the Output Display window context menu.

As indicated, some of the options below are not relevant to all tabs.

The options in this menu include:

• Enable/Disable Asynchronous (Notifications tab only): Stops or starts the asynchronous notifi-
Notifications cations messages that are sent by the NetLinx master controller
without visiting the menu bar.
• Enable/Disable Diagnostics (Diagnostics tab only): Stops or starts the internal system diag-
Messages nostics messages that are sent by the NetLinx master controller
without visiting the menu bar.
• Copy All Items Copies all items in the list to the clipboard.
• Copy Selected Items Copies only the selected items in the list to the clipboard.
• Save All Items Saves all items to a user-defined file. You will be prompted for a
file name to save the contents of the tab.
• Save Selected Items 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.
• 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 pro-
gram highlights the row and scrolls the row into view.
• Clear Clears all the items within the list.

You must stop the appropriate process (either the Asynchronous Notification or
Diagnostic messages) with the master controller before you can select the Save As or
Copy menu options.

NetLinx Studio v2.2 17


Introduction

Source Code Editor Windows


Use Source Code Editor windows 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.

NetLinx Studio features a Code Wizard that steps you through the process of
generating several different types of code. See The NetLinx Studio Code
Wizard section on page 3 for details.

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:

Auto-suggest and Auto-complete functionality: As you type in a variable name, device


name or a language reserved word, the program will suggest a name that has been
previous defined within the source code (this option is toggled on and off in the
Preference dialog - Editor Options tab). Press the Tab key to incorporate an Auto-
Suggest.

The text in the Editor windows is syntax highlighted for increased readability with a
default set of colors. Use the options in the Editor Options tab of the Preferences dialog
to customize various aspects of the Source Code editor windows (i.e. syntax highlighting,
auto-indent, show/hide line numbers and clipboard text buffer settings).

Syntax highlighting assigns different colors to different types of data in your Source
Code file. Use syntax highlighting to make your code easier to read and manage. For
example, you could syntax highlight all comments to yellow, all identifiers to red and
strings to blue to make them more easily identifiable in your code file.

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.

Source Code Editor windows are moveable and resizeable. Use the options in the
Window menu to arrange (cascade or tile) multiple windows.

Use the New Window option in the Window menu to open the same code file in multiple
Editor 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.

Use the Edit > Insert Section option to insert a (empty) section of code at the cursor
position.

18 NetLinx Studio v2.2


Introduction

Use the Edit > Goto Section option to move the cursor to the beginning of a selected
section of code in the active Editor window.

The Edit > Undo and Redo commands allow unlimited Undo/Redo operations.

Use the Edit > Make Selection Uppercase and Make Selection Lowercase commands to
automatically change the case on a selection of text.

Use the Edit > Sequentially Renumber Selection command to sequentially renumber
selected number text in the active Editor window.

The Edit > Block Comment-Uncomment option allows you to block comment-
uncomment selected text in the active Editor window.

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.

Supported Keyboard Movements


The following commands/keyboard movements are supported by the Source Code Editor:

Action Description
Select None removes any selection.
Delete Selection deletes whatever is selected. Equivalent to hitting the delete key when you
have a selection.
Delete All deletes everything. Clears the document.
Select Word selects the nearest word to the cursor.
Select Word Left selects from the cursor to the start of the word.
Select Word Right selects from the cursor to the end of the word
Select Line selects the current line at the cursor
Select Line Left selects from the cursor to the beginning of the line
Select Line Right selects from the cursor to the end of the line
Delete Word deletes the current word at the cursor
Delete Word Left 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 deletes the current line at the cursor
Delete Line Left deletes from the cursor to the beginning of the line
Delete Line Right 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).

NetLinx Studio v2.2 19


Introduction

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:

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.

Operator: All of the following operators


= < > + - * / % ! & | ^ ~ <= >= <> && || ^^

and the longer forms:


BOR AND XOR NOT BAND BNOT BXOR OR

are syntax highlighted using the color specified in Preferences > Editor > Operator.

Floating Point Numbers: A number is considered a floating point number if it contains a


decimal point. Floating point numbers are syntax highlighted using the color specified in
Preferences > Editor > Floating Point Number.

Number: A number is any series of digits that does not include a decimal point. A
number may have the optional prefix “$” for hex or the optional postfix “b” for binary. If
the number is a hexadecimal number then it may contain the letters A-F or a-f. Numbers
are syntax highlighted using the color specified in Preferences > Editor > Number.

String: Strings are any series of characters and digits that occur within two single quotes.
Strings are syntax highlighted using the color specified in Preferences > Editor >
String.

Constants, Devices, Type, Variable: Since NetLinx code may be divided into the
following sections DEFINE_CONSTANT, DEFINE_DEVICE, DEFINE_TYPE,
DEFINE_VARIABLE, anytime a word is encountered that falls within one of these
sections it is parsed, remembered and then syntax highlighted according to the section in
which it occurred. So if a DEFINE_DEVICE section contains a line that reads
“dvTP = 128” the word dvTP will be remembered as a device and syntax highlighted
using the color specified in Preferences > Editor > Device. Additionally, if the editor
recognizes that you have partially typed the name of the above section variable (say
“dv”), it will autosuggest “dvTP”. It does this for all of the items it encountered in any of
the above DEFINE_ sections.

20 NetLinx Studio v2.2


Introduction

Default Text: Any word that is not recognized as any of the above is syntax highlighted
using the color specified in Preferences > Editor > Default Text.

AutoComplete and AutoSuggest


You may enable or disable this feature by toggling the Enable AutoComplete/AutoSuggest
checkbox in the Editor tab of the Preferences dialog.
With this option enabled, the Editor can automatically complete typing many common and standard
programming terms for you. When you begin typing in the editor, a drop-down list of probable
matches for the term you started typing is displayed. Use the scroll bar to scroll through the list (if
necessary) and click to select the desired term or phrase that you want to insert at the cursor's
position.
Press the Tab key (or Enter on your keyboard) to insert the selection.
In the example below, the user has typed the character "D", and is selecting to insert the phrase
"DEFINE_EVENT" into the code. The selection always replaces the character(s) typed before the
AutoComplete/AutoSuggest drop-down was invoked.

Note that AutoComplete/AutoSuggest is case-sensitive. Typically section headings are


capitalized, and commands are not.

Use the Edit > Rescan Current Source File option to rescan the active file, in order to
rebuild the symbol information utilized by the AutoComplete/AutoSuggest feature.

Auto-Suggest/Auto-Complete does not for LOCAL_VARs, STACK_VARs, or


Call/Function Parameters at this time.

Source Code Editor Context Menu


Right-click inside any Source Code Editor window to open the Source Code Editor context menu.
The options in this menu include:

Build Active System Compiles all Source Code files (and any associated Include and
Module files) in the active System.
Compile Compiles the active file, using the compile type associated with the
<active Source Code File> file (the compile type can be changed via the File Properties dialog).
Compile as NetLinx Click to compile the active file using the NetLinx compiler, regardless
of it's Compile As property.
Compile as Axcess Click to compile the active file using the Axcess compiler, regardless
of it's Compile As property.
Undo, Redo Undo and Redo the last text editing action.
Cut, Copy, Paste Cut the selected text to the clipboard, Copy the selected text to the
clipboard, and Paste the contents of the clipboard to the active file, at
the cursor position.
Delete Deletes the selected (highlighted) text in the active Source Code Edi-
tor window.
Select All Selects all of the code in the active file.
Goto Section Click to open the Goto Section sub-menu, which contains a listing of
code sections in a Source Code File. Select a section from this list to
jump to the beginning of that section in the active file. If a section that
does not exist within the active code file is chosen, nothing happens.

NetLinx Studio v2.2 21


Introduction

Goto Line Opens the Goto Line dialog, where you can specify the line of code
to which you want to move the cursor in the active file. If a line num-
ber is entered that is beyond the max number of lines in the file, the
cursor is moved to the last line in the file.
Bookmark Inserts a bookmark at the line containing the cursor in the active file.
Bookmarks are indicated by a blue box in the left margin of the
Source Code Editor window. You can have as many bookmarks as
number of lines in the source code.
Toggle Breakpoint Places a breakpoint in the active file, at the cursor position (NetLinx
files only). Once a breakpoint has been inserted in the file, place the
cursor in the line with the breakpoint and select Toggle Breakpoint
again to remove the breakpoint.
Clear Breakpoints Removes all NetLinx breakpoints.

Terminal Window
NetLinx Studio provides a terminal interface to NetLinx and Axcess devices that support an
interactive terminal mode. The Terminal toolbar is enabled when the Terminal window is opened,
with connect/disconnect commands and the (ASCII, Hex, and Decimal) display commands.
Key features of the Terminal window (accessible through the Terminal window context menu) are
described below:

Paste Operations
Text data contained in the clipboard can be pasted into the terminal window. However, text can only
be pasted when the Terminal window is connected (online), and only the first line of text in the
clipboard will be pasted.

All characters pasted in the Terminal window are not pasted into the window directly,
regardless of the current position of the caret. Rather, they are sent out the port to the
device just as if they had been typed directly from the keyboard. This means that you
will not necessarily see the text that was pasted unless echoing is currently enabled
on the device. Also, carriage-return characters are not appended to the pasted text
(even if the clipboard text contains one). Your must press the return key to enter a
pasted command.

Configuring Terminal Communications Settings


The Terminal window has it's own dedicated communications settings. Use the options in the
Master Communication Settings dialog to specify communication settings for the Terminal
window:
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click to select the second item in the Available System(s) list (labeled <Terminal Settings>).
3. Click the Communication Settings button to access the Communication Settings dialog.
4. Select the default platform (NetLinx or Axcess).
5. Select a transport connection type (Serial or Modem).
6. Click Settings to open either the Serial Settings or Modem Settings dialog (depending on the
transport connection selected).
7. Specify the communications settings for the selected port.

22 NetLinx Studio v2.2


Introduction

For serial ports, specify the COM port, and set baud, data bits, parity, stop bits and flow
control.

For modems, specify the COM port, and set baud, data bits, parity, stop bits, flow control
and target phone number.
The default settings for Serial and Modem ports are:

• Com Port COM1


• Baud Rate 38400
• Data Bits 8
• Parity None
• Stop Bits 1
• Flow Control None

8. Click OK to close the Communication Settings dialog.


9. Click OK to close the Master Communication Settings dialog.

Using the Terminal Window


Select Tools > Terminal (or click the toolbar button) to open the Terminal window.
The Terminal window puts the Master Controller into dumb terminal mode. Anything that is typed
on the screen exits through the Master communications port, and anything coming in from the
communications port is displayed in the Terminal Emulator window. Use the Terminal window to
communicate directly with the Master Controller and to debug RS-232-controlled devices.

You cannot use the Terminal window while a communication port is in use for a file
transfer or debug operation.

Type "ECHO ON" in the Terminal window display messages.

If the Terminal window becomes unresponsive, close and re-open the window.

To leave the Terminal window active for a long session, click the Terminal Locks the
Port option in the General tab of the Preferences dialog.

Use the Format tab of the Preferences dialog to change the appearance of the elements of
the Terminal window.

To use the Terminal window with NetLinx systems, you must be connected to the Master
via the PROGRAM port. Otherwise, you can use Windows TelNet for terminal control of
NetLinx systems.
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).

NetLinx Studio v2.2 23


Introduction

Setting Terminal Preferences (Terminal Options tab)


Use the options on the Terminal Options tab of the Preferences dialog to set default terminal
window preferences. The items in this dialog include:

• Add line feed character This option toggles the display of a line feed character in the termi-
nal window (default = disabled).
• Send Ctrl characters to port This option toggles the transmission of control characters to the
terminal's port (default = disabled).
• Colors These options allow to customize the colors for both states (Active
(Connected) and Inactive (Disconnected)) of the terminal window.
To change the colors on the terminal window, select Active (Con-
nected), then click the down arrows to access the Foreground
(text) and Background color palettes. Select the desired colors,
and repeat for the Inactive (Disconnected) state.
• Terminal buffer size Use the slider to increase or decrease the size of the terminal
buffer. The range is 16 - 64K (default = 32K).

Terminal window Context Menu


Several of the key functions of the Terminal Window are accessible via the Terminal Window
context menu. To open this context menu, right-click inside the Terminal Window. The options
include:

• Display Click to open the Display sub-menu, which contains view options for the Ter-
minal Window. The options are ASCII, HEX (hexadecimal) and DEC (deci-
mal).
• Clear Clears the contents of the Terminal Window.
• Save To File Opens the Save As dialog, which allows you to save the contents of the Termi-
nal Window as a text file (.txt).
• Disconnect Disconnects the Terminal. The terminal window background turns a light
shade of gray, to indicate that it is disconnected.
• Last commands At the bottom of this menu is a list of the last commands entered.

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 This column displays the length of the watched variable.
• Value This column displays the value of the watched variable.
• Display This column displays the format of the variable (ASCII, Decimal, Hexadeci-
mal, Octal, or Binary).

24 NetLinx Studio v2.2


Introduction

You can also drag and drop a variable from the Source Code Editor window into the
debug window.

Debugging AXCESS Files


NetLinx Studio contains several useful options for debugging your Axcess Master Controller and
Source Code files. In order to begin debugging, your computer must be connected to a Master
Controller, and you must have a compiled Axcess Source Code file active.

You cannot compile, send/receive files, or change port settings while the program is
in debug mode.

To enter debug mode:

To use debugging, the Build With Source option must be selected in the Preferences
dialog (Axcess Compiler Options tab), before the file is compiled.

1. Open and compile an Axcess Source Code file (that contains at least one variable), if you have
not already done so. The file must be successfully compiled before you can enter debug mode.
2. Choose Build > Debug 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 displays the value of the watched variable in ASCII format.
• Decimal Display displays the value of the watched variable in decimal format.
• Hexadecimal Display displays the value of the watched variable in hexadecimal format.
• Octal Display displays the value of the watched variable in octal format.
• Binary Display displays the value of the watched variable in binary format.

To exit Debug mode, close the Watch window.

Watch Window Context Menu


Right-click inside the Watch Window to access the Watch Window context menu:

• Refresh List: Refreshes the contents of the Watch Window.


• Add Variable: Opens a text field in the Name column, to allow you to add a variable to
the Watch Window.

NetLinx Studio v2.2 25


Introduction

• Add Variable From List: Opens the List of Watched Variables dialog, where you can select a
variable to add to the Watch Window from a list of all variables located
in the TKN file of a compiled NetLinx source code file.
• Delete Variable: Deletes the selected variable from the Watch Window.
• Delete All Variables: Deletes all variables from the Watch Window.
• Total Length: Sets the viewing mode for arrays to show the total length of the array in
the Length column of the Watch Window. All of the locations of the
array are displayed, regardless of the current length value of the array.
• Step Mode: Toggles the step mode between Run and Single Step mode.
• Single Step: In NetLinx systems, this command executes a single instruction in the
source file; in Axcess systems, it executes a single line of code in the
Mainline.

Notes on using Current Length (when the Total Length option is disabled):
The way you initialize variables in your source code affects the use of Current Length. For
example, if you have a variable declared as:
CHAR cat[3]
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]
and then in the DEFINE_START section of your code you added:
cat[1] = 'C'
cat[2] = 'A'
cat[3] = 'T'
in debug Total Length = 3 and Current Length = 0, because setting values using array indexing does
not set the current length.

Dockable Windows
Dockable windows can be re-arranged within the application window. They automatically snap to
the top, bottom, right or left side of the application window. The windows you can dock and resize
are the Workspace Window, Output Display window and Watch window.

Double click in the title bar of any of the dockable windows to dock/undock the window.

To move the windows, click on the title bar and drag and drop the window.

To dock the windows, drag the window to reposition it next to any border or window
frame and the window will automatically snap to the nearest border.

To stretch/resize the windows, click on any border and drag the border either vertically or
horizontally.

Toggling the Windows


To toggle (show/hide) the Workspace, and Output Display windows, open the View menu and
check/uncheck the windows that you want to display (default = display all windows).

26 NetLinx Studio v2.2


Working With Workspace Files

Working With Workspace Files


NetLinx Studio utilizes a new concept for working with multiple projects/files simultaneously: the
Workspace file.
A Workspace represents at least one Project (containing at least one System), however a Workspace
can contain multiple Projects. Each Project in turn can contain multiple Systems. At any time, you
can create a Workspace file (via the File > Save Workspace option). Once created, you can re-open
that Workspace file to recall the NetLinx Studio workspace, exactly as it was when the Workspace
file was created.
All Workspace information is saved in an XML formatted file with the .APW file extension.

The File > Save Workspace command only saves the Workspace (APW) file itself,
and does not save changes made to the System files contained in the Workspace.
Use the File > Save All command to save the Workspace file and all of the System
files it contains.

One advantage of the Workspace file is that it serves as a time-saver: Once you have saved a
Workspace file, (containing a particular set of Projects, Systems and System Files), the next time
you open the application, you can simply open the single Workspace file (File > Open Workspace)
to load the Projects/Systems it contains. This way you bypass the need to open each Project,
System and System File individually.
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
v2.x also allows you to copy and paste Projects within the Workspace; in the case that 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, you should still 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.

Workspace files also allow you to build (compile) multiple Projects/Systems. The Build Workspace
command compiles every file contained in the Workspace.
It is important to note that in NetLinx Studio v2.x, there is no concept of Projects outside the
context of a Workspace. A Project can only be opened by adding it to a Workspace. This is to
support the file linking aspect of the program.
Other features of the Workspace file include:

NetLinx Studio v2.2 27


Working With Workspace Files

You can import other Project or Systems folders from previously saved Workspace files.

You can copy and paste existing Projects and Systems within a Workspace.

You can edit the identifier that is used to display the workspace name in the tree display
along with the description for the Workspace file via the Workspace Properties dialog.

You can export all the files associated with the Workspace (including the Workspace file)
into a .ZIP file.

Using the Workspace Wizard


The NetLinx Studio Workspace Wizard provides an quick and easy way to create a new Workspace
(.APW) file with one Project and one System. It presents a series of dialogs, which allow you to
enter workspace information based on specific questions.
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.
3. In the Workspace Wizard dialog, enter a name (up to 128 characters) for the new Workspace
file in the text field (required).
To enter an optional text description for the new Workspace, click the Workspace File
Description button, and enter the description in the Workspace File Description dialog (2,000
characters max). Click OK to return to the Workspace Wizard dialog.
4. Click Next to proceed to the Workspace File Location dialog.
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.
6. Click Next to proceed to the Project Identifier 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 (all fields in this dialog are optional). Click OK to
return to the Project Identifier dialog.
8. Click Next to proceed to the System Type dialog.
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.
10. Enter a name for the new System in the text field.
To enter an optional text description for the new System, click the Workspace File
Description button, and enter the description in the System Description dialog (2,000
characters max). Click OK to return to the System Information dialog.
11. Click Next to proceed to the Assign System ID dialog.
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).

28 NetLinx Studio v2.2


Working With Workspace Files

13. Click Next to proceed to the System Communications dialog. 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.

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.
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.
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.
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).
f. Click Next to complete the Wizard.

Add an existing AXS File to the System: This option adds an existing AXS file to the
System as the Master Source Code File:
a. Click Next to proceed to the Existing Master Source File Location dialog.
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.
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).

NetLinx Studio v2.2 29


Working With Workspace Files

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 Window.

Opening Workspace Files


1. Select Open Workspace from the File menu or the Workspace context menu (or click the
toolbar button) to open the Open Workspace dialog.
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.

Creating a New (Empty) Workspace


To create a new empty Workspace:

Right-click anywhere inside the Workspace tab to access the Workspace context menu,
and select New Workspace.

Before the new Workspace is created, the program will prompt you to save any changes
made to the currently open Workspace (if applicable).
A new Workspace file is created. As indicated in the Workspace tab, this Workspace contains no
Projects/Systems. All Projects/Systems and associated files must be added manually.

To create a new Workspace with a Project and System, use the Workspace Wizard.

Adding a Project to the Workspace


There are several ways to add a Project to the open Workspace:

Create a new Project, and import it into the Workspace

Import an existing Project

Paste a Project from another Workspace

30 NetLinx Studio v2.2


Working With Workspace Files

Importing Projects Into a Workspace


You can import existing Projects into the active workspace, via the Import a Project option in the
Workspace context menu.
To import an existing Project into the active Workspace:
1. Right-click on the Workspace folder (in the Workspace tab of the Workspace window) 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.

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.

Deleting a Project From the Workspace


When you "delete" a Project from the open Workspace, no System files are actually deleted from
the hard drive; the Project is simply removed from the open Workspace.
To delete a Project from the Workspace:
1. Click to select the Project that you want to remove (in the Workspace tab of the Workspace
Window).
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.

Building the Workspace


One advantage to the Workspace concept employed by NetLinx Studio v2.x is that you can choose
to build (compile) the entire Workspace. That is, every Source Code, Include, and Module file
contained within the open Workspace can be compiled with a single command: Build Workspace.
There are several ways to access the Build Workspace command - via the Build menu, the
Workspace context menu (in the Workspace tab of the Workspace Window), or via the toolbar
button.
To compile the open Workspace:
1. Select Build > Build Workspace.

NetLinx Studio v2.2 31


Working With Workspace Files

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 Display
Window.

Exporting Workspace Files for Distribution


The Export Workspace Files To Go option in the Project menu allows you to export the open
Workspace for distribution as an AXW file.
AXW files preserve all relative file path information for the Projects, Systems and System files
contained in the Workspace, making them ideal for distribution to remote sites.
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.
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. 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.
5. 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.

Backing Up The Workspace File (to ZIP file)


Use the Backup Workspace File option in the Tools menu to access the Backup Workspace Files
dialog, where you can create a backup ZIP file of the open Workspace:

This option is intended for file backups only, as opposed to creating a self-contained
Workspace file to be distributed to remote sites. To create a compressed and self-
contained Workspace file with relative file path information intact for distribution, 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.

32 NetLinx Studio v2.2


Working With Workspace Files

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.
4. The Progress bar indicates the progress of the backup operation.
Once the export operation is done, detailed results of the operation are listed in the Backup
Workspace Files Report dialog.

ZIP File Extraction


NetLinx Studio allows you to export an entire Workspace (including all contained Projects,
Systems and System Files) as a .ZIP file. The Extract From ZIP File command allows you to
extract these files:
1. Select Tools > File Extraction > Extract From ZIP File to access the Select ZIP File 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.

Viewing and Editing Workspace Properties


Use the Workspace Properties dialog to view and/or edit general properties of the open Workspace.
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 The Workspace Identifier can have a maximum of 128 characters.


• File Name The File Name cannot be changed and is only for display.
• Description The Description text is optional and can have a maximum of 2,000 characters.
• Creation Date This read-only field indicates the creation date of the open Workspace.
• Conversion Date If a NetLinx Studio v2.x workspace file was converted from a NetLinx Studio
v1.2 *.PJS file, the Conversion Date will also be displayed.

NetLinx Studio v2.2 33


Working With Workspace Files

Workspace Context Menu


Right-click on the Workspace folder (in the Workspace tab of the Workspace Window) to open the
Workspace context menu. This context menu contains various Workspace-level commands and
options, including:

• New Workspace Closes the currently open Workspace, and starts a new (empty) work-
space (no Project/System associated until you add them manually).
• Workspace Wizard Launches the Workspace Wizard, which steps you through the process
of creating a new Workspace with a Project/System.
• Open Workspace Opens the Open Workspace dialog, where you can locate and select
an existing Workspace (.APW) file. You can have only one Workspace
open at any time, so in the event that you have a Workspace open, it
will be replaced by the one you open.
• Close Workspace Closes the Workspace file. The program prompts you to close the files
associated with the Workspace before closing them.
• Save Workspace Saves the Workspace file, under its current name and location.
• Save Workspace As Opens the Save Workspace As dialog, where you can specify a new
name and/or location for the saved Workspace file.
• Build Workspace Builds (compiles) the Workspace (including all contained Projects). The
progress and results of the build can be viewed in the Status tab of the
Output Display window.
• Export Workspace Opens the Export Workspace dialog, which allows you to export the
Files Workspace file as a ZIP file. The options in this dialog allow you to
specify the name of the resulting ZIP file, the target folder for the ZIP
file, and whether to include the full directory paths within the ZIP file.
• New Project Opens the New Project Properties dialog, which allows you to assign
an Identifier and general properties for a new Project. Once created,
the new project is added to the Workspace.
• Import a Project Opens the Open Workspace dialog, where you can locate and select a
Workspace (.APW) file. This invokes the Import Components From a
Workspace dialog. Use the dialog to select a specific Project contained
in the Workspace.
• Paste Project You can copy and paste Projects by selecting Copy Project from the
Project Folder context menu, and selecting the Paste Project command.
• Collapse Tree Collapses the Project/System/File tree to show only the Workspace and
its Project(s).
• Expand To System Expands the Project/System/File tree to show the Workspace,
Level Project(s) and System(s).
• Docking view Changes the Workspace Window to a dockable window that can be
resized and moved to anywhere within the NetLinx Studio work area.
• Hide Hides the Workspace Window
• Workspace Properties Opens the Workspace Properties dialog, where you can view the basic
properties of the Workspace. The options in this dialog also allow you to
edit the Workspace Identifier and Description.

34 NetLinx Studio v2.2


Working With Projects

Working With Projects


A Project in NetLinx Studio contains one or more Systems (a System represents a control system
(an Axcess or NetLinx Master, one or more user-interface devices and various types of controlled
devices on the bus). Projects are represented by Project folders in the Workspace tab of the
Workspace Window. A Workspace can contain several Projects (which in turn can contain multiple
Systems).
In NetLinx Studio v2.x, 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 v2.x also allows you to copy and paste Projects within the Workspace; in
the case that 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.

Opening Projects in NetLinx Studio


In NetLinx Studio v2.x, Projects are always contained within a Workspace, and there is no concept
of a Project outside of a Workspace. So, rather than opening a Project directly (like you would have
in NetLinx Studio v.1.2), you must open the Workspace that contains the Project you want to work
on.

Creating a New Project


In order to create a Project, you must first open or create a Workspace file. When a Project is
created, it is automatically added to the open Workspace.
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.

A Workspace must be open for these options to be enabled.

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.

NetLinx Studio v2.2 35


Working With Projects

4. Click OK to add the new Project to the active Workspace.

Adding a Project to the Workspace


See the Adding a Project to the Workspace section on page 30.

Deleting a Project From the Workspace


See the Deleting a Project From the Workspace section on page 36.

Importing Projects Into a Workspace


See the Importing Projects Into a Workspace section on page 36.

Copying and Pasting Projects


One advantage to the concept of Workspaces is that you can easily copy and paste Projects (and all
of the associated Systems and System Files) within a Workspace. This allows you to develop a core
Project which you can then copy, paste and modify as necessary. In cases where there are only
minor variations from one Project to the next, this can be a real timer-saver.
To copy and paste a Project (within a Workspace):
1. Open a Workspace (in the Workspace tab of the Workspace Window) 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.

Adding a System to a Project


There are several ways to add a System to the selected Project:

Create a New System, and import it into the Project.

Import an Existing System

Paste a System from another Project

Deleting a System From a Project


When you "delete" a System from a Project, no System files are actually deleted from the hard
drive; the System is simply removed from the Project in the Workspace.
1. Click to select the System that you want to remove (in the Workspace tab of the Workspace
Window).
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.

36 NetLinx Studio v2.2


Working With Projects

Importing Systems Into a Project


Its easy to import one or more existing Systems into a Project in the open Workspace. You just need
to know which Workspace file contains the System(s) that you want to add to your Project:
1. Select (highlight) the Project that you want to add the imported System into (in the Workspace
tab of the Workspace Window).
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.
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 v2.x 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 timer-saver.
1. Open a Workspace (in the Workspace tab of the Workspace Window) and click to select
(highlight) a System folder.
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.
4. The System is added to the selected Project.

Building the Project


You can select to compile a single Project within the open Workspace, using the Build Project
command. When you compile a Project, every Source Code, Include, and Module file contained in
all of the Systems within the selected Project are compiled.
There are several ways to access the Build Project command - via the Build menu, the Project
context menu (in the Workspace tab of the Workspace Window), or via the toolbar button.
1. Click to select and highlight the Project that you want to compile (in the Workspace tab of the
Workspace Window).
2. Select Build > Build <Project Name> Project.

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.
3. The status and results of the build are displayed in the Status tab of the Output Display
Window.

NetLinx Studio v2.2 37


Working With Projects

Viewing and Editing Project Properties


Use the Project Properties dialog to view and/or edit general properties of the selected Project.
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 The Project Identifier is required and can have a maximum of 128 characters.
• Dealer optional, maximum of 128 characters.
• Sales Order optional, maximum of 128 characters.
• Designer optional, maximum of 128 characters.
• Purchase Order optional, maximum of 128 characters.
• Description optional, maximum of 2,000 characters.

Project Folder Context Menu


Right-click on any Project folder (in the Workspace tab of the Workspace Window) to open the
Project Folder context menu. This context menu contains various Project-level commands and
options, including:

• New Project Opens the New Project Properties dialog. The options in this dialog
allow you to specify information for the new Project, including Project
Identifier, Dealer, Sales Order, Designer, Purchase Order and
Description.
• Delete Project Deletes the selected Project from the Workspace. This option does
not delete the Project or its associated files from the disk.
• Build Project Builds (compiles) the Project (including all contained Systems and
System files). The progress and results of the build can be viewed in
the Status tab of the Output Display window.
• Copy Selected Project Copies the selected Project to clipboard memory, so it can be pasted
(within the same Workspace only), via the Paste Project command in
the Workspace context menu.
• New System Opens the System Properties dialog, which allows you to assign an
Identifier, System ID, and Description for a new System. The System
Properties dialog also contains options that allow you to set custom
communication settings for the new system. Once created, the new
system is added to the Project.
• Import a System Opens the Open Workspace dialog, where you can locate and select
the Workspace (.APW) file that contains the System you want to
import into the Project. Once you select an APW file, the Import Com-
ponents From a Workspace dialog is invoked. Use this dialog to select
specific Systems contained in the selected Workspace.
• Paste System You can copy and paste Systems (within a single Workspace) by
selecting Copy Selected System from the System context menu, then
opening the target Project, and selecting the Paste System command.
• Collapse Tree Collapses the Project/System/File tree to show only the Workspace
and its Project(s).
• Expand To System Level Expands the Project/System/File tree to show the Workspace,
Project(s) and System(s).
• Docking View Changes the Workspace Window to a dockable window that can be
resized and moved to anywhere within the NetLinx Studio work area.
• Hide Hides the Workspace Window.
• Project Properties Opens the Project Properties dialog, where you can view and edit the
basic properties of the Project (Project Identifier, Dealer, Sales Order,
Designer, Purchase Order and Description).

38 NetLinx Studio v2.2


Working With Systems and System Files

Working With Systems and System Files


A System in NetLinx Studio represents an Axcess or NetLinx-based control system. Each System
has its own Master Controller (and associated Master Source Code file) and set of devices on the
bus (and their associated files). Systems are represented by System Folders in the Workspace tab of
the Workspace Window. Any Project can contain multiple Systems, and Systems only exist within
the context of a Project.
A control system typically uses several different types of files. You must have a Master Source
Code file to download to the Axcess or NetLinx Master Controller, but a complete control system
also typically uses an assortment of other file types. The System file types recognized by NetLinx
Studio are described below:

Source Code Files - These include the Master Source Code File and all other source code
(.AXS) files associated with the System.

Include files - These are Axcess or NetLinx code files (.AXI) that are referenced in any
source code file by the 'Include' statement.

Module Files - NetLinx Module files provide pre-fabricated (.AXS) code or compiled
(.TKO) code to control a specific device on the bus. Module files cannot be designated as
master files. When the System is being compiled, Module files are compiled first, then
copied to the directory where the designated Master Source code file resides.

User Interface (UI) files - These files (.TPD, .TP4 or .KPD) are created in TPDesign3,
TPDesign4 or KPDesign, and contain touch panel pages, buttons and their associated
functionality.

Infrared (IR) library files - These files (.IRL or .IRV) are created in IREdit, and contain
infrared (IR) control functions for IR controlled devices.

IR Database files — These files (.IRN) contain links to either the AMX IR Database or
to a user-defined IR database.

Other 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.
In NetLinx Studio v2.x, 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 v2.x 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.

NetLinx Studio v2.2 39


Working With Systems and System Files

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.

Creating a New System

When you create a new System, it is automatically added to the Project that is
currently selected (highlighted) in the Workspace tab.

1. Select the Project that you want to add the new System to in the Workspace Window
(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. 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:
a. Click the Platform Selection radio buttons to select either Axcess or NetLinx as the system
platform.
b. Select a Transport Connection Option (TCP/IP, Serial or Modem).

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.

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.

Modem - Select the Modem radio button, and click Settings to open the Modem Settings
dialog, where you can select and configure a Modem COM port to use.
4. Click OK to add the new System to the selected Project.

40 NetLinx Studio v2.2


Working With Systems and System Files

Adding a New System To a Project


To create a new System, and add it to the selected Project:
1. Select the Project that you want to add the new System to in the Workspace Window
(Workspace tab).
2. Select New System from either the Project menu or the Project context menu (or click the
toolbar button) to open the System Properties dialog. 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 Configure to open the Communication Settings dialog, where you specify the System
platform, communications port and network settings as required:
a. Click the Platform Selection radio buttons to select either Axcess or NetLinx as the
system platform.
b. Select a Transport Connection Option (TCP/IP, Serial or Modem).

TCP/IP - To specify network TCP/IP settings (NetLinx systems only), select the TCP/IP
radio button, and click Configure to open the TCP/IP Settings dialog, where you can
enter the System's IP Address assignment.

Do not change the IP Port number! It should always be set to 1319 (default).

Serial - Select the Serial radio button, and click Configure to open the Serial Port
Settings dialog, where you can select and configure a Serial COM port to use.

Modem - Select the Modem radio button, and click Configure to open the Modem Port
Settings dialog, where you can select and configure a Modem COM port to use.
4. Click OK to add the new System to the selected Project.

Deleting a System From a Project


When you "delete" a System from a Project, no System files are actually deleted from the hard
drive; the System is simply removed from the Project in the Workspace.
1. Click to select the System that you want to remove (in the Workspace tab of the Workspace
Window).
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.

NetLinx Studio v2.2 41


Working With Systems and System Files

Importing Systems Into a Project


Its easy to import one or more existing Systems into a Project in the open Workspace. You just need
to know which Workspace file contains the System(s) that you want to add to your Project:
1. Select (highlight) the Project that you want to add the imported System into (in the Workspace
tab of the Workspace Window).
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.
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 v2.x 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 timer-saver.
To copy and paste a System (within a Workspace):
1. Open a Workspace (in the Workspace tab of the Workspace Window) and click to select
(highlight) a System folder.
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.
4. The System is added to the selected Project.

System Status: Active vs. Inactive


You may have multiple systems within a Project, but only one is designated as the "Active System",
meaning that all communication with the master controller (i.e. diagnostics, online tree, etc.) will
be done with the communications settings of the selected System.
The currently active System is bolded in the Workspace tab of the Workspace Window, and the
status bar at the bottom of the program will display the selected System communication settings.
If there is currently an active connection to a master controller when you select a System with
different communications settings, the program will prompt you to see if you want to stop the
current connection and continue with the selected active System communication settings.

Designating the Active System


You can set one System in the Workspace to be the "Active System". This signifies that all
communication with the master controller (i.e. diagnostics, online tree, etc.) will be done with the
communications settings of the specified System.

42 NetLinx Studio v2.2


Working With Systems and System Files

The Workspace tree indicates the active System with bold type, and the status bar at the bottom of
the program will display the selected System communication settings.
If there is currently an active connection to a master controller when you select a System to be
active, the program will prompt you to see if you want to stop the current connection and continue
with the selected Active System communication settings.
To designate the active System, select (highlight) a System (in the Workspace tab of the Workspace
Window), then select Set as Active System from either the Project menu or the System Folder
context menu (or click the toolbar button).

Changing the System Platform (Axcess / NetLinx)


You can change the designated Platform (Axcess or NetLinx) for a System via the Platform
Selection options in the Communication Settings dialog:
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). The currently active System is
highlighted in this list
2. Click to select a System from the Available System(s) list.
3. Click the Communication Settings button to access the Communication Settings dialog.
4. Select the default platform (NetLinx or Axcess).
Note that if you select NetLinx, a Module System file folder is included in the Workspace tab of the
Workspace Window.

Configuring System-Level Communications Settings


The Master Communication Settings dialog contains options that allow you to specify System-level
communication settings. Each System can have its own dedicated communication settings. These
System-level settings override the default communications settings.
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 (FIG. 7).

FIG. 7 Select a System from the Available System(s) list

3. Click the Communication Settings button to access the Communication Settings dialog.
4. Select the default platform (NetLinx or Axcess).
5. Select a transport connection type (TCP/IP, Serial or Modem).

TCP/IP is only available if NetLinx was selected as the platform.

NetLinx Studio v2.2 43


Working With Systems and System Files

6. Click Settings to open either the TCP/IP Settings, Serial Settings or Modem Settings dialog
(depending on the transport connection selected).
7. Specify the communications settings for the selected port.

For TCP/IP connections, set the TCP/IP address.

For serial ports, specify the COM port, and set baud, data bits, parity, stop bits and flow
control.

For modems, specify the COM port, and set baud, data bits, parity, stop bits, flow control
and target phone number.

The default settings for Serial and Modem ports are:

• Com Port COM1


• Baud Rate 38400
• Data Bits 8
• Parity None
• Stop Bits 1
• Flow Control None

8. Click OK to close the Communication Settings dialog.


9. 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 Window, 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.

Adding a File To a System


When a file is added to a System, the file is always added to the selected (highlighted) System (in
the Workspace tab of the Workspace Window), and it is always automatically added to the
appropriate System File folder, based on file type.
To add a file to a 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 File To System 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.

44 NetLinx Studio v2.2


Working With Systems and System 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.

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.

Window (Workspace tab). Drag and drop the file into the System folder.

In the Output Display Window, 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.

Removing a File From a System


Since all files are linked in NetLinx Studio v2.x, when you remove a file from a System, the file is
not deleted from the disc, only removed from the System. If the same file is used in multiple
Systems in the open Workspace, the Remove File from System option only removes the file from
the selected System (as opposed to all instances of the file in the Workspace).
To remove a file from a System (in the open Workspace):
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).
3. The program prompts you to verify this action.
4. Click Yes to remove the file from the System.

NetLinx Studio v2.2 45


Working With Systems and System Files

Alternatively, you can simply select a System file and press the Delete key for the
same results.

Building the Selected System


You can select to build (compile) any System in the Workspace, using the Build System command.
When you build a System, every Source Code, Include, and Module file contained in the selected
System is compiled. The Build System command always works on the selected System, regardless
of whether it is currently designated as the active system or not.
1. Click to select (highlight) the System that you want to build (in the Workspace tab of the
Workspace window).
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 Display
Window.

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 Window).

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 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 Display
Window.

Viewing and Editing System Properties


Use the System Properties dialog to view and/or edit the information entered in the New System
dialog when the System was created (for the selected System).
To access this dialog, select System Properties from the Project menu, the System Folder context
menu, or click the toolbar button.

46 NetLinx Studio v2.2


Working With Systems and System Files

You can edit all of the information in this dialog:

• Identifier Required, and can have a maximum of 128 characters.


• System ID Optional, the range is from 0 - 65535
• Description Optional, and can have a maximum of 2,000 characters.
• Communication Settings The Communication Settings window displays the current communica-
tions settings for this System. To change these settings, click the Com-
munication Settings command button to open the Communication
Settings dialog.

System Folder Context Menu


Right-click on any System folder (in the Workspace tab of the Workspace Window to open the
System Folder context menu. This context menu contains various System-level commands and
options, including:

• Set as Active System Sets the currently selected System as the Active System.
• New System Opens the New System dialog. The options in this dialog allow you to
specify information for the new System, including System Identifier, Sys-
tem ID, Description and Communication Settings.
• Delete System Deletes the selected System from the selected Project. This option does
not delete the System or its associated files from the disk.
• Build System Builds (compiles) the active System (including all contained System
files). The progress and results of the build can be viewed in the Status
tab of the Output Display window.
• Copy Selected System Copies the selected System to clipboard memory, so it can pasted into
another Project (via the Paste System command in the Project Folder
context menu).
• Add File To System Opens the Add Existing File dialog, which allows you locate and select
an individual file to be added to the active System. The selected file will
automatically be added to the appropriate System File folder, based on
file type.
• Collapse Tree Collapses the System/File tree to hide all System files.
• Expand System Tree Expands the System/File tree to show all System files contained in the
System File folders.
• Docking View Changes the Workspace Window to a dockable window that can be
resized and moved to anywhere within the NetLinx Studio work area.
• Hide Hides the Workspace Window.
• System Properties Opens the System Properties dialog, where you can view and edit the
basic properties of the active System (System Identifier, System ID,
Description and Communication settings).

NetLinx Studio v2.2 47


Working With Systems and System Files

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 Window)
as links only.
The supported System file types are described below:

• 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 spe-
cific devices on the bus. Master Source Code files are placed in the
Source file folder.
• 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 Con-
troller. Source Code files are placed in the Source file folder.
• Include files These are Axcess or NetLinx code files (.AXI) that are separate from
the main Master and Source Code files, but are included in the com-
pile 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. 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
PLK-IMS Keypads. UI files represent the user-interface for the control
system. UI files are placed in the User Interface file folder.
• Infrared (IR) library files 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 IRN files provide links to the AMX IR Database and/or user-defined IR
Database files.
• Other 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.

48 NetLinx Studio v2.2


Working With Systems and System Files

Creating New System Files


Use the File > New command (or toolbar button) to create all types of System files, including
Source Code, Include, Block and Text files. This command creates a new file, but does not
automatically associate the new file with any Project or System.

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.
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.
See the Using the Workspace Wizard section on page 28 for details.

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.

File Types and Extensions

File Type File Extension


• Axcess Source Code File .AXS
• Include File .AXI
• Compiled Axcess Source Code File .TOK
• Compiled NetLinx Source Code File .TKN
• NetLinx Source Code File .SRC
• Block File .AXB
• TPDesign3 User Interface File .TPD
• TPDesign4 User Interface File .TP4
• KPDesign Keypad Touch File .KPD
• IRL File .IRL
• IRV File .IRV
• IRN (IR Database) File .IRN
• Standard Text File .TXT
• Other File .* (any other extension)

NetLinx Studio v2.2 49


Working With Systems and System Files

Identifiers vs. Disk Filenames


Files in the Project Navigator are represented by the name assigned in the Identifier field in the
New Source Code, New Include File, or Import File To Project dialogs. This user-defined, or
assigned name is also known as an alias, since it is different from the disk file name.
The disk file name is the full file name (plus it's extension) as it appears in Windows Explorer. For
example, if you create or import a Source Code File into a Project and enter "My File" in the
Identifier field, the file will appear in the Project Navigator as "My File", but the disk file name is
"My File.AXS".

Identifiers must be unique to each System, regardless of the file type. If you assign an
identifier to a file that already exists in the Project, the program will prompt you to enter
a different identifier.

You can change the assigned identifier of any System file (via the File Properties dialog),
but remember that identifiers (alias file names) only to apply to the specific file that they
are applied to, and not to any others. For example if you change a file's identifier, the
file's associated *.TOK file still reflects the disk file name.

Viewing and Editing System File Properties


Use the File Properties option in the System File context menus to open the File Properties dialog,
which allows you to view general properties for the selected file. The fields in the File Properties
dialog include:

• Identifier The File Identifier can have a maximum of 128 characters, and must be unique
within a System.
• File Name You can change the file name in this text box. Use the browse button to navigate
to the desired file you want.
• Relative Path This (read-only) field represents the location of the file, relative to the WORK-
SPACE.APW file that is currently displayed. All files are linked to the workspace
(not copied over to the workspace directory).
• Description The Description text is optional and can have a maximum of 2,000 characters.
• Master File 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).

50 NetLinx Studio v2.2


Working With Systems and System Files

System File Folder Context Menus


Right-click on any System File Folder (in the Workspace tab of the Workspace Window) to access
the context menu associated with the selected System folder. As indicated in the following table,
the contents of these context menus vary depending on the type of System folder selected:
• Add New Source File Adds a new Source Code (.AXS) file to the selected (not neces-
sarily the "active") System, via the new file wizard. The options in
the new file wizard dialogs allow you to assign a File Template,
File Name and Location to the new Source Code file.
• Add Existing File Opens an Add Existing File dialog (specific to the type of System
file folder selected), where you can add an existing Source Code
file to the System containing the selected Sources folder. The new
file will be added to the selected Sources folder.
• Add Existing IR File Opens the Add Existing IR File dialog, which allows you to locate
(IR folder only) and select an IR file (*.IRL, *.IRV) to add to the System.
• Add From AMX IR Database Opens the Select IR From a Database dialog, which allows you to
(IR folder only) locate and select a hand control record from within the 'AMX IR'
database.
• Add From User IR Database Opens the Select IRN User Database dialog, which allows you to
(IR folder only) locate and select an IREdit Database file (*.IRN).
• Docking View Changes the Workspace Window to a dockable window that can
be resized and moved to anywhere within the NetLinx Studio work
area.
• Hide Hides the Workspace Window.

System File Context Menus


Right-click on any System file (in the Workspace tab of the Workspace Window) to access the
context menu associated with the selected file type. As indicated in the following table, the contents
of these context menus vary depending on the type of System file selected:

• Set As Master Sets the selected Source Code file as the Master Source file for the
(Source files only) system it belongs to.
• Compile Compiles the selected file, using the compiler (Axcess or NetLinx)
(Source and Module associated with the file. The status and results of the build are dis-
files only) played in the Status tab of the Output Display Window.
• Device Mapping (Source, Opens the Device Mapping dialog which allows you to map the file
Module, UI and IR files to a system device for transfer.
only)
• Device Mapping Opens the Device Mapping dialog to map the selected User Inter-
(UI and IR files only) face file to a specific device on the bus.
• Export to IRL File This option is only available if the IR file you selected was extracted
(IRN files only) from an IR Database (*.IRN) file. IR Database files come from the
IREdit application, and represent either the AMX IR Database
(included with the IREdit application), or a user-defined IR Database
file.
Once you have added an IR file from an IR Database file (via the
Add From AMX IR Database or Add From User IR Database options
in the Project menu, IR File Folder context menu, or Project toolbar),
you can use this option to export the file as an IRL file that can then
be treated as a stand-alone IR entity (independent of the IR Data-
base file that originally contained it).
• Remove File From System Removes the selected file from its System (the file is not deleted
from the disk, only removed from the System).
• File Properties Opens the File Properties dialog, where you can view (and edit)
properties for the selected file.

NetLinx Studio v2.2 51


Working With Systems and System Files

Working With Source Code Files


You can create new Source Code files in NetLinx Studio, or add existing Source Code files to a
System. Source Code files are created and/or edited in the Source Code Editor windows.
Source Code files are stored in the Source folder (in the Workspace tab of the Workspace Window).
NetLinx Studio distinguishes between two types of Source Code files: the Master Source Code file
and System Source Code files:

Master Source Code file — The Source Code that is downloaded to an Axcess or
NetLinx Master Controller. The Master Source Code file defines all of the devices in the
System and sets any global parameters for the System.

Source Code files — Axcess or NetLinx Source Code files that are downloaded to
specific NetLinx or Axcess devices on the bus. You can have as many Source Code files
in the Source Code System folder as is required for the System.
Source Code files are stored in the Source folder (in the Workspace tab of the Workspace Window).

Adding a New Source Code File to a System


To create new Source Code file, and automatically add it to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window).
2. Right-click on the Source folder to access the Source File Folder context menu, and select Add
New Source File.
3. In the File Template dialog, select whether to use an existing template to create the file.

If you click Yes, you will prompted to select the template (NetLinx or Axcess).

If you click No, you will proceed directly to the New File Location dialog.

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 file.
By default, the target directory is the NetLinx Studio directory. Use the Browse button to
navigate to another folder if necessary.
5. The program notifies you that the file was created.
6. Click Finish to close the File Template dialog. The new file should appear in the Source folder,
under the selected System.

Adding an Existing Source Code File to a System


To add an existing Source Code file to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window).
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 Source dialog, locate and select the Source (.AXS) file that you want to add to the
selected System.

52 NetLinx Studio v2.2


Working With Systems and System Files

Use the Recent tab to quickly access 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 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


To create 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, select whether to use an existing template to create the file.

If you click Yes, you will be prompted to select the template (NetLinx or Axcess). Click
Next to proceed.

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.

NetLinx Studio v2.2 53


Working With Systems and System Files

Designating the System's Master Source Code File


Each System must have a Master Source Code file, and only one Source Code file in the System
can be designated as the Master Source.
There are two possible ways to designate the Master Source Code file for a System:

You can designate a Source Code file as the Master Source at the time that it is added to
the System, via the Master File option in the File Properties dialog.

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
Window), and selecting Set As Master from the Source Code File context menu.

Compiling Source Code Files


There are several ways to compile individual Source Code files:

Right-click on a Source Code file (in the Workspace tab of the Workspace Window), and
select Compile from the Source Code File context menu.

In the Build menu, select Compile <filename.AXS>.

To specify the compiler to use (NetLinx or Axcess), double-click to open the file in a
Source Code Editor window, and select Compile as NetLinx or Compile As Axcess
from the Build menu.
The status and results of the build are displayed in the Status tab of the Output Display Window.

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. 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 dialog.
2. Locate and select the SRC file you want to extract, and click Open.

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 NetLinx Source From a SRC File dialog, the selected file (with full directory path) is
indicated in the SRC File To Extract From field.
Select the Extract using original directory path(s) option to preserve the original directory
paths of the files (default = enabled).

54 NetLinx Studio v2.2


Working With Systems and System Files

4. In the Extract To field, specify the target directory for the extracted NetLinx Source 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.

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.

Working With Include Files


An Include file is a type of code file (.AXI) that is included in the compiling process without having
to reside in the Master Code file itself. Include files are effectively linked to the Source Code file,
and must be called in the Master Source Code. You can create new Include files using the File >
New > Include File option, or import existing Include files into your Project. Include files are
stored in the Include folder (in the Workspace tab of the Workspace Window).
If any Include files are present in the Include System File folder when the Project is compiled (and
if they are called in the source code), they are compiled as if the code that they contain was part of
the Master Source Code file.

NetLinx .AXI File


Any time you compile a NetLinx file, the file "NetLinx.AXI" is accessed. This is the default
NetLinx include file, and contains various standard NetLinx system structures and variables. This
file is called at every NetLinx compile operation, and is included even without being specified in
the program. The NetLinx.AXI file is updated in step with version changes of NetLinx Studio.
If there are ever any interim updates to the NetLinx.AXI file, you will be notified via the AMX
newsletter, and the update will be posted to the Software Center on the AMX.com website.

Adding a New Include File to a System


To create new Include file, and automatically add it to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window).
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.
4. Click OK to create the file. The new file should appear in the Include folder, under the selected
System.

NetLinx Studio v2.2 55


Working With Systems and System Files

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 Window).
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 Include dialog, locate and select the Include (.AXI) file that you want to add to the
selected System.

Use the Recent tab to quickly access 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. Click OK to add the file to the selected System.
7. The file should now appear in the Include folder under the selected System.

Creating an Include File


To create an orphan Include file:
1. Select New from the File menu, or click the toolbar button to open the New dialog.
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.

56 NetLinx Studio v2.2


Working With Systems and System Files

Working With NetLinx Modules


NetLinx Module files provide pre-fabricated (.AXS) code or pre-compiled (.TKO) code to control a
specific device on the bus. Module files are stored in the Module folder (in the Workspace tab of the
Workspace Window).

Module files cannot be designated as Master Source Code files.

When the System is being compiled, first the pre-compiled modules (.TKO) are copied to
the Source folder, then the Module files are compiled, and then the Master Source Code
(.AXS) file is compiled.

Minimum Support Requirements for NetLinx Modules


The following panels, firmware versions and software versions represent the minimum support
requirements for the KPDesign module:

PLK-DMS Keypad, version 5.1

PLK-IMS Keypad, version 5.0

NetLinx Studio version 1.2

NetLinx Master version 2.0, build 94 or higher.

Source Code Entry


To include a module into your program, use the following module line:
DEFINE_MODULE 'DMS-IMSMod' Module_Name(Virtual_Dev, Real_Dev,
strFileName, strVarTextArray)
Where:

• Module_Name DMS-IMSMod.tko
• Virtual_Dev A virtual device you define.
• Real_Dev The device number of the DMS or IMS panel.
• StrFileName 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 The name of the compiled TKO file.


• MdlDMS The module name.
• DvDMS The module ID device number (ex 32768).
• DvDMS_R The device number of the keypad.
• StrFILE_NAME Exact name of the KPD file.
• StrVarText Array Description of the parameters for the variable text buffer.

NetLinx Studio v2.2 57


Working With Systems and System Files

Adding a New Module File to a System


To create new Module file, and automatically add it to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window).
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.

If you click Yes, you will prompted to select the template (NetLinx or Axcess).

If you click No, you will proceed directly to the New File Location dialog.

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. By default, the target directory is the NetLinx Studio directory. 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.

Adding an Existing Module File to a System


To add an existing Module file to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window). 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 Module dialog, locate and select the Module (.AXS or .TKO) file that you want to
add to the selected System.

Use the Recent tab to quickly access recently used files.

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.

58 NetLinx Studio v2.2


Working With Systems and System Files

Compiling Module Files


There are several ways to compile individual Module files:

Right-click on a Module file (in the Workspace tab of the Workspace Window), and select
Compile from the Module File context menu.

In the Build Menu, select Compile <filename.AXS>.

To specify the compiler to use (NetLinx or Axcess), double-click to open the file in a
Source Code Editor window, and select Compile as NetLinx or Compile As Axcess
from the Build menu.
The status and results of the build are displayed in the Status tab of the Output Display Window.

Working With User Interface (UI) Files


User-Interface (UI) files are downloaded to either touch panels or keypads, and provide the user-
interface that allows the end user to control the system. User Interface files are placed (as links) in
the User Interface folder (in the Workspace tab of the Workspace Window).
There are two basic types of user-interface files: Touch Panel and Keypad. Touch Panel UI files are
created in either TPDesign3 (.TPD) or TPDesign4 (.TP4), and Keypad UI files (.KPD) are created
in KPDesign.

TPDesign3 is a touch panel design program for use with G3-firmware touch panels (all
models except Modero and NXP-TPI/4).

TPDesign4 is a touch panel design program for use with G4-firmware touch panels
(Modero panels and NXP-TPI/4).

KPDesign is a keypad design program for use with PLK-DMS and PLK-IMS keypads.
Use the KPDesign to design the keypad display pages and buttons, and their associated
functionality, and use NetLinx Studio to transfer the KPDesign file (KPD) to the NetLinx
Master. In order to use KPDesign file with the appropriate keypads, the NetLinx code file
must first be configured (in NetLinx Studio), compiled, and then transferred to the
NetLinx Master.

Refer to the on-line help files for instructions on generating UI files in these applications.
These software applications are available for transfer via the www.amx.com website
(Dealers > Tech Center > Downloadable Files > Application Files).
NetLinx Studio allows you to associate UI files with each System, and to map and transfer the files
to their target panels or master.

While Touch Panel UI files are transferred to the panels themselves, KPD files are
transferred to the master and not directly to the keypad.

If the TPDesign3, TPDesign4 and/or KPDesign applications are installed on your PC, you can
double-click on any UI file in the Workspace tab to launch the associated editor program
(TPDesign3, TPDesign4 or KPDesign). You can add external programs to the Tools menu via the
Add Tool option.

NetLinx Studio v2.2 59


Working With Systems and System Files

Adding an Existing User Interface File to a System


To add an existing User Interface (UI) file to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window).
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 User Interface 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

Use the Recent tab to quickly access recently used files.

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.

4. Edit the file information (if necessary).


5. Click OK to add the file to the selected System.
6. 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 +.

60 NetLinx Studio v2.2


Working With Systems and System Files

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. This file
is added to the project file in the UI system folder of the Panel Navigator.
4. Add the KPD file to the project by choosing File > File Import.
5. Browse for the KPD file.
6. Uncheck the Use System Generated File Names option (because you want to keep the file
name identical to what you are using in the actual NetLinx Studio program - StrFILE_NAME).
7. Select the Add as Link option (if you do not want to copy the file to your project folder).

Sample NetLinx Code


To download a KPD file to a NetLinx Master, you must use the NetLinx DMS-IMS module, with
the following DEFINE_MODULE entry in the Master Source Code:
DEFINE_MODULE 'DMS-IMSMod' Module_Name(Virtual_Dev, Real_Dev,
strFileName, strVarTextArray)
Where:
Module_Name is a unique name. For example:
DEFINE_MODULE 'DMS-IMSMod' mdlDMS (…
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]

Where:

• DVVirt an arbitrary Virtual Device number you define (range for keypad panels =
32768 -36863).
• DvDMS the real device number of the DMS or IMS panel.
• StrFileName a string variable (CHAR array) containing the file name of the KPD file to
download or run.
• StrVarTextArray 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).

NetLinx Studio v2.2 61


Working With Systems and System Files

When using two or more keypad panels, you can create a single three-dimensional array for a
keypad panels, instead of separate two-dimensional arrays for each keypad panel.

Working With IR Files


IR files (.IRL and .IRV) contain IR control data to operate IR-controlled system devices. NetLinx
Studio v2.x allows you to link existing IR files into your Project/System.

IR files are stored in the IR folder (in the Workspace tab of the Workspace Window).

IRL files are standard IR library files.

IRV files are IR files exported from the VPXpress application (for use with AMX
ViewPoint wireless touch panels).

NetLinx Studio v2.x also supports IR Database (.IRN) files. IRN files are generated in
the IREdit application, and consist of a database of IR files (either the read-only AMX
IR Database or a user-defined database).

Adding an Existing IR File to a System


To add an existing IR file to a selected System in the current Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window).
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.

Use the Recent tab to quickly access 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. Click OK to add the file to the selected System.
The file should now appear in the IR folder under the selected System.

62 NetLinx Studio v2.2


Working With Systems and System Files

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 #.

IREdit
IREdit is a separate application that works in conjunction with NetLinx Studio v2.x. Once IREdit is
installed, you can double-click on any IR file in the Workspace tab of the Workspace Window or
the Find IR Files tab of the Output Display Window to open the selected IR file for viewing and
editing in IREdit.

Refer to the IREdit online help for detailed operating instructions.

To launch the IREdit program, double-click on an IR file in the Workspace tab of the Workspace
Window or double-click on an IR file in the Find IR Files tab of the Output Display Window
(results of a search).

Adding an IR File From the AMX IR Database


If you have installed the IREdit application, the Add From AMX IR Database option is available
in the Project menu, the IR File Folder context menu and the Project Toolbar.
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.

The AMX IR Database is read-only.

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. 8 IR Database file tree

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).

NetLinx Studio v2.2 63


Working With Systems and System Files

The file(s) will be added to the selected (highlighted) System in the Workspace tab,
which is not necessarily the active system.

Adding an Existing IR File From an IREdit User Database (*IRN) File


Use the options in the Select IR From a Database dialog to access individual IR files from within an
existing IREdit IR Database (*IRN) file:

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 opens 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. In the Select IR From a Database dialog, 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. The file appears in the IR System File Folder
(in the Workspace tab of the Workspace Window).

Export to IRL File


Once you have added an IR file from an IR Database file (via the Add From AMX IR Database or
Add From User IR Database options in the Project menu, IR File Folder context menu, or Project
toolbar), you can use the Export To IRN File option (in the IR System File context menu) to export
the file as an IRL file that can then be treated as a stand-alone IR entity (independent of the IR
Database file that originally contained it).

64 NetLinx Studio v2.2


Working With Systems and System Files

Searching for IR Library (IRL/IRV) Files


Use the Find IRL/IRV Files option in the Tools menu to search for an IR file in a specific directory,
based on certain search criteria:
1. Choose Tools > Find IRL/IRV Files (or click the toolbar button) to access the Find IR Files
dialog.
2. Fill in the search criteria fields:

Manufacturer - Enter the name manufacturer of the IR device associated with the file
you are searching for.

Hand Control Model # - Enter the model number for the hand-held IR remote associated
with the file you are searching for.

Device Model # - Enter the manufacturer's model number for the IR device associated
with the file you are searching for.

Where To Search - 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 gen-
erates an index file of all IR files in that directory. The status of this opera-
tion 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 drop-
down 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 Display Window. 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 Display window context menu.

NetLinx Studio v2.2 65


Working With Systems and System Files

Working With "Other" Files


The Other file folder (in the Workspace tab of the Workspace Window) contains all other (non-
Axcess/NetLinx specific) file types that you want to include with your Project. These files are not
compiled, but are saved with the Project.

Do not open .LIB or .SYN files for editing in the Source Code Editor. These are binary
file types that cannot be edited in NetLinx Studio v2.x.

Use the Other folder to store standard text files, image files, etc.

AMX recommends that documents such as AXwires, button-by-button, system


drawings, etc. should all be placed in a "_Docs" folder under the project directory.
This "_Docs" folder must be created in Windows Explorer. The underscore is placed
in the front to ensure this folder will be located first under the project root. This makes
it easier to view the overall project in Explorer.

Creating a Text File


To create an orphan 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.

Adding an Existing "Other" File to a System


To add an existing "Other" file to a specific System in the Workspace:
1. Click to select (highlight) a System (in the Workspace tab of the Workspace Window).
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 Other 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.

Use the Recent tab to quickly access 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.

66 NetLinx Studio v2.2


Working With Systems and System Files

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.

NetLinx Studio v2.2 67


Working With Systems and System Files

68 NetLinx Studio v2.2


Programming

Programming
Source Code Editor Windows
Use Source Code Editor windows (see FIG. 2) 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.

NetLinx Studio features a Code Wizard that steps you through the process of
generating several different types of code.

Use the Source Code Editor windows to generate and edit Axcess and/or NetLinx code. Source
Code Editor window features include:
Source Code Editor window features include:

Auto-suggest and Auto-complete functionality: As you type in a variable name, device


name or a language reserved word, the program will suggest a name that has been
previous defined within the source code (this option is toggled on and off in the
Preference dialog - Editor Options tab).

Syntax highlighting: The text in the Editor windows is syntax highlighted for increased
readability with a default set of colors. Use the options in the Editor Options tab of the
Preferences dialog to customize various aspects of the Source Code editor windows (i.e.
syntax highlighting, auto-indent, show/hide line numbers and clipboard text buffer
settings).

Syntax highlighting assigns different colors to different types of data in your Source
Code file. Use syntax highlighting to make your code easier to read and manage. For
example, you could syntax highlight all comments to yellow, all identifiers to red and
strings to blue to make them more easily identifiable in your code file.

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.

Source Code Editor windows are moveable and resizeable. Use the options in the
Window menu to arrange (cascade or tile) multiple windows.

Use the New Window option in the Window menu to open the same code file in multiple
Editor 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 (see page 70).

Hold down the Alt key and select text with the left mouse button for columnar Cut, Copy,
and Paste operations.

NetLinx Studio v2.2 69


Programming

Use the Edit > Insert Section option to insert a (empty) section of code at the cursor
position.

Use the Edit > Goto Section option to move the cursor to the beginning of a selected
section of code in the active Editor window.

The Edit > Undo and Redo commands allow unlimited Undo/Redo operations.

Use the Edit > Make Selection Uppercase and Make Selection Lowercase commands
to automatically change the case on a selection of text.

Use the Edit > Sequentially Renumber Selection command to sequentially renumber
selected number text in the active Editor window.

The Edit > Block Comment-Uncomment option allows you to block comment-
uncomment selected text in the active Editor window.

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.

Source Code Editor Context Menu


Right-click inside any Source Code Editor window to open the Source Code Editor context menu.
The options in this menu include:

• Build Active System Compiles all Source Code files (and any associated
Include and Module files) in the active System.
• Compile <active Source Code File> Compiles the active file, using the compile type associated
with the file (the compile type can be changed via the File
Properties dialog).
• Compile as NetLinx Click to compile the active file using the NetLinx compiler,
regardless of it's Compile As property.
• Compile as Axcess Click to compile the active file using the Axcess compiler,
regardless of it's Compile As property.
• Undo, Redo Undo and Redo the last text editing action.
• Cut, Copy, Paste Cut the selected text to the clipboard, Copy the selected
text to the clipboard, and Paste the contents of the clip-
board to the active file, at the cursor position.
• Delete Deletes the selected (highlighted) text in the active Source
Code Editor window.
• Select All Selects all of the code in the active file.
• Goto Section Click to open the Goto Section sub-menu, which contains a
listing of code sections in a Source Code File. Select a sec-
tion from this list to jump to the beginning of that section in
the active file. If a section that does not exist within the
active code file is chosen, nothing happens.
• Goto Line Opens the Goto Line dialog, where you can specify the line
of code to which you want to move the cursor in the active
file. If a line number is entered that is beyond the max num-
ber of lines in the file, the cursor is moved to the last line in
the file.

70 NetLinx Studio v2.2


Programming

• Bookmark Inserts a bookmark at the line containing the cursor in the


active file. Bookmarks are indicated by a blue box in the left
margin of the Source Code Editor window. You can have as
many bookmarks as number of lines in the source code.
• Toggle Breakpoint Places a breakpoint in the active file, at the cursor position
(NetLinx files only). Once a breakpoint has been inserted in
the file, place the cursor in the line with the breakpoint and
select Toggle Breakpoint again to remove the breakpoint.
• Clear Breakpoints Removes all NetLinx breakpoints.

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:
^ - 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".

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:

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.

Operator - All of the following operators


= < > + - * / % ! & | ^ ~ <= >= <> && || ^^
and the longer forms:
BOR AND XOR NOT BAND BNOT BXOR OR

NetLinx Studio v2.2 71


Programming

are syntax highlighted using the color specified in Preferences > Editor > Operator.

Floating Point Numbers - A number is considered a floating point number if it contains


a decimal point. Floating point numbers are syntax highlighted using the color specified
in Preferences > Editor > Floating Point Number.

Number - A number is any series of digits that does not include a decimal point. A
number may have the optional prefix “$” for hex or the optional postfix “b” for binary. If
the number is a hexadecimal number then it may contain the letters A-F or a-f. Numbers
are syntax highlighted using the color specified in Preferences > Editor > Number.

String - Strings are any series of characters and digits that occur within two single
quotes. Strings are syntax highlighted using the color specified in Preferences > Editor >
String.

Constants, Devices, Type, Variable - These are new to NetLinx Studio 2.1. Since
NetLinx code may be divided into the following sections DEFINE_CONSTANT,
DEFINE_DEVICE, DEFINE_TYPE, DEFINE_VARIABLE, anytime a word is encountered
that falls within one of these sections it is parsed, remembered and then syntax
highlighted according to the section in which it occurred. So if a DEFINE_DEVICE
section contains a line that reads “dvTP = 128” the word dvTP will be remembered as a
device and syntax highlighted using the color specified in Preferences > Editor > Device.
Additionally, if the editor recognizes that you have partially typed the name of the above
section variable (for example “dv”), it will autosuggest “dvTP”. It does this for all of the
items it encountered in any of the above DEFINE_ sections.

Default Text - Any word that is not recognized as any of the above is syntax highlighted
using the color specified in Preferences > Editor > Default Text.

AutoComplete and AutoSuggest


You may enable or disable this feature by toggling the checkbox located in
Preferences > Editor > Enable AutoComplete/AutoSuggest.
When the editor makes a suggestion, you may choose to accept the suggestion by hitting the TAB
key or using your own keystroke defined in Preferences > Keyboard > Advanced Editor > Insert
Suggestion. Additionally, if the editor’s suggestion is not what you intended you may choose to
have the editor display its next suggest. You can cycle through all of the editors suggestion by using
the keystroke defined in Preferences > Keyboard > Advanced Editor > Next Suggestion.

There is no default for Next Suggestion in order to avoid conflicting with pre-existing
user keystrokes. You must set your own.

The collection of words from DEFINE_ sections that the editor recognizes is updated whenever the
file is loaded and saved. Additionally, whenever a portion of the editor is redrawn that portion is re-
examined for possible DEFINE_ type items. All of this is done to optimize speed. If the file was
continuously scanned, the performance would suffer greatly. It is possible that the information that
the editor has stored can be “out of date”, this is best remedied by saving the file.

72 NetLinx Studio v2.2


Programming

Searching Within the Active Source Code File


Use the Find and Find Next options in the Edit menu to search within the active Source Code file:
1. Choose Edit > Find (or click the "Find" toolbar button) to open the Find dialog.
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 — Searches only for instances that match the case (UPPERCASE or
lowercase) of the characters in the search string.

Loop — 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 At Top — Start the search at the top of the file (regardless of the cursor's position).

Direction — 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.

Using the Code Wizard


Select Tools > Code Wizard to launch the NetLinx Studio Code Wizard. 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

IR Constants

A source file must be open in Source Code Editor window in order to use the Code
Wizard.

NetLinx Studio v2.2 73


Programming

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).
2. Click Next to proceed to the next 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.
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 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.

74 NetLinx Studio v2.2


Programming

Code Wizard - Advanced Options


The Code Wizard can be toggled to show the individual dialogs (containing detailed options) for all
the above functionality that can be used by advanced users. To view the advanced options in every
dialog, de-select the Wizard Style checkbox (on by default).
When the Wizard generates a new code segment, it is inserted in the active Source Code file, in the
appropriate section of the code.

A source file must be open in Source Code Editor window in order to use the Code
Wizard.

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:

• Push Generate PUSH statements


• Release Generate RELEASE Statements
• Hold Generate HOLD statement. Not supported in Axcess.
• Feedback Generate feedback assignments.
• No Arrays Button Range will be generated without using arrays, i.e. multiple
BUTTON_EVENTs, PUSHes or RELEASEs will be generated. This
is the default option is generating code for Axcess.
• Use DEVCHAN Button ranges will be placed in a DEVCHAN array named Array
Name using the Device and button range defined as From through
To in the DEFINE_VARIABLE section. A single BUTTON_EVENT
statement referencing Array Name will be generated. Note that
when Use DEVCHAN is selected, GET_LAST() is selected and
grayed out. This option is not available if generating code for Axcess.
• Use INTEGER Button ranges will be placed in an INTEGER array named Array
Name using the button range defined as From through To in the
DEFINE_VARIABLE section. A single BUTTON_EVENT statement
referencing Device and Array Name will be generated. This option is
not available if generating code for Axcess.
• Button Index/GET_LAST() This option will include a calculation for the button index using a
mathematical calculation, BUTTON.INPUT.CHANNEL – From, for
non-array button ranges and a function call to GET_LAST(),
GET_LAST(Array Name), for array button ranges. The button index
calculation is used if generating code for Axcess.
• SWITCH/CASE This option will include a SWITCH/CASE construct under the PUSH
and/or RELEASE statements. The SWITCH will be based on the
Button Index. Note that when SWITCH/CASE is selected, the Button
Index option is selected, and grayed out. When generating Axcess
code, a SELECT/ACTIVE construct will be generated instead of a
SWITCH/CASE.
• Stacked This option will cause each button in the Array Name definition to be
generated on its own line with an empty comment at the end of the
line. If this option is not selected, eight channels will be generated
on each line with an empty comment above the line.
• Hold Repeat This option will include the REPEAT keyword in the HOLD event
handler. This option is not available when generating Axcess code.

NetLinx Studio v2.2 75


Programming

• Device The device name used during code generation. This name may
appear in a DEVCHAN definition, BUTTON_EVENT, PUSH,
RELEASE or feedback assignment statements depending on the
platform and options selected.
• From, To, Total The button range used during code generation. The range is 1 -
1000. You may change any of these values; the others will adjust
automatically. A value of 0 (zero) in the From field will generate an
“all button” handler. In this case, code generation cannot support
arrays or feedback.
• Array Name The array name used for generating DEVCHAN or INTEGER array
for button ranges.
• Hold Time This value is used when generating the HOLD statement.
• Comment This value is used on the lines before the array definition,
BUTTON_EVENT, PUSH, and RELEASE and feedback statements
as determined by the options. Comments in NetLinx are always line-
style comments (i.e. //).
• Insert Once you have made the relevant selections on this tab, click this
command button to insert the specified code into the file.

Code Wizard Dialog - Channel tab


In NetLinx, channel events are always created using the CHANNEL_EVENT handler in the
DEFINE_EVENT section. In Axcess, channel events are not supported. The items in the Channel tab
are described below:

• On Generate ON statements
• Off Generate OFF Statements
• No Arrays Channel ranges will be generated without using arrays, i.e. multi-
ple CHANNEL_EVENTs will be generated.
• Use DEVCHAN Channel ranges will be placed in a DEVCHAN array named Array
Name using the Device and channel range defined as From
through To in the DEFINE_VARIABLE section. A single
CHANNEL_EVENT statement referencing Array Name will be
generated. Note that when Use DEVCHAN is selected,
GET_LAST() is selected and grayed out. This option is not avail-
able if generating code for Axcess.
• Use INTEGER Channel ranges will be placed in an INTEGER array named Array
Name using the channel range defined as From through To in the
DEFINE_VARIABLE section. A single CHANNEL_EVENT state-
ment referencing Device and Array Name will be generated.
• Channel Index/GET_LAST() This option will include a calculation for the channel index using a
mathematical calculation, CHANNEL.CHANNEL – From, for non-
array channel ranges and a function call to GET_LAST(),
GET_LAST(Array Name), for array channel ranges. The channel
index calculation is used if generating code for Axcess.
• SWITCH/CASE This option will include a SWITCH/CASE construct under the ON
and/or OFF statements. The SWITCH will be based on the Chan-
nel Index. Note that when SWITCH/CASE is selected, the Channel
Index option is selected, and grayed out.
• Stacked This option will cause each channel in the Array Name definition to
be generated on its own line with an empty comment at the end of
the line. If this option is not selected, eight channels will be gener-
ated on each line with an empty comment above the line.
• Device The device name used during code generation. This name may
appear in a DEVCHAN definition or CHANNEL_EVENT statement
depending on the platform and options selected.

76 NetLinx Studio v2.2


Programming

• From, To, Total The channel range used during code generation. The range is 1 -
1000. You may change any of these values; the others will adjust
automatically. A value of 0 (zero) in the From field will generate an
“all channel” handler. In this case, code generation cannot support
arrays.
• Array Name The array name used for generating DEVCHAN or INTEGER array
for channel ranges.
• Comment This value is used on the lines before the array definition,
CHANNEL_EVENT statements as determined by the options.
Comments in NetLinx are always line-style comments (i.e. //).
• Insert Once you have made the relevant selections on this tab, click this
command button to insert the specified code into the file.

Code Wizard Dialog - Level tab


In NetLinx, level events are always created using the LEVEL_EVENT handler in the
DEFINE_EVENT section. In Axcess, level event are not supported. CREATE_LEVELs are placed in
the DEFINE_START section and are support on Axcess and NetLinx. SEND_LEVELs are placed in
the DEFINE_PROGRAM section and are support on Axcess and NetLinx. The advanced options
available for Level_Events (in the Level tab of the Code Wizard dialog) are described below:

• Event Generate LEVEL_EVENT statements.


• Create Generate CREATE_LEVEL statements.
• Send Generate SEND_LEVEL statements.
Note: You cannot generate EVENT_LEVEL statements and
CREATE_LEVEL or SEND_LEVEL statements at the same time.
• No Arrays Level ranges will be generated without using array, i.e. multiple
LEVEL_EVENTs will be generated.
• Use DEVLEV Level ranges will be placed in a DEVLEV array named Array Name
using the Device and button range defined as From through To in the
DEFINE_VARIABLE section.
A single LEVEL_EVENT statement referencing Array Name will be
generated. If CREATE_LEVEL and/or SEND_LEVEL statements will
be generated, each construct will reference this array for the level
number for NetLinx only. Note that when Use DEVCHAN is selected,
GET_LAST() is selected and grayed out. This option is not available if
generating code for Axcess.
• Use INTEGER Level ranges will be placed in an INTEGER array named Array Name
using the button range defined as From through To in the
DEFINE_VARIABLE section. A single LEVEL_EVENT statement ref-
erencing Device and Array Name will be generated. If
CREATE_LEVEL and/or SEND_LEVEL statements will be generated,
each construct will reference this array for the level number for
NetLinx only.
• Level Index/GET_LAST() This option will include a calculation for the level index using a mathe-
matical calculation, LEVEL.INPUT.LEVEL– From, for non-array level
ranges and a function call to GET_LAST(), GET_LAST(Array Name),
for array level ranges. The option is only used for LEVEL_EVENTs.
• SWITCH/CASE This option will include a SWITCH/CASE construct under the
LEVEL_EVENT statement. The SWITCH will be based on the Level
Index. Note that when SWITCH/CASE is selected, the Level Index
option is selected, and grayed out.

NetLinx Studio v2.2 77


Programming

• Stacked This option will cause each level in the Array Name definition to be
generated on it’s own line with an empty comment at the end of the
line. If this option is not selected, eight levels will be generated on
each line with an empty comment above the line Device The device
name used during code generation. This name may appear in a DEV-
LEV definition, LEVEL_EVENT, CREATE_LEVEL or SEND_LEVEL
statements depending on the platform and options selected.
• From, To, Total The level range used during code generation. The range is 1 - 1000.
You may change any of these values; the others will adjust automati-
cally. A value of 0 (zero) in the From field will generate an “all level”
LEVEL_EVENT handler. In this case, code generation cannot support
arrays.
Note: The range setting (1-1000) affects the load placed on the CPU
at compile time. Higher range settings may result in slower compile
operations.
• Array Name The array name used for generating DEVLEV or INTEGER array for
level ranges.
• Value/Variable Name The array name or value used for generating CREATE_LEVEL or
SEND_LEVEL statements. If generating code for a level range on
NetLinx, this variable will be created as an array. If generating code
for a level range on Axcess, this variable will be created as a series or
variable starting with this name, i.e. Variable Name 1, Variable Name
2, etc…
• Comment This value is used on the lines before the array definition,
LEVEL_EVENT, CREATE_LEVEL, and SEND_LEVEL statements as
determined by the options. Comments in NetLinx are always line-style
comments (i.e. //).
• Insert Once you have made the relevant selections on this tab, click this
command button to insert the specified code into the file.

Code Wizard Dialog - Data tab


In NetLinx, data events are always created using the DATA_EVENT handler in the DEFINE_EVENT
section. In Axcess, data events are created using constructs placed in the DEFINE_PROGRAM
section. The advanced options available for Data_Events (in the Data tab of the Code Wizard
dialog) are described below:

• Online Generate ONLINE statements. In Axcess, a construct for detecting device


online status is generated.
• Offline Generate OFFLINE statements. In Axcess, a construct for detecting device
offline status is generated.
• OnError Generate ONERROR Statements. Not supported in Axcess
• String Generate STRING statements. Not supported in Axcess.
• Command Generate COMMAND Statements. Not supported in Axcess
• Create Buffer Define a buffer and connect it to a device using CREATE_BUFFER, in the
DEFINE_START section.
• Process Buffer Generate a construct for detecting incoming strings. If generating code for
NetLinx, this code is placed in the STRING section of the DATA_EVENT. If gen-
erating code for Axcess, this code is placed in the DEFINE_PROGRAM section.
• Device The device name used during code generation. This name may appear in a
variable declaration, ONLINE/OFFLINE construct, DATA_EVENT or
CREATE_BUFFER statements depending on the platform and options
selected.
• Comment This value is used on the lines before the variable declaration, ONLINE/
OFFLINE construct, DATA_EVENT or CREATE_BUFFER statements as deter-
mined by the options. Comments in NetLinx are always line-style comments
(i.e. //).

78 NetLinx Studio v2.2


Programming

• Insert Once you have made the relevant selections on this tab, click this command
button to insert the specified code into the file.

Code Wizard Dialog - Send Command tab


Send commands are generated using the options supplied and placed at the cursor location. The
advanced options available for Send_Commands (in the Send Command tab of the Code Wizard
dialog) are described below:

• Page Generate PAGE- page flip send command for touch panels.
• !T Generate !T variable text send command for touch panels.
• @BMF Generate @BMF variable text send command for touch panels.
• @PPN Generate @PPN- popup on send command for touch panels.
• @PPF Generate @PPF- popup off send command for touch panels.
• @PPK Generate @PPK- popup kill send command for touch panels.
• @PPX Generate @PPX- kill all popups send command for touch panels.
• Custom Generate a custom send command.
• Device The device name used during code generation. This name will appear in the
SEND_COMMAND statement.
• Sub Command The command parameter used in the SEND_COMMAND. Depending on
options, this may be the Page Name, Text to Send, @BMF sub-command,
popup page name or custom command.
• Comment This value is used on the line before the SEND_COMMAND statement. Com-
ments in NetLinx are always line-style comments (i.e. //).
• Insert Once you have made the relevant selections on this tab, click this command
button to insert the specified code into the file.

Code Wizard Dialog - IR Constant tab


Constants are generated from IR files. One constant is generated for every IR function and are
placed in the DEFINE_CONSTANT section. The advanced options available for IR Constants (in the
IR Constant tab of the Code Wizard dialog) are described below:

• Device The device name used during code generation. This name is used to generate
the Constant Prefix field.
• IR File The IR file for which you would like to generate constants.
• Constant Prefix The prefix to precede all constant declaration. By default, this will be
<Device>_.
• Comment This value is used on the line before the constant declarations. Comments in
NetLinx are always line-style comments (i.e. //).
• Insert Once you have made the relevant selections on this tab, click this command
button to insert the specified code into the file.

NetLinx Studio v2.2 79


Programming

Insert Section
The Insert Section option in the Edit menu allows you to insert a particular section heading in your
code, at the cursor's position. This command only works on the open Source Code Editor window.
1. Select Edit > Insert Section (or use the toolbar button) to access the Insert Section sub-menu.
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: Axcess:
• DEFINE_DEVICE • DEFINE_DEVICE
• DEFINE_CONSTANT • DEFINE_CONSTANT
• DEFINE_TYPE
• DEFINE_VARIABLE • DEFINE_VARIABLE
• DEFINE_LATCHING • DEFINE_LATCHING
• DEFINE_TOGGLING • DEFINE_TOGGLING
• DEFINE_MUTUALLY_EXCLUSIVE • DEFINE_MUTUALLY_EXCLUSIVE
• DEFINE_CONNECT_LEVEL • DEFINE_CONNECT_LEVEL
• DEFINE_START • DEFINE_START
• DEFINE_MODULE
• DEFINE_EVENT
• DEFINE_PROGRAM • DEFINE_PROGRAM

The Insert Section and Goto Section sub-menus may include sections that do not
exist in that are appropriate for the file's System type (NetLinx or Axcess). The valid
commands for the System type will be available whether they are actually in the file or
not.

4. The section heading is added at the cursor's position.

Goto Line
The Goto Line option in the Edit menu allows you 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. Select Edit > Goto Line (or use the toolbar button) to access the Goto Line dialog.
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.

If the line number entered is greater then the number of lines in the file, this function
will take you to the last line in the file.

80 NetLinx Studio v2.2


Programming

Goto Section
The Goto Section option in the Edit menu allows you to jump to a particular section in your code.
1. Select Edit > Goto Section (or use the toolbar button) to access the Goto Section sub-menu.
2. Select the section that you want to jump to from the sub-menu. The available options are listed
in the Insert Section sub-section above
3. The cursor jumps to the top of the selected section in the open Source Code Editor window.

Goto Function or Subroutine


The Goto Function or Subroutine toolbar command allows you to jump to a particular section in
your code.
1. Click the Goto Function or Subroutine toolbar button to access a list of functions and
subroutines contained in the file. This command only works on the currently active Source
Code Editor window.
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 open Source Code Editor window.

Using the Clipboard Text Buffer


The Clipboard Text Buffer allows you to copy multiple selections from the Source to clipboard
memory as separate items that you can selectively paste from the clipboard.

You can have up to 30 clip-board buffer items.

The maximum display width is 80 characters.

Clipboard items are not saved when the application terminates.


To use the Clipboard Text Buffer:
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 to access a list of items in the Clipboard Text
Buffer.
7. Click an item in the list to paste it into the active Source Code Editor window, at the cursor
location.

NetLinx Studio v2.2 81


Programming

Working With Bookmarks


NetLinx Studio allows you to place bookmarks in your program files for quick navigation to key
points in the code. Use the bookmarks commands in the Edit menu to create, jump to, and clear
bookmarks.
To create a bookmark, place the cursor in the line that you want to bookmark, and select Edit >
Bookmark, the Source Code Editor context menu, or use the toolbar button. The bookmark is
indicated by a blue rectangle in the left margin of the Source Code Editor window.

Use the Next Bookmark and Previous Bookmark options to jump to your bookmarks.

Use the Clear Bookmarks command to clear all bookmarks in the Source Code Editor
window.

Debugging Source Code Files


NetLinx Studio contains several useful options for debugging your Master Controller and Source
Code files. 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 enter debug mode:

To use debugging, the Build With Source option must be selected in the
Preferences dialog (Axcess Compiler and/or NetLinx Compiler tabs), before the file is
compiled.

1. Open and compile an Source Code file (that contains at least one variable), if you have not
already done so. The file must be successfully compiled before you can enter debug mode.
2. Choose Build > Debug 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: displays the value of the watched variable in ASCII format.
• Decimal Display: displays the value of the watched variable in decimal format.
• Hexadecimal Display: displays the value of the watched variable in hexadecimal format.
• Octal Display: displays the value of the watched variable in octal format.
• Binary Display: displays the value of the watched variable in binary format.

To exit Debug mode, close the Watch window.

82 NetLinx Studio v2.2


Programming

You cannot compile, send/receive files, or change port settings while the program is
in debug mode.

Using Single-Step Mode


In Single-step mode, program execution is suspended between each pass through mainline,
allowing you to test programs one line at a time. Single-step mode works differently in NetLinx
than it does in Axcess:

In NetLinx systems it executes a single instruction in the source file.

In Axcess systems it executes a single line of code in the Mainline.


To use Single-step mode:
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.

Using the Terminal Window


Select Tools > Terminal (or click the toolbar button) to open the Terminal window.
The Terminal Emulator window puts the Master Controller into dumb terminal mode. Anything
that is typed on the screen exits through the Master communications port, and anything coming in
from the communications port is displayed in the Terminal window. Use the Terminal window to
communicate directly with the Master Controller and to debug RS-232-controlled devices.

You cannot use the Terminal window while a communication port is in use for a file
transfer or debug operation.

Type "ECHO ON" in the Terminal window to display messages.

If the Terminal window becomes unresponsive, close and re-open the window.

To leave the Terminal window active for a long session, click the Terminal Locks the
Port option in the General tab of the Preferences dialog.

Use the Format tab of the Preferences dialog to change the appearance of the elements of
the Terminal window.

To use the Terminal window with NetLinx systems, you must be connected to the Master
via the PROGRAM port. Otherwise, you can use Windows TelNet for terminal control of
NetLinx systems.

NetLinx Studio v2.2 83


Programming

Master Controller Debug Options


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 variables within a compiled Axcess or NetLinx program. Also, you can control the
execution through each pass of the mainline of a compiled Axcess or NetLinx program.
Once Start Debugging has been selected, the other options in the Debug menu become available:

• Start/Stop Debugging Ability to toggle the debug state of the application. There is no limitation
on then number of NetLinx variables that can be watched in the Debug
Watch windows. A maximum of 10 watch variables are allowed when
debugging an Axcess master controller.
• Step Mode Enable/Disable Step mode causes the Interpreter to break after each
execution of the mainline. Watch variables are always updated after each
pass through mainline. To continue program execution while in Step
mode, you must invoke the Step command again.
• Single Step Execute one line of a source code file at a time for a NetLinx master con-
troller or execute one pass through the mainline code for an Axcess con-
troller.

The following options are only needed for debugging code located on a NetLinx master controller:

• Run To continue execution after a Single Step operation or from a toggled break
point.
• Run To Cursor Execute the program and break on the line of code where the cursor is
residing on the screen.
• Break 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 Toggle a break point on the screen where the cursor is residing. A red dia-
mond appears next to the line of code to signify a break point.
• Clear Break Points Clears all the break points within the source code file.

Changing the Value of a Watched Variable


Once you have entered Debug mode, you can change the name and/or value of any watched
variable, via the Value column in the Watch window:
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.

84 NetLinx Studio v2.2


Programming

Using Breakpoints (NetLinx Only)


While Single Step Mode allows you to execute a single line of code in the Mainline in Axcess
systems, NetLinx systems allow you to use Breakpoints to execute a single instruction in the source
file. You can set a breakpoint on any line of code (other than a comment) that is within the
DEFINE_PROGRAM section.
The following is an example of a SEND_LEVEL breakpoint:
PUSH[dvLocalTP3,1]
PUSH[dvLocalTP3,2]
{
fTestLevel=fTestLevel + 1;
SEND_LEVEL dvLocalTP3,1,fTestLevel;
}
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. Right-click to open the Source Code Editor context menu, and select Toggle Breakpoint, or
use the Toggle Breakpoint toolbar button to insert the breakpoint. You can also access the
Toggle Breakpoint command through the Source Code Editor context menu (right-click inside
the Source Code Editor window to open).
3. A red circle 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 current execution point.

To execute the next line of code, right-click and choose Step Into. You'll see the
execution pointer advance one line.

If you no longer need to single step, right-click and choose Run.

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.

NetLinx Studio v2.2 85


Programming

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.
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.

If the line number entered is greater then the number of lines in the file, this function
will take you to the last line in the file.

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.
Select Edit > Goto Section to access the Goto Section sub-menu.
Select the section that you want to jump to from the sub-menu. The available options are:

NetLinx: Axcess:
• DEFINE_DEVICE • DEFINE_DEVICE
• DEFINE_CONSTANT • DEFINE_CONSTANT
• DEFINE_TYPE
• DEFINE_VARIABLE • DEFINE_VARIABLE
• DEFINE_LATCHING • DEFINE_LATCHING
• DEFINE_TOGGLING • DEFINE_TOGGLING
• DEFINE_MUTUALLY_EXCLUSIVE • DEFINE_MUTUALLY_EXCLUSIVE
• DEFINE_CONNECT_LEVEL • DEFINE_CONNECT_LEVEL
• DEFINE_START • DEFINE_START
• DEFINE_MODULE
• DEFINE_EVENT
• DEFINE_PROGRAM • DEFINE_PROGRAM

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.

The cursor jumps to the top of the selected section in the open Source Code Editor window.

86 NetLinx Studio v2.2


Programming

Goto Function or Subroutine


The Goto Function or Subroutine toolbar command allows you to jump to a particular section in
your code, in the active 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.

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 (if necessary).
2. Choose File > Print Setup to open the Print Setup dialog, to choose and configure your printer
(if necessary).
3. Choose File > Print 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. 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 Prints the current page view


• Next Page Displays the next page of the selected file
• Prev Page Displays the previous page of the selected file
• One Page/Two Page Toggles the page view to one or two pages. This option is enabled only if
the active file is longer than one page.
• Zoom In Zooms in on the page view
• Zoom Out Zooms out from the page view
• Close 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.

NetLinx Studio v2.2 87


Programming

88 NetLinx Studio v2.2


Compile Operations

Compile Operations
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 v2.x 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.

Building the Workspace


One advantage to the Workspace concept employed by NetLinx Studio v2.x is that you can choose
to build (compile) the entire Workspace. That is, every Source Code, Include, and Module file
contained within the open Workspace can be compiled with a single command: Build Workspace.
There are several ways to access the Build Workspace command - via the Build menu, the
Workspace context menu (in the Workspace tab of the Workspace Window), or via the toolbar
button.
To compile the open Workspace:
1. Select Build > Build Workspace.
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 Display
Window.

Building the Project


You can select to compile a single Project within the open Workspace, using the Build Project
command. When you compile a Project, every Source Code, Include, and Module file contained in
all of the Systems within the selected Project are compiled.
There are several ways to access the Build Project command - via the Build menu, the Project
context menu (in the Workspace tab of the Workspace Window), or via the toolbar button.
To compile a Project:
1. Click to select and highlight the Project that you want to compile (in the Workspace tab of the
Workspace Window).
2. Select Build > Build <Project Name> Project.
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.
3. The status and results of the build are displayed in the Status tab of the Output Display
Window.

NetLinx Studio v2.2 89


Compile Operations

Building a Selected System


You can select to build (compile) any System in the Workspace, using the Build System command.
When you build a System, every Source Code, Include, and Module file contained in the selected
System is compiled. The Build System command always works on the selected System, regardless
of whether it is currently designated as the active system or not.
To compile a System:
1. Click to select (highlight) the System that you want to build (in the Workspace tab of the
Workspace window).
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 Display
Window.

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 Window).

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 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 Display
Window.

90 NetLinx Studio v2.2


Compile Operations

Compiling an Individual File


You can select to compile a single Source Code, Include, or Module file, using the Compile,
Compile As NetLinx and Compile as Axcess commands.

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.
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 Window), the Source Code Editor context
window, or via the toolbar buttons.
To compile an individual file:
1. Select the file that you want to compile:

If the file is already included in the open Workspace, click to select the file and select the
appropriate Compile command.

If the file is not part of the open Workspace, open the file via the File > Open command,
then right-click on the file (in the Source Code Editor window) and select the appropriate
Compile command from the Source Code Editor context menu.
2. Click to select and highlight the System that you want to compile (in the Workspace tab of the
Workspace window). The Build System command always works on the selected System,
regardless of whether it is currently designated as the active system or not.
3. Select Build > Build System.
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.
4. The status and results of the build are displayed in the Status tab of the Output Display
Window.

NetLinx Studio v2.2 91


Compile Operations

Compiler Errors and Warnings


These help topics contain information on the various types of errors and bugs common to
programming, and some techniques for solving these problems.

Compiler Error Types


There are three general types of programming errors:

Compilation errors - Errors that occur at compile time. The compiler alerts you to these
errors immediately and identifies each error and the line where it is located.

Run-time errors - Errors that occur after the program has been compiled and loaded into
the Master Controller. These errors are caused by program statements that attempt illegal
operations.

Logic errors - Logic errors are errors in program design and thus are the programmer's
responsibility; The master cannot tell if the program it is executing is accomplishing what
the user intends.

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 The compiler is expecting a certain symbol at this particu-
lar place.
Active keyword expected An ACTIVE keyword is not present after a SELECT key-
word.
Allowed only in DEFINE_START A keyword that is only allowed to appear in the
DEFINE_START section of the program was encountered
elsewhere.
Attempted CALL to undefined subroutine A CALL statement refers to a subroutine that has not been
defined with a DEFINE_CALL statement.
Comment never ends, EOF encountered A comment begins but never ends. Place a close com-
ment, * ) at the end of the unfinished comment.
Conditional compile nesting too deep There are too many nested #IF_DEFINED or
#IF_NOT_DEFINED conditional compilation statements.
The limit is 20 nested conditional compilation statements
Constant type not allowed 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 must have a name after it. For example,
DEFINE_CALL 'VHS'.
DEFINE_CALL name already used The name of the DEFINE_CALL has already been used.
This name cannot be the same as an already declared
identifier of any type.

92 NetLinx Studio v2.2


Compile Operations

Compiler Errors (Cont.)


Device values must be equal In a range specification, the devices (or their defined iden-
tifiers) must be equal. For example, ([1,1]..[1,5]) is valid;
([1,1]..[2,5]) is not.
Duplicate symbol Duplicate definitions of variables or constants are found.
All variables and constants must have unique identifiers.
Evaluation stack overflow The expression is too complicated. Try breaking it up into
Evaluation stack underflow smaller pieces.

Identifier expected The compiler is expecting an identifier after a #DEFINE


statement or after an integer declaration in the
DEFINE_VARIABLE section.
Identifier is not an array type A non-array variable was treated as an array.
Include file not found An INCLUDE statement was encountered, but the speci-
fied Include file could not be found.
Invalid Include file name A string literal enclosed in single quotes must follow the
INCLUDE keyword.
Library file not found The library file containing the specified SYSTEM_CALL
could not be found.
Maximum string length exceeded String literals are limited in length to 132 characters,
including spaces.
Must be char array reference An array type variable was expected in
CREATE_BUFFER, CREATE_MULTI_BUFFER, or
CLEAR_BUFFER.
Must be integer reference The identifier in question must be an integer. This error
occurs when the third parameter of CREATE_LEVEL is an
array or array element.
NetLinx Compiler failed RT: -2147417851 ST:1 This error means that the compiler cannot find the line
number to even check what type of error has occurred, so
it gives no details on the cause.
If you get this non-descriptive error when compiling and
the code contains modules, check to make sure the mod-
ule parameters are the right type. If you're trying to pass in
a one-dimension array where the module requires a two-
dimension array, or a CHAR instead of an INTEGER, etc.,
this error will occur.
Out of memory The compiler has run out of memory. Free up memory
either by removing any pop-up programs or drivers, by
using extended memory, or by breaking your program into
one or more Include files.
Parameter mismatch in CALL A value or variable passed to a CALL as a parameter is of
the wrong type as defined by the DEFINE_CALL state-
ment.
PROGRAM_NAME must be on line 1 Move the PROGRAM_NAME= statement to the first line of
the program.
PUSH/RELEASE not allowed within PUSH/ A PUSH or RELEASE statement was found within a block
RELEASE of code headed by a PUSH or RELEASE statement.
PUSH/RELEASE not allowed within WAIT These keywords are not allowed in a section of code which
PUSH_CHANNEL not allowed within WAIT will be executed due to a WAIT keyword.

RELEASE_CHANNEL not allowed within WAIT


PUSH_DEVICE not allowed within WAIT
RELEASE_DEVICE not allowed within WAIT
String constant expected A string is required for the particular operation. This error
occurs if a string literal enclosed in single quotes does not
follow the PROGRAM_NAME keyword.

NetLinx Studio v2.2 93


Compile Operations

Compiler Errors (Cont.)


String constant never ends, EOF encountered A string literal is started but never ends. Add a closing sin-
gle quotation mark (' ) to the end of the string.
String literal expected A string is required for the particular operation. This error
would occur if a string literal enclosed in single quotes
does not follow the #WARN keyword.
Subroutine may not call itself A subroutine cannot call itself. It can, however, call a differ-
ent subroutine.
Syntax error A syntax error is found in an expression. In most cases,
this error means that a character is out of place or some-
thing is misspelled.
SYSTEM_CALL name not same as This error occurs when a library file is compiled and the
PROGRAM_NAME in <file> name of the subroutine in the library file does not match
the PROGRAM_NAME string on the first line of the file.
This variable type not allowed This error occurs when an attempt is made to use an array
variable with DEFINE_LATCHING , DEFINE_TOGGLING,
or DEFINE_MUTUALLY_EXCLUSIVE .
To not allowed within DEFINE_START These errors occur if the TO keyword is found in an errone-
To not allowed within MAINLINE ous location. The TO keyword can only be associated
directly with a PUSH statement.
To not allowed within RELEASE
To not allowed within WAIT
Too few parameters in CALL There are not enough parameters being passed to the
subroutine.
Too many Include files A program may only contain up to 20 Include files.
Too many parameters in CALL There are too many parameters being passed to the sub-
routine.
Type mismatch in function CALL 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.
Undefined identifier An attempt was made to reference an identifier that has
not been defined previously in the program.
Unmatched #END_IF An #END_IF keyword was found, but no #IF_DEFINED or
#IF_NOT_DEFINED was previously compiled.
Unrecognized character in input file An invalid character was found during compilation.
Use SYSTEM_CALL [INSTANCE] 'NAME' This error occurs if a SYSTEM_CALL statement is written
incorrectly as SYSTEM_CALL 'NAME' [INSTANCE NUM-
BER].
Variable assignment not allowed here Variables may not be assigned a value when they are
defined in the DEFINE_VARIABLE section.
WAIT not found 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.

94 NetLinx Studio v2.2


Compile Operations

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 Preference 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 non-array variable or two-dimensional
array variable)
• Assigning the result of a function that returns a non-array type to a
one- or two-dimensional array variable (for example, X =
ATOI('AMX'), where X is a one- or two-dimensional 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 Preference dialog.
(w) Define_Call is not used This warning occurs at the end of program compilation for each
DEFINE_CALL subroutine that was declared but never used. The gen-
eration of this warning can be turned on or off in the Compiler Options
tab of the Preference dialog
(w) Integer applies to arrays only 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. The genera-
tion of this warning can be turned on or off in the Compiler Options tab
of the Preference dialog.
(w) Long_While within While This warning occurs if the compiler finds a LONG_WHILE or
MEDIUM_WHILE inside a block of code following a WHILE keyword.
This warning exists because the WHILE command has a 1/2 second
timeout period, and the LONG_WHILE and MEDIUM_WHILE key-
words do not. This could create a hard-to-find logic error. The solution
is to change the WHILE to a LONG_WHILE to fix this problem. The
generation of this warning can be turned on or off in the Compiler
Options tab of the Preference dialog.
(w) Possibly too many nested levels This warning appears if there is a large amount of nesting in the pro-
gram. This can happen with a long chain of IF...ELSE IF statements.
The solution is to use the SELECT...ACTIVE set of statements. The
generation of this warning can be turned on or off in the Compiler
Options tab of the Preference dialog.
(w) Variable is not used This warning occurs at the end of compilation for each variable that
was declared but never used. The generation of this warning can be
turned on or off in the Compiler Options tab of the Preference dialog.

NetLinx Studio v2.2 95


Compile Operations

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... 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.
Bad assign Call... These errors occur if the Master Controller cannot assign a parameter in a
CALL statement to the parameter in the corresponding DEFINE_CALL state-
ment.
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... These errors indicate that the device-channel or variable that is being refer-
enced by an OFF, ON, or TO keyword is out of range.
Bad re-assign Call... These errors occur when the Master Controller attempts to re-assign the
parameter variables in a DEFINE_CALL to the parameters in the correspond-
ing CALL statement, and the assignment cannot be made.
Bad run token This error occurs when the Master Controller does not understand a piece of
data in the program it is executing.
Bad Set_Length... 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.
Bad While This error occurs whenever a WHILE loop terminates due to the half-second
timeout imposed on WHILE loops.

96 NetLinx Studio v2.2


Working With Online Devices

Working With Online Devices


Connecting To a NetLinx Master
To connect to a NetLinx master, use the options in the Master Communication Settings and
Communication Settings dialogs to specify the TCP/IP address, serial port or modem settings,
depending on the transport connection type specified. These instructions in these topics assume that
the physical link between the PC running NetLinx Studio and the NetLinx master is established.

Connecting to a NetLinx Master via TCP/IP


To connect to a NetLinx master, use the options in the Master Communication Settings and
Communication Settings dialogs to specify the TCP/IP address, serial port or modem settings,
depending on the transport connection type specified. These instructions in these topics assume that
the physical link between the PC running NetLinx Studio and the NetLinx master is established.
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click Configure 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 Configure to open the TCP/IP Settings dialog.
6. Enter the TCP/IP Address of the master.

The Port should always be set to 1319 (default setting). Do not change the Port
assignment.

7. Click OK to return to the Communication Settings dialog.


8. Click OK to return to the Master Communication 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 window), click Display to
open the Online Tree sub-menu, and select Refresh Network to refresh the online tree display.
11. Double-click the System icon to expand the tree to show the NetLinx master.

Connecting to a NetLinx Master via Serial Port


To connect to a NetLinx master, use the options in the Master Communication Settings and
Communication Settings dialogs to specify the TCP/IP address, serial port or modem settings,
depending on the transport connection type specified. These instructions in these topics assume that
the physical link between the PC running NetLinx Studio and the NetLinx master is established.
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click Configure to access the Communication Settings dialog.
3. Select NetLinx Master as the Platform Selection.

NetLinx Studio v2.2 97


Working With Online Devices

4. Select Serial as the Transport Connection Option.


5. Click Configure to open the Serial Port Settings dialog.
6. Select a COM port and specify the communication settings for serial port communications.
The default settings are:

• Comm Port COM1


• Baud Rate 38400
• Data Bits 8
• Parity None
• Stop Bits 1
• Flow Control None

7. Click OK to return to the Communication Settings dialog.


8. Click OK to return to the Master Communication 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 window), click Display to
open the Online Tree sub-menu, and select Refresh Network to refresh the online tree display.
11. Double-click the System icon to expand the tree to show the NetLinx master.

Connecting to a NetLinx Master via Modem


To connect to a NetLinx master, use the options in the Master Communication Settings and
Communication Settings dialogs to specify the TCP/IP address, serial port or modem settings,
depending on the transport connection type specified. These instructions in these topics assume that
the physical link between the PC running NetLinx Studio and the NetLinx master is established.
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click Configure to access the Communication Settings dialog.
3. Select NetLinx Master as the Platform Selection.
4. Select Modem as the Transport Connection Option.
5. Click Configure to open the Modem Port Settings dialog.
6. Select a COM port and specify the communication settings for modem communications. The
default settings are:

• Comm Port COM1


• Baud Rate 38400
• Data Bits 8
• Parity None
• Stop Bits 1
• Flow Control None
• Phone Number Enter the telephone number of the master.

7. Click OK to return to the Communication Settings dialog.


8. Click OK to return to the Master Communication Settings dialog.

98 NetLinx Studio v2.2


Working With Online Devices

9. Click OK to close the Master Communications dialog.


10. In the online tree (displayed in the Online Tree tab of the Workspace window), click Display to
open the Online Tree sub-menu, and select Refresh Network to refresh the online tree display.
11. Double-click the System icon to expand the tree to show the NetLinx master.

Connecting To an AXCESS Master


To connect to an AXCESS master, use the options in the Master Communication Settings and
Communication Settings dialogs to specify the serial port or modem settings, depending on the
transport connection type specified. These instructions in these topics assume that the physical link
between the PC running NetLinx Studio and the AXCESS master is established.

Connecting to an AXCESS Master via Serial Port


To connect to an AXCESS master, use the options in the Master Communication Settings and
Communication Settings dialogs to specify the serial port or modem settings, depending on the
transport connection type specified. These instructions in these topics assume that the physical link
between the PC running NetLinx Studio and the AXCESS master is established.
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click Configure to access the Communication Settings dialog.
3. Select Axcess Master as the Platform Selection.
4. Select Serial as the Transport Connection Option.
5. Click Configure to open the Serial Port Settings dialog.
6. Select a COM port and specify the communication settings for serial port communications.
The default settings are:

• Comm Port COM1


• Baud Rate 38400
• Data Bits 8
• Parity None
• Stop Bits 1
• Flow Control None

7. Click OK to return to the Communication Settings dialog.


8. Click OK to return to the Master Communication 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 window), click Display to
open the Online Tree sub-menu, and select Refresh Network to refresh the online tree display.
11. Double-click the System icon to expand the tree to show the Axcess master.

NetLinx Studio v2.2 99


Working With Online Devices

Connecting to an AXCESS Master via Modem


To connect to an AXCESS master, use the options in the Master Communication Settings and
Communication Settings dialogs to specify serial port or modem settings, depending on the
transport connection type specified. These instructions in these topics assume that the physical link
between the PC running NetLinx Studio and the NetLinx master is established.
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click Configure to access the Communication Settings dialog.
3. Select Axcess Master as the Platform Selection.
4. Select Modem as the Transport Connection Option.
5. Click Configure to open the Modem Port Settings dialog.
6. Select a COM port and specify the communication settings for modem communications. The
default settings are:

• Comm Port COM1


• Baud Rate 38400
• Data Bits 8
• Parity None
• Stop Bits 1
• Flow Control None
• Phone Number Enter the telephone number of the master.

7. Click OK to return to the Communication Settings dialog.


8. Click OK to return to the Master Communication 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 window), click Display to
open the Online Tree sub-menu, and select Refresh Network to refresh the online tree display.
11. Double-click the System icon to expand the tree to show the Axcess master.

Viewing Online Devices and Ports


If you are connected to a System with online devices, you can view the online devices, device
properties, and device port properties in the Online Tree tab of the Workspace Window.
To view online devices:
1. If the Workspace Window 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.
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.

100 NetLinx Studio v2.2


Working With Online Devices

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.

Diagnostics
Using NetLinx Diagnostics
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.

Using NetLinx Device Notification


The NetLinx Device Notifications functionality in NetLinx Studio v2.x allows you to receive
several types of auto-notification messages from one or more specified NetLinx devices. Use the
NetLinx Device Notifications Options dialog (Diagnostics > NetLinx Device Notification
Options) to set auto-notification preferences for one or more NetLinx devices.
Select Enable NetLinx Notifications from the Diagnostics menu (or use the toolbar button) to
enable the specified NetLinx notifications. The resulting notification messages are displayed in the
Notifications tab of the Output Display window. The Notifications tab contains 13 columns. Each
column represents a notification type (which are enabled/disabled in the NetLinx Notification
Properties dialog). If a notification type is enabled, the word ON is displayed in the appropriate
column. Initially, the only entry in the notifications list is All Devices, and the only notification
enabled is Input.
The Enable Asynchronous Notifications option (in the NetLinx Device Notifications Options
dialog) allows you to view low-level strings of raw data used primarily for troubleshooting the
NetLinx master, including SEND_STRING results in the Diagnostics tab of the Output Window.
This option is primarily intended for use in conjunction with AMX Technical Support.

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.
2. Click Add to open the NetLinx Notification Properties (Add) dialog.
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.

NetLinx Studio v2.2 101


Working With Online Devices

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 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).
6. Repeat steps 2-5 to configure NetLinx Notifications for as many additional devices as is
necessary.

A very large amount of data may be generated if all options are enabled for every
device in a large System.

7. Click Close to save the changes and exit 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.

Editing Device Notification Settings


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 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.
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.

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.

102 NetLinx Studio v2.2


Working With Online Devices

Removing Devices From the Notifications 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 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.

NetLinx Device Emulation


Using NetLinx Device Emulation
Emulating a device in NetLinx Studio means that the program generates messages that appear to
the master to have come from a specified <D:P:S> combination (real or fictitious). The options in
the Emulate a Device dialog allow you to specify the <D:P:S> combination for a device you want
to emulate.
Use device emulation to simulate basic control of a specified NetLinx Master, including Channels
(PUSH/RELEASE), Levels and String/Commands. Use this option to test specific areas in your
Source Code against a specific device.
To use NetLinx Device Emulation:
1. Select Diagnostics > Emulate a Device (or click the toolbar button) to access the Emulate a
Device dialog.
2. Enter the Device, Port and System <D:P:S> combination of the device you wish to emulate
(real or fictitious). The Device, Port and System value ranges are 0-65535.
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>.
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:

NetLinx Studio v2.2 103


Working With Online Devices

Min Value Max Value


• CHAR 0 255
• INTEGER 0 65535
• SINTEGER -32768 32767
• LONG 0 429497295
• SLONG -2147483648 2147483647
• 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.
6. Check the Messaging Options checkboxes to Enable Asynchronous Notifications and/or
Enable Internal Diagnostic Messages.

It is recommended that you enable NetLinx Notifications to view the results in the
Notifications tab of the Output Display window. 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.

NetLinx Device Control


Using NetLinx Device Control
Controlling a device in NetLinx Studio means that it will appear to a specified System device that
messages are being sent from the NetLinx master controller. The options in the Control a Device
dialog allow you to specify the <D:P:S> combination for the target device you want to control.
Use device control to simulate basic control of a specified NetLinx device, including Channels
(PUSH/RELEASE), Levels and String/Commands. Use this option to test specific areas in your
Source Code against a specific device.
To use NetLinx Device Control:
1. Select Diagnostics > Control a Device (or click the toolbar button) to access the Control a
Device dialog.

104 NetLinx Studio v2.2


Working With Online Devices

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>.
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 contains the valid level data types and their ranges:

Min Value Max Value


• CHAR 0 255
• INTEGER 0 65535
• SINTEGER -32768 32767
• LONG 0 429497295
• SLONG -2147483648 2147483647
• 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.
6. Check the Messaging Options checkboxes to Enable Asynchronous Notifications and/or
Enable Internal Diagnostic Messages.

NetLinx Studio v2.2 105


Working With Online Devices

It is recommended that you enable NetLinx Notifications to view the results in the
Notifications tab of the Output Display window. 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.

NetLinx Device Addressing


Use the Device Addressing dialog to change the Device and System assignments for a specified
NetLinx device, or to change a NetLinx Master's System number. Select Device Addressing from
the Diagnostics menu, the Online Device context menu, or click the toolbar button to access this
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.

Changing the Device/System Address on a NetLinx Device


Select Device Addressing from the Diagnostics menu, the Online Device context menu, or click
the toolbar button to access the Device Addressing dialog, which allows you to change the Device
and/or System Address for a NetLinx system device:
1. Enter the target device's current Device number in the (Device to Change) Device text box.
2. Click the Change Device checkbox and enter the new Device number in the New Device text
box.
3. Enter the target device's current System number in the (System to Change) System text box.
4. Click the Change System checkbox and enter the new System number in the New System text
box.
5. Click the Change Device/System Number command button to set the new address
information for the specified device.
6. The master must be rebooted to accept the new System number assignment. To reboot the
master, click Reboot Master checkbox located in the Reboot column of the File Transfer
dialog. Allow the master 20-30 seconds to reboot.
Alternatively, you can use the ID 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.

106 NetLinx Studio v2.2


Working With Online Devices

Restoring the Default Device and System Numbers on a NetLinx Device


Use the Device Addressing dialog to restore the default Device and System numbers on a NetLinx
device:
1. Select the target device/system in the Online Device Tree.
2. Click the Set Device/System to Factory Default button.

Using ID Mode to Change the Device Address on a NetLinx Device


The ID Mode section of the Device Addressing dialog allows you to place the program in ID
(Identity) mode. This is useful when the current address assignments are unknown.
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.

Use ID Mode when you don't know the current address assignments.

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 Waiting…Press Cancel to Quit message. The Start Identify
Mode button changes to Cancel Identify Mode (click to cancel ID Mode).
4. 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.


5. 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.

NetLinx Studio v2.2 107


Working With Online Devices

URL Lists
Creating a URL List
Use the URL Listing dialog to create a URL List for the specified master. The URL List identifies
all NetLinx Masters present in the same System as the Master that you are connected to.
You must enter a URL for each master in the System before you can use ID Mode on other masters.

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).

To create 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 Master to the URL List, click Add. This opens the Add URL dialog.
4. Enter the web address (URL or IP Address) of the NetLinx Master in the URL text box and
click OK to return to the URL List dialog.

If you enter a valid URL for a Master, 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 Masters as are required.

To retrieve a list of all URL's in the list, click Get URL 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.

108 NetLinx Studio v2.2


Working With Online Devices

Network Addressing
Use the options in the Networking Addresses dialog to change the network settings for a specified
NetLinx master.

Changing the System Number on a NetLinx Master


Use the System field in the Network Addresses dialog to change the System number for the
connected Master:
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, specify a new System number in the System text box.
3. Click the Reboot Master button to reboot the master and accept the new changes. Allow 20-30
seconds for the master to reboot.

Changing the IP Address on a NetLinx Device Using DHCP


Use the IP Address options in the Network Addresses dialog to change the IP Address for a
specified NetLinx Device (using DHCP):
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, enter the specified device's System and Device numbers in the text
boxes. The range is 0-65535.
3. Click the Get IP Information button to populate the IP Address fields with the current Host
Name and Gateway assignments.
4. Click the Use DHCP radio button, 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 the Reboot Master button to reboot the master and accept the new changes. Allow 20-30
seconds for the master to reboot.

When you change the IP Address of a master (if connected via IP), you must also
change the communication settings to match the new IP Address in the Master
Communications Settings dialog.

Setting the DNS Address for a NetLinx Master


1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. Enter the specified device's System and Device values in the text boxes at the top of the dialog
(ranges = 0-65535).

NXI masters are always set to Device = 0.

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).

NetLinx Studio v2.2 109


Working With Online Devices

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.

Setting the IP Address for a NetLinx Master


1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, enter the specified device's System and Device numbers in the text
boxes (range = 0-65535).

NXI masters are always set to Device = 0.

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.

Changing the IP Address on a NetLinx Master (Use DHCP)


Use the options in the Network Addresses dialog to change the IP Address for a specified NetLinx
device (using DHCP).
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, enter the specified device's System and Device numbers in the text
boxes. The range is 0-65535.

NXI Masters are always set to Device = 0.

3. Click the Get IP Information button to populate the IP Address fields with the current Host
Name and Gateway assignments.
4. Click the Use DHCP radio button, and enter the new Host Name in the text box, if necessary.
5. Click the Set IP Information button to set the new Host Name assignment. A message will be
displayed indicating that the Master has accepted the new settings.
6. Click the Reboot Master button to reboot the Master and accept the new changes. Allow 20-
30 seconds for the Master to reboot.

If you change the IP Address of a Master (if connected via IP), you must also change
the communication settings to match the new IP Address (in the Communication
Setting dialog).

110 NetLinx Studio v2.2


Working With Online Devices

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.
2. Enter the specified master's System number in the System text box at the top of the dialog. The
range is 0-65535.

NXI Masters are always set to Device = 0.

3. Click the Get IP Information button 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 the Set IP Information button to set the new IP Address assignment. A message will be
displayed indicating that the Master has accepted the new settings.
6. Click the Reboot Master button to reboot the Master and accept the new changes. Allow 20-
30 seconds for the Master to reboot.

If you change the IP Address of a Master (if connected via IP), you must also change
the communication settings to match the new IP Address (in the Master
Communication Setting dialog).

Setting NetLinx Time and Date


Select Tools > Set Master Controller's Date/Time to open the Set Master Controller's Date/Time
dialog. Use the options in this dialog to set the time and date for a specified 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.
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.

NetLinx Studio v2.2 111


Working With Online Devices

112 NetLinx Studio v2.2


NetLinx Diagnostics

NetLinx Diagnostics
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.

Using NetLinx Device Notification


The NetLinx Device Notifications functionality in NetLinx Studio v2.x allows you to receive
several types of auto-notification messages from one or more specified NetLinx devices. Use the
NetLinx Device Notifications Options dialog (Diagnostics > NetLinx Device Notification
Options) to set auto-notification preferences for one or more NetLinx devices.
Select Enable NetLinx Device Notifications from the Diagnostics menu (or use the toolbar
button) to enable the specified NetLinx notifications. The resulting notification messages are
displayed in the Notifications tab of the Output Display window. The Notifications tab contains 13
columns. Each column represents a notification type (which are enabled/disabled in the NetLinx
Notification Properties dialog). If a notification type is enabled, the word ON is displayed in the
appropriate column.
Initially, the only entry in the notifications list is All Devices, and the only notification enabled is
Input.
Select the Enable Asynchronous Notifications option (in the NetLinx Device Notifications
Options dialog) to enable the NetLinx Notifications.

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.
2. Click Add to open the NetLinx Notification Properties (Add) dialog.
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

NetLinx Studio v2.2 113


NetLinx Diagnostics

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).
6. Repeat steps 2-5 to configure NetLinx Notifications for as many additional devices as
necessary.

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.
7. Click Done to save the changes and exit the NetLinx Device Notifications Options dialog.

Editing Device Notification Settings


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 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.
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.
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.
4. Click OK to close the NetLinx Notification Properties - (Edit) dialog and return to the NetLinx
Device Notifications Options dialog. The new notification options are indicated (as ON) in the
notifications list.

Removing Devices From the Notifications 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 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.

114 NetLinx Studio v2.2


NetLinx Diagnostics

Viewing Push Results


The PUSH keyword is used to find out if a channel has had an input change from off to on, such as
when a button is pressed. If the channel has been turned on, the corresponding Push statement is
activated. The operation or operations following this Push statement are only executed once after
the channel is turned on.
To view Push results, select Diagnostics > Enable Push Message Status Bar Display.
NetLinx Studio displays the most recently received Push, or Push status (Push Enabled/Disabled)
in the Status Bar. 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.

Using NetLinx Device Emulation


Emulating a device in NetLinx Studio means that the program generates messages that appear to
the master to have come from a specified <D:P:S> combination (real or fictitious).
The options in the Emulate a Device dialog allow you to specify the <D:P:S> combination for a
device you want to emulate.
Use device emulation to simulate basic control of a specified NetLinx Master, including Channels
(PUSH/RELEASE), Levels and String/Commands. Use this option to test specific areas in your
Source Code against a specific device.
To use NetLinx Device Emulation:
1. Select Diagnostics > Emulate a Device (or click the toolbar button) to access the Emulate a
Device dialog.
2. Enter the Device, Port and System <D:P:S> combination of the device you wish to emulate
(real or fictitious). The Device, Port and System value ranges are 0-65535.
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>.
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 contains the valid level data types and their ranges:

NetLinx Studio v2.2 115


NetLinx Diagnostics

Min Value Max Value


• CHAR 0 255
• INTEGER 0 65535
• SINTEGER -32768 32767
• LONG 0 429497295
• SLONG -2147483648 2147483647
• 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.

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
6. Check the Messaging Options checkboxes to Enable Asynchronous Notifications and/or
Enable Internal Diagnostic Messages.

It is recommended that you enable NetLinx Notifications to view the results in the
Notifications tab of the Output Display window. 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.

Using NetLinx Device Control


Controlling a device in NetLinx Studio means that it will appear to a specified System device that
messages are being sent from the NetLinx master controller. The options in the Control a Device
dialog allow you to specify the <D:P:S> combination for the target device you want to control.
Use device control to simulate basic control of a specified NetLinx device, including Channels
(PUSH/RELEASE), Levels and String/Commands. Use this option to test specific areas in your
Source Code against a specific device.
To use NetLinx Device Control:
1. Select Diagnostics > Control a Device (or click the toolbar button) to access the Control a
Device dialog.
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.

116 NetLinx Studio v2.2


NetLinx 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)
messages for the specified <D:P:S>.
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 contains the valid level data types and their ranges:

Min Value Max Value


• CHAR 0 255
• INTEGER 0 65535
• SINTEGER -32768 32767
• LONG 0 429497295
• SLONG -2147483648 2147483647
• 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.
6. Check the Messaging Options checkboxes to Enable Asynchronous Notifications and/or
Enable Internal Diagnostic Messages.

It is recommended that you enable NetLinx Notifications to view the results in the
Notifications tab of the Output Display window. 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.

NetLinx Studio v2.2 117


NetLinx Diagnostics

NetLinx Device Addressing


Use the Device Addressing dialog to change the Device and System assignments for a specified
NetLinx device, or to change a NetLinx Master’s System number. Select Device Addressing from
the Diagnostics menu, the Online Device context menu, or click the toolbar button to access this
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.

Changing the Device/System Address on a NetLinx Device


Select Device Addressing from the Diagnostics menu, the Online Device context menu, or click the
toolbar button to access the Device Addressing dialog, which allows you to change the Device and/
or System Address for a NetLinx system device:
1. Enter the target device’s current Device number in the (Device to Change) Device text box.
2. Click the Change Device checkbox and enter the new Device number in the New Device text
box.
3. Enter the target device’s current System number in the (System to Change) System text box.
4. Click the Change System checkbox and enter the new System number in the New System text
box.
5. Click the Change Device/System Number command button to set the new address
information for the specified device.
6. 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.

Restoring the Default Device and System Numbers on a NetLinx Device


Use the Device Addressing dialog to restore the default Device and System numbers on a NetLinx
device:
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.

118 NetLinx Studio v2.2


NetLinx Diagnostics

Using ID Mode to Change the Device Address on a NetLinx Device


The ID Mode section of the Device Addressing dialog allows you to place the program in ID
(Identify) mode. This is useful when the current address assignments are unknown.
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.
Use the ID Mode options in the Device Addressing dialog to set or change the Device Address
(Device and System ID numbers) for a NetLinx device:
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 Waiting…Press Cancel to Quit message. The Start Identify Mode
button changes to Cancel Identify Mode (click to cancel ID Mode).
4. 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.


5. 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.

Network Addressing
Use the options in the Networking Addresses dialog to change the network settings for a specified
NetLinx master.

Changing the System Number on a NetLinx Master


Use the System field in the Network Addresses dialog to change the System number for the
connected Master:
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, specify a new System number in the System text box.
3. Click the Reboot Master button to reboot the master and accept the new changes. Allow 20-30
seconds for the master to reboot.

NetLinx Studio v2.2 119


NetLinx Diagnostics

Changing the IP Address on a NetLinx Device Using DHCP


Use the IP Address options in the Network Addresses dialog to change the IP Address for a
specified NetLinx Device (using DHCP):
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, enter the specified device’s System and Device numbers in the text
boxes. The range is 0-65535.
3. Click the Get IP Information button to populate the IP Address fields with the current Host
Name and Gateway assignments.
4. Click the Use DHCP radio button, 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 the Reboot Master button to reboot the master and accept the new changes. Allow 20-30
seconds for the master to reboot.

When you change the IP Address of a master (if connected via IP), you must also
change the communication settings to match the new IP Address in the Master
Communications Settings dialog.

Setting the DNS Address for a NetLinx Master


1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. Enter the specified device’s System and Device values in the text boxes at the top of the dialog
(ranges = 0-65535).

NXI masters are always set to Device = 0.

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.

Setting the IP Address for a NetLinx Master


1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, enter the specified device’s System and Device numbers in the text
boxes (range = 0-65535).

NXI masters are always set to Device = 0.

120 NetLinx Studio v2.2


NetLinx Diagnostics

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.

Changing the IP Address on a NetLinx Master (Use DHCP)


Use the options in the Network Addresses dialog to change the IP Address for a specified NetLinx
device (using DHCP).
1. Select Diagnostics > Network Addresses (or click the toolbar button) to access the Network
Addresses dialog.
2. At the top of the dialog, enter the specified device’s System and Device numbers in the text
boxes. The range is 0-65535.

NXI Masters are always set to Device = 0.

3. Click the Get IP Information button to populate the IP Address fields with the current Host
Name and Gateway assignments.
4. Click the Use DHCP radio button, and enter the new Host Name in the text box, if necessary.
5. Click the Set IP Information button to set the new Host Name assignment. A message will be
displayed indicating that the Master has accepted the new settings.
6. Click the Reboot Master button to reboot the Master and accept the new changes. Allow 20-
30 seconds for the Master to reboot.

If you change the IP Address of a Master (if connected via IP), you must also change
the communication settings to match the new IP Address (in the Communication
Setting dialog.

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.
2. Enter the specified master’s System number in the System text box at the top of the dialog. The
range is 0-65535.

NXI Masters are always set to Device = 0.

3. Click the Get IP Information button to populate the IP Address fields with the current Host
Name, IP Address, Subnet Mask and Gateway assignments.

NetLinx Studio v2.2 121


NetLinx Diagnostics

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 the Set IP Information button to set the new IP Address assignment. A message will be
displayed indicating that the Master has accepted the new settings.
6. Click the Reboot Master button to reboot the Master and accept the new changes. Allow 20-
30 seconds for the Master to reboot.

If you change the IP Address of a Master (if connected via IP), you must also change
the communication settings to match the new IP Address (in the Master
Communication Setting dialog).

Setting NetLinx Time and Date


Select Tools > Set Master Controller's Date/Time to open the Set Master Controller's Date/Time
dialog. Use the options in this dialog to set the time and date for a specified 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.
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.

Checking the Port Status On an Online Device


To check the status of the ports on a device listed in the Online Device Tree:
1. In the Online Tree tab of the Workspace Window, double-click on an online device to expand
the device folder.
2. Select a Port and right-click to open the Online Tree context menu.
3. Select Check Port Status.
4. The status of the selected Port is listed in the Status tab of the Output Display Window.

122 NetLinx Studio v2.2


Device Mapping

Device Mapping
NetLinx Studio makes it easy to map System files to devices on the bus for file transfer operations:
1. Select and open the Project containing the file to be mapped to a device (in the Workspace tab
of the Workspace Window).
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.

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).

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 Window.
The file mapping information is saved with the 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.

NetLinx Studio v2.2 123


Device Mapping

To Remove Device Mapping Information from a File


1. Select a device-mapping icon in the File View window.
2. Click the Remove button.

Device Mapping dialog


The Device Mapping dialog allows you to map files to System devices for file transfers. To access
the Device Mapping dialog, select a System (in the Workspace tab of the Workspace Window) and
select Project > Device Mapping. Alternatively, you can access the Device Mapping command via
the Device Mapping command in the Source File, User Interface, and IR File context menus, or use
the toolbar button.
The Device Mapping dialog consists of two windows. The File View window (on the left) presents
a view of the Projects, Systems and System Files contained in the open Workspace file, in a tree
structure similar to the one displayed in the Workspace tab of the Workspace Window.

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 will prompt you to enter the D:P:S
assignment of the device you want to map to.

Files can be mapped to 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 Window.
The file mapping information is saved with the 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.

124 NetLinx Studio v2.2


Device Mapping

System File Device Map context menu


Right click on a Device Mapping icon (in the Workspace tab of the Workspace Window) to access
the System File Device Map context menu:

• Device Mapping Opens the Device Mapping dialog for mapping files to System devices.
• Delete Removes the selected file's device-file mapping association.

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 // device number
INTEGER Port // port on device
INTEGER System // system device belongs to
}

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.

NetLinx Studio v2.2 125


Device Mapping

126 NetLinx Studio v2.2


Communication Settings

Communication Settings
Communication Settings
Use the options in the Master Communication Settings dialog to set the communication settings for
connecting to a NetLinx or Axcess master controller.

A connection can be made to a NetLinx master controller via TCP/IP, serial-RS232 or a


modem.

A connection can be made to a Axcess master controller via serial-RS232 or a modem.

Configuring the Default Communications Settings


The Master Communication Settings dialog contains options that allow you to specify 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.
To set the default communication settings:
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click to select the first item in the Available System(s) list.
3. Click the Communication Settings button to access the Communication Settings dialog.
4. Select the default platform (NetLinx or Axcess).
5. Select a transport connection type (TCP/IP, Serial or Modem).

TCP/IP is only available if NetLinx is selected as the platform.

6. Click Settings to open either the TCP/IP Settings, Serial Settings or Modem Settings dialog
(depending on the transport connection selected).
7. Specify the communication settings for the selected port.

For TCP/IP connections: Set the TCP/IP address.

For serial ports: Specify the COM port, and set baud rate, data bits, parity, stop bits and
flow control.

For modems: Specify the COM port, and set baud rate, data bits, parity, stop bits, flow
control and target phone number.

The default settings for Serial and Modem ports are:

• Com Port: COM1


• Baud Rate: 38400
• Data Bits: 8
• Parity: None
• Stop Bits: 1
• Flow Control: None

NetLinx Studio v2.2 127


Communication Settings

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.

8. Click OK to close the Communication Settings dialog.


9. Click OK to close the Master Communication Settings dialog.

Configuring System-Level Communications Settings


The Master Communication Settings dialog contains options that allow you to specify System-level
communication settings. Each System can have its own dedicated communication settings. These
System-level settings override the default communications settings.
To set System-level communication settings:
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.
4. Select the default platform (NetLinx or Axcess).
5. Select a transport connection type (TCP/IP, Serial or Modem).

TCP/IP is only available if NetLinx was selected as the platform.

6. Click Settings to open either the TCP/IP Settings, Serial Settings or Modem Settings dialog
(depending on the transport connection selected).
7. Specify the communications settings for the selected port.

For TCP/IP connections, set the TCP/IP address.

For serial ports, specify the COM port, and set baud, data bits, parity, stop bits and flow
control.

For modems, specify the COM port, and set baud, data bits, parity, stop bits, flow control
and target phone number.

The default settings for Serial and Modem ports are::

• Com Port COM1


• Baud Rate 38400
• Data Bits 8
• Parity None
• Stop Bits 1
• Flow Control None

128 NetLinx Studio v2.2


Communication Settings

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.

8. Click OK to close the Communication Settings dialog.


9. 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 Window, 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.

Configuring Terminal Communications Settings


The Terminal window has it’s own dedicated communications settings. Use the options in the
Master Communication Settings dialog to specify communication settings for the Terminal
window:
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Click to select the second item in the Available System(s) list (labeled <Terminal Settings>).
3. Click the Communication Settings button to access the Communication Settings dialog.
4. Select the default platform (NetLinx or Axcess).
5. Select a transport connection type (Serial or Modem).
6. Click Settings to open either the Serial Settings or Modem Settings dialog (depending on the
transport connection selected).
7. Specify the communications settings for the selected port.

For serial ports, specify the COM port, and set baud, data bits, parity, stop bits and flow
control.

For modems, specify the COM port, and set baud, data bits, parity, stop bits, flow control
and target phone number.

The default settings for Serial and Modem ports are:

• Com Port: COM1


• Baud Rate: 38400
• Data Bits: 8
• Parity: None
• Stop Bits: 1
• Flow Control: None

NetLinx Studio v2.2 129


Communication Settings

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.

8. Click OK to close the Communication Settings dialog.


9. Click OK to close the Master Communication Settings dialog.

Tested Modems List


The following is a list of internal and external modems that have been tested with the program.

Internal Modems Windows Operating System


Manufacturer Model - Internal 95 98 ME NT 2000 XP
Diamond Supra 336i SP ASVD ? C ? ? ? ?
Diamond Supra 56i SP ? C ? ? ? ?
Lucent 56K LU PCI ? C ? C ? ?
US Robotics 56k Fax PCI #3CP5610A ? C ? C ? ?
US Robotics Sportster WinModem - #0467 ? X ? ? ? ?
Zoom Fax 28.8 v.341 #275 ? C ? ? ? ?
Note: Internal modes were tested only for calling capabilities.
External Modems Windows Operating System
Manufacturer Model - External 95 98 ME NT 2000 XP
Boca 14.4 V.32b #MV.34xx X X X X X X
Hayes Accura 56k #03328-A ? C C C C ?
Hayes Accura 144+Fax 144 #5300AM X X X C X X
MultiTech MultiModem 19.2k Data/Fax ? X ? A A ?
Practical PM288MT II v.34 - 28K ? C< ? ? X ?
Peripherals
US Robotics 56k Fax v.90 #USR5686D ? CA ? CA CA ?
US Robotics Sportster56k Fax #USR5686-03 CA CA CA CA CA ?
US Robotics Sportster 33.6 - #0413 ? ? ? CA ? ?
US Robotics Sportster 14.4 Fax CJE-0235 ? ? ? ? ? ?
Zoom Fax 56kx Dualmode #2949L ? CA C CA C ?

C = Call - means that the FileTransfer program can get the modem to call another modem
and establish communications.

A = Answer - means that the FileTransfer program can get the modem to answer inbound
calls and establish communications with the master controller.

X = Not supported.

< = Less 100% reliable.

130 NetLinx Studio v2.2


File Transfer Operations

File Transfer Operations


NetLinx Studio supports asynchronous communications, on up to ten communications ports
(COM1-COM8, and Network). This allows you send and receive to and from the bus on all
available communications ports. You can send and receive both Axcess and NetLinx Source Code
files to and from the appropriate Master Controller or bus device.

Axcess or NetLinx Source Code files (.AXS) can be sent to the Master Controller, or
other control devices on the bus. Source code files must be successfully compiled before
they can be sent.

Touch Panel UI files created in TPDesign3 (.TPD) are sent directly to wired Touch Panels
on the bus via an AXlink/serial connection where the Device ID = 0.

Touch Panel UI files created in TPDesign4 (.TP4) are sent to the Master, either serially or
over TCP/IP. G4 panels are connected to the Masters via TCP/IP and cannot be sent over
AXlink. You can choose to include buttons and pages only, or include fonts, bitmaps and/
or icons in the transfer.

KeyPad UI files (.KPD) created in KPDesign are sent to a NetLinx Master.

IR library files (.IRL/.IRV) are sent to IR-controlled devices on the bus, or directly to a
System device (i.e. ViewPoint Touch Panels).
The File Transfer dialog provides an easy to understand approach to file transfer while still
providing a high level of flexibility.

Sending Workspace Files to the Master Controller or


System Device
Use the Send tab of the File Transfers dialog to send files contained in the currently open
Workspace to the Master, or System devices on the bus. The Send tab consists of the Files To Send
table, and the File Transfer command buttons. All files must mapped to devices before they can be
selected for transfer.

Source Code files cannot be sent until they have been successfully compiled.

In order for NetLinx Debugging to work, both the source (SRC) and token (TKO) files
must be successfully sent to the Master. Always use the Compile With Debug Info and
Build With Source options (Preferences dialog - NetLinx Compiler Options tab) to
compile NetLinx code files that allow debugging.

While Touch Panel UI files are sent to the panels themselves, Keypad UI files are sent to
the master and not directly to the keypad. Before sending a KPDesign (KPD) file to the
target keypad(s), be sure that you have successfully compiled the Source Code file that
contains the keypad module, and sent it to the Master (see Configuring NetLinx Source
Code for KPD Files).
To send Workspace files to the Master or to a System device, you will first add the file(s) you want
to send to the Files to Send table:

NetLinx Studio v2.2 131


File Transfer Operations

1. Select Tools > File Transfers (or click the toolbar button) to access the File Transfers dialog
(already opened to the Send tab).
2. Click the Add button to add the Workspace file(s) you want to send to the Files To Send table.
This opens the Select Files for File Transfer dialog (Current Workspace tab), containing a
display of all Projects, Systems and associated System files in a tree structure, similar to that of
the Workspace tab of the Workspace Window. The mapping information for each file is also
indicated in this display (files that have not yet been mapped to a device are labeled as Not
Mapped).
3. Select the Workspace System file(s) that you want to add to the Files to Send table:

You can only select files with device-mapping information. You can always edit the
file's mapping information later via the File Transfer dialog, but without any mapping
information associated with the file, it cannot be selected (since the selection
checkboxes are not provided). Since each file has its own device-mapping
association, you can add all of the System files in a Workspace, and send them all to
their individual target devices with the Send command in the File Transfer dialog.

To add all of the (mapped) System files (contained in the open Workspace) to the Files To
Send table, select the Projects directory at the top of the tree structure. This selection
automatically selects all Projects in the Workspace, their contained Systems, and
(transferrable) System files.

To add all of the (mapped) System files contained in a particular Project, select the
desired Project directory. This automatically selects all of the Systems contained in the
selected Project, and all (transferrable) System files.

To add all of the (mapped) files contained in a particular System, select the desired
System directory to automatically selected all transferrable files in that System.

Select individual System files to add as desired.


4. Click OK to return to the File Transfer dialog (Send tab) - the selected files appear in the Files
To Send table.

The checkbox to the left of each file in the Files To Send table indicates wether the file is
selected to be included in the transfer. By default, the checkbox is selected when a file is
added to the list. Deselect this checkbox to exclude the file from the transfer.

To rearrange the files in the list, select a file and use the Up and Down command buttons,
as desired. If a file is already at the top of the list, selecting the Up button will "wrap" the
item to the bottom of the list. The opposite is true for the Down button.

To remove a file from the list, select a file and click the Remove command button.

To edit the communication and/or mapping information for a file, select a file and click
the Edit command button. This opens the File Transfers Edit sub-menu:

• Communication Opens the Communication Settings dialog, where you can edit the Platform,
Settings Transport Connection type and Communication Settings for the selected file.
Alternatively, you can double-click in the Connection column to access the
Communication Settings dialog.

132 NetLinx Studio v2.2


File Transfer Operations

• Device Opens the Enter DPS dialog, where you can edit the D:P:S assignment for the
Mapping selected file. Alternatively, you can double-click in the Mapping column to
access the Enter DPS Settings dialog.
In Axcess, Master Source Code files are always mapped to the Master Control-
ler (device = 0). Master Source Code files cannot be mapped to any other
device. NetLinx Master Source Code files are mapped according to the System
settings when the Project was created. The only way to modify these settings is
via the System Properties dialog.
Also, when sending TPD files directly to a Touch Panel (i.e. via serial cable con-
nection), the device = 0.
• Options This option is only available if you have selected a TPD or TP4 touch panel UI
file.
If you have selected a TPD (TPdesign3) file, this option opens the TPD Transfer
Options dialog, where you can select which parts of the TPD file to include
when the file is sent (the options are Bitmaps, Fonts and Icons - by default they
are all selected).
If you have selected a TP4 (TPDesign4) file, this option opens the TP4 Transfer
Options dialog, where you can select to enable Smart Transfer. Smart Transfer
automatically optimizes the transfer by identifying the various components
(fonts, bitmaps, sound files, even pages and popup pages) of the selected
panel file, and comparing them to the elements already present on the target
panel. Any shared components are not sent, resulting in a much faster transfer
(assuming that there are shared components).

When sending a TP4 file to a G4 panel, verify that the NetLinx Master Firmware is
build 85 or later. Verify the TPDesign4 program being used is Version 1.01 or higher.
Earlier versions of the firmware and TPD4 software are incompatible with G4 panels.

5. Click the Send command button to send the files, in the order that they are arranged in the
queue.

By default, the Reboot option (indicated by checkboxes in the Reboot column of the
Files To Send table) is enabled (for Workspace files only), so that the System Master will
automatically reboot after the transfer is complete.

The Reboot option always reboots the Master, regardless of the device mapping
associated with the file itself. For example, TPD/TP4 files are transferred directly to
the panel, but the Reboot option will reboot the Master - not the panel that received
the file.

The progress of each file transfer is indicated in the File Transfer Status tab of the Output
Display Window. This tab also lists the file’s communications port assignment, transfer
status (pending, failed, in progress, complete, or cancelled), filename, type (send or
receive), errors, date received, and other data on the transfer. The file will sent as soon as
the specified communications port is available.

When a file is in the process of being sent, it cannot be re-compiled. If you need to re-
compile a file that is being sent, cancel the file transfer first, re-compile and re-submit
for transfer.

NetLinx Studio v2.2 133


File Transfer Operations

Sending Other Files to the Master Controller or System


Device
Use the Send tab of the File Transfers dialog to send files that are not associated with a System to
the Master or to System devices on the bus. The Send tab consists of the Files To Send table, and
the File Transfer command buttons. All files must mapped to devices before they can be selected
for transfer.

Source Code files cannot be sent until they have been successfully compiled.

In order for NetLinx Debugging to work, both the source (SRC) and token (TKO) files
must be successfully sent to the Master. Always use the Compile With Debug Info and
Build With Source options (Preferences dialog - NetLinx Compiler Options tab) to
compile NetLinx code files that allow debugging.

While Touch Panel UI files are downloaded to the panels themselves, KPDesign (KPD)
files are sent to the master and not directly to the keypad. Before sending a KPD file to
the target keypad(s), be sure that you have successfully compiled the Source Code file
that contains the keypad module, and sent it to the Master (see the Configuring NetLinx
Source Code for KPD Files section on page 60).
To send files that are not associated with a System to the Master or to a System device, you will first
add the file(s) you want to send to the Files to Send table:
1. Select Tools > File Transfers (or click the toolbar button) to access the File Transfers dialog
(already opened to the Send tab).
2. Click the Add button to add the file(s) you want to send to the Files To Send table. This opens
the Select Files for File Transfer dialog. click on the Other tab.
3. The Other tab contains a set of icons representing the different types of files that can be
transferred (IR Codes, Touch Panel Design File, NetLinx Source Code, Compiled NetLinx
Source Code, Compiled Axcess Source Code, TP4 Touch Panel Design File, and KPD Keypad
Touch File). Select the type of file you want to add to the Files to Send list, and click the Add
button.
4. Locate and select the desired file(s) via the Open dialog. Click Open to return to the Select
Files For File Transfer dialog (Other tab). Before the file(s) are opened, the program prompts
you to specify device-mapping for each file, via the Enter Device Information dialog. Once a
D:P:S assignment (for the intended target device for each file) has been specified, the selected
file(s) appear in the File list at the bottom of this tab.
5. Click OK to return to the File Transfer dialog (Send tab) - the selected files appear in the Files
To Send table.

The checkbox to the left of each file in the Files To Send table indicates wether the file is
selected to be included in the transfer. By default, the checkbox is selected when a file is
added to the list. Deselect this checkbox to exclude the file from the transfer.

To rearrange the files in the list, select a file and use the Up and Down command buttons
as desired.

To remove a file from the list, select a file and click the Remove command button.

134 NetLinx Studio v2.2


File Transfer Operations

To edit the communication and/or mapping information for a file, select a file and click
the Edit command button. This opens the File Transfers Edit sub-menu (described in the
previous section, Sending Workspace Files to the Master Controller or System Device.
6. Click the Send command button to send the files, in the order that they are arranged in the
queue.

The progress of each file transfer is indicated in the File Transfer Status tab of the Output
Display Window. This tab also lists the file’s communications port assignment, transfer
status (pending, failed, in progress, complete, or cancelled), filename, type (send or
receive), errors, date received, and other data on the transfer. The file will sent as soon as
the specified communications port is available.

When a file is in the process of being sent, it cannot be re-compiled. If you need to re-
compile a file that is being sent, cancel the file transfer first, re-compile and re-submit
for transfer.

Receiving Files from the Master Controller or System


Device
Use the Receive tab of the File Transfer dialog to receive files that reside in the Master, or System
devices on the bus, for editing. The Receive tab consists of the Files To Receive table, and the File
Transfer command buttons. To receive files, you will add a new (blank) file to the Files to Receive
table, and apply a name.
The name you specify here will be applied to the file once it is received from the device specified.
All files must mapped to devices before they can be selected for transfer.

Source Code files can only be received from a device if the Build With Source option
(Preferences dialog - Axcess and NetLinx Compiler Options tabs) was selected when
the file was compiled, prior to transfer.

To receive files from the Master or System device, you will first add the file(s) you want to receive
to the Files to Receive table:
1. Select Tools > File Transfer (or click the toolbar button) to access the File Transfer dialog,
and open the Receive tab.
2. Click the Add button to access the Select Files for File Transfer dialog (Other tab). This dialog
contains a set of icons representing the various types of files that can be received from the
Master or System device (IR Codes, Touch Panel Design File, NetLinx Source Code File ,
Axcess Source Code File and TP4 Touch Panel Design File). Select the type of file you want to
receive, and click the Add button.

IR files cannot be received from Axcess devices. Even if the device is connected
through a Netlinx Master, if it's an Axcess device you can't receive IR files.

3. In the Save As dialog, enter a name for the received file, or select an existing file to replace
with the received file, and click Save to return to the Select Files For File Transfer dialog
(Other tab).

NetLinx Studio v2.2 135


File Transfer Operations

4. Specify a source device for each file, via the Enter Device Information dialog. Once a D:P:S
assignment has been specified for each file, the selected file(s) appear in the file list at the
bottom of the Select Files for File Transfer dialog.
5. Click OK to return to the File Transfer dialog (Receive tab) - the selected files appear in the
Files To Receive table.

The checkbox to the left of each file in the Files To Receive table indicates wether the file
is selected to be included in the transfer. By default, the checkbox is selected when a file
is added to the list. Deselect this checkbox to exclude the file from the transfer.

To rearrange the files in the list, select a file and use the Up and Down command buttons
as desired.

To remove a file from the list, select a file and click the Remove command button.

To edit the communication and/or mapping information for a file, select a file and click
the Edit command button. This opens the File Transfer Edit sub-menu:

• Connection Opens the Communication Settings dialog, where you can edit the Platform, Trans-
port Connection type and Communication Settings for the selected file. Alterna-
tively, you can double-click in the Connection column to access the Communication
Settings dialog.
• Mapping Opens the Enter DPS dialog, where you can edit the D:P:S assignment for the
selected file. Alternatively, you can double-click in the Mapping column to access
the Enter DPS dialog.

Right-click on any file in the list to access the File Transfer context menu.
6. Click the Receive command button to receive the files, in the order that they are arranged n the
queue. The progress of each file transfer is indicated in the File Transfer tab of the Output
Display window. This tab also lists the file's communication port assignment, transfer status
(pending, failed, in progress, complete or cancelled), filename, transfer type (send or receive),
errors, date received, and other data on the transfer.

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 Display window:

• Type The type of transfer (sending or receiving).


• Status The current state of the transfer (Pending, Transferring, Complete or Failed).
• Connection The communications settings used to establish communication with the tar-
get device.
• Mapping 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.
• File The name and extension of the file being transferred.
• Path The full path of the file being transferred.
• Bytes Transferred The number of bytes transferred, and the total number of bytes left to trans-
fer.
• Error An error message if an error has occurred.
• Last Transfer The time and date of the last transfer.

136 NetLinx Studio v2.2


File Transfer Operations

Removing Inactive File Transfer Requests


Inactive file transfer requests are any file transfer requests that are not labeled In Progress. These
are files that have been submitted for transfer and the transfer operation has either not yet begun, or
has terminated (completed, cancelled or failed). Inactive file transfer requests can be removed via
the File Transfer Status tab context menu:
1. Select one or more inactive file transfer requests in the Output Display window (File Transfer
Status tab).
2. Right-click in the File Transfer Status tab to open the Output Display Window context menu.
3. Click Cancel Transfer.

Canceling Transfers
A file transfer may be cancelled by right-clicking on the item in the Output Display Window - File
Transfer Status tab and selecting Cancel Current Transfer from the context menu. Canceling an
item that is not currently transferring removes it from the transfer queue.

Canceling during a file transfer may leave the target device in an unstable state.

Exiting NetLinx Studio During a File Transfer Operation


If you exit NetLinx Studio during a file transfer operation, the transfer continues unaffected. If you
re-open NetLinx Studio, the status of the transfer will still be displayed in the File Transfer Status
tab of the Output Display window.

Rebooting the Master Controller


Select Tools > Reboot the Master Controller to reboot the NetLinx master controller that you are
currently connected to.

Allow 20-30 seconds for the reboot.

You have the option to reconnect after the master has rebooted.

Quick Load dialog


Click the Quick Load command button in the File Transfer dialog to open the Quick Load dialog,
containing options that allow you to specify which file types (of the files included in the Workspace
file) to include in the transfer operation. The options in this dialog include:

Selection Options menu Click the down arrow to access the following load options:

Current Source File Loads the currently active file (SRC and/or TKN-TOK) that
is displayed in the Source Code Editor window.

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.

NetLinx Studio v2.2 137


File Transfer Operations

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.

Remove Duplicates When Loading Enable this option to prevent having any duplicate
entries in the Send list of the File Transfer dialog (default = enabled).

138 NetLinx Studio v2.2


Firmware Transfers

Firmware Transfers
NetLinx Studio provides the ability to download 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.

Sending Firmware to a NetLinx Device (KIT file)


Use the Firmware Transfers options in the Tools menu to update the firmware in NetLinx Master
Controllers or System devices. NXI Master Controllers use Kit files for firmware upgrades. A Kit
file (.KIT) is a package of several files, all of which are required to upgrade the firmware, and are
available online via www.amx.com.

The Online Device Tree (Online Tree tab of the Workspace Window) displays
information about each online device, including the current firmware version.

Before attempting to upgrade the firmware, you must have the appropriate Kit file for
your NetLinx Master.

If for any reason your Kit file transfer should fail, continue to retry the transfer until you
are successful. DO NOT reboot the Master, or change connections until the transfer
is complete. Failure to complete this operation successfully may result in a factory
repair of the Master.

To update NetLinx firmware:


1. Choose Tools > Firmware Transfers > Send to NetLinx Device to open the Send To NetLinx
Device dialog.
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. 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.
4. Review the File, Connection, Address, and Target Device information before you send.

Check the Reboot option.

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.

NetLinx Studio v2.2 139


Firmware Transfers

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.

Sending Firmware to an Axcess Device (TSK file)


Use the Firmware Transfers options in the Tools menu to update the firmware in Axcess Masters.
Axcess Master Controllers use .TSK files for firmware upgrades.
To update Axcess firmware:
1. Choose Tools > Firmware Transfers > Send To Axcess Device to open the Send To Axcess
Device dialog.
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.
7. 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.
8. Once the TSK file has been transferred, the program prompts you to reboot the Master. Click
Yes to reboot, and the program initiates the reboot sequence.
9. 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. Once it has rebooted, click OK.

140 NetLinx Studio v2.2


Setting Program Preferences

Setting Program Preferences


Setting the Default Control Platform
You can set the default control platform and communication settings via the Configuration settings
in the Master Communication Settings dialog:
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Select <No Active System-Default Settings> in the Available System(s) list. With this
selection, you are setting the default platform and communication settings for all new Projects/
Systems and System files.
3. Click the Configure button to access the Communication Settings dialog.
4. Select the Platform (NetLinx or Axcess) to be used as the default.
5. Click OK to save your changes and close the Communication Settings dialog.
6. Click OK to close the Master Communication Settings dialog.

Setting the Default Communication Settings


You can set the default control platform and communication settings via the Configuration settings
in the Master Communication Settings dialog:
1. Select Settings > Master Communication Settings to open the Master Communication
Settings dialog.
2. Select <No Active System-Default Settings> in the Available System(s) list. With this
selection, you are setting the default platform and communication settings for all new Projects/
Systems and System files.
3. Click the Configure button to access the Communication Settings dialog.
4. Select the default Transport Connection Option (TCP/IP, Serial or Modem).
5. Click Configure to access the communication settings for the selected Transport Connection
type.
6. Click OK to save your changes and close the Communication Settings dialog.
7. Click OK to close the Master Communication Settings dialog.

NetLinx Studio v2.2 141


Setting Program Preferences

Preferences Dialog
Select Settings > Preferences to open the Preferences dialog, where you can set various
application-level preferences. This dialog contains the following tabs:

General - Contains options to set general program defaults

Axcess Compiler - Contains options to set default preferences for the Axcess compiler

NetLinx Compiler - Contains options to set default preferences for the NetLinx compiler

Editor - Contains options to set default preferences for the Source Code Editor windows

Diagnostics - Contains options to set default diagnostics preferences

Terminal - Contains options to set default Terminal window preferences.

File Transfer - Contains options to set default preferences for file transfer operations.

Workspace - Contains options to set various display and file preferences relating to the
Workspace Window

Commands - Contains options to add/remove commands from the toolbars.

Toolbars - Contains options to add/delete/rename and reset the toolbars.

Tools - Contains options to add a shortcut to another application in the Tools menu.

Keyboard - Contains options to set custom keyboard accelerators (shortcut keys/key


combinations) for often-used commands.

Menu - Contains options to customize the menus and reset the menus to their original
default state. To reset a menu, select a particular window view (i.e. AXS type views or
TXT type views) from the combo box and then select the Reset button.

Options - Contains options to set a few basic toolbar options.

Setting General Program Preferences (General tab)


Use the options on the General tab of the Preferences dialog to set general program defaults. The
options on this tab include:

Window Color Display Options - This area of the dialog allows you to change the
foreground/background colors for the following windows of the application:

Output Bar - Status - Status tab of the Output Display window

Output Bar - Find in Files - Find in Files tab of the Output Display window

Output Bar - Find IR Files - Find IR Files tab of the Output Display window

Output Bar - File Transfer Status - File Transfer Status tab of the Output Display
window

Output Bar - Notifications - Notifications tab of the Output Display window

Output Bar - Diagnostics - Diagnostics tab of the Output Display window

Workspace Project Tree - Workspace tab of the Workspace window

Online Tree - Online Tree tab of the Workspace window

142 NetLinx Studio v2.2


Setting Program Preferences

Foreground Color - This is the text color setting for the selected window.

Background Color - This is the background color setting for the selected window.

Software History Application - This option allows you to specify wether to


automatically close the AMX Software History Application when you exit NetLinx
Studio, or to leave it running (default = Close when NetLinx Studio Exits).

Recent File List Size - This field allows you to change the size of the recent file list,
displayed at the bottom of the File menu (range = 1-9),

Setting AXCESS Compiler Preferences (AXCESS Compiler tab)


Use the options in the Axcess Compiler Options tab of the Preferences dialog to set default
preferences for the AXCESS compiler:

Warnings - Click these checkboxes to specify which warnings to display in the Build tab
of the Output Window, after compile operations. The warnings are described below:

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.

Assignment of 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 non-array
variable or two-dimensional array variable).
• Assigning the result of a function that returns a non-array type to a one- or two-
dimensional array variable (for example, X = ATOI('AMX'), where X is a one- or two-
dimensional 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.

Variable not used - This warning occurs at the end of compilation for each variable
that was declared but never used.

Define_Call not used - This warning occurs at the end of program compilation for
each DEFINE_CALL subroutine that was declared but never used.

Too many nested levels - This warning appears if there is a large amount of nesting
in the program. This can happen with a long chain of IF...ELSE IF statements. The
solution is to use the SELECT...ACTIVE set of statements.

Long_While in While - This warning occurs if the compiler finds a LONG_WHILE


or MEDIUM_WHILE inside a block of code following a WHILE keyword. This
warning exists because the WHILE command has a 1/2 second timeout period, and

NetLinx Studio v2.2 143


Setting Program Preferences

the LONG_WHILE and MEDIUM_WHILE keywords do not. This could create a hard-
to-find logic error. The solution is to change the WHILE to a LONG_WHILE to fix
this problem.

Separate Define Call list - Check to store all DEFINE_CALL subroutines in a separate
section of the Master Controller memory than the DEFINE_PROGRAM section. This
effectively allows the code size of a program to reach 128K (64K for the DEFINE_CALLS
and 64K for the DEFINE_PROGRAM section).

Build with Source - Check to download the executable code and the source code to the
Master Controller or data device when the file is downloaded (memory permitting). If
Build with Source is disabled, only the executable code is downloaded, which cannot be
retrieved from the Master Controller.

Directories - Click to open the directories menu, where you select the directories to point
the compiler to, by file type. Once a directory type is selected, the directory list is
populated with the directories of that type that have been mapped. There are a maximum
of 100 directories that can be entered for each type.

Select Include Files to select or create the directory that the compiler will look for
Include files in.

Select Library Files to select or create the directory that the compiler will look for
(IR) Library files in.

Setting NetLinx Compiler Preferences (NetLinx Compiler tab)


Use the options in the NetLinx Compiler tab of the Preferences dialog to set default preferences for
the NetLinx compiler. The items in this tab include:

Directories — Click to open the directories menu, where you select the directories to
point the compiler to, by file type. Once a directory type is selected, the directory list is
populated with the directories of that type that have been mapped. There are a maximum
of 100 directories that can be entered for each type.

Select Include Files to select or create the directory that the compiler will look for
Include files in.

Select Library Files to select or create the directory that the compiler will look for
System Call files in.

Compile With Debug Info Select this option to include variable symbol information in
the compiled file. This allows the debugger to identify and validate variable symbols in
the code. You must compile with debug info in order to debug NetLinx files.

Build With Source Check to include the executable code and the source code to the
Master Controller or data device when the file is sent (memory permitting). This allows
the Receive option to retrieve the source code from the Master Controller. If Build with
Source is disabled, only the executable code is sent, which cannot be retrieved from the
Master Controller.

144 NetLinx Studio v2.2


Setting Program Preferences

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.

Build With Password Protection — Select this option to apply a password to the Source
file. Select the Change button to edit the password (via the Change Password dialog). A
password must be at least 6 characters in length (maximum of 20 characters).

Setting Editor Preferences (Editor tab)


Use the options on the Editor tab of the Preferences dialog to set default preferences for the Source
Code Editor windows. The items in this tab include:

Syntax Highlighting - 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.

Item list - This is a list of all the items that can be customized in the Source Code
Editor Windows. Select an item from this list to customize.

Foreground Color - This is the text color setting for the selected Item.

Background Color - This is the background color setting for the selected Item.

Style - This is the text style setting for the selected Item (Default, Normal, Bold or
Italic).

Since NetLinx code may be divided into several sections (DEFINE_CONSTANT,


DEFINE_DEVICE, DEFINE_TYPE and DEFINE_VARIABLE), any time a word is
encountered that falls within one of these sections it is parsed, remembered and then
syntax highlighted according to the section in which it occurred. Therefore, if a
DEFINE_DEVICE section contains a line that reads “dvTP = 128” the word dvTP will
be remembered as a Device, and syntax highlighted accordingly.

Clipboard Text Buffer - These options allow you to define the number of clip-board
buffer entries and the maximum width to display:

Max Items - You can have a maximum of 30 clip-board buffer items (default = 20).

Max Display Width - You can set the maximum display width to up to 80 characters
(default = 50).

Clear Text Buffer History - Clears all the clipboard text items from the list.

Formatting - These options allow you to set various text display and formatting options:

Auto-indent - This option automatically indents your text as you type (default =
enabled).

Show Line Numbers - This option toggles line numbers in the view containing the
source code file (default = disabled).

Tab Size - Use the up and down arrows to increase/decrease the number of spaces
used for tabs (default = 4).

NetLinx Studio v2.2 145


Setting Program Preferences

Font Point Size - Click the down arrow to select a font size (in points) for the text in
the Code Editor window (default = 10)

Enable AutoComplete/AutoSuggest - This option enables or disables Auto-Complete


and Auto-Suggest functionality in the Code Editor windows (default = enabled).

With Auto-Complete/Auto-Suggest enabled, as you type in a variable name, device name


or a reserved identifier, the program will suggest a name that has been previous defined
within the source code.

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).

Additionally, if the editor’s 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 pre-existing custom keystrokes). You must set your own keystroke to take effect.

Setting Commands Preferences (Commands tab)


Use the options on the Commands tab of the Preferences dialog to add/remove commands from the
toolbars. The items on this tab include:

Categories - This is a list of command categories. Each command category in this list
contains several commands (displayed in the Commands list).

Commands - This is a list of the commands included in the selected Command Category.

Description - This (read-only) field displays a brief description of the selected


Command.

146 NetLinx Studio v2.2


Setting Program Preferences

Setting Toolbars Preferences (Toolbars tab)


Use the options on the Toolbars tab of the Preferences dialog to add/delete/rename and reset the
toolbars. The items on this tab include:

Toolbars - This list represents all toolbars currently loaded in the GUI, including any
custom toolbars. The checkboxes next to each toolbar indicate which toolbars are
currently enabled. Use these check boxes to specify which toolbars to show by default at
startup.

Reset - With one of the System (non-custom) toolbars selected in the Toolbars list, the
Reset button resets the toolbar to its default set of command buttons .

Reset All - Click to reset all System toolbars to their default set of command buttons.

New - Click to create a new custom toolbar via the Toolbar Name dialog.

Rename - Select a custom toolbar and click Rename to rename the selected toolbar via
the Toolbar Name dialog. You cannot rename or delete system toolbars.

Delete - Select a custom toolbar and click Delete to delete the selected toolbar. You
cannot rename or delete system toolbars.

Adding/Removing Commands From the Toolbars


Use the options on the Commands tab of the Preferences dialog to add/remove commands from the
toolbars.
To add a command to an existing toolbar:
1. Select Settings > Preferences to open the Preferences dialog.
2. In the Commands tab, select the command category that the command you want to add belongs
to (in the Category list).
3. In the Commands list, select the command you want to add.
4. Click and drag the command from the Commands list, and drop it into any open toolbar.
To remove a command from an existing toolbar:
1. Select Settings > Preferences to open the Preferences dialog.
2. Select a toolbar button in any open toolbar.
3. Click and drag the button out of the toolbar.

Creating Custom Toolbars


Use the options on the Commands tab of the Preferences dialog to create custom toolbars:
1. Select Settings > Preferences to open the Preferences dialog.
2. In the Toolbars tab, click New.
3. Enter a name in the Toolbar Name dialog, and click OK.
4. The new toolbar appears in the Toolbars list, and the new (empty) toolbar appears within the
Toolbars list area of this tab.
5. Click and drag the new toolbar into the work area.
6. Populate the toolbar with command buttons as desired.

NetLinx Studio v2.2 147


Setting Program Preferences

Setting Tools Preferences (Tools tab)


Use the options on the Tools tab of the Preferences dialog to add a shortcut to another application,
to be included in the Tools menu. The items on this tab include:

Menu Contents - This list represents all shortcuts to external applications currently
loaded in the Tools menu. This list is empty until you add a shortcut. The text entered
here is what will be displayed in the Tools menu.

Command - Click the browse button (to the right of the Command text box) to locate and
select the .EXE for the application that you want to add to the Tools menu.

Arguments - Click the right-arrow button (to the right of the Arguments text box) to
access a list of supported arguments. Select an argument from the list (if necessary).

Initial Directory - Click the right-arrow button (to the right of the Initial Directory text
box) to access a sub-menu containing the following options:

o$(FilDir)

o$(CuDir)

oBrowse

Adding/Removing Application Shortcuts In the Tools Menu


Use the options on the Tools tab of the Preferences dialog to add/remove shortcuts to external
applications in the Tools menu:
1. Select Settings > Preferences to open the Preferences dialog.
2. In the Tools tab, click the New button to create an empty text field in the Menu Contents list.
3. Enter a name for the application.
4. Click the browse button to locate and select the application's .EXE file. The directory path is
displayed in the Command text box.
5. Specify any Arguments, if necessary. Click the right-arrow button to select from a list of all
applicable arguments.
6. Specify an Initial Directory, if necessary. Click the right-arrow button to select an initial
directory option, or select Browse to specify an initial directory via the Browse For Folder
dialog.
7. Click Close to close the Preferences dialog.
8. The new shortcut should appear at the bottom of the Tools menu.

Setting Keyboard Preferences (Keyboard tab)


Use the options on the Keyboard tab of the Preferences dialog to set custom keyboard accelerators
(shortcut keys/key combinations) for often-used commands. The items on this tab include:

Category - This drop-down list represents the various command categories. Select a
Category to populate the Commands list.

Commands - This list represents all of the commands contained within the selected
command Category.

148 NetLinx Studio v2.2


Setting Program Preferences

Description - With a command selected (in the Commands list), this text box displays a
brief (read-only) description of the selected command.

Current Keys - With a command selected (in the Commands list), this text box displays
the current keyboard accelerator assignment (read-only).

Press the New Shortcut Key - With a command selected (in the Commands list), this
text box allows you to enter the new keyboard shortcut for that command.

Assign - Click to assign the newly specified keyboard shortcut to the selected command.
This button is only enabled if a command is selected, and new shortcut keys have been
entered in the Press New Shortcut Key text box.

Remove - With a command selected (in the Commands list), click Remove to remove the
associated keyboard shortcut.

Reset All - Click to reset all keyboard shortcuts to the defaults.

Creating Custom Shortcut Keys


Use the options on the Keyboard tab of the Preferences dialog to set custom keyboard accelerators
(shortcut keys/key combinations) for often-used commands:
1. Select Settings > Preferences to open the Preferences dialog.
2. In the Keyboard tab, select the command Category that contains the command that you want to
create a new shortcut key for.
3. In the Commands list, select the command that you want to create a shortcut key for. If a
shortcut key is already associated with the selected command, it is indicated in the Current
Keys text box.
4. Place the cursor in the Press New Shortcut Key text box, and enter the desired shortcut key or
key combination. If the new shortcut key is already assigned to another command, it is
indicated directly below the Press New Shortcut Key text box, and the Assign button will be
disabled to prevent duplicate assignments.
5. Click Assign to assign the new shortcut key to the selected command.

Setting Menu Preferences (Menu tab)


Use the options on the Menu tab of the Preferences dialog to customize menus, and reset the menus
to their original default state:

Application Frame Menus - Click the down-arrow to access a list of all Application
Frame Menus. These relate to file types that can be opened and edited in NetLinx Studio.

Reset - Click to reset the selected application frame menu to its default state.

Context Menus - Click the down-arrow to access the two context menu options: Source
View and Text View.

Source View sets the context menu to include commands associated with creating/
editing source code files.

Text View sets the context menu to list only commands that relate to creating/editing
text documents.

NetLinx Studio v2.2 149


Setting Program Preferences

Reset - Click to reset the selected context menu to its default state.
To reset an Application Frame Menu to its original default state, select a particular window view
(i.e. AXS type views or TXT type views) from the combo box and then select the Reset button (in
the Application Frame Menus area).

Customizing the Menus


Use the options on the Commands tab of the Preferences dialog to customize menus, and reset the
menus to their original default state.
To customize a menu:
1. Select Settings > Preferences to open the Preferences dialog.
2. Open the Commands tab.
3. Open a menu (in the main Menu bar).

To add a command: Select a command category and a select the command you want to
add to the menu. Click and drag the command out of the Commands list and into the
desired position in the open menu.

To remove a command: Select a command from the open menu, and click and drag it
outside of the menu.
4. Click Close to close the Preferences dialog.

Setting Options Preferences (Options tab)


Use the options on the Options tab of the Preferences dialog to set a few basic toolbar options:

Show Screen Tips on Toolbars - This option toggles the display of screen tips (a brief
description of the toolbar button) anytime the mouse hovers over a toolbar button (default
= enabled).

Show Shortcut Keys In Screen Tips - This option toggles the display of any shortcut
keys associated with the command (as part of the screen tip). This option is disabled if
the Show Screen Tips on Toolbars option is disabled.

Large Icons - This option toggles the display of large icons in the toolbar buttons (default
= disabled).

Setting Diagnostics Preferences (Diagnostics tab)


Use the options on the Diagnostics tab of the Preferences dialog to set default system diagnostics
and asynchronous notification preferences:

Notification View - Use this set of options to set default display preferences for the
Notification tab of the Output Display Window.

Display Line Numbers - toggles the display of line numbers in asynchronous


notification displays (default = enabled).

Display Time Stamp - toggles the display of time stamps in asynchronous


notification displays (default = enabled). When enabled, the Display Milliseconds
option causes asynchronous notification time stamps to be displayed in milliseconds
(default = disabled).

150 NetLinx Studio v2.2


Setting Program Preferences

Display Control Codes as - select the default display option (Hex or Decimal
Values) for control codes in asynchronous notification displays (default = Hex
Values).

Hex values will display with a leading $ character. For example the message:
STRING from CHANNEL 6 - $0F$1D has two control codes converted to
hexadecimal.

Decimal values will display with a leading # character: STRING from


CHANNEL 6 - #15#29.

Diagnostics View - Use this set of options to set default display preferences for the
Diagnostics tab of the Output Display Window.

Display Line Numbers - toggles the display of line numbers in system diagnostics
displays (default = enabled).

Display Time Stamp - toggles the display of time stamps in system diagnostics
displays (default = enabled). When enabled, the Display Milliseconds option causes
diagnostics time stamps to be displayed in milliseconds (default = disabled).

Display Control Codes as - select the default display option (Hex or Decimal
Values) for control codes in system diagnostics displays (default = Hex Values).

Buffer File Options - Use the text box to specify the total size of the two files that are
used by the program to buffer the asynchronous notification and system diagnostic
messages. The number specified here will be divided evenly between the two files. The
range is 2 - 500 MB (default = 10).

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.

Setting Terminal Preferences (Terminal tab)


Use the options on the Terminal tab of the Preferences dialog to set default terminal window
preferences. The items in this dialog include:

Add line feed character - This option toggles the display of a line feed character in the
terminal window (default = disabled).

Send Ctrl characters to port - This option toggles the transmission of control characters
to the terminal's port (default = disabled).

Terminal Window Colors - These options allow you to customize the colors for both
states (Active (Connected) and Inactive (Disconnected)) of the terminal window.

To change the colors on the terminal window, select Active (Connected), then click the
down arrows to access the Foreground (text) and Background color palettes. Select the
desired colors, and repeat for the Inactive (Disconnected) state.

NetLinx Studio v2.2 151


Setting Program Preferences

Setting File Transfer Preferences (File Transfer tab)


Use the options on the File Transfer tab of the Preferences dialog to set default preferences for file
transfer operations. The options on this tab include:

Automatically select reboot when sending a TKN file (default = enabled).

When sending a TKN, automatically send the associate 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).

Assume I am connected directly to a touch-panel (no master) whenever transferring


TPD files (default = disabled).

Setting Workspace Preferences (Workspace tab)


Use the options on the Workspace tab of the Preferences dialog to set various display and file
preferences relating to the Workspace Window. The items on this tab include:

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 Setting in the Identifier - This option (off by default)
displays the System Configuration settings as part of the System identifier (as displayed
in the Workspace tab of the Workspace Window).

Enable Auto Save - Toggles the timed auto-saving of text files and the duration of time
between auto saves (default = disabled).

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.

Enable Window Tabs - This option toggles the display of the window tabs that appear by
default along the lower edge of the Source Code Editor windows area of the GUI.

These tabs provide easy access for each open Source Code Editor window. If this option
is not selected, the following tab-oriented options are disabled.

Enable File Icons In Tabs - This option toggles the file icons displayed in the
Source Code Editor window tabs.

Enable Window Close Button - This option toggles the Window Close button ( ).

When Closing the Workspace - This section contains options for closing files associated
with a Workspace that is being closed. The options are:

Close Associated Files Without Prompting

152 NetLinx Studio v2.2


Setting Program Preferences

Always Prompt Before Closing Associated Files

Do Not Prompt Or Close Associated Files

When Removing a File From the Workspace - This section contains various options
for closing files when they are removed from the current Workspace. The options are:

Close File Without Prompting

Always Prompt Before Closing Files

Do Not Prompt Or Close File

NetLinx Studio v2.2 153


Setting Program Preferences

154 NetLinx Studio v2.2


Index
A Delete Line 19
Delete Line Left 19
Add File To System 13 Delete Line Right 19
Add line feed character 24 Delete Selection 19
Add Variable 25 Delete Variable 26
Add Variable From List 26 Delete Word 19
ASCII 24 Delete Word Left 19
ASCII Display 25 Delete Word Right 19
AutoComplete 21 Device Addressing 15
AutoSuggest 21 Devices 20
B Diagnostics Messages Status 7
Diagnostics tab 15
Binary 24 DIP Switch 2.0 3
Binary Display 25 Disconnect 24
Bookmark 22 Display 24
Buffering of the Notification and Diagnostic Tabs 16 display all windows 26
Build Active System 21 Dockable Windows 26
Build Project 11 Docking View 12, 13
Build System 12 Docking view 11
Build Workspace 11 drag and drop 13
Button Events 3
Bytes Transferred 16
E
C Enable/Disable Asynchronous Notifications 17
Enable/Disable Diagnostics Messages 17
Channel Events 3 enter debug mode 25
Check Port Status 15 Error 16
Clear 17, 24 exit Debug mode 25
Clear Breakpoints 22 Expand System Tree 13
Close Workspace 10 Expand to Device Level 15
Collapse Tree 11, 12, 13, 15 Expand To System Level 11, 12
Colors 24 Expand Tree 15
Comments 20 Export Workspace Files 11
Communication Settings 22
Communication Status 7
F
Compile 21 File 15
Compile as Axcess 21 File Transfer Status tab 15
Compile as NetLinx 21 file types 5
Configuring Terminal Communications Settings 22 Find 17
Connection 15 Find In Files tab 16
Constants 20 Find In IR tab 16
Converting NetLinx Studio v1.2 Project Files 5 Floating Point Numbers 20
Copy All Items 17
Copy Selected Items 17 G
Copy Selected Project 11 G4 touch panels 1
Copy Selected System 12 Goto Line 22
Current Length 26 Goto Section 21
Cursor Location 7
Cut, Copy, Paste 21 H
D Hexadecimal 24
Hexadecimal Display 25
Data Events 3 Hide 11, 12, 13
Debugging AXCESS Files 25 hierarchical file structure 9
Decimal 24
Decimal Display 25 I
default platform 22 Import a Project 11
default settings for Serial and Modem ports 23
Import a System 12
Default Text 21
Import From Exported Workspace File 11
Delete 21 IR Constants 3
Delete All 19
Delete All Variables 26
K Projects 1, 4

Keyboard Settings 7 Q
L quick descriptions 7
Quick Load Project 12
Language Reserved Words 20 Quick Load System 13
Last commands 24 Quick Load Workspace 11
Last Push Message and History 7
Last Transfer 16 R
Length 24 Refresh List 25
Level Events 3 Refresh Network 14, 15
Line (NetLinx only) 24 Refresh System 14, 15
linked files 13 Remove Project 11
M Remove System 12
Rescan Current Source File 21
Mapping 15
Master Communication Settings 22 S
Master communications port 23 Save All Items 17
Master Controller Connection Save Selected Items 17
Information 7 Save To File 24
Master Source Code file 13 Save Workspace 10
Menu Bar 8 Save Workspace As 10
Modem Settings 22 Select All 21
N Select Line 19
Select Line Left 19
Name 24 Select Line Right 19
NetLinx Module files 1 Select None 19
NetLinx Studio 2.0 Work Area 6 Select Word 19
NetLinx Studio Code Wizard 3 Select Word Left 19
NetLinx Studio v1.2 1 Select Word Right 19
NetLinx Studio V1.2 PJS File 5 Send Commands 3
NetLinx Studio v2.0 1 Send Ctrl characters to port 24
New Project 11 Serial Settings 22
New System 12 Set as Active System 12
New Workspace 10 Setting Terminal Preferences 24
Notifications Messages Status 7 Single Step 26
Notifications tab 16 Software History 2 Application 3
Number 20 Source Code Editor Context Menu 21
O Source Code Editor Windows 18
Start Debugging 24
Octal 24 Status 15
Octal Display 25 Status Bar 7
Online Device Tree 14 Step Mode 26
Online Tree Context Menu 15 String 20
Open Workspace 10 Sub-devices 15
Operator 20 Supported Keyboard Movements 19
Output Display Window 15 Supported operating systems 2
Output Display Window - Diagnostics tab 15 Syntax Highlighting 20
Output Display Window - File Transfer Status tab 15 System File Folders 13
Output Display Window - Find In Files tab 16 System Folder Context Menu 12
Output Display Window - Find IR Files tab 16 System Folders 12
Output Display window - Status tab 17 System Properties 13
Output Display Window Context Menu 17 Systems 1, 4
P T
Paste Operations 22 Terminal buffer size 24
Paste Project 11 Terminal Locks the Port 23
Paste System 12 Terminal Options tab of the Preferences dialog 24
Path 16 Terminal Settings 22
PC Requirements 2 Terminal Window 22
PROGRAM port 23 Terminal window 23
Project Folder Context Menu 11 Terminal window Context Menu 24
Project Folders 11 The NetLinx Studio Code Wizard 3
Project Properties 12 The NetLinx Studio Workspace Wizard 3
Title Bar 7
Toggle Breakpoint 22
Toggling the Windows 26
Toolbars 8
Total Length 26
TPDesign4-generated UI (.TP4) files 1
transport connection type 22
Type 15, 20
U
Undo, Redo 21
Using the Terminal Window 23
V
Value 24
Variable 20
Viewing Push Results 115
W
Watch Window 24
Watch Window Context Menu 25
WebUpdate 3
What’s New Dialog 2
Windows TelNet 23
Working With Workspace Files 27
Workspace 1, 4
Workspace Context Menu 10
Workspace file 27
Workspace Folder 10
Workspace Properties 11
Workspace tab of the Workspace Window 4
Workspace Window 9
Workspace Window - Online Tree tab 14
Workspace Window - Workspace tab 9
Workspace Wizard 3, 10
Workspace, Projects and Systems 4
X
XML 27
Index

NetLinx Studio v2.2 159


033-004-2713 8/04 ©2004 AMX Corporation. All rights reserved. AMX, the AMX logo, the building icon, the home icon, and the light bulb icon are all trademarks of AMX Corporation.
*In Canada doing business as Panja Inc.

AMX reserves the right to alter specifications without notice at any time.

ARGENTINA • AUSTRALIA • BELGIUM • BRAZIL • CANADA • CHINA • ENGLAND • FRANCE • GERMANY • GREECE • HONG KONG • INDIA • INDONESIA • ITALY • JAPAN
LEBANON • MALAYSIA • MEXICO • NETHERLANDS • NEW ZEALAND • PHILIPPINES • PORTUGAL • RUSSIA • SINGAPORE • SPAIN • SWITZERLAND • THAILAND • TURKEY • USA
ATLANTA • BOSTON • CHICAGO • CLEVELAND • DALLAS • DENVER • INDIANAPOLIS • LOS ANGELES • MINNEAPOLIS • PHILADELPHIA • PHOENIX • PORTLAND • SPOKANE • TAMPA

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

You might also like