Download presentation
Presentation is loading. Please wait.
1
To Join the Telephone Conference . . .
Dial Please specify conference ID You must dial in using a telephone to hear the audio portion of the broadcast. All participant telephone lines are muted. To ask a question, use the WebEx chat feature and select Send to Host. Upgrade Boundaries RS5K V2 to present– CFlash local chassis modules only V13 and prior f/w releases – Hyperterminal was required to SERCOS drives, UltraWARE for U3K V13 – Implemented “Browsing” over SERCOS to the servo drive using RSLinx Important because you can now see the drive through RSLinx, although you cannot flash to it. V13 - AutoFlash was implemented for motion modules in the chassis (not drives). V15 - ControlFlash & AutoFlash over SERCOS implemented (1756-RN619C-EN-E & 2094-RN006E). V16 - Firmware Supervisor Implemented V17 – Kinetix 6200 introduced – CFlash capable V18 –Kinetix 6500 introduced – CFlash capable V19 – Kinetix 300 – Uses MotionView for upgrades V20 – Kinetix 350 introduced – CFlash capable (hardware available now) We will send a copy of this presentation and a recording of this broadcast within a few days. Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
2
March 2012 TechConnect Genius Webinar
Using ActiveX Controls and ADO: Practical Applications for VBA
3
Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
Agenda 1. ActiveX Controls Definition Examples Components Things to Know Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
4
Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
Agenda 1. ActiveX Controls 2. ADO Definition of ADO Using ADO in VBA Things to know about ADO Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
5
Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
Agenda 1. ActiveX Controls 2. ADO 3. Demo 4. Questions Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
6
What Are ActiveX Controls?
ActiveX is a Microsoft framework for defining reusable components They are building blocks for creating applications in a Windows environment. They provide a way for easily reusing code. ActiveX controls are “embeddable programs” There may be differences in how any given ActiveX control behaves in any given environment. Examples of environment include: Visual Basic forms Microsoft Word documents PowerPoint documents RSView32 graphics VBA forms FactoryTalk View SE graphics Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
7
Examples of ActiveX Controls
Examples of ActiveX controls include: Select a recipe? Select options? CheckBox ComboBox WebBrowser TrendX Create application help? Plot historical data? Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
8
What Are the Components of an ActiveX Control?
ActiveX controls contain the following components: Properties These act as variables that the host program can read or write. Example: TextBox1.Caption = “Hello World” Methods These are subroutines that tell the control to do something. They may take parameters from the host and may return a value. Example: WebBrowser1.Navigate2(“ Events These notify the container that something has happened. Example: CheckBox1.Click Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
9
Things You Should Know About ActiveX Controls
The source of the ActiveX control: The provider (e.g., Microsoft, Rockwell Automation, third- party) The program which installs the control (e.g., MS Office, FTalk View SE, third-party). To deploy the control, run the install provided from the vendor. The versions on all computers. Target computer version > design computer version = Warning Target computer version < design computer version = Error The intent of the ActiveX control General use or proprietary. Example: RSLinx Comm Control is an ActiveX control intended for use within RSLinx Classic. Does the control require a license? Example: Microsoft FlexGrid works in a Visual Basic container but not VBA or FactoryTalk View SE. This is by design. Just because you find an ActiveX control you like does NOT mean you should use it in your project! Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
10
Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
What Is ADO? ActiveX Data Objects. Part of Microsoft Data Access Objects (MDAC). Provides a way for applications to access data without knowing how the database has been implemented. Like ActiveX controls, they are a means of providing code reuse. Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
11
Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
Using ADO in VBA By itself, VBA has a small pool of functions. Adding references to external libraries gives VBA additional functionality MS Excel FTView SE VBA MDAC Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
12
Things You Should Know About ADO
ADO is part of the Microsoft Data Access Components (MDAC). You can obtain ADO from the Free Downloads page from Microsoft Documentation for the latest version of ADO is also available online There are many examples of ADO code on the Internet and in the Rockwell Automation Support Center. Keep applications simple when you use ADO as part of VBA Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
13
Using ActiveX Controls and ADO: Practical Applications for VBA
Demonstration of ActiveX and ADO in a FactoryTalk View SE application
14
Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
References Creating a file viewer (Microsoft Web Browser, AID 26520). Triggering action when computer has been idle for a period of time (IdleDetect control, AID 48268). Interfacing with FactoryTalk View Batch using the Batch ActiveX controls (ProcedureView, AID 21831) View a database report that has been published as a web page (MS Web Browser, Add machine vision to your application using a Cognex In-Sight display control ( Connection string website ( Copyright © 2012 Rockwell Automation, Inc. All rights reserved.
15
Using ActiveX Controls and ADO: Practical Applications for VBA
Questions?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.