| Description: |
| | A Processing Object that takes the Value property of the Object to which the Input property links and copies it to the Value property of the Object to which the Output property links. |
| Operation: |
| | The normal operation of the oBus Object is to take the Value property of the Object to which the Input property links and copy it to the Value property of the Object to which the Output property links once every Object list loop. The Mode property modifies the operation so that this function only occurs once each time the Operate property transitions from 0 to 1. If the property option "C" is used, then the operation is modified so that the copy function only occurs once each time the Flag-property to which the ClockIn property points transitions in the manner specified by the InvertC property. If the InvertIn property is set to 1, then the Value of the Input Object is negated before it is copied to the Output Object. An 8-Bit signed Value property can be substituted for either the Input or the Output property by specifying the appropriate property options. |
| Property Options: |
| | The oBus Object has 6 variants which are selected with the 3 property options: I, O, and C. - I specifies that the Input property is replaced with a Value property.
- O specifies that the Output property is replaced with a Value property.
- C specifies that the Mode property is replaced with the ClockIn and InvertC properties.
| | Continuous operation | Clocked operation |
|---|
| Pointers for both input and output: |  | oBus |  | oBusC |
|---|
| Signed 8-Bit Value on input: |  | oBusI |  | oBusIC |
|---|
| Signed 8-Bit Value on output: |  | oBusO |  | oBusOC |
|
| Storage size & Availability: |
| | The following table lists the size and availability of the oBus Object and its variants:
| Object | Size | Version |
|---|
 | oBus | 3 Bytes | B.1.0 |  | oBusI | 4 Bytes |  | oBusO |  | oBusC | 5 Bytes |  | oBusIC |  | oBusOC |
|
| Properties: |
| | The following table lists the Properties of the oBus Object:
| Property | Description |
|---|
| Address | Returns a pointer to the address of the oBus Object instance. Data-Type: Address, Read-Only Data-Range: 0 - 127 |
|---|
| ClockIn | A pointer to an Object's Flag property that will be used to determine when the oBus Object copies the value. Data-Type: Flag-Pointer Data-Range: 0 - 127 Availability: oBusC, oBusIC, oBusOC |
|---|
| Input | A pointer to an Object whose Value property will be copied to the Output Object's Value property. Data-Type: Object-Pointer Data-Range: 0 - 127 Availability: oBus, oBusC, oBusO, oBusOC |
|---|
| InvertC | A value that specifies the active transition state of the Flag property to which ClockIn points. Data-Type: Bit, Flag Data-Range: 0 - 1 Availability: oBusC, oBusIC, oBusOC The following table lists the values of the InvertC property:
| InvertC | Constant | Description |
|---|
| 0 | cvFalse | The copy function is performed when the Flag property linked to by the ClockIn property transitions from 0 to 1 |
|---|
| 1 | cvTrue | The copy function is performed when the Flag property linked to by the ClockIn property transitions from 1 to 0 |
|
|---|
| InvertIn | A value that specifies if the value of the Input Object is negated before it is copied to the Output object. Data-Type: Bit, Flag Data-Range: 0 - 1 The following table lists the values of the InvertIn property:
| InvertIn | Constant | Description |
|---|
| 0 | cvFalse | The value of the Input Object is not negated before it is copied to the Output Object. |
|---|
| 1 | cvTrue | The value of the Input Object is negated before it is copied to the Output Object. |
|
|---|
| Mode | A value that specifies if the copy function is performed continuously or only when the Operate property transitions from 0 to 1. Data-Type: Bit Data-Range: 0 - 1 Availability: oBus, oBusI, oBusO The following table lists the values of the Mode property:
| Mode | Description |
|---|
| 0 | The value of the Input Object is continuously copied to the Output Object. |
|---|
| 1 | The value of the Input Object is copied to the Output Object only when Operate property transitions from 0 to 1. |
|
|---|
| Operate | A value that specifies whether or not the operation is performed. Data-Type: Bit, Flag Data-Range: 0 - 1 The following table lists the values of the Operate property:
| Operate | Constant | Description | | 0 | cvFalse | The copy function is not performed. | | 1 | cvTrue | The copy function is performed. |
|
|---|
| Output | A pointer to an Object whose Value property is set with a value copied from the input Object's Value property. Data-Type: Object-Pointer Data-Range: 0 - 127 Availability: oBus, oBusC, oBusI, oBusIC |
|---|
| Value | A signed 8-Bit value that can be on either the input or the output side of the oBus Object. Data-Type: Byte Data-Range: -128 to +127 Availability: oBusI, oBusIC, oBusO, oBusOC |
|
| Example: |
| | In the following example, a Virtual Circuit is made that uses the oBus Object to copy the value of an oA2DX Object to the value of an oServoX Object allowing a potentiometer to position a RC Servo.
Dim A as new oA2DX
Dim S as new oServoX
Dim B as new oBus
Sub Main()
A.IOLine = 1
A.Operate = cvTrue
S.IOLine = 31
S.Operate = cvTrue
B.Input.Link(A)
B.Output.Link(S)
B.Operate = cvTrue
End Sub
|
|
| See Also: |
| | oMath Object - Modifies a value as it copies. oChanged Object - Detects if a value has changed as it copies. oDDELink Object - Copies values between two Objects in two different OOPics. oWire Object - Copies a Boolean value. |