oBus Object

Back to top of pageDescription:
 A Processing Object that takes the value of one object and copies it to another object.
 The following table lists the size and availability of the oBus Object and its variations.
 ObjectSizeDescriptionA1A2B1B2C1
oBus3 BytesProvides copy function.xxx
oBusI4 BytesWith 8-Bit Value on Input.xxx
oBusOWith 8-Bit Value on Output.xxx
oBusC5 BytesClocked copy function.xxx
oBusICClocked with 8-Bit Value on Input.xxx
oBusOCClocked with 8-Bit Value on Output.xxx
Back to top of pageOperation:
 

The normal operation of the oBus Object is to take the value of the Object that the Input property points to and copy it to the Object that the Output property points to once every Object list loop.

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.

If the Negate 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.

Back to top of pageProperty 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 a clocked version of the object is used.
 Continuous
operation
Clocked
operation
Pointers for both input and output:oBusoBusC
Signed 8-Bit Value on input:oBusIoBusIC
Signed 8-Bit Value on output:oBusOoBusOC
Back to top of pageProperties:
 

The following table lists the properties of the oBus Object:

Property

Description

Operate
A value that selects if the copy operation takes place.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOffThe copy operation is not performed.
1cvOnThe copy operation is performed.
Value
A value that is used in place of either the Input or Output property.
Object Class: oChar Value Range: -128 to +127
Data Type: Numeric Default Value: 0
Availability: oBusI,  oBusIC,  oBusO,  oBusOC
Input
A pointer to an object whose value will be copied to the Output Object.
Object Class: oValuePtrI Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Availability: oBus,  oBusC,  oBusO,  oBusOC
Output
A pointer to an object that will be updated with the value of the Input Object.
Object Class: oValuePtrO Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Availability: oBus,  oBusC,  oBusI,  oBusIC
Negate
A value that selects if the input value should be negated before it is stored in the output.
Object Class: oSelect0to1L Value Range: 0 - 1
Data Type: Numeric Default Value: 0
InvertInConstantDescription
0cvFalseThe value of the Input Object is not negated before it is copied to the Output Object.
1cvTrueThe value of the Input Object is negated before it is copied to the Output Object.
Process
Clock
See Clocked Objects for detail
Object Class: oClockedOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Availability: oBusC,  oBusIC,  oBusOC
Address
Returns a pointer to the address of the oCounter Object instance.
Object Class: oAddress Value Range: 0 - 127
Data Type:Pointer (Read Only) Default Value: Address of Object

Back to top of page 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.
Visual Basic Syntax C and Java Syntax
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
oA2DX A = New oA2DX;
oServoX S = New oServoX;
oBus B = New oBus;

Void Main(Void){
  A.IOLine = 1;
  A.Operate = cvTrue;
  S.IOLine = 31;
  S.Operate = cvTrue;
  B.Input.Link(A);
  B.Output.Link(S);
  B.Operate = cvTrue;
}
Basic Syntax 
A As oA2DX
S As oServoX
B As oBus

A.IOLine = 1
A.Operate = cvTrue
S.IOLine = 31
S.Operate = cvTrue
B.Input.Link(A)
B.Output.Link(S)
B.Operate = cvTrue
 
Back to top of pageRelated Items:
 The following table lists other objects with related functions.
 ObjectDescriptionA1A2B1B2C1
oBusF(I,O,C)6 Objects that copy one Object's Value to another Object with fuzziness.x
oMath(I,O,C)Provides mathematical functions.xxxxx
oDDELinkProvides a Dynamic-Data-Exchange link over the I2C network.xxxxx
oDataStrobeProvides a Data-Strobe in response to a value being written to it.xxxxx
oWire(1-4,C)Copies the value of an oLogic Object to another oLogic Object.xxxxx
Back to top of pageVersion History and Bug List:
 Firmware Ver B1: Introduced.

Bugs: No known bugs.


ooPIC Compiler Ver 6.0 (c) Copyright 1997 - 2007 Savage Innovations, LLC.