oFeedBack2 Object

Main Index
Object List
Back to top of page Description:
 

A Hardware Object that reads a 2 x 1 matrix feedback loop.

 The following table lists the size and availability of the oFeedBack2 Object.
 ObjectSizeDescriptionA1A2B1B2C1
oFeedBack25 BytesReads a 2 x 1 matrix feedback loop.xx
Back to top of page Operation:
 

The oFeedBack2 Object alternately toggles two I/O lines used for sending signals. A third I/O line is monitored for feedback.  If feedback is detected, then a value indicating which line's feedback was detected is calculated. 

The 2 signal lines are individually and sequentially set high (5-Volts) while the feedback lines is used to detect any feedback from the signals.  Feedback is detected when the feedback lines detects the signal being sent out by the signal lines.  The oFeedBack2 Object handles all the required I/O logic.  The InvertOut property inverts the logic state of the outgoing signals and the InvertIn property inverts the logic state that is considered a detection.

When the Operate property is set to 1 the 2 x 1 feedback matrix is scanned.  If any outgoing signal is detected on the feedback line, the Result property is updated with a value and the "Any" property is set to 1.

The value of the Result property is calculated by ((signal1) + (signal2 * 2)).  The "Any" property will remain at 1 so long as at least 1 signal is detected.  Once all feedback is lost, the "Any" property is be cleared to 0.

The four oLogic properties; Ch1Only, Ch2Only and Both are also updated each time the feedback status is determined.  These three properties are exclusive and only one will be true at any time.

When the Operate property is set to 0 the feedback matrix scanning is suspended until the Operate property is set back to 1.

Back to top of page Properties:

The following table lists the properties of the oFeedBack2 Object:

Property

Description

Result
A value that indicates the result of testing the feed back loops.
Object Class: oNib Value Range: -1 to 1
Data Type: Numeric Default Value: 0
ValueDescription
0Nether channel's feedback was detected.
1The feedback from only channel 1 was detected.
2The feedback from only channel 2 was detected.
3The feedback from channel 1 and 2 was detected.
Ch1
A value that indicates that the first feedback loop returned the data.
Object Class: oVar1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Ch1Only
A value that indicates that ONLY the first feedback loop returned the data.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Ch2
A value that indicates that the second feedback loop returned the data.
Object Class: oVar1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Ch2Only
A value that indicates that ONLY the second feedback loop returned the data.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Both
A value that indicates that both feedback loops returned the data.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Any
A value that indicates that any feedback loop returned the data.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
IOLine1
A value that specifies which I/O Line is connected to the first signal driver.
Object Class: oIOLine Value Range: 0 - 31
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOLine help file for details.
IOLine2
A value that specifies which I/O Line is connected to the second signal driver.
Object Class: oIOLine Value Range: 0 - 31
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOLine help file for details.
InvertOut
A value that selects if the outputs to drivers are to be inverted.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Normally, the output lines specified by the IOLine1 and IOLine2 properties are set to logical high (+5 volts) when the feedback signal output.  By setting the InvertOut property to 1, the outputs can be inverted so that a logical low (0 volts) is used to output the signal.
InvertOutConstantDescription
0cvFalseThe outputs lines are taken to +5 volts to send the signal.
1cvTrueThe outputs lines are taken to 0 volts to send the signal.
IOLineS
A value that specifies which I/O Line is connected to the return sensor.
Object Class: oIOLine Value Range: 0 - 31
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOLine help file for details.
InvertIn
A value that selects if the input from the sensor is inverted.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Normally, the oFeedBack2 Object is expecting that a feedback detection is when the IOLineS property is taken to a logical high state.  By setting the InvertIn property to 1, the expected input can be inverted so that a logical low state indicates a detection.
InvertInConstantDescription
0cvFalseA detection is indicated with a logical 1.
1cvTrueA detection is indicated with a logical 0.
Operate
A value that selects whether or not the feed back loops are being tested.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOff

The feedback feed back loops are not being tested.

1cvOn

The feedback feed back loops are being tested.

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 Connections:
See the oIRPD Object for connections.
Back to top of page Examples:
 In the following example, the oFeedBack2 Object is used.
' This program monitors 
' two lines for feedback
' and displays the results 
' on I/O lines 24 and 25.
Dim A As New oFeedBack2
Dim B As New oDIO4

Sub Main()
  A.IOLine1 = 28
  A.IOLine2 = 30
  A.IOLineS = 29
  A.InvertIn = cvTrue
  A.Operate = 1
  B.IOPack = 3
  B.Direction = cvOutput
  Do
    B.Value = A.Value
  Loop
End Sub

Back to top of page Related Items:

 The following table lists objects that use the oFeedBack2 Object.
 ObjectDescriptionA1A2B1B2C1
oIRPDReads a Lynxmotion Dual IR Proximity Detector.xx
 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oFeedBack1TMeasures the time interval between a signal sent on one I/O line and returned on a second I/O line.xxx
oFeedBack4Reads a 4 x 4 matrix feedback loop.xxxxx
oFeedBack8Reads an 8 x 8 matrix feedback loop.xx
Back to top of page Version History and Bug List:
 Firmware Ver B2: Introduced.

Bugs: No known bugs.


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