VisionBox Interface Library  1.7.10.0 (2024-04-16)
VIB::LCD Class Reference
+ Inheritance diagram for VIB::LCD:

Detailed Description

This class controls the status display of the Machine Vision Controller.

The display can be used to show user generated text by using WriteText() and ClearDisplay(). Any visible ASCII character can be used.

Further, the FPGA is able to generate text without CPU/OS or user interaction. See ConfigureAutoText() and VIB::LCD::LCD_AUTO_TYPE for available modes.

It is also possible to mix user and auto generated content. For example: show auto-generated on-time in the first line and user content in the second line.

This class is generic so the size of the display can be read out with GetNumberOfCharactersPerLine() and GetNumberOfLines().

Public Types

enum  LCD_AUTO_TYPE
 Definitions for automatic text display, used by ConfigureAutoText() More...
 

Public Member Functions

bool ClearDisplay ()
 Clears the entire display. More...
 
bool ConfigureAutoText (const VIB::LCD::LCD_AUTO_TYPE AutoTextType, const bool Enable)
 Enables or disables the specified auto text feature. More...
 
bool GetNumberOfCharactersPerLine (unsigned int &NumberOfCharactersPerLine)
 Return the number of characters in each line. More...
 
bool GetNumberOfLines (unsigned int &NumberOfLines)
 Return the number of lines. More...
 
 LCD ()
 Default constructor for the device object More...
 
bool Reset ()
 Resets the device to default settings. More...
 
bool WriteText (const unsigned int StartCharacterIndex, const unsigned int StartLineIndex, const unsigned int CharactersToWrite, const unsigned char *pText, const bool LineWrap=true)
 Displays the given text on the display, starting at the give coordinates. More...
 
- Public Member Functions inherited from VIB::iDevice
bool Close ()
 Closes a device More...
 
 iDevice (const iDevice &device)
 The copy constructor makes a copy of the existing device object More...
 
bool isOpen (bool &state)
 Returns the open state of a device object More...
 
bool Open (unsigned int Index=0)
 Opens a device More...
 
iDeviceoperator= (const iDevice &device)
 The assignment operator makes a copy of the existing device object More...
 
virtual ~iDevice ()
 Deletes the device object More...
 

Member Enumeration Documentation

◆ LCD_AUTO_TYPE

Definitions for automatic text display, used by ConfigureAutoText()

POST code and temperature modes are only supported if the Machine Vision Controller is installed in the VisionBox AGE-X4.
If the POST code and temperature are both enabled, they will appear alternately on the second line.

Enumerator
LCD_AUTO_TYPE_ONTIME 

Display time since the last power-on or reset in the first line.

LCD_AUTO_TYPE_POSTCODE 

Display the last BIOS POST code in the second line.

LCD_AUTO_TYPE_TEMPERATURE 

Display the main-board temperature in the second line.

Constructor & Destructor Documentation

◆ LCD()

VIB::LCD::LCD ( )

Default constructor for the device object

The device must be opened with Open() before it can be used.

Member Function Documentation

◆ ClearDisplay()

bool VIB::LCD::ClearDisplay ( )

Clears the entire display.

Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ ConfigureAutoText()

bool VIB::LCD::ConfigureAutoText ( const VIB::LCD::LCD_AUTO_TYPE  AutoTextType,
const bool  Enable 
)

Enables or disables the specified auto text feature.

Parameters
AutoTextTypeType of auto text feature to enable or disable
Enableenable the specified auto text feature
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ GetNumberOfCharactersPerLine()

bool VIB::LCD::GetNumberOfCharactersPerLine ( unsigned int &  NumberOfCharactersPerLine)

Return the number of characters in each line.

Parameters
NumberOfCharactersPerLineNumber of characters
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ GetNumberOfLines()

bool VIB::LCD::GetNumberOfLines ( unsigned int &  NumberOfLines)

Return the number of lines.

Parameters
NumberOfLinesNumber of lines.
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ Reset()

bool VIB::LCD::Reset ( )

Resets the device to default settings.

The current text is cleared and all available automatic text modes are activated (ON-time, BIOS POST code, temperature).

Returns
true for success, use VIBSystem::GetLastErrorString() for an error description

◆ WriteText()

bool VIB::LCD::WriteText ( const unsigned int  StartCharacterIndex,
const unsigned int  StartLineIndex,
const unsigned int  CharactersToWrite,
const unsigned char *  pText,
const bool  LineWrap = true 
)

Displays the given text on the display, starting at the give coordinates.

Parameters
StartCharacterIndexThe first used index, 0 ... (GetNumberOfCharactersPerLine() - 1)
StartLineIndexThe fist used line, 0 ... (GetNumberOfLines() - 1)
CharactersToWriteNumber of chars inside pText which are displayed
pTextASCII coded string.
LineWrapfalse: writes the string only in to the given line, additional characters are discarded
true: the string can overflow into the next line.
Returns
true for success, use VIBSystem::GetLastErrorString() for an error description