User guide
P/N: 021-00154, Rev. A.6 - updated for V4.7 Tools     Page | 61  
5 Programming Examples 
This section illustrates how the DVC5, DVC7 and DVC10 are programmed. The first example is a traditional 
Hello program. Hello introduces you to the basic steps in writing a DVC application. The second example is a 
two speed binary counter that introduces you to logic sequences. For both of these examples you only need to 
have a DVC5/7/10 and the DVC Programming Tool / Program Loader Monitor software installed. The third 
example is most illustrative of a hydraulic control application and is shown in step-by-step detail. The other 
examples are explained and can be provided. They are not shown in step-by-step detail, but the key points are 
highlighted and explained. 
5.1  DVC variable types 
The physical I/O for the DVC module uses 10 bit architecture, the decimal values for the variables can be 0-
1023. Internal variables are 16 bit, or decimal values 0-65535. It is recommended to write the program logic 
using decimal values, but some may find it easier using logic statements such as true / false, on/off. As a 
reminder, using decimal values and logic statements, care must be used that the programmer knows the 
decimal value of a logic statement 
‘  true’ and ‘on’ have a decimal value of 65535 
‘  false’ and ‘off’ have a decimal value of 0. 
Other constants can be defined such as the statement below 
Const yes = 52    This variable ‘yes’ has been given a value of 52. 
Always remember to try a variable using the virtual display to fully understand the decimal value of the variable 
when turned on and off. 
5.2  Hello Program 
This is 
an example program to introduce you to most of the DVC programming concepts. 
It is designed to operate with only a DVC5/7/10 connected to your Windows PC computer using the DVC RS232 
cable and a +12volt dc 1.0 amp power source. The DVC RS232 serial cable is used to load your application 
into the DVC controller’s memory from your Windows PC. 
Program Description
The Hello program will flash the Status LED on the DVC5/7/10 10 times every 10 seconds. 
Process
No IOs will need to be configured for this example. 
Enter the Hello code in the Always 
bubble, Compile/Make the program and 
load the “.pgm” file into the DVC5/7/10. 
On the next pages are the steps you 
should follow and the resultant screen 
displays you should see. First, the 
Programming Tool screens are shown 
followed by the Program Load Monitor 
screens. 
Programming Steps 
Execute the Programming Tool by 
double clicking on the Programming Tool 
icon on the desktop or in the C:\Program 
Files\HCT Products folder. 










