15 hints & tips for code writing, Hints & tips for code writing – High Country Tek DVC80 User Manual

Page 21

Advertising
background image

P/N: 021-00154, Rev. A.6 - updated for V4.7 Tools

Page | 21


1.15

Hints & Tips for code writing

The Intella programming environment allows the programmer to be creative in their programming style. Here
are some suggestions as how a program may be structured.


Create machine function flowchart (a.k.a. Sequence of Operations)

This idea forces the development team to understand what the function of the machine will be before the
program is written. Using flowchart notation, the development team documents each function of the machine.
In the case of a hydraulic log splitter, maybe the first function would be to assure the engine is running,
providing pressure for the pump. It is advised that the first flowchart of a project contain very simple steps in the
functionality. Later revisions can combine simple functions into more complex functions. Insert as much
information in this flowchart as possible. For instance, if there is a pressure relief valve in the machine, set at
1500psi, list that in the flowchart. Once the flowchart is finished, everyone should agree on the machine
functionality. This step will help to minimize changes to the program at a later date. This step could take
considerable time, but will make the program much sampler to write. Refer to appendix F for an example.

Separate different functions into different logic bubbles.

It is not incorrect to place all of the program logic in the always code, but it can slow down the program and
make it more difficult to troubleshoot. Time critical logic should be contained in the ‘always’ code. Different
functions should be contained in individual bubbles. For example, a pump control’s logic can be contained in a
bubble by itself. The logic to control the track drive of a bulldozer can be contained in a bubble by itself. These
functions may not be as critical as something such as looking for a high pressure situation.

Advertising
This manual is related to the following products: