StickOS
DI-159 PLC Hardware Manual
Entering Programs
To enter a statement into the BASIC program, precede it with a line number identifying its posi-
tion in the program:
line statement
If the specified line already exists in the BASIC program, it is overwritten.
To delete a statement from the BASIC program, enter just its line number:
line
To edit an existing line of the BASIC program via command-line editing, use the command:
edit
line
A copy of the unchanged line is also stored in the history buffer.
Note that statements are initially entered into a RAM buffer to avoid excessive writes to flash
memory, and therefore can be lost if the DI-159 PLC is reset or loses power before the pro-
gram has been saved. When a program is run, the (newly edited) statements in RAM are seam-
lessly merged with the (previously saved) statements in flash memory, to give the appearance
of a single "current program", at a slight performance penalty. When the newly edited program
is subsequently saved again, the merged program is re-written to flash and the RAM buffer is
cleared, resulting in maximum program performance. If the RAM buffer fills during program
entry, an "auto save" is performed to accelerate the merging process.
To automatically number program lines as you enter them, use the command:
auto
auto
line
Enter two blank lines to terminate automatic line numbering.
Note that you can edit a BASIC program in a text editor, without line numbers, and then paste
it into the terminal emulator window with automatic line numbering, and then enter two blank
lines to terminate automatic line numbering.
To list the BASIC program, or a range of lines from the BASIC program, use the command:
list
list
line
list
-
line
23
Summary of Contents for DI-159
Page 51: ...StickOS DI 159 PLC Hardware Manual 4 is even _ 51...
Page 76: ...DI 159 Block Diagram 76...
Page 77: ...Dimensional Drawing 77...