oDDELink Object

Back to top of page Description:
 

A Processing Object that dynamically exchanges data with other ooPICs by transmitting information over an I2C network to which both ooPICs are connected.

 The following table lists the size and availability of the oDDELink Object.
 ObjectSizeDescriptionA1A2B1B2C1
oDDELink8 BytesProvides a Dynamic-Data-Exchange link over the I2C network.xxxxx
Back to top of page Operation:
 

An oDDELink Object uses the I2C network to transfer data to and from a local Object located within the same physical ooPIC and a remote Object located in any other physical ooPIC connected to the I2C network. An oDDELink Object is required in both the Local ooPIC and the Remote ooPIC to complete a communication link over the I2C network. To create a communication link, three specifications must be made: (1) The local Object is specified by the Input and the Output properties of the local oDDELink Object (2) The Remote Object is specified with the Input and Output properties of the Remote oDDELink Object (3) The Remote oDDELink Object is specified by the Node and Location properties of the local oDDELink object (See "Using the oDDELink Object" in the ooPIC Programmers guide for more information on the 3 specifications). When the Operate property of the local oDDELink Object is set to cvTrue, it will initiate a communication link between the local oDDELink Object and the remote oDDELink Object and transfer the data. When a data transfer is successfully initiated, the values of the oValue Objects pointed to by the Input and Output properties will have been copied in the direction specified by the Direction property and the Operate property will be cleared to 0. If the network is busy or if an I2C arbitration is lost, the transmission will wait until the network is not busy and try again.

NOTE: You may not link to a system object (ooPIC.Hz1 for instance) the compiler will not allow this.

Back to top of page Properties:
 

The following table lists the properties of the oDDELink Object:

Property

Description

Sync
A value that is used to instruct the oDDELink object to synchronize its data with the remote oDDELink object's data.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
The following table list the values of the Sync Property:
SyncConstantDescription
0cvFalse

The Value properties are not synchronizing.

1cvTrue

The Value properties are synchronizing.

Input
A pointer to a local oValue Object whose value will be send to the remote-object.
Object Class: oValuePtrI Value Range: Any oValue Object
Data Type: Pointer Default Value: Null
Output
A pointer to a local oValue Object whose value will be updated with the remote-object's value.
Object Class: oValuePtrO Value Range: Any oValue Object
Data Type: Pointer Default Value: Null
Direction
A value that selects the direction of the data flow on the I2C network.
Object Class: oSelect0to1L Value Range: 0 - 1
Data Type: Numeric Default Value: 0
The following table list the values of the Direction Property:
DirectionConstantDescription
0cvSend

Data is copied from the local Object specified by the Link property to the remote Object specified by the Node and Location properties.

1cvReceive

Data is copied from the remote Object specified by the Node and Location properties to the local Object specified by the Link property.

Node
A value that specifies the Node address of the I2C networked ooPIC that contains the remote oDDELink object.
Object Class: oVar7 Value Range: 0 - 127
Data Type: Numeric Default Value: 0
The following table list the values of the Node Property:
NodeDescription
0

The oDDELink Object instance is inactive.

1 - 127

The oDDELink Object will exchange data with the ooPIC on the I2C network that has that Node address.

Location
A pointer to a remote oDDELink object instance whose Link-object's data will be exchanged.
Object Class: oVar7 Value Range: 0 - 127
Data Type: Numeric Default Value: 0
Operate
A value that selects whether or not the data is updated.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOff

The Value properties are not updated.

1cvOn

The Value properties are updated.

Transmitting
A value that indicates if the oDDELink object is currently transferring data.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric (Read-Only) Default Value: 0
The following table lists the values of the Transmitting Property:
TransmittingConstantDescription
0cvFalse

The oDDELink Object instance is idle.

1cvTrue

The oDDELink Object instance is transferring data.

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 Examples:
 In the following examples, the oDataStrobe Object is used
'This program creates a Virtual 
'Circuit that sends the value of 
'V to an oDDELink Object in 
'another ooPIC.

Dim D As New oDDELink
Dim V As New oByte

Sub Main()
  ooPIC.Node = 1
  D.Input.Link(V)
  D.Node = 2
  D.Location = 41
  D.Direction = cvSend
  D.Operate = cvTrue
  Do
   If D.Transmitting = cvFalse then
     V = V + 1
     D.Sync = 1
   End If
  Loop
End Sub
'This program creates a Virtual 
'Circuit that receives the 
'value of l from an oDDELink 
'Object in another ooPIC.

Dim D As New oDDELink
Dim L As New oDio8

Sub Main()
  ooPIC.Node = 2
  D.Output.Link(L)
  D.Operate = cvTrue
  L.IOGroup = 3
  L.Direction = cvOutput
End Sub

Back to top of page Related Items:

 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
Back to top of page Version History and Bug List:
 Firmware Ver A1: Introduced.

Bugs: No known bugs.


 

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