In the example above, a toggle switch object was placed on the screen as a ‘+’ button. When this button is pushed, it
forces LB:1 to ON and the ‘AddTwo’ macro executes, storing the result in LW:2 and turning LB:1 to OFF and the
macro stops.
Vari ables, Dec la ra tions and Mem ory Us age
Variables, constants & functions are named by the programmer. Variables and constants are called
operands
.
Variable names can be any character or number (a-z, A-Z, 0-9, or ‘_’) and can be as many characters as you need to
describe it (the compiler has been tested to variable name lengths of 32 characters, but it is best to keep the variable
names small for ease of reading the code). Variable names are not case sensitive, so ‘result’ is the same as ‘ReSult’
or ‘RESULT’. Variable names must always start with a letter (i.e. variables cannot begin with a number or the
underscore ‘_’ character).
Memory Usage
Macros use a minimum of about 2.5K, plus the memory required for each variable type:
• float: 4 bytes (32-bits)
• int: 4 bytes (32-bits)
• short: 2 bytes (16-bits)
• char: 1 byte (8-bits)
1010-1007, Rev 05
Macros
245
Tog gle Switch Ob jects At trib utes Dialog
Summary of Contents for Silver Plus Series
Page 20: ...1010 1007 Rev 05 16 Silver Plus Series Installation Operation Manual ...
Page 31: ...COM Ports for the HMI5056 5070 1010 1007 Rev 05 Connect the OIT to the PLC or Controller 27 ...
Page 38: ...1010 1007 Rev 05 34 Silver Plus Series Installation Operation Manual ...
Page 49: ...7 Click the Shape tab 1010 1007 Rev 05 Creating Your First Project 45 ...
Page 62: ...1010 1007 Rev 05 58 Silver Plus Series Installation Operation Manual ...
Page 75: ...3 Click OK The System Parameter Settings dialog appears 1010 1007 Rev 05 Using EZware 5000 71 ...
Page 132: ...1010 1007 Rev 05 128 Silver Plus Series Installation Operation Manual ...
Page 156: ...1010 1007 Rev 05 152 Silver Plus Series Installation Operation Manual ...
Page 210: ...1010 1007 Rev 05 206 Silver Plus Series Installation Operation Manual ...
Page 216: ...1010 1007 Rev 05 212 Silver Plus Series Installation Operation Manual ...
Page 246: ...1010 1007 Rev 05 242 Silver Plus Series Installation Operation Manual ...