Prog2, Prog2 -17, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 57: Syntax, Example

Advertising
background image

Publication 1746-RM001A-US-P

BASIC Commands 4-17

PROG2

Purpose

Use the PROG2 command the same as you would the PROG1 command except
for the following: instead of signing on and entering the Command mode, the
module immediately begins executing the first program stored in the resident
EEPROM. Otherwise, it executes the program stored in RAM.

You can use the PROG2 command to RUN a program on powerup without
connecting to a console. Saving PROG2 information is the same as typing a ROM
1, RUN command sequence. This feature also allows you to write a special
initialization sequence in BASIC and generate a custom sign-on message for
specific applications. The PROG2 command does not alter the first program in the
memory module.

The following figure shows the module operation from a power-up condition using
PROG1 and PROG2, or battery backed RAM.

Syntax

PROG2

Example

READY

>PROG2

Programming sequence successful.

IMPORTANT

Before you attempt to program an EEPROM, read the PROG,
PROG1 and PROG2 sections of this chapter. Note, the PROG2
command does not transfer the RAM program to EEPROM. The
PROG2 command enables the first program in EEPROM to be
loaded at each powerup.

IMPORTANT

The PROG2 command does not cause the module to RUN at
powerup if PRT1 default communications are selected via JW4.
Refer to Chapter 3 of the SLC 500™ BASIC and BASIC-T
Modules User Manual
(publication number
1746-UM004A-US-P) for more information.

Advertising