
Programming
92
NetLinx Studio - Instruction Manual
Code Wizard dialog - Channel tab
The items in the
Channel
tab (FIG. 166) are described below:
Code Wizard - Button tab Options (Cont.)
From, To, Total
The button 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 button" handler. In this case, code generation
cannot support arrays or feedback.
Array Name
The array name used for generating DEVCHAN or INTEGER array for button ranges.
Hold Time
This value is used when generating the HOLD statement.
Comment
This value is used on the lines before the array definition, BUTTON_EVENT, PUSH, and RELEASE
and feedback 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. 167
Code Wizard dialog - Channel tab
Code Wizard - Channel tab Options
On
Generate ON statements
Off
Generate OFF Statements
No Arrays
Channel ranges will be generated without arrays (i.e. multiple CHANNEL_EVENTs will be generated).
Use DEVCHAN
Channel ranges will be placed in a DEVCHAN array named Array Name using the Device and channel
range defined as
From through To
in the DEFINE_VARIABLE section. A single CHANNEL_EVENT
statement referencing Array Name will be generated. Note that when Use DEVCHAN is selected,
GET_LAST() is selected and disabled.
Use INTEGER
Channel ranges will be placed in an INTEGER array named Array Name using the channel range
defined as
From through To
in the DEFINE_VARIABLE section. A single CHANNEL_EVENT statement
referencing Device and Array Name will be generated.
Channel Index
This option will include a calculation for the channel index using a mathematical calculation,
CHANNEL.CHANNEL - From, for non-array channel ranges and a function call to GET_LAST(),
GET_LAST(Array Name), for array channel ranges.
SWITCH/CASE
This option will include a SWITCH/CASE construct under the ON and/or OFF statements. The SWITCH
will be based on the Channel Index. Note that when SWITCH/CASE is selected, the
Channel Index
option is selected and disabled.
Stacked
This option will cause each channel 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.
Device
The device name used during code generation. This name may appear in a DEVCHAN definition or
CHANNEL_EVENT statement depending on the platform and options selected.
Содержание NetLinx Studio
Страница 40: ...Working with Projects 28 NetLinx Studio Instruction Manual...
Страница 148: ...Communication Settings 136 NetLinx Studio Instruction Manual...
Страница 160: ...Working with Online Devices 148 NetLinx Studio Instruction Manual...
Страница 178: ...File Transfer Operations 166 NetLinx Studio Instruction Manual...
Страница 208: ...Tools Menu Options 196 NetLinx Studio Instruction Manual...
Страница 229: ...Setting Program Preferences 217 NetLinx Studio Instruction Manual...