4 program statements, How logic sequences are executed by the dvc5/7/10, Program statements – High Country Tek DVC80 User Manual

Page 58

Advertising
background image

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

Page | 58

cause the transition code to be displayed in the Logic Sequence window. Transitions expressions are
supported for going from bubble n to bubble m and vice versa. An empty expression signals no transition
defined between the bubbles whereas entering “1” or “Always” indicates a transition from one bubble to another
always.

Examples of transition expressions would be “dig_1 = true” or “joystick_left > 50% and reset_timer < 1s”.

4.3

How Logic Sequences are executed by the DVC5/7/10

A logic sequence is executed at a typical or default rate of 100 times per second or once every 10ms. The
maximum rate is 1000 times a second. Within each execution cycle, the processor updates the system
input/output values and communicates with other modules over the CAN Bus then the Always code is executed
followed by the active logic bubble in a logic sequence and its out bound transition expressions. Note that this
implies that an individual logic sequence will be executed typically every 10ms * the number of logic sequences.
For example, an application with three sequences would execute a particular logic sequence once every 30ms.
Grouping of logic sequences can be used to change the frequency of execution of a particular logic sequence.
For instance, assigning 2 logic sequences out of a total of 3 to a group would mean that logic sequence 3
executes every 20ms while logic sequences 1 and 2 execute every 30ms. Multiple groups of logic sequences
can be defined. Logic sequences not assigned to a group can be considered to be in their own group for
purposes of this discussion. Only one bubble within a logic sequence of a group will be executed each 10ms.
After one pass through all of the groups then the process is repeated with a new logic sequence in each group
being executed. If no more logic sequences are defined in a particular group then the first logic sequence in the
group is executed. This execution pattern can be thought of as a main loop with mini loops in each group.

Each time the active bubble of a logic sequence is executed the execution starts at the top of the repeat bubble
code and proceeds to the end of the code after which time the DVC5/7/10 BIOS checks the transition conditions
and executes any true transition conditions. A true transition condition for a bubble causes the pointed to
bubble’s entry code to be executed during the next execution cycle followed by the repeat code.

Always

Entry

Repeat

Transition

0ms

10ms

Logic Sequence #0

Always

Entry

Repeat

Transition

11ms

20ms

Logic Sequence #1

Always

Entry

Repeat

Transition

21ms

30ms

Logic Sequence #2

Always

Entry

Repeat

Transition

0ms

10ms

Logic Sequence #0

DVC Application Code Processing

4.4 Program

Statements

The programming tool supports the following basic-like statements:
Refer to Appendix B for examples of how to use program statements and logical operators.
Programming statements including keywords are all case insensitive.

Advertising
This manual is related to the following products: