4 bubble logic, Bubble logic – High Country Tek DVC80 User Manual

Page 55

Advertising
background image

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

Page | 55

Name

Description

FreeRunningTimer 16 bit counter that continually increments every 100 micro second. Counts

from 0 to 65535 (6.5 seconds) then begins again. Could be used to show
timing between two events, as long as these events were within 6.5 seconds.


DVC Macid

Name

Description

MACID

This variable returns the MACID of the DVC controller.


Coil Gains

Name

Description

HC_Coil_Gain_OG1 to OG3
LC_Coil_Gain_OG1 to OG3

These variables return the coil gain constant used by the BIOS to
determine actual coil current from analog to digital values derived by
the controller’s processor. You use these values if you wish to
dynamically change maximum and minimum current setting in your
application.
Max_cur = (current_in_ma * 100)/HC_Coil_Gain_OG1

4 Bubble

Logic


DVC5/7/10 application programs consist of one or more
code sections. The first section is called the Always
code and the second and additional sections are called
logic sequences. An icon in the main project window
identifies each of the sections. These icons represent
where the programmer actually writes the application
code. Each application has an Always section and
optionally any number of logic sequence sections. By
clicking the right mouse button in the project window, a
menu will appear that will allow the addition of logic
sequence icons.


A logic sequence is composed of bubbles that
contain application code. Code expressions specifying
under what circumstances execution will transition to
another bubble are also present as the diagram
illustrates. Typical transition conditions are a timer
expiring or digital input being true.

Logic sequences, Bubble transitions and the Always
code have a defined way in which they are executed.
The Always code is executed followed by the code for
the active bubble in a logic sequence and finally the outbound transitions defined for the active bubble are
evaluated. If one of the transition expressions is true the bubble pointed to by that transition will be the new
active bubble the next time the logic sequence is executed. Upon completing this cycle, the Always code is
executed again and the active bubble for a different logic sequence and its transitions are executed and
evaluated respectively if more than one logic sequence is defined. After the last logic sequence is executed the
first one will be executed during the next cycle. This Always code - logic sequence – transition evaluation cycle
is repeated every 10ms or longer if the code is complex. In between these cycles, the DVC5/7/10 BIOS
executes and records system input/output value changes and sends and receives CAN Bus messages. Given
the frequent execution of the Always code it should contain your system critical code such as code to sound an
alarm control critical valves. Note that the timing between executing each logic sequence is a minimum of 10ms

Advertising
This manual is related to the following products: