High Country Tek emc-3L User Manual

Page 36

Advertising
background image

normal case you should update the feedback value in your Always code and when the feedback equals the set-
point the coil current will remain fixed. Note that when you use the simulator and do not drive an actual coil the
PWM command will never exceed the set-point %.

For example: if you system is capable of generating 0 to 3000 psi and you wish to generate 1500 psi you would
set the set-point value to 50% or 512. Then typically in the Always code (since it updates every 10ms) you
would read the pressure sensors voltage to determine the current pressure and set the feedback value as a
percent of the 0-3000 psi range.

Enable Current Ramps

The output current will be ramped up or down based on the ramp times to the Low-Side Name set-point. As the
current set-point is ramped to in steps, the DVC hardware and BIOS change the current to the set point using
the P and I setting to correct any error and after the set-point is reached it continues to regulate / maintain the
current at the set-point.

PWM Duty Cycle Control
The Low-Side Name allows direct PWM duty cycle 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 5.2)
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

PWM Frequency
The PWM Frequency mode allows the user to use the output as a variable frequency output for driving
equipment that requires a PWM input at frequencies from 1Hz to 100Hz. In this mode, the Duty Cycle can be
either fixed or variable as required by the programmer. The variable to control the Frequency is
“PWMname.Frequency” and is set in 1/10 of hertz (100 = 10Hz). The variable to control the Duty Cycle is
“PWMname.DutyCycle” and is set as a percentage or as a 10 bit number (0 – 1023).

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.Frequency = 750

Set the PWM Frequency for PWM_1 to 75Hz

PWM_1.Dutycycle = 512

Set the Duty Cycle for PWM_1 to 512 or 50%

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.Open) then

Test for open coil

HS1.RampUp = 100

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

P/N: 021-00163, Rev. A.0 - for V5.2 Tools

Page | 36

Advertising
This manual is related to the following products: