C - basic module programming hints, Basic module programming hints – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 166

Advertising
background image

Appendix C

Basic Module Programming Hints

These programming hints can help you to properly program your module
to increase module performance.

1.

Always define strings first.

2.

Always dimension arrays after defining strings.

3.

Define the most used variables first. You can use 0 values until you assign
real values.

4.

When doing math, save intermediate values rather than recalculate.

5.

Place the most used subroutines near the beginning of the program.

6.

Straight through code executes faster, but uses more memory.

7.

Put multiple statements on a line, after the program has been debugged.

8.

Comments use space and slow program execution. After the program is
debugged save a fully commented copy on tape or spare ERROM and
remove comments.

BASIC Module
Programming Hints

Advertising