Download presentation
Presentation is loading. Please wait.
Published byShon Woods Modified over 9 years ago
1
Creating a Virtual Control Console for Hardware using Visual Basic Presented by William Koch Kochworx, Ltd. Kochworx, Ltd. October 24, 2002
2
Summary Goals Goals Hardware & Interface Hardware & Interface Visual Basic Concepts Visual Basic Concepts Solution Development Solution Development Demonstration Demonstration
3
Goals Create a Virtual Console to Demonstrate Hardware Create a Virtual Console to Demonstrate Hardware Describe Visual Basic Concepts Describe Visual Basic Concepts Use the RS-232 Port Use the RS-232 Port
4
Hardware & Interface Virtual Hardware – the RGB Beast Virtual Hardware – the RGB Beast 4 Addressable Channels 4 Addressable Channels Each Channel has 0-FF settings for Red, Green, Blue Each Channel has 0-FF settings for Red, Green, Blue Settings Tx Via RS-232 Interface Settings Tx Via RS-232 Interface Start Sequence = 4 $FF Start Sequence = 4 $FF Data Sequence = Channel# R G B Data Sequence = Channel# R G B Sample: FF FF FF FF 01 C0 FF D6 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 Basis of all Visual Tools is Object Oriented Design Functionality is Encapsulated in Controls Functionality is Encapsulated in Controls Properties, Methods & Events provide programming hooks Properties, Methods & Events provide programming hooks VB is powerful because of Reusable Components VB is powerful because of Reusable Components
8
Solution Development Begin a Project as a Standard EXE Begin a Project as a Standard EXE Add Controls for Project to the Toolbox (ex. MSCOMM Control 6.0) Add Controls for Project to the Toolbox (ex. MSCOMM Control 6.0) Design the Form Visually by Adding Controls and Setting Properties Design the Form Visually by Adding Controls and Setting Properties Write Code to Interact with Visual Objects Write Code to Interact with Visual Objects
9
Constructing Virtual Console Add a Label and a Slider Control to Form Add a Label and a Slider Control to Form Set Slider Properties, Label Properties Set Slider Properties, Label Properties Replicate for Blue, Green Replicate for Blue, Green Add a Timer, MSCOMM Control Add a Timer, MSCOMM Control Write Code to Transmit Data Write Code to Transmit Data
10
Simple Control Console
11
Coding the Timer Must send 4 FF’s, Channel#, R, G, B Must send 4 FF’s, Channel#, R, G, B When Byte Stream Ready, Send When Byte Stream Ready, Send Timers specified in milliseconds Timers specified in milliseconds Finest granularity is ~55ms, max is 65535ms (60K=1 minute) Finest granularity is ~55ms, max is 65535ms (60K=1 minute)
12
Adding a Channel Selector Textbox Textbox Spinner Control Spinner Control Command Buttons Command Buttons Radio Buttons Radio Buttons …many options available …many options available Hook the Channel Selector Into Data Stream Hook the Channel Selector Into Data Stream
13
Other Visual Controls Microsoft Standard Controls Microsoft Standard Controls 3 rd Party Controls for just about anything 3 rd Party Controls for just about anything
14
Summary Goal was to create a Virtual Console to control a hardware device Goal was to create a Virtual Console to control a hardware device Hardware was a 4-Channel addressable RGB display device Hardware was a 4-Channel addressable RGB display device VB Components encapsulate large amounts of functionality VB Components encapsulate large amounts of functionality Drag/Drop Development of UI Drag/Drop Development of UI Demonstrated Hardware Control Demonstrated Hardware Control
15
Questions (?) William Koch wkoch@kochworx.com www.kochworx.com973.534.6367
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.