 |
oGate Object
|
|
|
Description: |
| | A Processing Object that can be configured to do multi-input logic gate operations like AND, NAND, OR, NOR, XOR, XNOR, NOT, LATCH, Etc. |
| | The following table lists the size and availability of the oGate Object and its variations.
| | Object | Size | Description | A1 | A2 | B1 | B2 | C1 |
 | oGate | 3 Bytes | Copies the value of an oLogic Object to another oLogic Object. | x | x | x | x | x |
 | oGate2 | 4 Bytes | Copies the value of an oLogic Object to 2 other oLogic Objects. | x | x | x | x | x |
 | oGate3 | 5 Bytes | Copies the value of an oLogic Object to 3 other oLogic Objects. | x | x | x | x | x |
 | oGate4 | 6 Bytes | Copies the value of an oLogic Object to 4 other oLogic Objects. | x | x | x | x | x |
 | oGate5 | 7 Bytes | Copies the value of an oLogic Object to another oLogic Object. | x | x | x | x | x |
 | oGate6 | 8 Bytes | Copies the value of an oLogic Object to 2 other oLogic Objects. | x | x | x | x | x |
 | oGate7 | 9 Bytes | Copies the value of an oLogic Object to 3 other oLogic Objects. | x | x | x | x | x |
 | oGate8 | 10 Bytes | Copies the value of an oLogic Object to 4 other oLogic Objects. | x | x | x | x | x |
 | oGateC | 5 Bytes | Clocked copy of an oLogic Object's value to another oLogic Object. | x | x | x |
 | oGate2C | 6 Bytes | Clocked copy of an oLogic Object's value to 2 other oLogic Objects. | x | x | x |
 | oGate3C | 7 Bytes | Clocked copy of an oLogic Object's value to 3 other oLogic Objects. | x | x | x |
 | oGate4C | 8 Bytes | Clocked copy of an oLogic Object's value to 4 other oLogic Objects. | x | x | x |
 | oGate5C | 9 Bytes | Clocked copy of an oLogic Object's value to another oLogic Object. | x | x | x |
 | oGate6C | 10 Bytes | Clocked copy of an oLogic Object's value to 2 other oLogic Objects. | x | x | x |
 | oGate7C | 11 Bytes | Clocked copy of an oLogic Object's value to 3 other oLogic Objects. | x | x | x |
 | oGate8C | 12 Bytes | Clocked copy of an oLogic Object's value to 4 other oLogic Objects. | x | x | x |
|
Operation: |
| | An oGate Object takes the value of the oLogic Object pointed to by one or more Input pointers and performs a logical OR operation. The logical OR operation can be changed by setting the InvertIn(1-8), InvertOut, and the Exclusive properties. The properties InvertIn(1-8) and InvertOut invert the input values to the logical OR operation while the Exclusive property determines if the inputs will be evaluated with a Boolean-OR or a Boolean-XOR logic. In normal operation, the Operate property determines if the Result property is updated with the final result of the logic operation. Each time the Result property is updated, its value is also copied to the oLogic Object pointed to by the Output property. If the InvertOut property is set to 1, then the value of the Result property is inverted before it is copied. If the property option "C" is used, then the operation is modified so that this function only occurs once each time an oLogic Object transitions. oGate Objects can be setup to emulate the functionality of several different integrated circuits such as 7400, 7402, 7404, 7408, 7410, 7420, 7428, 7430, 7475, etc by setting the InvertIn(1-8), InvertOut and Exclusive properties. |
Property Options: |
| | The oGate Object has 16 variants which are selected with the property options 2, 3, 4, 5, 6, 7, 8 and C.
- 2 specifies that there are 2 inputs.
- 3 specifies that there are 3 inputs.
- 4 specifies that there are 4 inputs.
- 5 specifies that there are 5 inputs.
- 6 specifies that there are 6 inputs.
- 7 specifies that there are 7 inputs.
- 8 specifies that there are 8 inputs.
- C specifies that the Clock property is added.
| | Continuous operation | Clocked operation | | | Continuous operation | Clocked operation |
| Single Input |  | oGate |  | oGateC | | Five Inputs |  | oGate5 |  | oGate5C |
| Two Inputs |  | oGate2 |  | oGate2C | | Six Inputs |  | oGate6 |  | oGate6C |
| Three Inputs |  | oGate3 |  | oGate3C | | Seven Inputs |  | oGate7 |  | oGate7C |
| Four Inputs |  | oGate4 |  | oGate4C | | Eight Inputs |  | oGate8 |  | oGate8C |
|
Properties: |
| | The following table lists the properties of the oGate Object:
|
Example:
|
| | In the following example, a Virtual Circuit is created that uses the oGate Object to monitor two push button switches on I/O line 9 and 11 and when both are pressed, turn on I/O line 10.
| Visual Basic Syntax | C and Java Syntax |
Dim G As New oGate2
Dim S1 As New oDIO1
Dim S2 As New oDIO1
Dim L As New oDIO1
Sub Main()
'ooPIC.PullUp = 1
S1.IOLine = 9
S1.Direction = cvInput
S2.IOLine = 11
S2.Direction = cvInput
L.IOLine = 10
L.Direction = cvOutput
L.Value = 0
G.Input1.Link(S1)
G.Input2.Link(S2)
G.Output.Link(L)
G.InvertOut = cvTrue
G.Operate = cvTrue
End Sub | oGate2 G = New oGate2;
oDIO1 S1 = New oDIO1;
oDIO1 S2 = New oDIO1;
oDIO1 L = New oDIO1;
Void Main(Void){
'ooPIC.PullUp = 1;
S1.IOLine = 9;
S1.Direction = cvInput;
S2.IOLine = 11;
S2.Direction = cvInput;
L.IOLine = 10;
L.Direction = cvOutput;
L.Value = 1;
G.Input1.Link(S1);
G.Input2.Link(S2);
G.Output.Link(L);
G.InvertOut = cvTrue;
G.Operate = cvTrue;
} |
| Basic Syntax |
G Var oGate2(S1,,S2,,L,cvTrue,,cvOn)
S1 Var oDIO1(9,cvInput)
S2 Var oDIO1(11,cvInput)
L Var oDIO1(10,cvOutput) |
|
Related Items: |
| | The following table lists other objects with related functions.
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oWire(1-4,C) | Copies the value of an oLogic Object to another oLogic Object. | x | x | x | x | x |
 | oBus(I,O,C) | 6 Objects that copy one Object's Value to another Object | x | x | x |
|
Version History and Bug List: |
| | Firmware Ver A1: Introduced. Firmware Ver B1: Clocking added.Bugs: No known bugs. |
|