Applies To
All
Purpose
Sets all the properties of the command object.
Syntax
Object.Set (enDioCommandOpCode, [vAddressOrValue], [enDioCommandCondition], [enDioCommandRegister])
Or
Object.Set (enDioCommandOpCode, [vAddressOrValue], [enDioCommandCondition], [enDioCommandXEventBit])
The Set method syntax has the following parts:
Name |
Type |
Description |
Object |
DioCommand |
DioCommand object. |
enDioCommandOpCode |
enumDioCommandOpCode |
Integer specifying the command. |
vAddressOrValue |
Variant |
Optional - Set the branch address or register value. Default is 0. |
enDioCommandCondition |
enumDioCommandCondition |
Optional - Integer specifying the command condition. Default is dioCommandConditionNone. |
enDioCommandRegister |
enumDioCommandRegister |
Optional - Integer specifying the Register number. Default is dioCommandRegisterA. |
nDioCommandXEventBit |
enumDioCommandXEventBit |
Optional - Integer specifying the XEvenBit number. Default is dioCommandXEventBit0. |
Where
enumDioCommandOpCode can be one of the following
Name |
Value |
Description |
dioCommandOpCodeNop |
0 |
No operation. |
dioCommandOpCodeJumpFar |
1 |
Jump Far (GX5050, GX5050, GX5055) |
dioCommandOpCodeJumpA |
1 |
Jump Register A (GX5150) |
dioCommandOpCodeJump Near |
2 |
Jump Near (GX5050, GX5050, GX5055) |
dioCommandOpCodeJumpB |
2 |
Jump Register B (GX5150) |
dioCommandOpCodeLoop |
3 |
Loop (GX5050, GX5050, GX5055) |
dioCommandConditionBitHigh |
4 |
Set (GX5050, GX5050, GX5055) |
dioCommandOpCodeCall |
5 |
Call(GX5050, GX5050, GX5055) |
dioCommandOpCodeReturn |
6 |
Return (GX5050, GX5050, GX5055) |
dioCommandOpCodePause |
7 |
Pause |
dioCommandOpCodeHalt |
8 |
Halt |
enumDioCommandCondition can be one of the following:
Name |
Value |
Description |
dioCommandConditionNone |
0 |
No condition |
dioCommandConditionGreater |
1 |
External event lines > Register value(GX5050, GX5050, GX5055). |
dioCommandConditionLess |
2 |
External event lines < Register value(GX5050, GX5050, GX5055). |
dioCommandConditionEqual |
3 |
External event lines = Register value. |
dioCommandConditionNotEqual |
4 |
External event lines <> Register value. |
dioCommandConditionBitLow |
5 |
The specified External event line is low(GX5050, GX5050, GX5055). |
dioCommandConditionBitHigh |
6 |
The specified External event line is high(GX5050, GX5050, GX5055). |
If enDioCommandOpCode is dioCommandOpSet then enDioCommandRegister can be one of the following:
Name |
Value |
Description |
dioCommandRegisterA |
0 |
Register A |
dioCommandRegisterB |
1 |
Register B |
dioCommandRegisterC |
2 |
Register C |
dioCommandRegisterD |
3 |
Register D |
If enDioCommandOpCode is dioCommandConditionBitLow or dioCommandConditionBitHigh then enDioCommandXEventBit can be one of the following:
Name |
Value |
Description |
dioCommandXEventBit0 |
0 |
External event line number 0. |
dioCommandXEventBit1 |
1 |
External event line number 1. |
dioCommandXEventBit2 |
2 |
External event line number 2. |
dioCommandXEventBit3 |
3 |
External event line number 3. |
enumDioCommandCondition can be one of the following:
Name |
Value |
Description |
dioCommandConditionNone |
0 |
No condition |
dioCommandConditionEqual |
3 |
External event lines = Register value. |
dioCommandConditionNotEqual |
4 |
External event lines <> Register value. |
Comments
The vAddressOrValue value can be as follow:
GX5050/GC5050:
If enDioCommandOpCode is dioCommandOpSet then the vAddressOrValue can only be a value 0-65535.
If enDioCommandOpCode is dioCommandOpCodeJumpNear, dioCommandOpCodeLoop or dioCommandOpCodeCall, then vAddressOrValue can be a step address value or a string representing a label. The branch address range is 0-131072 (128K).
If enDioCommandOpCode is dioCommandOpCodeJumpFar, then vAddressOrValue can be a step address value or a string representing a label. The branch address range is 0-1048576 (1M)
GX5150:
If enDioCommandOpCode is dioCommandOpCodeJumpA or dioCommandOpCodeJumpB then vAddressOrValue can be a step address value or a string representing a label. The branch address range is 0-33554432 (32M).
See Also