Programming
91
NetLinx Studio - Instruction Manual
Code Wizard dialog - Button tab
Select Tools > Code Wizard to launch the NetLinx Studio Code Wizard. Uncheck the Use Wizard Style check box to
access the individual tabs containing detailed options for each code type. The Button tab is shown in FIG. 166:
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:
FIG. 166 Code Wizard dialog - Button tab
Code Wizard - Button tab Options
Push Generate PUSH statements
Release Generate RELEASE Statements
Hold Generate HOLD statement.
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.
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 disabled.
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.
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.
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 disabled.
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.
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.