1 always code, Always code – High Country Tek DVC80 User Manual

Page 56

Advertising
background image

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

Page | 56

times the number of logic sequences. Logic sequence code is usually where your normal system operation
sequences and display code are programmed (i.e. open this valve when this digital input is switched on).

Note that with release 4.7, the above cycle sometimes referred to as the system heartbeat can be set from 1ms
to 20ms with the default being 10ms.

To further help you control the operation of your application from a timing perspective Logic sequences can be
grouped to provide you a way of tuning the performance of your system while maintaining the logic sequence
coding paradigm for different aspects of your
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. You may also want to use
this screen to define your program variables. In this way
you can easily find variable definitions. Note that all DVC
defined program variables are global (i.e. able to be
referenced or changed in any logic bubble) unless they are
specifically declared as Private. Another recommended
use of the Always code is to sum all of the system

Advertising
This manual is related to the following products: