oFeedBack1T Object

Main Index
Object List
Back to top of page Description:
 

The oFeedBack1T Object is an I/O Function Object that times the signal return time in a feedback loop.  

Whether or not the feedback is detected and how long it took to receive the feedback is reported.

 The following table lists the size and availability of the oFeedBack1T Object.
 ObjectSizeDescriptionA1A2B1B2C1
oFeedBack1T6 BytesMeasures the time interval between a signal sent on one I/O line and returned on a second I/O line.xxx
Back to top of page Operation:
 When the oFeedBack1T Object's Operate property transitions from 0 to 1, a signal is sent out the I/O line specified by the IOLineS property, the Sent property is set to 1 and the Received property is cleared to 0. 

After the signal is sent, the oFeedBack1T Object waits for the feed back indicating that the sent signal was detected by the I/O Line specified by the IOLineR property.  While it is waiting, a counter increments every 13.83us.  Once the feedback is detected, the current counter value (which is the time it took for the feedback to be detected) is stored in the Duration property, the Sent property is cleared to 0 and the Received property is set to 1.

If the feedback signal was not detected by the time that the counter reaches 4095 (Approximately 1/20th of a second), then the Sent property is cleared to 0, the Received property is set to 0. and the Timeout property is set to 1.

The feedback signal is sent once for each time that the Operate property transitions from 0 to 1.  This is different than most of the other ooPIC Objects which continually update the properties. 

Back to top of page Properties:

The following table lists the properties of the oFeedBack1T Object:

Property

Description

Duration
A value that indicates the duration between outputting the signal and detecting the feedback signal.
Object Class: oInt Value Range: 0 - 32768
Data Type: Numeric Default Value: 0
The duration is in 13.83us increments.
Sent
A value that indicates that the sending signal was outputted.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
SentConstantDescription
0cvFalseThe feedback signal has not been sent.
1cvTrueThe feedback signal has been sent and the oFeedBack1T is waiting for its return.
Received
A value that indicates that the feedback signal was detected.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
ReceivedConstantDescription
0cvFalse

The feedback signal has not been detected.

1cvTrueThe feedback signal was detected.
TimeOut
A value that indicates that the feedback signal was not received in the allotted amount of time.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
TimeoutConstantDescription
0cvFalse

An feedback signal was detected or the oFeedBack1T is still waiting to detect the feedback signal.

1cvTrueAn feedback signal was still not received after a short period of time.
IOLineS
A value that specifies which I/O Line is used to output the sending signal.
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.
Option
A value that selects if the sent signal is a pulse or a state change.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OptionDescription
0The feedback signal is sent by pulsing the active state.
1

The feedback signal is sent by changing to the active state.

InvertS
A value that selects if the sending signal output is inverted.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
InvertOutSDescription
0

The feedback signal is sent by outputting 5 Volts.

1The feedback signal is sent by outputting 0 Volts.
Availability: This property was added if firmware version C.1
IOLineR
A value that specifies which I/O Line is used to input the received feedback signal.
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.
InvertR
A value that selects if the received feedback signal is inverted.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
InvertInRDescription
0

The feedback signal is detected by inputting 5 Volts.

1The feedback signal is detected by inputting 0 Volts.
Availability: This property was added if firmware version C.1
Operate
A value that selects when to send the feedback signal.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOff

The feedback signal is not sent.

1cvOn

The feedback signal is sent once.

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 example, the oFeedBack1T Object is used.
Visual Basic SyntaxC and Java Syntax
'This program reads an oFeedBack1T
'Object and outputs the time
'on Scott Edwards LCD.

Dim A As New oFeedBack1T
Dim D As New oLCDSE

Sub Main()
  A.IOLineR = 31
  A.IOLineS = 30
  A.Operate = 1  
  D.IOLine = 16 
  Do  
    A.Operate.Pulse(1,1,250)
    D.Clear
    D.VString = Str$(A)
  Loop  
End Sub 
// This program reads an oFeedBack1T
// Object and outputs the time
// on Scott Edwards LCD.

oFeedBack1T A = New oFeedBack1T;
oLCDSE D = New oLCDSE;

Void Main(Void){
  A.IOLineR = 31;
  A.IOLineS = 30;
  A.Operate = 1;
  D.IOLine = 16;
  Do{
    A.Operate.Pulse(1,1,250);
    D.Clear;
    D.VString = Str$(A);
  } While (1);
}
Basic Syntax 
'This program reads an oFeedBack1T
'Object and outputs the time
'on Scott Edwards LCD.

A As oFeedBack1T(31,,,30,,cvOn)
D As oLCDSE(16)

Do  
  A.Operate.Pulse(1,1,250)
  D.Clear
  D.VString = Str$(A)
Loop
 
Back to top of page Connections:
See the oSonarDV and oSonarPL Objects for connection examples.

Back to top of page Related Items:

 The following table lists objects that use the oFeedBack1T Object.
 ObjectDescriptionA1A2B1B2C1
oSonarDVReads a Devantech SRF04 Ultrasonic Range Finder.xxx
oSonarPLReads a Polaroid 6500 sonar ranging module.xxx
 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oFeedBack2Reads a 2 x 1 matrix feedback loop.xx
oFeedBack4Reads a 4 x 4 matrix feedback loop.xxxxx
oFeedBack8Reads an 8 x 8 matrix feedback loop.xx
oCycleTimeLMeasures the cycle time of an low-frequency input on any I/O line.xxx
Back to top of page Version History and Bug List:
 Firmware Ver B1: Introduced.
Firmware Ver C1: The InvertS property was added.
Firmware Ver C1: The InvertR property was added.

Bugs: No known bugs.


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