This example demonstrates how to configure and drive an output in High Side Current Control mode. This would be commonly used to drive a proportional valve.
In this example we configured the output settings to match a Sun Hydraulics Coil model 770-224 mated with a FPCC proportional valve to provide a real world example. Technical data can be found on the Sun Hydraulics web site.
The output will ramp up and down as it runs though the main loop and transmit the desired current and the measured current over J1939 CAN SPN 1083 and 1084.
Output Configuration Settings
- Drive Profile = Single
- Drive Mode = PWM Current Control
- Switching Side = High Side
Valve/Coil specific settings
- Dither Frequency = 140hz
- Dither Amplitude = Determine experimentally
- Minimum Command = 50mA
- Maximum Command = 590mA
Driving the Output
- Set the desired current in mA - example, desiredCurrentB02 := 100;