Code Wizard - Channel tab Options (Cont.)
From, To, Total
Array Name
Comment
Insert
Code Wizard dialog - Level tab
The advanced options available for LEVEL_EVENTs in the Level tab (FIG. 168) are described below:
FIG. 168
Code Wizard dialog - Level tab
Code Wizard - Level tab Options
Event
Create
Send
No Arrays
Use DEVLEV
Use INTEGER
Level Index
SWITCH/CASE This option will include a SWITCH/CASE construct under the LEVEL_EVENT statement. The SWITCH
Stacked
NetLinx Studio - Instruction Manual
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.
The array name used for generating DEVCHAN or INTEGER array for channel ranges.
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. //).
Once you have made the relevant selections on this tab, click this button to insert the specified code
into the file.
Generate LEVEL_EVENT statements.
Generate CREATE_LEVEL statements.
Generate SEND_LEVEL statements.
Note: You cannot generate EVENT_LEVEL statements and CREATE_LEVEL or SEND_LEVEL
statements at the same time.
Level ranges will be generated without using arrays (i.e. multiple LEVEL_EVENTs will be generated).
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.
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.
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.
will be based on the Level Index. Note that when SWITCH/CASE is selected, the Level Index option is
selected and disabled.
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
Programming
93