Introduction – Lenze PM94P01C User Manual

Page 15

Advertising
background image

PM94P01C

13

Introduction

;********************** Initialize and Set Variables ***********************
UNITS = 1
ACCEL = 75
DECEL =75
MAXV = 10
;V1 =
;V2 =
;********************** Events *********************************************
;Set Events handling here
;No events are currently defined in this program
;********************** Main Program **************************************
RESET_DRIVE:

;Place holder for Fault Handler Routine

WAIT UNTIL IN_A3:

;Make sure that the Enable input is made before continuing

ENABLE

;Enable output from drive to motor

PROGRAM_START:

;Place holder for main program loop

MOVEP 0

;Move to Pick position

OUT1 = 1

;Turn on output 1 to extend Pick arm

WAIT TIME 1000

;Delay 1 sec to extend arm

OUT2 = 1

;Turn on output 2 to Engage gripper

WAIT TIME 1000

;Delay 1 sec to Pick part

OUT1 = 0

;Turn off output 1 to Retract Pick arm

MOVED -10

;Move 10 REVs to Place position

OUT1 = 1

;Turn on output 1 to extend Pick arm

WAIT TIME 1000

;Delay 1 sec to extend arm

OUT2 = 0

;Turn off output 2 to Disengage gripper

WAIT TIME 1000

;Delay 1 sec to Place part

OUT1 = 0

;Retract Pick arm

GOTO PROGRAM_START ;Loop back and continuous execute main program loop
END
;********************** Sub-Routines ***************************************
;Enter Sub-Routine code here
;********************** Fault Handler Routine ********************
;Enter Fault Handler code here
ON FAULT
;No Fault Handler is currently defined in this program
ENDFAULT

Saving Configuration File to PC
The “Configuration File” consists of all the parameter settings for the drive, as well as the User Program. Once you are
done setting up the drive’s parameters and have written your User Program, you can save these setting to your computer.
To save the settings, select

[Save All] from the Main toolbar. Then simply assign your program a name, (e.g. Basic

Motion), and click [Save] in the dialog box. The configuration file has a “.dcf” extension and by default will be saved to the
“My Documents” folder.

Loading Configuration File to the Drive
There are times when it is desired to import (or export) the program to another drive. Other times the program was
prepared off-line. In both scenarios, the program or configuration file needs to be loaded from the PC to the drive. To
load the configuration file to the drive, select

[Load Configuration] from the Main toolbar. Then simply select the

program you want to load and click [Open] in the dialog box. MotionView will first compile the selected program. Once
compiled, the [Compilation Complete] dialog box should appear. Click [OK] to dismiss this dialog box. MotionView will
then load the selected file to the drive. When done, a “Parameters Successfully Loaded” or similar message will be
displayed in the Message Window.

Advertising