oOperate Object

Back to top of page Description:
 The oOperate object provides on-off switch function.
 The following table lists the size and availability of the oOperate Object.
 ObjectSizeDescriptionA1A2B1B2C1
oOperate1 Byte xxxxx
Back to top of page Operation:
 the oOperate object is used in various objects to indicate when to operate.

Some objects do internal configurations when switched from off to on.  Other objects simply skip any processing when switched off.

Internally, the oOperate property uses an oLogic object as its default value.  This allows a virtual circuit to connect to the oOperate object.

Back to top of page Properties:

The following table lists the properties of the oOperate Object:

Property

Description

Value
The value of the 1 bit.
Object Class: oLogic Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOffThe switch if off.
1cvOnThe switch if on.
IsOn
A value that indicates if the bit is 1.
Object Class: oProperty Value Range: 0 - 1
Data Type: Numeric (Read-Only) Default Value: 0
Used in a conditional statement, the IsOn function reports true when the switch is on.
IsOnConstantDescription
cvFalsecvOffThe switch if off.
cvTruecvOnThe switch if on.
IsOff
A value that indicates if the bit is 0.
Object Class: oProperty Value Range: 0 - 1
Data Type: Numeric (Read-Only) Default Value: 1
Used in a conditional statement, the IsOn function reports true when the switch is off.
IsOnConstantDescription
cvFalsecvOffThe switch if on.
cvTruecvOnThe switch if off.
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 Example:

The following examples use the oOperate Object.
Visual Basic SyntaxC and Java Syntax
' This program pulses the Operate
' property of an oSonarDV

Dim A As New oSonarDV
Dim D As New oLCDSE

Sub Main()
  A.IOLineE = 31
  A.IOLineP = 30
  A.Operate = 1  
  D.IOLine = 16 
  Do  
    A.Operate.Pulse(1,1,250)
    D.Clear
    D.VString = Str$(A/64)
  Loop  
End Sub 
// This program pulses the Operate
// property of an oSonarDV

oSonarDV A = New oSonarDV;
oLCDSE D = New oLCDSE;

Void Main(Void){
  A.IOLineE = 31;
  A.IOLineP = 30;
  A.Operate = 1;
  D.IOLine = 16;
  Do{
    A.Operate.Pulse(1,1,250);
    D.Clear;
    D.VString = Str$(A/64);
  } While (1);
} 
Basic Syntax 
' This program pulses the Operate
' property of an oSonarDV

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

Do  
  A.Operate.Pulse(1,1,250)
  D.Clear
  D.VString = Str$(A/64)
Loop
 

Back to top of page Related Items:

 The following table lists objects that use the oOperate Object.
 ObjectDescriptionA1A2B1B2C1
o7SegAn Object that displays a number on a 7-Segment LED display.x
oBumper4Reads a 4-contact bumper.xxx
oBitShifterAn Object that outputs a bit pattern that shifts.xxx
oCenterSwitch4An Object that finds the center most active Input.xxx
oBusAn Object that copies one Object's Value to another Objectxxx
oCompareCompares an Object's Value to set points.xxx
oA2DControls the PIC's A2D Hardware Module.xxxxx
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.