Digital Outputs
All 16 outputs on the 1310 are Pulse Width Modulated active low FET drivers. They are not just
turned “on” or “off” but must be set to a duty cycle between 0% and 100%. Setting the PWM
value to 0 will turn the output off completely (open output) while a setting of 32767 will set it
completely on ( always pulled to B-). A setting of 16383 provides nearly 50% duty cycle. The
Put_PWM and Automate_PWM functions are used for all digital outputs. The variable
PWM#_Output (where # is 1 through 16) can be used by VCL to read the present state of any
output driver.
Each outputs also has an associated input. This input goes on and off with the PWM and senses
the actual state of the FET driver and wiring. Using the input function on an output can allow
the wiring of a circuit to be fault checked. Using or basic wiring configuration, the Aux
Contactor on Output 2 can be checked for proper connection before and after engaging it.
If (PWM2_Output = 0) ; check if the Aux Contactor is open (off)
{
if (SW_2 = ON) ; check if the input is high
{
;The PWM is off and B+ is getting to the pin, so the coil must be connected
Put_PWM(PWM2, 32767) ; close the Aux Contactor
}
Else ; there is a fault!
{
; the input sense was low, so the coil must be disconnected or open.
; put your fault detect code HERE....
}
}
If (PWM2_Output = 32767) ; check if the Aux Contactor is closed (on)
{
if (SW_2 = ON) ; the input should be low, check if it is high
{
; the PWM is full on but B+ is getting to the pin, so the driver is bad
; put your bad FET driver code HERE
}
}
Because, in the basic wiring configuration, the Aux Contactor is on Output 2, the VCL code can
check the the coil, once turned on, draws a reasonable current. Looking at Table to in section 2,
the raw value of this current reading is put into ADC16_Output. The example below extends the
fault checking to include this feature.
If (PWM2_Output = 32767) ; check if the Aux Contactor is closed (on)
{
If (ADC16_Output < 1000) ; the coil is drawing less than the minimum raw current reading
{
; put your low current coil fault detect code HERE....
}
}
Note that all ADC#_Output values are raw 10 bit value. The VCL programmer must
experientially determine the reasonable values for this reading. In the case of ADC15_Output
and ADC16_output, a full scale reading (1024) is equal to about 3.33 amps.
1310 Vehicle Control System Users Manual Release Rev B Page 41 of 51