Opening The Example Vba File; Testing The Form - Baldor Flex+DriveII Operating Manual

Hide thumbs Also See for Flex+DriveII:
Table of Contents

Advertisement

5.5.6

Opening the example VBA file

It is recommended that the file VBA.xls is used to continue the demonstration. The file contains comments to explain
each section of code, together with an error handling routine. All code assumes that the Flex+Drive
the host PC's COM1 port. Confirm that the Flex+Drive
Before opening VBA.xls, it will be necessary to close the current test file's windows.
1. Click the Close button at the top of the main Visual
Basic editing window.
This will return the application to the normal
spreadsheet view.
2. Click the Close Window button at the top of the Excel
spreadsheet window.
3. Choose File, Open.
Locate the example file VBA.xls and click Open.
4. Click the Visual Basic Editor button.
Ensure that UserForm1 is the currently selected
window.
5.5.7

Testing the form

Excel can 'run' the form, almost as if it were a separate application. If any errors occur Excel will stop the program
and highlight the error.
1. Click the Run Sub/UserForm button.
The form will now become active.
2. Click the Init button.
The Init button's code will be executed, initializing the Flex+Drive
3. Click the << or >> button.
The button's code will be executed, causing the motor to jog in the positive or negative direction.
4. Click the Stop button to stop motion.
5-10 Applications
II
SW1 DIP switches 1-4 are all in the off position.
II
. The other buttons will also become active.
II
is connected to
MN1917

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents