Format
Examples
If
Condition
Then
[
Statements
]
Else
[
else statements
]
End If
If x == 1 Then
y = y * 5
z = z – 12
Else
y = y * 2
z=y-1
End If
If (x == 0 OR x == 1) AND y == 0 Then
z = 10
Else
z=5
End If
A
looping control
statement is used for looping a pre-determined number of times. For counting up, use the
keyword
To
. For counting down, use the keyword
Down
. Counter Necessary. The counter of looping control. It
can be integer o character.
Start
Necessary. The initial value of Counter.
End
Necessary. The end value of Counter.
Step
Options. The increment decrement step of Counter. It can be integer an can be omitted when value is 1.
Statements
• Optional. Statement block between For and Next which will be executed.
Format
Examples
For counter = start To/Down end [Step
steps ]
[Statements]
Next [counter]
For n = 100 Down 0 Step 3
n = n * 2
Next n
For loop = 0 To 20 Step 2
loop = (loop + 1) *2
Next loop
While – Wend state ment
Loop an unknown number of times. Looping is controlled by the Condition. When Condition is TRUE, the
statements will be executed repetitively until the condition turns to FALSE.
Condition
Necessary. An expression which evaluates to TRUE or FALSE.
Statements
Optional. Statement block.
1010-1007, Rev 05
Macros
251
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 ...