Create and edit a basic program, Create and edit a basic program -8, Enter a basic program using an ascii terminal -8 – Rockwell Automation 1746-BAS-T SLC 500 Basic Basic-T Modules User Manual

Page 56: Enter a basic program using an ascii terminal

Advertising
background image

Publication 1746-UM004B-EN-P - December 2005

4-8 Programming Overview

Create and Edit a BASIC
Program

Module execution is controlled through a BASIC program residing in
RAM or ROM. You have the option of creating and editing this
program.

• on a personal computer using the BASIC development software

and then downloading it to the module. BASIC development
software uses an MS-DOS compatible personal computer to
facilitate editing, compiling (translating), uploading, and
downloading BASIC programs. Refer to the BASIC Development
Software Programming Manual, publication 1747-PM001, for
additional information on the BASIC development software.

• entering the program one line at a time directly to the module

using an ASCII terminal. ASCII terminal programming must be
done one line at a time.

Enter a BASIC Program Using an ASCII Terminal

BASIC line numbers indicate the order in which the program lines are
stored in memory. They are also used as references when branching
and editing. Typically you start numbering BASIC programs with line
number 10 and increment by 10. This lets you add additional lines
later as you work on your program.

Since the computer runs the statements in numerical order, additional
lines need not appear in consecutive order on the screen. For
example, if you enter line 35 after line 40, the computer still runs line
35 after line 30 and before line 40. This technique saves you from
re-entering an entire program if you forget to include a line.

After the line number, there may be a combination of BASIC
commands, statements, operators, or CALLs. Depending on the logic
of your program, there may be more than one statement on a line. If
so, each statement must be separated by a colon (:).

To enter a BASIC program using an ASCII terminal:

1. Select the program port using JW4.

IMPORTANT

Reuse of an existing line number causes all of the
information referenced by the original line number
to be lost. Be careful when entering numbers in the
Command mode; you may accidentally erase some
program lines.

Advertising
This manual is related to the following products: