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.
| | Object | Size | Description | A1 | A2 | B1 | B2 | C1 |
 | oFeedBack1T | 6 Bytes | Measures the time interval between a signal sent on one I/O line and returned on a second I/O line. | x | x | x |
|
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. |
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 |
|
| Sent | Constant | Description |
| 0 | cvFalse | The feedback signal has not been sent. |
| 1 | cvTrue | The 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 |
|
| Received | Constant | Description |
| 0 | cvFalse | The feedback signal has not been detected. |
| 1 | cvTrue | The 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 |
|
| Timeout | Constant | Description |
| 0 | cvFalse | An feedback signal was detected or the oFeedBack1T is still waiting to detect the feedback signal. |
| 1 | cvTrue | An 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 |
|
| Option | Description |
| 0 | The 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 |
|
| InvertOutS | Description |
| 0 | The feedback signal is sent by outputting 5 Volts. |
| 1 | The 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 |
|
| InvertInR | Description |
| 0 | The feedback signal is detected by inputting 5 Volts. |
| 1 | The 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 |
|
| Operate | Constant | Description |
| 0 | cvOff | The feedback signal is not sent. |
| 1 | cvOn | 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 |
|
|
|
Examples: |
| | In the following example, the oFeedBack1T Object is used.
| Visual Basic Syntax | C 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 | |
|
Connections: |
| See the oSonarDV and oSonarPL Objects for connection examples. |
Related Items:
|
| | The following table lists objects that use the oFeedBack1T Object.
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oSonarDV | Reads a Devantech SRF04 Ultrasonic Range Finder. | x | x | x |
 | oSonarPL | Reads a Polaroid 6500 sonar ranging module. | x | x | x |
|
| | The following table lists objects with related functions
| | Object | Description | A1 | A2 | B1 | B2 | C1 |
 | oFeedBack2 | Reads a 2 x 1 matrix feedback loop. | x | x |
 | oFeedBack4 | Reads a 4 x 4 matrix feedback loop. | x | x | x | x | x |
 | oFeedBack8 | Reads an 8 x 8 matrix feedback loop. | x | x |
 | oCycleTimeL | Measures the cycle time of an low-frequency input on any I/O line. | x | x | x |
|
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. |