Entering And Exiting Debug Mode; Using Single-Step Mode; Changing The Value Of A Watched Variable - AMX NetLinx Studio Instruction Manual

Netlinx design v3.3 or higher
Table of Contents

Advertisement

Building and Debugging Source Code

Entering and Exiting Debug Mode

1.
Open and compile a 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 Debug > Start Debugging to open the Watch Bar (FIG. 179 on page 111).
If this option is disabled, make sure your Master Communications Port settings are set to connect to your Master
Controller. See the Connecting to a Master Controller section on page 119 for details.
3.
Right-click inside the Watch Bar to open the Watch Bar context menu.
4.
Click Add to insert a new variable in the Watch Bar. 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 Bar context menu. This opens the Display sub-menu, containing the following
view options:
ASCII Display
Decimal Display
Hexadecimal Display
Octal Display
Binary Display
To exit Debug mode, select Debug > Stop Debugging. or close the Watch Bar.

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:


To use Single-step mode:
1.
Right-click on a watched variable and choose Debug > Single Step to put the Master into single-step mode.
2.
With the watched variable selected, select Debug > Single Step. 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.

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 Bar:
1.
Select a watched variable in the Watch Bar.
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.
112
displays the value of the watched variable in ASCII format.
displays the value of the watched variable in decimal format.
displays the value of the watched variable in hexadecimal format.
displays the value of the watched variable in octal format.
displays the value of the watched variable in binary format.
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
NetLinx Studio - Instruction Manual

Advertisement

Table of Contents
loading

Table of Contents