Programming
93
NetLinx Studio - Instruction Manual
Code Wizard dialog - Level tab
The advanced options available for LEVEL_EVENTs in the Level tab (FIG. 168) are described below:
Code Wizard - Channel tab Options (Cont.)
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 button to insert the specified code
into the file.
FIG. 168
Code Wizard dialog - Level tab
Code Wizard - Level tab Options
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 arrays (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 disabled.
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 referencing
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.
Level Index This option will include a calculation for the level index using a mathematical 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 disabled.
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