Adding Program Lines (Code) - Baldor Flex+DriveII Operating Manual

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

Advertisement

5.5.5

Adding program lines (code)

Each command button requires some Visual Basic program code, so that when the user clicks the button, a function
will be performed.
1. Right-click on the Init button, and choose View Code.
This will display the underlying code for the button.
The lines "Private Sub btnInit_Click" and
"End Sub" are essential and must not be deleted. All
code for a button must be entered between these two
lines.
2. Type the lines:
MintController1.setFlexPlusDrive2Link 2, 1, 57600, True
MintController1.getAAABuild lBuild
MintController1.doCancel 0
MintController1.setDriveEnable 0, True
3. Using the left drop down box at the top of the code
window, select another button.
4. In this way, code can be entered for each button. However, to save time, the complete form, buttons and code
have already been created in the file VBA.xls. See the next section.
MN1917
Applications 5-9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents