1 / 15

Creating a Virtual Control Console for Hardware using Visual Basic

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

sonia-moody
Télécharger la présentation

Creating a Virtual Control Console for Hardware using Visual Basic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating a Virtual Control Console for Hardware using Visual Basic Presented by William Koch Kochworx, Ltd. October 24, 2002

  2. Summary • Goals • Hardware & Interface • Visual Basic Concepts • Solution Development • Demonstration

  3. Goals • Create a Virtual Console to Demonstrate Hardware • Describe Visual Basic Concepts • Use the RS-232 Port

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

  5. RGB Beast Virtuware

  6. Software to Hardware Connection

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

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

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

  10. Simple Control Console

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

  12. Adding a Channel Selector • Textbox • Spinner Control • Command Buttons • Radio Buttons • …many options available • Hook the Channel Selector Into Data Stream

  13. Other Visual Controls • Microsoft Standard Controls • 3rd Party Controls for just about anything

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

  15. Questions (?) William Koch wkoch@kochworx.com www.kochworx.com 973.534.6367

More Related