Step 7: debugging the device application – Echelon NodeBuilder FX User Manual

Page 69

Advertising
background image

NodeBuilder FX User's Guide

55

4. Press and hold the left button at the bottom of your development board (SW1 on the FT 5000

EVB; IO_6 on the Gizmo 4 I/O Board). The value of the nvoSwitch network variable in the
Switch functional block changes to 100.0 1, which means that the switch is at its maximum level
(100%) and on.

5. Release the left button at the bottom of your development board. The value of the nvoSwitch

network variable in the Switch functional block changes back to 0.0 0, which means that the
switch is at its lowest level (0%) and off.

Note: The nvoSwitch network variable does not toggle each time you press the button. Instead, it
depicts the current state of the button. You will modify the behavior of the Switch functional
block in Step 7: Debugging Your Device’s Application so that it acts as a toggle-switch.

6. Click anywhere in the row for the nviLamp network variable in the LED functional block. In the

Value box in the browser toolbar, enter 100.0 1 and then press ENTER or click the Set Value
button (

) in the browser toolbar. This sets the LED on the left side of your development board

(LED1 on the FT 5000 EVB; IO_0 on the Gizmo 4 I/O Board) to its maximum level (100%) and
turns it on.

7. In the Value box in the browser toolbar, enter 0.0 0, and then press ENTER or click the Set Value

button (

) in the browser toolbar. This returns the LED to its lowest level (0%) and turns it off.

The LED functional block appears to be functioning correctly.

8. Proceed to the next section to debug your device’s application. You will modify your device

application so that the value of the nvoSwitch network variable in the Switch functional block
toggles each time the button is pressed instead of when the button is pressed and released.

For more information on testing your device, see Chapter 9, Testing a NodeBuilder Device Using the
LonMaker Tool
.

Step 7: Debugging the Device Application

If your device does not function as expected, you can use the NodeBuilder Debugger to control and
observe the behavior of the device application. The debugger allows you to set breakpoints, monitor
variables, halt the application, step through the application, view the call stack, and peek and poke
memory. You can make changes to the code as you debug your device.

To debug your device’s application with the NodeBuilder Debugger, follow these steps:

1. Click the Echelon LonMaker/Visio button in the Taskbar to switch to the LonMaker tool.

2. Right-click the NB Device device shape in your LonMaker drawing, point to NodeBuilder, and

then click Debug on the shortcut menu.

Advertising