oOneShot Object

Back to top of page Description:
 A Processing Object that produces a one-pulse output in response to an input value transitioning from 0 to 1.
 The following table lists the size and availability of the oOneShot Object.
 ObjectSizeDescriptionA1A2B1B2C1
oOneShot3 BytesAn Object that produces a one-pulse output in response to logic transition.xxxxx
Back to top of page Operation:
 An oOneShot Object stays idle until the oLogic Object pointed to by the Input property has changed from a logical Low state to a logical High state. When then this happens, it activates the one-shot logic and the Result property is set to 1 for an amount of time determined by the ooPIC's Object-Loop. The ooPIC's Object-Loop is calculated so that all of the other objects can process the a transition one and only one time. In addition to setting the Result property, the oLogic Object pointed to by Output is also set to 1. After the ooPIC's Object-Loop time has expired, the Result property is reset back to 0 and the oLogic Object pointed to by the Output pointer is also set to 0. The oOneShot Object will wait until the oLogic Object pointed to by the Input property is set to 0 before it can be activated again.

If the Operate property is set to 0, the transitions are ignored.

Back to top of page Properties:

The following table lists the properties of the oOneShot Object:

Property

Description

Operate
A value that selects if the Result property is pulsed once.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
The following table lists the values of the Operate Property:
OperateConstantDescription
0cvOff

The Result property is not changed.

1cvOn

The Result property is set to 1 for 1 Object-Loop, then returned to 0.

Input
A pointer to an oLogic Object whose value will be used to trigger the One-Shot pulse.
Object Class: oLogicPtrI Value Range: Any oLogic Object
Data Type: Pointer Default Value: Null
InvertIn
A value that selects if the Input Value is inverted before used in the One-Shot operation.
Object Class: oSelect0to1L Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Output
A pointer to an oLogic Object that will be updated with the One-Shot pulse.
Object Class: oLogicPtrO Value Range: Any oLogic Object
Data Type: Pointer Default Value: Null
InvertOut
A value that selects if the Boolean result of the One-Shot operation is inverted before it is stored into the Output oLogic Object.
Object Class: oSelect0to1 Value Range: 0 - 1
Data Type: Numeric Default Value: 0
Result
The Boolean result of the one-shot evaluation. Indicates that the Operate property has transitioned from a logical Low to a logical High.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
The following table list the values of the Result Property.
ResultConstantDescription
0cvFalse

The oOneShot is not in its active state.

1cvTrue

The oOneShot is in its active state.

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 oOneShot Object is used
'This program create a Virtual
'Circuit that will output a pulse
'that is one Object list loop in
'duration when a button is pressed.

Dim Y As New oOneshot
Dim I As New oDio1
Dim O As New oDio1

Sub Main()
  ooPIC.Node = 5
  ooPIC.Pullup = 1
  Y.Input.Link(I)
  Y.InvertIn = cvTrue
  Y.Output.Link(O)
  Y.Operate = 1
  O.IOLine = 5
  O.Direction = cvOutput
  I.IOLine = 8
  I.Direction = cvInput
End Sub

Back to top of page Related Items:

 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oRepeatProvides a repeat function.xxx
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.