High Country Tek DVC80 User Manual

Page 44

Advertising
background image

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

Page | 44

PWM Duty Cycle Control
The Low-Side Name allows direct PWM control. This mode is equivalent to Open Loop PWM, and is required
for voltage (i.e. PWM) controlled valves, or variable LED outputs.
PWM Frequency (New with release 4.76)
Using the variables Low_Side Name.frequency and Low_Side Name.dutycycle or Low_Side Name the PWM
frequency and PWM dutycycle and be controlled between the ranges 0 to 100 hertz (in tenth hertz increments)
and 0 to 100% (in tenth % increments) respectively. The accuracy of the frequency and dutycycle is very
precise. This can apply to single coil or dual coil configurations.
Enable Dither
Click this option if the user wants current regulated dither
Range: True, False

Output Group Code Sample

Code Comments
PWM_1. Enable = True

Enable PWM to drive

PWM_1 = Uni_1

Sets an PWM% output to the Analog Input %

PWM_1 = 50%

Set PWM or current to 50% of output range

PWM_1.Dir = HS1

Set direction of HS1 output (Dual coil only)

PWM_1.Dir = Uni_1.Dir

Set direction based on position of input (verses center)

If (PWM_1.Short) then

Test for shorted coil

If (HS1.Short) then

Test for shorted coil

HS1.Short = False

Reset shorted coil flag (retry logic)

HS1.RampUp = 100

HS1 Ramp Up from min to max = 1 second (.01 per)

Programming the Different Output Group Valve Configurations

Controlling valves has a few subtleties depending on the valve configuration. Some of the control of the valve’s
operation is done for you by the DVC5/7/10 BIOS. This level of BIOS control has two purposes. First, to ease
some of the application programming that would otherwise be required. Second and most important, is to insure
safe valve operation in the event of miswiring or valve control failure. You can think of this BIOS control as
implementing hidden code automatically for you.

Note: Should you inadvertently use a variable that is not defined for a particular valve configuration you will get a
compile error when you compile your application.

The basic output group default variable names that control valves in Output Group 1 are:
HS_1
HS_2
PWM_1
PWM_1.Enable
PWM_1.Dir

For each of the four configurations a subset of these variables is used as enumerated below.
Dual Coil High Side

PWM_1.Enable Set it to TRUE (>0) to activate the valve controls

PWM_1 Set it to 0 to1023 or 0 to 100% to cause current to flow in a coil equal
to the percentage of the current range

PWM_1.Dir Set it to False to activate the HS_1 powering of the coil and True to

activate the HS_2 powering of the coil
Hidden

Code

HS_1 = PWM_1.Enable and not PWM_1.Dir

HS_2 = PWM_1.Enable and PWM_1.Dir
Single Coil High Side

Advertising
This manual is related to the following products: