Description: |
| | The oWire Object reads a Boolean value from an Object and copies that value to up to four other objects. The oWire can be configured to invert the value that it copies and has the option of either continuously copying the value or only copying when an event occurs. |
| | The following table lists the size and availability of the oWire Object and its variations.
| | Object | Size | Description | A1 | A2 | B1 | B2 | C1 |
 | oWire | 3 Bytes | Copies the value of an oLogic Object to another oLogic Object. | x | x | x | x | x |
 | oWire2 | 4 Bytes | Copies the value of an oLogic Object to 2 other oLogic Objects. | x | x | x | x | x |
 | oWire3 | 5 Bytes | Copies the value of an oLogic Object to 3 other oLogic Objects. | x | x | x | x | x |
 | oWire4 | 6 Bytes | Copies the value of an oLogic Object to 4 other oLogic Objects. | x | x | x | x | x |
 | oWireC | 5 Bytes | Clocked copy of an oLogic Object's value to another oLogic Object. | x | x | x |
 | oWire2C | 6 Bytes | Clocked copy of an oLogic Object's value to 2 other oLogic Objects. | x | x | x |
 | oWire3C | 7 Bytes | Clocked copy of an oLogic Object's value to 3 other oLogic Objects. | x | x | x |
 | oWire4C | 8 Bytes | Clocked copy of an oLogic Object's value to 4 other oLogic Objects. | x | x | x |
|
Operation: |
| | The normal operation of the oWire Object is to take the value of the oLogic Object pointed to by the Input property and copy it to the oLogic Objects pointed to by the Output properties once every Object List Loop. The value that is copied can optionally be inverted by setting the appropriate InvertOut property to 1. 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. |
Property Options: |
| | The oWire Object has 8 variants which are selected with the property options 2, 3, 4 and C.
- 2 specifies that there are 2 outputs.
- 3 specifies that there are 3 outputs.
- 4 specifies that there are 4 outputs.
- C specifies that a clocked version of the object is used.
| | Continuous operation | Clocked operation |
| Single Output |  | oWire |  | oWireC |
| Two Outputs |  | oWire |  | oWireC |
| Three Outputs |  | oWire |  | oWireC |
| Four Outputs |  | oWire |  | oWireC |
|
Properties: |
| | The following table lists the properties of the oWire Object:
|
Example: |
| | In the following example, a Virtual Circuit is created that uses the oWire Object to monitor a push button switch on I/O line 9. When the push button is pressed, it turns on I/O lines 8 and 10 and when it is released, it turns off I/O lines 8 and 10.
| Visual Basic Syntax | C and Java Syntax |
' This program creates a Virtual
' Circuit that reads an input
' and sets two outputs to the
' same value.
Dim W As New oWire2
Dim S As New oSwitch
Dim L As New oLED
Dim D As New oDIO1
Sub Main()
'ooPIC.PullUp = 1
S.IOLine = 9
L.IOLine = 8
L.TurnOn
D.IOLine = 10
D.Direction = cvOutput
W.Input.Link(S.Position)
W.Output1.Link(L.Operate)
W.Output2.Link(D.State)
W.Operate = cvTrue
End Sub | // This program creates a Virtual
// Circuit that reads an input
// and sets two outputs to the
// same value.
oWire2 W = New oWire2;
oSwitch S = New oSwitch;
oLED L = New oLED;
oDIO1 D = New oDIO1;
Void Main(Void){
// ooPIC.PullUp = 1
S.IOLine = 9;
L.IOLine = 8;
L.TurnOn;
D.IOLine = 10;
D.Direction = cvOutput;
W.Input.Link(S.Position);
W.Output1.Link(L.Operate);
W.Output2.Link(D.State);
W.Operate = cvTrue;
} |
| Basic Syntax |
' This program creates a Virtual
' Circuit that reads an input
' and sets two outputs to the
' same value.
W As oWire2(S.Position,L.Operate,,D.State,,cvOn)
S As oSwitch(9)
L As oLED(8,7,cvOff)
D As oDIO1(10,cvOutput) |
|
Related Items: |
| | The following table lists other objects with related functions.
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oGate(1-8,C) | 16 Objects that provide logic-gate functions. | 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. |