11 stopping execution (stop and end statements) – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 87

Advertising
background image

6Ć47

When you save a reconstructible task from the processor, the

system will write the lines included back to a file with the same

filename as specified in the INCLUDE statement. The reconstructed

file will look exactly like the source file. See JĆ3684, JĆ3750 or

J2Ć3045 for more information on reconstructible tasks.
The following is an example of a valid INCLUDE statement:

50 INCLUDE IODEFS.INC"

The file IODEFS.INC contains the following:

IODEFăRELAY_1@ă[SLOT=3,REGISTER=1,BIT=4]

IODEFăRELAY_2@ă[SLOT=3,REGISTER=1,BIT=5]

IODEFăRELAY_3@ă[SLOT=3,REGISTER=1,BIT=6]

When the file is compiled, it will look like this to the compiler:

50ăINCLUDE IODEFS.INC"

51ăIODEFăRELAY_1@ă[SLOT=3,REGISTER=1,BIT=4]

52ăIODEFăRELAY_2@ă[SLOT=3,REGISTER=1,BIT=5]

53ăIODEFăRELAY_3@ă[SLOT=3,REGISTER=1,BIT=6]

6.11

Stopping Execution

(STOP and END Statements)

WARNING

CAREFULLY REVIEW MACHINE OPERATION TO INSURE THAT UNSAFE

MOVEMENT IS NOT INITIATED BY STOPPING ALL APPLICATION SOFTWARE.

FAILURE TO OBSERVE THIS PRECAUTION COULD RESULT IN BODILY INJURY

OR DAMAGE TO EQUIPMENT.

The STOP statement will stop all tasks in the system and should

only be used when a severe error has occurred. It will not be

possible to continue from a stopped" state without reĆstarting all

tasks in the rack. The STOP statement has the following format:

STOP

The following are valid STOP statements:

20 IF OVER_TEMP@ THEN STOP

20 IF GAIN%>MAXGAIN% THEN PRINT ăăăăă&

ERROR_MESSAGE$\STOP

The END statement is used to end the task execution or to place the

task in a suspended state until the time interval that was

programmed in a START EVERY statement expires. If a task has a

periodic execution defined, it will at some later point be reĆactivated

when that period or interval expires. Refer to section 6.7 for more

information.
The END statement has the format:

END

The END statement must be at the physical end of the task.

Advertising
This manual is related to the following products: