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.
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