Programming
82
NetLinx Studio (v2.4 or higher)
Code Wizard Dialog - Level Tab
The advanced options available for Level_Events (in the Level tab of the Code Wizard dialog) are
described below:
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.
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 ref-
erencing Array Name will be generated. If CREATE_LEVEL and/or
SEND_LEVEL statements will be generated, each construct will refer-
ence 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.
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 DEVLEV definition, LEVEL_EVENT, CREATE_LEVEL or
SEND_LEVEL statements depending on the platform and options
selected.