Bosch 6000 User's Guide Page 47

  • Download
  • Add to my manuals
  • Print
  • Page
    / 268
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 46
32
6000 Series Programmer's Guide
Error Program Set-up Example
The following is an example of how to set up an error program. This particular example is
for handling the occurrence of a user fault.
Step 1
Create a program file (in Motion Architect's Editor module) to set up the error program:
; ***********************************************************************
; * Assign the user fault input function to programmable input #1. *
; * The purpose of the user fault input is to detect the occurrence of *
; * a fault external to the 6000 controller and the motor/drive. *
; * This input will generate an error condition. *
; ***********************************************************************
INFNC1-F ; Define programmable input #1 as a user fault input
INFEN1 ; Enable input functions (For the purposes of this
; set-up example, make sure programmable input #1 is
; not activated.)
; ***********************************************************************
; * Define a program to respond to the user fault situation (call the *
; * program fault), and then assign that program as the error program. *
; * The purpose of the fault program is to display a message to *
; * inform the operator that the user fault input has been activated. *
; ***********************************************************************
DEL fault ; Delete a program before defining it (a precaution)
DEF fault ; Begin definition of program fault
IF(ER.7=b1) ; Check if error bit 7 equals 1
; (which means the user fault input has been activated)
WRITE"FAULT INPUT\10\13" ; Send the message FAULT INPUT
T3 ; Wait 3 seconds
NIF ; End IF command
END ; End definition of program fault
ERRORP fault ; Assign the program called fault as the error program
; ***********************************************************************
; * Enable the user fault error-checking bit by putting a “1” in the *
; * seventh bit of the ERROR command. After enabling this *
; * error-checking bit, the controller will branch to the error *
; * program whenever the user fault input is activated. *
; ***********************************************************************
ERROR0000001 ; Branch to error program upon user fault input (As an
; alternative to the ERROR0000001 command, you could also
; enable bit #7 by issuing the ERROR.7-1 command.)
Step 2
Save the program file in the Editor module. Then, using the Terminal module, download the
program file to the 6000 controller.
Step 3
Test the error handling:
1. While in the terminal emulator, enter these four commands:
L ; Loop command
WRITE"IN LOOP\10\13" ; Send Message "IN LOOP" to the terminal display
T2 ; Wait 2 seconds
LN ; End the loop ("IN LOOP" will be displayed
; once every 2 seconds)
2. While the IN LOOP loop is executing in the terminal emulator, enter the !INEN1 command.
The !INEN1 command disables input #1 and forces it on for testing purposes. This
simulates the physical activation of input #1. (Since the error program is called
continuously until the branch to the error program is canceled, the message FAULT INPUT
will be repeatedly displayed once every 3 seconds.)
3. While the FAULT INPUT loop is executing in the terminal emulator, enter the !INENE
command. The !INENE command re-enables input #1. The message IN LOOP will not
be displayed again, because the user fault input error is a GOTO branch (not a GOSUB
branch) to the error program.
Page view 46
1 2 ... 42 43 44 45 46 47 48 49 50 51 52 ... 267 268

Comments to this Manuals

No comments