1 always code, 2 logic sequences, Always code – High Country Tek emc-3L User Manual

Page 50: Logic sequences

Advertising
background image

system. Right clicking on a logic sequence will give you the ability to add the logic sequence to 1 of 9 groups.
The grouped logic sequences are shown graphically connected by the black line. Generally, the non-critical
performance parts of your application should be grouped together.

Virtual Display updates, DVC61 Display updates, Open Loop Test, EEmemory change validation and LED
updates are examples of non critical parts of most applications.

Within each group only the active bubble of one of the logic sequences will be executed during a cycle. In other
words, in the window above the Always code will be executed every 10ms as normal. The Logic0 and Logic1
sequences will be executed every 30ms and each of the other two grouped sequences will be executed every
60ms. Without grouping the Logic 0, Logic1 sequence would have been executed every 40ms. Other than right
clicking on a sequence icon to add it to a group no other changes to your program are required. Right clicking
also allows you to remove a sequence from a group.

You can also copy and paste a whole logic sequence from one project to another or within the same project by
right clicking on the appropriate sequence to copy it and right clicking in the project window to add it into the
project.

To access the Always code or a particular logic sequence’s code, double click the icon. This will cause a
window to appear for editing the Always code and the bubble diagram for the logic sequence selected. Double
clicking a bubble will bring up an edit window for its code. To delete a logic sequence or bubble, click the right
mouse button on the icon and select Delete.

4.1 Always Code

In this section program all of the logic statements for the
system variables that need to be checked or updated most
frequently as the code will execute every 10ms
independent of the logic sequence to be executed.

Generally closed loop software process control should be
implemented in the Always code. Another recommended
use of the Always code is error checking.

4.2 Logic Sequences

To add a Logic Sequence, Right click on the main screen
of the Programming tool and select Add Logic Sequences.
Double click on the logic sequence to open it for editing
bubble logic. The logic sequence window uses bubbles
(the circles) and transitions (the lines connecting the circles) to
create a logical program flow for part of the user application.
Bubbles are containers for the program code while transitions
specify bubble to bubble transition conditional logic. Each Bubble
represents a state in which the program will repeat the same set
of programmed logic until a transition logic expression is
evaluated to be true. When a transition statement becomes true,
the program will change states to the bubble pointed to by the
transition line and execute that code the next time that logic
sequence is visited by the BIOS. Bubbles can have multiple
transitions pointing to different bubbles in the same logic
sequence.

P/N: 021-00163, Rev. A.0 - for V5.2 Tools

Page | 50

Advertising
This manual is related to the following products: