oLPT Object

Back to top of page Description:
 

The oLPT Object is a Hardware Object that outputs data to a printer.  

 The following table lists the size and availability of the oLPT Object.
 ObjectSizeDescriptionA1A2B1B2C1
oLPT6 BytesControls a printer.xx
Back to top of page Operation:
 The oLPT Object uses one I/O Group and two I/O Lines to send data to a printer.

When the oLPT Object's Value property is assigned, the assigned value is sent out the I/O Lines specified by the IOGroup and a data strobe is generated on the I/O Line specified by the IOLineS property.

The IOLineB property specifies which I/O line to read the printer's busy line.

The DIO property is an instance of the oDIO8F object which is created when the oLPT object is.  The oLPT object configures the oDIO8F object in such a way that it will provide the proper I/O control of the printer.  Changing attributes of the oDIO8F may change the way the printer behaves to something different than the way described in this document.  (see oDIO8F object for more detail on how the oDIO8F Object sends data to the printer)

Back to top of page Properties:

The following table lists the properties of the oLPT Object:

Property

Description

Value
A value who's binary data is sent to the Printer.
Object Class: oByte Value Range: 0 - 255
Data Type: Numeric Default Value: 0
VString
The Value property expressed as a string.
Object Class: oProperty
Data Type: Numeric
IOGroup
A value that specifies which group of 8 I/O lines is connected to the printer's data lines.
Object Class: oIOGroup Value Range: 0 - 3
Data Type: Numeric Default Value: 0
Some I/O Lines have special purposes.  Be sure to see oIOGroup for details.
IOLineS
A value that specifies which I/O Line to use for the printer's data strobe line.
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.
IOLineB
A value that specifies which I/O line is used for the printer's busy status line.
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.
Operate
A value that selects if new data is sent to the printer.
Object Class: oOperate Value Range: 0 - 1
Data Type: Numeric Default Value: 0
OperateConstantDescription
0cvOffNew data is not sent to the printer.
1cvOnNew data is sent to the printer.
DIO
The I/O function object used to control the printer.
Object Class: oDIO8F Value Range: 0 - 255
Data Type: Numeric Default Value: 0
When the oLPT object is created, it configures its oDIO8F Object to have a Busy Line input with the following assignment:

Attributes of the printer's operation can be adjusted by directly manipulating the oDIO8F object, but note that doing so may change the way the printer behaves to something different than the way described in this document.

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 oLPT Object.
Visual Basic SyntaxC and Java Syntax
'This program sends the line
' "Hello world."
'to a printer.

Dim Lpt1 As New oLPT

Sub Main()  
  Lpt1.IOGroup = 3
  Lpt1.IOLineS = 11
  Lpt1.IOLineB = 8
  Lpt1.Operate = cvTrue
  Do		
    If Lpt1.IOLineB.IsHigh Then
      Lpt1.VString = "Hello world."
      Lpt1.Value = 13 
      Delay = 100  
    End If
  Loop	
End Sub
// This program sends the line
// "Hello world."
// to a printer.

oLPT Lpt1 = New oLPT;

Void Main(Void){
  Lpt1.IOGroup = 3;
  Lpt1.IOLineS = 11;
  Lpt1.IOLineB = 8;
  Lpt1.Operate = cvTrue;
  Do{
    If (Lpt1.IOLineB.IsHigh){
      Lpt1.VString = "Hello world.";
      Lpt1.Value = 13;
      Delay = 100;
    }
  } While (1);
}
Basic Syntax 
'This program sends the line
' "Hello world."
'to a printer.

Dim Lpt1 As New oLPT(3,11,8,cvOn)

Do
  If Lpt1.IOLineB.IsHigh Then
    Lpt1.VString = "Hello world."
    Lpt1.Value = 13 
    Delay = 100  
  End If
Loop
 

Back to top of page Related Items:

 The following table lists objects with related functions
 ObjectDescriptionA1A2B1B2C1
oLCDSEControls a Scott Edwards Serial LCD Display.xxx
oVideoICControls an Intuitive Circuits On-Screen Display Character Overlay board.xxx
Back to top of page Version History and Bug List:
 Firmware Ver B1: Introduced.

Bugs: No known bugs.


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