Creating a Virtual Control Console for Hardware using Visual Basic
This presentation by William Koch from Kochworx Ltd. outlines the development of a virtual control console designed to demonstrate and manage hardware functionality, specifically a 4-channel addressable RGB display device. Utilizing Visual Basic concepts and RS-232 communication, the project incorporates object-oriented design principles to build an intuitive user interface with controls for adjusting color settings. Key components include sliders, labels, and timers for data transmission, creating an interactive platform for users to engage with hardware in a dynamic way.
Creating a Virtual Control Console for Hardware using Visual Basic
E N D
Presentation Transcript
Creating a Virtual Control Console for Hardware using Visual Basic Presented by William Koch Kochworx, Ltd. October 24, 2002
Summary • Goals • Hardware & Interface • Visual Basic Concepts • Solution Development • Demonstration
Goals • Create a Virtual Console to Demonstrate Hardware • Describe Visual Basic Concepts • Use the RS-232 Port
Hardware & Interface • Virtual Hardware – the RGB Beast • 4 Addressable Channels • Each Channel has 0-FF settings for Red, Green, Blue • Settings Tx Via RS-232 Interface • Start Sequence = 4 $FF • Data Sequence = Channel# R G B • Sample: FF FF FF FF 01 C0 FF D6
Visual Basic Concepts • Basis of all Visual Tools is Object Oriented Design • Functionality is Encapsulated in Controls • Properties, Methods & Events provide programming hooks • VB is powerful because of Reusable Components
Solution Development • Begin a Project as a Standard EXE • Add Controls for Project to the Toolbox (ex. MSCOMM Control 6.0) • Design the Form Visually by Adding Controls and Setting Properties • Write Code to Interact with Visual Objects
Constructing Virtual Console • Add a Label and a Slider Control to Form • Set Slider Properties, Label Properties • Replicate for Blue, Green • Add a Timer, MSCOMM Control • Write Code to Transmit Data
Coding the Timer • Must send 4 FF’s, Channel#, R, G, B • When Byte Stream Ready, Send • Timers specified in milliseconds • Finest granularity is ~55ms, max is 65535ms (60K=1 minute)
Adding a Channel Selector • Textbox • Spinner Control • Command Buttons • Radio Buttons • …many options available • Hook the Channel Selector Into Data Stream
Other Visual Controls • Microsoft Standard Controls • 3rd Party Controls for just about anything
Summary • Goal was to create a Virtual Console to control a hardware device • Hardware was a 4-Channel addressable RGB display device • VB Components encapsulate large amounts of functionality • Drag/Drop Development of UI • Demonstrated Hardware Control
Questions (?) William Koch wkoch@kochworx.com www.kochworx.com 973.534.6367