DVC Family System and Programming User Guide The information in this publication is intended as a guide only, and HCT take NO responsibility for usage and implementation in any user written application code structure. HCT strongly suggests that the user attends one of the product training courses to ensure correct and full understanding of this information and to learn further optimized methods of control techniques.
About Us HCT was founded in 1983 as an electronics contract manufacturing company, based upon the founder’s extensive background in high-tech manufacturing, including senior manufacturing positions at several Silicon Valley companies. Early in its history, HCT began a systematic migration towards proprietary products. The Company anticipated the need for Electronic Controls for Mobile Equipment and invested more than $2M to develop the DVC™ family of products, which began shipments in 2001.
New Release 4.7 Features and Enhancements Summary Each new release of the Programming Tool and Program Loader Monitor contains new and enhanced features plus normal bug fixes. Release 4.7 succeeds Release 4.2 and contains the following new features and extensions. Application and BIOS Compatibility Applications compiled using the 4.0 or 4.2 Programming Tool will work with the 4.7 BIOS. Programming Tool 4.7 generated applications will run with the previously released 4.22 BIOS as well as the new 4.7 BIOS.
o Variable Output Group PWM frequency (0-100 hertz) and duty cycle control. o DP04 Pendant Logging feature o Variable PWM frequency (0-100 hertz) and duty cycle control. o Vista Business & Ultimate drive updates. o New Application variables: HC_Coil_Gain_OG1 HC_Coil_Gain_OG2 HC_Coil_Gain_OG3 LC_Coil_Gain_OG1 LC_Coil_Gain_OG2 LC_Coil_Gain_OG3 FreeRunningTimer MACID P/N: 021-00154, Rev. A.6 - updated for V4.7 Tools DVC_Temperature J1939msgname.srcaddr J1939msgname.
Manual Index: About Us ......................................................................................................................2 New Release 4.7 Features and Enhancements Summary........................................3 Application and BIOS Compatibility.................................................................................................... 3 New Features ................................................................................................................................
1.13 1.14 1.15 1.16 2 2.1 2.2 2.3 3 3.1 3.3 3.4 3.5 3.6 3.7 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 4 4.1 4.2 4.3 4.4 4.5 4.7 5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 6 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 6.10 6.11 6.12 Input Output Variables and Programming.............................................................................20 Programming Example .......................................................................................................... 20 Hints & Tips for code writing.................
6.13 6.14 6.16 7 Virtual Display......................................................................................................................107 Application Simulator...........................................................................................................108 DP04 Pendant .....................................................................................................................116 Program Loader Monitor ..................................................................
Protection with Fuses and Special switches...................................................................................150 Get the entire valve shift you need .................................................................................................150 Trouble shooting the electronics in your system ............................................................................150 Troubleshooting the CAN Bus Communication network ................................................................
1 DVC System and Software 1.1 Introduction The DVC module family is user programmable with combinations of modules able to support a wide range of hydraulic control applications. The DVC5, DVC7 and DVC10 are the master controllers and their flexible hardware and software allow them to run many hydraulic control applications as a single module. This user guide illustrates the techniques to create and maintain user applications that run on the DVC5/7/10 and the DVC family of expansion modules.
1.3 DVC7 Introduction The DVC7 Programmable Valve Controller is the latest addition to the DVC family of modules. The DVC7 is designed to be a low cost subsystem controller. The low cost DVC7 has enough processing power and input output functionality to support a wide range of hydraulic applications. Should more capability be needed than provided by a single DVC7, multiple interconnected DVC7s or the DVC5/10 and the DVC expansion modules can be used. The DVC7 comes in one version.
In addition, the DVC10 has 6 High-Side (voltage and current sourcing) outputs and 3 PWM (pulse width modulation) outputs for proportional and bang-bang valve control. The High-Side outputs provide +POWER (system power typically 12-24 volts) when enabled by your program to the coils used to open or close your valves. The PWM outputs serve two functions for proportional valve coil current closed loop control. First, they provide the current return path from the negative side of the coil.
P/N: 021-00154, Rev. A.6 - updated for V4.
P/N: 021-00154, Rev. A.6 - updated for V4.
1.6 How the System Works Here we will give you an overview of the operation of the DVC5, DVC7 and the DVC10 with the DVC expansion modules they can control. While not being an exhaustive discussion of the DVC design and operation, hopefully, this overview will allow you to better understand the Programming Tool and Program Loader Monitor to see how your system operation is programmed and controlled. There are 5 fundamental concepts we wish to introduce to you. 1.
First, every DVC module be it a DVC5/7/10 or DVC expansion module has an internal program or BIOS to control the module’s operation and its communications over the CAN Bus. All of the modules operate asynchronously with their own internal clock. The BIOS sets module internal circuits to correspond to the input/output configurations you specify using the Programming Tool.
to fast can cause over correction (i.e. overshoot) depending on the latency experienced by the feedback signal changing given the adjustment. Most systems require the P and I terms to be tuned based on how your system behaves. It should be noted that when you desire a valve’s current to be set to 1 ampere for instance from 0 amperes the PID system works as if the error at time zero is 1 ampere and the adjustment mechanism then sets the actual PWM% to begin to correct the error.
Debugging your application is generally done with the assistance of the PC based DVC Program Loader Monitor. This software supports a Virtual Display allowing your application to display variable values and where the code is executing as well as showing you the status of the various inputs and outputs of your system. The screens here show examples of the main debug windows. 1.9 Expansion Modules As your system control needs grow, the DVC family is designed to meet your needs easily and cost effectively.
DVC-21 – 40 additional digital inputs (sinking and sourcing) are provided. DVC-22 – 40 additional Digital Inputs (Sinking only) are provided. DVC-41 – 12 additional High-Side outputs are provided. DVC-50 – Additional Digital /Analog /Universal Inputs, Output Groups are provided. DVC-61 – Display and 5 Single Pole Double Throw Digital Inputs are provided. DVC62 Pendant – A 4x20 character display and keypad data entry is provided. DVC-65(RS232) – A serial text display is provided.
D206 – Color Touch Screen Graphical Display. Logic Sequence – Where system operation code is created using state machine like bubbles Virtual Display - Where the Program Loader Monitor Virtual Display screens are defined. DNET1 Device Net Module - Defines DVC10 communication to Device Net devices 1.10 Menus The Programming tool features a menu across the upper portion of the project screen.
project (“projectname.dvc”) into a directory of your choosing and to reopen a previously saved project. When your project is compiled (or make is run) five files are created for a project. These files have .dvc, .bak, .inf, .mem and .pgm file extensions. .dvc .bak .inf .mem .
1.15 Hints & Tips for code writing The Intella programming environment allows the programmer to be creative in their programming style. Here are some suggestions as how a program may be structured. Create machine function flowchart (a.k.a. Sequence of Operations) This idea forces the development team to understand what the function of the machine will be before the program is written. Using flowchart notation, the development team documents each function of the machine.
Use meaningful variable names. The limit on variable size is 32 characters. A variable that isn’t an input or output device is called an internal variable. An internal variable that is for Valve1 minimum current setting for the program loader monitor could be labeled Valve1MinCurA_PLM_IV. This naming convention could be used throughout the program. An EEmem variable for a valve’s minimum current setting could be named Valve1MinCurB_eem. Below are some other examples. Valve1ctl_AI2 – analog input#2.
(2) valves, 1.7A each 3.4A Total current 3.55A Of course, a AGC fuse of 3.55A is not available, use a fuse size near this calculated value. 2 Software Installation 2.1 System Requirements Windows XP Professional Windows Vista Business or Ultimate 40 megabytes of disk space to support a complete system install PC with Serial Port - RS232 or USB port For USB ports you need a USB to RS232 converter (i.e. Dongle) DVC5/7/10 controller module DVC10 serial cable 2.
Program Loader Monitor P/N: 021-00154, Rev. A.6 - updated for V4.
3 Programming the DVC Family The "Programming Tool" is used to create your application for the DVC5/7/10. The "Program Loader Monitor" is used to load the user application into the DVC5/7/10 module and monitor the inputs and outputs in real-time mode as your application executes. Both programs are located in the Windows Start Menu under the c:\Program Files\HCT Products. In order to create a user application, the following steps generally should be followed: a) Architect your system.
3.3 Saving DVC Files To save your project click on the File menu item in the Programming Tool project window and then select the Save menu item. This saves the project file under the current filename. To save your project with a different name click on File and select “Save as” on the menu selection. Type a new filename and save your new .dvc project file. Note: If you select an existing project name, the existing file will be deleted and replaced with the new DVC project file.
project to a DVC5/7/10 is more involved because of the new features added to the DVC7 such as configurable LEDs and digital inputs with pulse capability. 3.7 Programming the DVC5/7/10 The DVC hardware is very flexible and supports many input and output configurations. For quick reference the inputs and outputs have been grouped into the following: Digital Inputs, Analog Inputs, Universal Inputs, Output Groups and Input/Output Functions.
3.9 DVC Program Loader Monitor Password Implementation The password scheme is implemented to protect customers from software vandalism or unskilled users. First, the passwords are defined using the Programming Tool and are downloaded into the DVC5/7/10 when the project files are loaded. Next, the Program Loader Monitor asks you to enter a password for the level of access you wish to have to the run time environment. The Program Loader Monitor has 3 levels of password protection.
A typical digital input waveform as seen at the DVC digital input pin looks like the following: +PWR De-bounce Time Time The DVC5/7/10 support two electrical configurations called Sinking and Sourcing. In the Sinking case, the switch is powered externally and the digital input pin detects the switch being open or closed and supplies a connection to ground through a resistor for the current when the switch is closed. In the Sourcing case, the DVC supplies the power (i.e.
False if it is not met. In Toggle mode, the input state is set to True on the first occurrence of the Active Polarity instance and remains true until the second instance of the Active Polarity, always observing debounce time. Software toggle changes the state of the program variable when a rising edge or falling edge is detected on the input. For an input in Toggle mode the application program can also set the input state at any time.
Digital Input Code Example Code If (Dig_1 = True) Then HS_1 = Dig_1 PWM_1.Dir = Dig_1 Dig_1 = False DVCLED_1 = True Comments if logic test True or False based on the state of the input Sets an output to the state of the Input Set direction of a dual coil based on the state of the input Set the state of an Input to False (Toggle mode Only) Turns on the programmable LED of a DVC5 DVC7 Digital Pulse Inputs The DVC7’s digital inputs can be configured to be pulse inputs with RPM and counter modes.
3.11 Analog Inputs Voltage conditioning for Analog Inputs All inputs on the DVCs are rated for a Maximum of +/-32 Volts. The working voltage on the universal and analog inputs for the dvc7/10/710 is 0 to +5 Volts (optional +/- 1, 0 to +10 volts for the DVC10/710). The signal will need to be clamped positive or negative that exceeds 32 Volts. Suggest clamping to 28 Volts. Analog inputs are 0-5V level reading inputs. There are 2 such inputs on the DVC5 and DVC7. The DVC10 has 3 Analog inputs.
PWR COM Analog inputs can be noisy or have abrupt voltage swings (i.e. joysticks). To help the application developer with these problems the DVC5/7/10 support smoothing functions or ramps and noise filtering. Noise filtering is effectively accomplished by the 10ms input sampling period of the DVC hardware and the deadband facility provided. Ramps allow successive 10ms voltage measurements to be damped.
When Enable Center is not checked, Ramp Down is the ramp time from Max to Min Volts. Checking Enable Ramps allows you to specify the Min to Max and Max to Min ramp times. Otherwise, Ramp Down is the ramp from Center - Deadband Volts to Min. The Ramp time is the amount of time to ramp from 100% to 0%. Range: 0.0 to 65.00 s Ramp Up: When Enable Center is not checked, Ramp up is the Ramp from Min to Max Volts. Otherwise, Ramp Up is the ramp from Center + Deadband to Max Volts.
normally due to faulty wiring. The condition is communicated to the program using the Name.MinF and Name.MaxF variable names where Name is the name you gave to the input like Ana_1. Min: If the input voltage is less than this set point, Then “Name.MinF” is set to true. Range: 0 to 4.99v Note: If the voltage goes out of range, the user must reset Name.MinF manually to false. Max: If the input voltage is more than this set point, Then “Name.MaxF” is set to true. Range: .01 to 5.
the form y = gain * x + offset where x is the analog input’s value and y is the scaled value. This is convenient to c Code Comments o If (Ana_1 > 5%) Then If Input % is greater than 5% n PWM_1 = Ana_1 Sets an PWM% output to the Analog Input % v PWM_1.Dir = Ana_1.Dir Set direction of a dual coil based on input (if centered enabled) e If (Ana_1.MaxF) then Test if Maximum Volts threshold reached rt If (Ana_1.MaxRF) then Test if Reference Maximum volts threshold reached a Ana_1.
0ma to 22ma. On the DVC5 only 0 to +5volts is supported. Note that on the DVC5/7 0 to +10volts requires an external voltage divider to be connected. To identify a Universal Input to your application program, fill out the name field or use the default. Each universal input needs at a minimum its input type and input range to be selected. Note: The Universal Input configuration window will display certain fields while deactivating others based on the Input Type selected.
Pulse Time Out The amount of time elapsing without detecting a pulse before turning RPM to 0 Range: 0 to 2.0 seconds Count Limits Min: 0 to 65535 Max: 0 to 65535 Universal Input Code Sample Code If (Uni_1 > 5%) Then PWM_1 = Uni_1 PWM_1.Dir = Uni_1.Dir If( Uni_1.MaxF) then If (Uni_1.MaxRF) then Uni_1.MaxRF = 0 If (Uni_1.RealRPM > 500) then Uni_1.MaxVolt = Uni_1.RawVolts If (Uni_1.LOS) then Uni_1.Counter = 512 3.
These outputs are designed to source (supply) power supply voltage when enabled. Each output is short circuit protected and has open circuit detection. The maximum current per output capability is 3.3 Amps. PWM OUTPUTS (PWM OUT) – Qty (2 for DVC5/7 or 3 for DVC10) These outputs are designed to sink current to ground at the PWM frequency (19 khz). Each output can be configured for a specified current range for maximum current sensing resolution.
OUTPUT GROUP CONFIGURATIONS SINGLE COIL HIGH-SIDE DUAL COIL HIGH-SIDE To HS OUT To HS OUT PWM PWM PWM BANG BANG To PWM OUT To PWM OUT To +POWER IN To HS OUT To HS OUT BANG BANG PWM To PWR COM HIGH-SIDE ONLY SINGLE COIL LOW-SIDE To PWR COM To HS OUT To HS OUT To HS OUT To HS OUT BANG BANG BANG BANG To PWR COM To PWM OUT BANG BANG To PWR COM FIGURE 4 The following gives the definition as well as an overview of each of the fields in the Output Groups screen: Low Side Name The name use
For the DVC hardware PI Loop regulating current, this is the P value Range: 0 to 655.00 Current I For the DVC hardware PI Loop regulating current, this is the I value Range: 0 to 655.00 Dither Amp How much current above and below set point to dither Range: 0 to 100% Dither Hz The frequency setting of the dither Range: 1Hz to 500Hz High Side # Name This will be the access word for the High Side Output. Set this ON or OFF in your application. Range: 16 Characters with no spaces.
Single Coil High Side Single Coil Low Side High-Side Only Process P Setting the P in the Process PI Loop Range: 0 to 655.00 Process I Setting the I in the Process PI Loop Range: 0 to 655.00 Process I Time The time in between updates to the Integral portion of the output correction for the Process PI Loop Range: 0.10 to 10.000 Process Selection Range: Current Regulation, Enable Process PI, Enable Current Ramps and PWM Duty Cycle Control. Each selection will activate the appropriate selection boxes.
P and I setting to correct any error and after the setpoint is reached it continues to regulate / maintain the current at the setpoint. P/N: 021-00154, Rev. A.6 - updated for V4.
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.
PWM_1.Enable Set it to TRUE (>0) to activate the valve controls for the High Side 1 connected valve. PWM_1 Set it to 0-1023 or 0 to 100% to cause current to flow in HS_1’s coil HS_2 Set it to TRUE to activate the Bang-Bang valve. Hidden Code HS_1 = PWM_1.Enable Single Coil Low Side PWM_1.Enable Set it to TRUE (>0) to activate the low side valve controls. PWM_1 Set it to 0-1023 or 0 to 100% to cause current to flow in the coil. HS_1 Set it to TRUE to activate the Bang-Bang valve.
The following subsections give the definition as well as an overview of each of the fields in the Input/Output functions window: Name This is the access word for the function’s associated properties. Range: 16 Characters with no spaces. Valid characters are A-Z, a-z, 0-9, and "_". Rules: The first character cannot be a number. Compiler Keywords or other Names already in use are not valid.
Digital Input LEDs Unused DVC5/10 digital inputs and the four extra LED provided for in the DVC5 can have their LED turned on or off by doing two things. First, define the digital input as being a toggle type using the digital inputs configuration screen. Finally by executing the statement Dig_1 = True or Dig_1 = False the LED will be turned on or off and remain so until the Dig_1 variable is set again.
LED STATE Off On GREEN Flashing GREEN On RED Flashing RED Flashing RED/Green MEANING There is no power applied to the module. The module is operating in a normal condition. Device is in standby state. May need servicing. Module has an unrecoverable fault. Recoverable fault. This DVC7 was loaded with an application that was compiled for a DCV10 or DVC5. The DVC7 is not operational in this condition. Recompile the application as a DVC7 type and load that application.
LED STATE Off RED >> GREEN Flashing GREEN Flashing RED MEANING No PWMs are active. The greatest PWM % 0 -> 100% PWM or High Side output Open circuit detected PWM or High Side output Short circuit detected LED3: Error / System Enable / Module Ready LED STATE On RED On Yellow On GREEN Flashing RED MEANING Unrecoverable error System Enable active (Power cycle required to reset) Module Ready Low voltage (<8.
Digital Input Name Name1 Name.RealRPM Name.PulseTimeout Name.PulsesPerRev Name.Counter Name.LOS Description Set/Get the state of the switch The Unsigned Integer Value of the RPM. For Pulse inputs Only Get/Set Pulse Timeout for Loss of Signal Get/Set Pulses Per Revolution Get/Set Unsigned Integer Value of the Counter. Pulse inputs Only Loss of Signal flag set after time out.
Name.LOS Name.RealRPM Name.Counter Name.PulsesPerRev Loss of Signal flag set after time out. For Universal Pulse inputs Only The Unsigned Integer Value of the RPM. For Universal Pulse inputs Only Get/Set Unsigned Integer Value of the Counter. Universal Pulse inputs Only Get/Set Pulses Per Revolution False (Pulses ok), True (No Pulse Input) 0 to 9999 0 to 65535 0 to 9999 1 Name is the actual name entered in the Input/Output configuration window. Scale depends on Input Range (0 to 5 =.00489, 0 to 10 = .
Output Group Selected as Single Coil High-Side Name Description Name Set the state Current Target or Process in percentage of min to max current 0 = 0 Current, .1% = Min Current, and 100% = Max Current Name.Enable Set the PWM to 0 or enable the PWM Name.Short Get the Coil Flag for Short Status Name.Open Get the Coil Flag for Open Status Name.Rampup Set the ramp up rate (time to travel from 0% to 100%) Name.
HSEvenName HSEven#Name.Short from 100% to 0%) Set PWM frequency Ser PWM dutycycle Returns error 1 = Frequency error, 2 means duty cycle error Set the Bang-bang Coil to On or Off Get the Coil Flag for Short Status HSEven#Name.Open Get the Coil Flag for Open Status HSOddName HSOdd#Name.OpenDisable HSOdd#Name.Short Set the Bang-bang Coil to On or Off Set the Disable Coil Open Detection Get the Coil Flag for Short Status HSOdd#Name.Open Get/Set the Coil Flag for Open Status Name.Cur Name.RampCur Name.
Name.ProI Name.ProItime Name.Cur Name.RampCur Name.CurErr Name.CurSumErr Name.CurP Name.CurI Name.MinCurA Name.MaxCurA Name.MinCurB Name.MaxCurB Name.Config Status LED Name BlinkCode Process Proportional Term Constant “I” Update / Integration Time Current actual * CurGain = amps Current ramped Currend*CurGain= amps Current Error = RampCur – Cur Current Error accumulated over time Current Proportional Term Constant “P” Current Proportional Term Constant “I” Minimum Current Coil A *.
Name FreeRunningTimer DVC Macid Name MACID Description 16 bit counter that continually increments every 100 micro second. Counts from 0 to 65535 (6.5 seconds) then begins again. Could be used to show timing between two events, as long as these events were within 6.5 seconds. Description This variable returns the MACID of the DVC controller.
times the number of logic sequences. Logic sequence code is usually where your normal system operation sequences and display code are programmed (i.e. open this valve when this digital input is switched on). Note that with release 4.7, the above cycle sometimes referred to as the system heartbeat can be set from 1ms to 20ms with the default being 10ms.
input/output status variables and then check for a non-zero sum that indicates an error condition was detected. Given an error then examine each of the status variables to determine the problem and corrective action. 4.2 Logic Sequences The logic sequence window uses bubbles (the circles) and transitions (the lines connecting the circles) to create a logical program flow for part of the user application.
cause the transition code to be displayed in the Logic Sequence window. Transitions expressions are supported for going from bubble n to bubble m and vice versa. An empty expression signals no transition defined between the bubbles whereas entering “1” or “Always” indicates a transition from one bubble to another always. Examples of transition expressions would be “dig_1 = true” or “joystick_left > 50% and reset_timer < 1s”. 4.
Code Dim VarName as Uint Dim VarName as Timer Dim VarName as EEmem Private VarName as Uint/Timer/String Comments Declares a 0 to 65,535 value variable All variables are Global Declares a Uint variable that once set will decrement at 10ms intervals until it reaches zero. Create a Uint location in memory that can be stored in permanent non-volatile memory. Up to 128 EEmem resident variables can be declared.
To save all of the EE memory, execute this line of code in your application: EECommand = EEWrite. In between writes you will need to reset the EEcommand to 0. Also, note that the EE memory will only be written to if one or more of the EE memory variables has changed. So if you insert the EEcommand = EEwrite in your always bubble or some other frequently executed logic bubble you are very unlikely to exceed the 1 million writes limit of the memory chips.
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.
Click the Project menu item and select the controller type you have. Double click on the DVC5/7/10 Master icon to open the DVC configuration window. Enter Hello in the Program Name field. Next, enter the Always bubble code. Double click the Always icon in the Project window. Enter the code as shown into the empty edit window. Select the Make item from the Compile menu in the Project window. When prompted save your project in c:\Program Files\HCT Products\myproject.dvc.
Virtual Display configuring and use in debugging String Utilization The Binary Counter program is designed to have the Dig_1, Dig_2 and Dig_3 DVC5/10 LEDs count in binary from 0 to 7 (all LEDs on). The counter increments once every 2 seconds in slow mode and once every 200ms in fast mode. The mode changes from slow to fast or fast to slow when the count reaches 7.
field to Logic1. Next, right click in the Logic1 window and select “Add Bubble”. Repeat this again to get a second bubble displayed. Now, right click on bubble 1, select “Add Transition”, move the mouse to bubble 2 and click. A line connecting the two bubbles will be displayed. Next, double click on the line and a Transition dialog box will appear. Enter “always” in the “Transition to 2 when” text box. Entering “always” will cause a transition to bubble 2 every time the bubble 1 code completes.
Next, double click on bubble 1 and enter the variable initialization code shown below. Now, we will enter the code for bubble 2 and the other bubbles in the logic sequence. Double click on the bubble and enter the program text and the optional Description field. Next double click on the transition line connecting bubbles 2 and 3. Enter the transition conditions as shown. Repeat this for the other transition lines. Enter the transition conditions shown in the “Logic1” logic sequence window.
condition is met signaled by Toggle_2 being set to TRUE. Next is the Bubble 3 code. Here is the Bubble 4 code. Now select the Make option from the project window’s Compile menu. Correct any typing errors and repeat the Make operation. Now load the application into the DVC controller as you did in the Hello example. Once it is loaded click the yellow Virtual Display status button in the Program P/N: 021-00154, Rev. A.6 - updated for V4.
Loader/Monitor window and the following screens should be visible. Note also the changing Dig_1 to Dig_3 LEDs on the DVC5/10 module. You have completed Example 2 and now we will introduce you to more sophisticated control applications. 5.4 Process PI Closed Loop Control Example (PSI to Valve Current) Process PI is a capability of the DVC that makes it easy to control a valve’s current as a function of another sensors input.
First, by being in the Always bubble this code will execute every 10ms so the system will be very responsive to any change in the setpoint or any variation in the performance of the pump as indicated by a change in the pressure sensor or feedback. Second, the valve will only be activated or enabled when a nonzero setpoint (True) is read from the analog input Setpoint_PSI.
Press the Button Labeled "Dig_1". In the Digital Input 1 window, enter the following information: Name: Start De-bounce Time: 20ms Polarity: Active High Toggle: No Toggle Press the Button Labeled "PWM_1" in the Output Groups.
Double click on bubble "1".
Double click on the transition between bubble 2 and 3. In this entry screen setup the following: Description: (empty) Visible: not checked Transition to 2 when: (empty) Visible: checked Transition to 3 when: Wait = 0s Visible: checked Double click on the transition between bubble 3 and 4.
After a few seconds, power cycle the DVC5/7/10 again to execute the application. P/N: 021-00154, Rev. A.6 - updated for V4.
5.6 Compactor Program Example The compactor demo is a good example showing how bubble logic works. This program will run a garbage compacting routine that has manual and auto compacting modes. Also, while in the Auto Cycle mode, the manual inputs will override the auto mode. Holding the Auto button will halt the machine and reset the auto cycle.
The Bubble Logic The Bubble Logic on the following page contains circles with captions. Above the circles is a description. The starting point's description always starts with a "(s)". In this example the starting point is the bubble with the caption "M". Transitions are the lines that connect two bubbles. If the Transition goes in only one direction, there will be only one arrowhead. If there are two arrowheads, it is necessary to know how to read the transition information.
5.7 More Complex Control Program Example This example program illustrates how to program various types of processes on the DVC. The point of this example is to show the kind of code written to make a given process work. Processes Valve Driver: Drive a Dual Coil High-Side valve setup with a joystick. AntiStall: If the Engine RPM starts to drop, the Hydraulic load is reduced. Bang-Bang: Drive two Bang-bang valves with two digital switches. Flash LED: Pulse a High-Side output to drive an LED.
PWM_1.Enable = True This command enables the output for PWM current regulation. If the enable is set to False, the output will be 0% PWM, or 0 current. It will not go to Min current. To get min current, the output should be enabled and the variable set to 0%. Anti-stall Two lines of code are required to run an Anti-stall algorithm. The key to the Anti-stall routine is in the set-up. The load on the Engine is controlled with a Single Coil PWM Valve.
This example makes use of the Process PI selection. The Process PI selection will adjust the current output up or down in an attempt to make the Set point and the Feedback equal. This kind of regulation requires three lines of code. PWM_3.Setpoint = EngineSetpoint 0% to 100%. Update the set point variable. The variable is a value from 0 to 1023 or PWM_3.Feedback = EngineRPM or 0% to 100%. Update the feedback variable. The variable is a value from 0 to 1023 PWM_3.
End If ElseIf (Feedback < Actual_SP) Then SError = (Actual_SP - Feedback) * EE_I / 100 If (SError > EE_Error_Max) Then SError = EE_Error_Max End If If (Sum + SError > 100%) then Sum = 100% Else Sum = Sum + SError End If End If End If 5.8 Send receive bit / byte information The DVC controllers are capable of both sending and receiving J1939 messages. This example will explain how to contruct / deconstruct bytes of information from both single bit and 10 bit configurations.
else Valvecoil2.Enable = 0 end if If the value is true, or ‘2’ in this example, then an internal bit can be set or reset. Analog values, using more than one bit: Using a value that is other than on/off will need to be transferred also. The DVC controllers use a 10 bit number. The information transmitted in 1 byte is 8 bits in length. For this reason, and to transmit / receive the highest resolution, 2 words will need to be used, see the code below on format. data_to_dvc7a.
6 DVC Expansion Modules 6.1 Introduction The DVC5, DVC7 and DVC10 are programmable controllers. Each has a fixed number of Inputs and Outputs for standalone operation. If your system requires more inputs or outputs than the DVC5/7/10 provide you have two expansion options. Additional DVC5, DVC7 and DVC10s can be configured each as master controllers for a portion of your application.
The DVC21 screen is broken up into three areas: Name, MAC ID, and Individual Input Configuration. The Name is used to uniquely identify a particular DVC expansion module. The MAC ID tells the DVC10 how to address the Input Module when communicating over the CAN Bus. You configure the inputs by pressing the numbered buttons. Digital Inputs Digital inputs are Boolean inputs that are either true or false. The input is enabled when the Name field is specified.
Software Polarity Active High Active Low Toggle Input changes states when Voltage goes from Gnd to > 2.5 Volts Input changes states when Voltage goes from > 2.5 Volts to Gnd Toggle No Toggle Input is True when voltage is > 2.5 volts Input is True when voltage is Gnd DVC21 Program Variables DVC21.Status Get the state of the flag. Range: 0 = Module is Online 2 = Module is Offline DVC21.Name or Name Get the state of the switch. Range: False or Off, True or On Digital Input Code Sample Code If (Dvc21.
Note: Regardless of what type of switch is used, the DVC22 will react according to the voltage seen at the input (above 2.5 volts is a high level and below a low level). Instructions for hooking up a switch to provide the desired voltage levels can be found in the hardware manual. Name: The name used in the bubble logic screen to access this variable and properties. Range: 16 Characters with no spaces. Usable characters are A-Z, a-z, 0-9, and "_". Rules: The first character cannot be a number.
Digital Input Code Sample Code If (Dvc22.I40 = True) Then Dvc41.A1 = Dvc22.I1 Comments If logic test True or False based on the state of the input Sets an output to the state of the Input Note: The input state cannot be set or reset by the application. The input must be set or reset by the physical input.
Digital Output Code Sample Code Dvc41.A12 = On Dvc41.A1 = Dvc21.I1 6.5 Comments Turn Output On Sets an output to the state of the Input DVC50 The DVC50 Universal I/O Module is an expansion module designed to operate in conjunction with a DVC7/10 Master Module. Its large number of inputs and outputs make it ideal for applications that may need to control more proportional valves than a DVC7/10 supports.
10ms to the DVC10 while Mail Inputs are sent to the DVC50 every 20ms. Direct memory transfers will complete every 40ms. The DVC50 I/O configuration screen is very similar to the DVC10’s screen with the addition of the Name, MAC ID and IO Assignment fields. Also note the different number of Analog/Pulse Inputs and that only six function curves are provided instead of eight. The Name field is used to identify this DVC50 module and serves as the prefix for DVC50 IO names.
that you use a mail input. Refer to the code samples at the end of this section for an example. IO Functions The IO Functions screen allows the user to assign various inputs as the input to an IO Function curve. Use the pull down menus on the right side of the screen to assign an input to the associated Function Curve. Mail Names The Mail Names screen is used to assign variable names to the Mail_Inputs1,…8 and Mail_Outputs1,...4 of the DVC50. You use these names in your DVC7/10 application code.
IO Assignments screens may not be contradicted in the Bubble Logic. DVC50 Program Variables The Input and Output Group variables are the same as with the DVC10. Note: Output Group PWM is the lone exception and is controlled via the Mail In variables as previously explained. To access these variables in the Bubble logic, use the format “Name.Var-Prefix.Var-Suffix”, where Name is the name of the module (DVC50, DVC51, Frank etc), Var-Prefix is the I/O variable name (.Dig_1, .
‘ mail_input1 Else DVC50.pump.enable = false End if 6.6 ' turns off current to the valve DVC61 The DVC61 display module is a very configurable display device with an additional 5 Single Pole Double Throw digital inputs. A single DVC61 can be connected to the RS232 port of a DVC5/7/10 or one of more DVC61s can be connected to the CAN Bus. In addition to supporting multiple DVC61 display devices, multiple screen images per device are also supported.
DVC61 Digital Input Setup The DVC61 Input Setup screen allows the user to configure the 5 Single Pole Double Throw (SPDT) digital inputs of the DVC61. The user may select the tabs at the top of the screen to switch between the five input groups. The diagrams displayed show possible hardware configurations for the inputs. Input 1A check box Enable the input for use in the project by checking the box. Name: The name used in the bubble logic screen to access this variable and properties.
Range: 16 alpha/numeric characters only with no spaces. V1, … ,V12: Scroll down list of display types/formats Refer to Section 8.2 for an explanation of Display Types. X&Y These are the X and Y numeric text character position and line coordinates for the Display variables. The Upper left corner is X = 1 and Y = 1. Test Value This is the value displayed on the test screen to allow the user to preview the finished screen while in the programming tool.
batteries and a moisture and oil proof keypad. Backlighting provides for easy reading of the display. Programming the DVC62 Below is an example of how to program the DVC62. More complete examples can be obtained from High Country Tek Tek upon request. You basically program the display in four steps: First add the DVC62 icon to your project. Second construct the various display images you will want the user to access (scroll through). The images are specified much like the DVC61 screens.
Each key has a unique integer value. Below is the value for each key on the keypad.
6.8 DVC65 The DVC65 layout screen is similar to that of the DVC61 except it is limited to 2 rows of 24 characters each. New DVC65 screens can be defined by first clicking the right mouse button in the window and selecting "Add Screen". DVC65 Screens A DVC65 Setup screen has a field to change the Name, display up to 4 Variables, and a string of text. In the upper portion (2x24 Test Display) of the setup screen, there is a preview of the DVC65 display.
Name.V3 Range: 0 to 65535 Set the value for the Var 3 Name.V4 Range: 0 to 65535 Set the value for the V4 display variable DVC65 Code Sample Code DVC65.Screen = Screen_Name DVC65.V1 = ana_1 6.9 Comments Point to DVC65 Screen to display First Variable is set to analog input 1 DVC70 The DVC70 memory module is capable of storing (logging) data, date and time information to nonvolatile memory in the DVC70.
Trend logging, Event logging or Fault logging. Memory Allocation sets the size of the particular bucket (in kilobytes) out of a maximum of 5megabytes. The Data Protected checkbox determines if new data can be written over old data. The Time Stamp checkbox gives the option of recording time, date and day in the log. Alarm and Alarm Percent work together as a means of showing when the Allocation Block is getting close to being filled.
Time Stamp: When Time Stamp in Trend mode, the time, date, and day of each scan is stored as well as the scanned data Range: On, Off. Notes: Trend Logs: the user has the choice to deactivate Time Stamp, except when the data is not protected. If the Time Stamp is deactivated, only the first record will be time stamped and the Program Loader Monitor will automatically calculate the time in reference to the first time-stamp and the scan rate. Event and Fault Logs: Time Stamp is activated by default.
Number: This field contains the (message) number. This number is stored in the DVC70 during data collection, and is used in order to determine the Message when the user downloads the data using the Loader Monitor. Range: 1 – 32768. Message: This field contains the message to be added to the Message List. Message is what is displayed in the output Log File. Range: 40 Alpha/Numeric characters.
Range: 1 - 5 = Memory Bucket # (1 – 5) Active DVC70.AlarmState Range: 1 – 5 = Alarm State for Memory Bucket 1 – 5 DVC70.PercentUsed Possible Values: 50%, 60%, 70%, 80%, 90%, 95%, 98%, and 100% DVC70.MinSec Bits: bits 0 – 6 (Seconds) – 0 - 59 bits 8 – 15 (Minutes) – 0 - 59 DVC70.DayHours Bits: bits 0 – 4 (Hours) – 0 - 23 bit 5 PM or AM – 0 or 1 bit 6 12 or 24 hour clock – 0 or 1 bits 8 – 15 (Day of the Week) – 1 - 7 DVC70.MonthDate Bits: bits 0 – 5 (Date) – 1 - 31 bits 8 – 13 (Month) – 1 - 12 DVC70.
Code Sample Code EngineTrend.EngineRPM = ana_1 Dvc70.ActiveB2 = Dig_2 Event_2.Truck_moving = 1 + SF10 Dim Day as Uint Day = DVC70.DayHours / 256 If (Day = 1) then DVC70.ActiveB2 = true End if 6.10 Comments First Variable of Engine Trend is set to analog input 1 Digital Input 2 toggles activity Set the message to be displayed (in the event that Event_2.
DVC5/7/10 Firmware Setup With the Program Loader Monitor running and connected to the DVC5/7/10 navigate to the Factory Information screen and select the following options then select “Send Changes”. CAN Baud Rate = 250K baud CAN Bus Type = J1939 Only DVC J1939 Operation At this point load the application into the DVC5/7/10 in the normal manner. The DVC will communicate directly on the J1939 CAN Bus.
Maximum Time The meaning of this field is dependent on the Control type. If the Control type is Send Data then this field means how often the message is transmitted out from the DVC controller and DVC80. If the Control type is Receive Data then this field means how often the message is expected to be received. Error indications will occur if these times are exceeded. Range: 10ms to 10seconds. PDU Format (PF) The PF field identifies one of two PDU formats able to be transmitted (PDU1 or PDU2).
Priority Data Length 3 5 EEC1.Status_EEC1 EEC1.Drive_DMD_Eng EEC1.Actual_Eng EEC1. EngRPML EEC1. EngRPMH EEC1.
Level / Pressure Cruise Control/ Vehicle Speed Fuel Economy Ambient Condition s Inlet/Exha ust Condition s Vehicle Electrical Power Transmis son Fluids Engine Fluid Level/Pre ssure 6.11 Engine Oil Pressure Coolant Pressure Coolant Level Wheel Based Vehicle Speed 254, 239 254, 239 254, 239 254, 241 65263 65263 65263 65265 FEEF FEEF FEEF FEF1 4 7 8 2 1 1 1 2 4 2 0.
The Poll Update Rate specifies the rate at which the DVC5/7/10 will send messages to the Device Net module. The I/O Poll Consume and Produce Bytes fields are counts of the number of data bytes to be received or sent by the DVC7/10 respectively. Each byte will have a name with the defaults (Consume1, Produce1 etc.) being as shown. You reference a given byte using the name DNET1.Consume1 or DNET1.Produce1.
Send Uint Name 1 - 4: This is the suffix Name for setting the data to the other DVC5/7/10. Range: 16 Characters with no spaces. Usable characters are A-Z, a-z, 0-9, and "_". Rules: The first character cannot be a number. Compiler Keywords or other Names already in use are not valid. Receive Uint Name 1 - 4: This is the suffix Name for the data sent from the other DVC5/7/10. Range: 16 Characters with no spaces. Usable characters are A-Z, a-z, 0-9, and "_". Rules: The first character cannot be a number.
6.13 Virtual Display The Virtual Display allows DVC5/7/10 users to monitor variables using a Windows XP PC or laptop computer. You can monitor up to 20 variables concurrently. You add the Virtual Display to your project by right clicking the mouse in the project window and selecting the Add Virtual Display option. Only one Virtual Display can be added but the Virtual Display can have an unlimited number of screen definitions.
VirtualDisplay.V3 … VirtualDisplay.V20 6.14 Contains the value for V3. Contains the value for V20. Application Simulator A useful facility for debugging your DVC5/7/10 application without physically being on the target machine is the application simulator. Using this facility much of your application code can be debugged prior to actually installing the controller and the application on the target machine. All of the inputs and outputs of the DVC5/7/10 can be controlled using the different blue icons.
6.15 D206 Touch Screen Color Graphical Display With release 4.7 the DVC tools provide support for the D206 Touch Screen Color Graphical Display input/output device. The display comes in various sizes along with black and white. The midsize display is 5” by 7” and can be used in a landscape or portrait orientation. The D206 connects to the DVC5/7/10 controller using the RS232 interface. Backlighting provides for easy reading of the display.
To specify the objects for a screen you first open the screen by double clicking the screen icon. Using the Objects Menu you select the object types you wish to add to your screen from the 25 objects listed.
20-Text,x/1/,y/1/,txtclr/w/,backclr/T/,text/..../,angle/0/,w/30/,h/20/,size/10/,justify/c/ 21-TextNumeric,x/1/,y/1/,clr/w/,text/..../,value/0/,w/30/,h/20/,size/10/, justify/c/ 22-TextNumericText,x/1/,y/1/,clr/w/,text1/..../,value/0/,text2/.../,w/30/,h/20/,size/10/, justify/c/ 23-TrendChart,clear/0/,x/1/,y/1/,clr/r/,min/0/,max/100/,pts/10/,flag/0/,data/100/,w/10/,h/20/ 24-VerticalText,x/1/,y/1/,clr/w/,text/....
MNBLUE Midnight Blue NAVY Navy WGRAY Warm Gray data The Trendchart uses this field as where the new data field to be recorded is located flag Trendchart uses this field to indicate when a new data point is being transmitted. This field will alternate between > 0 and 0 (true and false). h Specifies the height in pixels of the object. imageno Bitmap object identifier. Consult HCT for more information on bitmaps.
Editing a Display Screen You can edit the object script using the Edit Display Script window. Editing consists of adding comments, changing field values or display variable types and field and line numbers. If you make a mistake in the editing, an error message will be displayed above the window otherwise the “No Script Errors” message appears. The Display Script window reflects the display variables v1 to v24 substitution in the script (i.e. *V1*). Each defined variable has a line and field specification.
The variables you use when displaying a screen are named: GD.screen GD.v1, .... GD.v24 GD.portrait A value of 1 = landscape, 2 = landscape rotated 180 degrees, 3 = portrait, 4 = portrait rotated 180 degrees. Zero the default = landscape. GD.alarm This variable must be set first to true and then to false for each alarm beep and be about 250ms apart. Here is example alarm code: dim alarmtimer as timer if (alarmtimer = 0) then alarmtimer = 250ms if (gd.alarm = false) then gd.alarm = true else gd.
Special Object Notes Rectangle Rectangles are assumed to be behind other objects when displayed and as such can be used for background color and illumination. For instance to make the display background all white include the following in your script. Rectangle,x/1/,y/1/,clr/w/,w/320/,h/240/ Trendchart This object plots the number of entries you specify. Between sending values to the object you need to reset the new data field. Data to a trend chart is usually done at regular intervals as shown below.
6.16 DP04 Pendant With release 4.7 the DVC tools provide support for the DP04 Graphical Display Pendant with Keypad. The Pendant is approximately 3” wide x 6” high and 1” deep. The DP04 connects to the DVC5/7/10 controller using the RS232 interface. Backlighting provides for easy reading of the display. The unit has batteries for power. Programming the DP04 The DP04 is programmed using the Programming Tool much like you would program the Graphical Display.
One added feature of the DP04 is the ability to log data to its flash memory card. The log object is used to log up to 12 data variables. The DP04 timestamps the log messages and creates a comma delimited file for import from the flash memory card into Excel. Log Object Log,Record/1/,L1/name/,F1/ /,L2/name/,F2/ /,.........,L12/name/,F12/ / You specify where the V1, ...V24 variables are to be located and their format.
7 Program Loader Monitor 7.1 Introduction The Program Loader Monitor is used to download programs to the DVC5/7/10 and to display information from all of the DVC modules connected together via the CAN Bus. It runs on your Windows PC and uses a RS232 cable to communicate with the DVC5/7/10. Data from DVC expansion modules (i.e. DVC21, DVC70 etc.) is transmitted through the DVC7/10 to the Program Loader Monitor.
The first time you execute the Program Loader Monitor the following screen appears. Select the PC COMM port to which your RS232 cable is attached. 7.4 Main Program Loader Monitor Screen Normally the first screen you will see after executing the Program Loader Monitor program is as shown below. This window shows all of the modules in your applications project. Each module has an icon and status button. Up to 14 DVC modules controlled by the DVC10 on the CAN Bus can be monitored.
The Program Loader Monitor determines the DVC controller type it is connected too automatically and the main screen will be modified to reflect the input outputs of that controller. Virtual Display Status The Virtual Display screen is a PC resident display window that is activated from the Program Loader Monitor’s main screen. The display is used to display program variables for debugging or run time information.
7.5 Program Loader You use the Program Loader (yellow button in the center of the DVC5/7/10 monitoring window above) to reprogram the DVC BIOS and Application programs. When selected the Program Loader button sets a signal in the serial cable that allows the DVC5/7/10 to go into programming mode on DVC5/7/10 power up. After selecting the Program Loader button and power cycling the DVC5/7/10, there are two ways to determine that the DVC controller is in programming mode.
7.8 Input / Output Functions Double click the IO Functions yellow button (in the middle of the Monitor window) to activate this window. The information displayed is the same as the information programmed with the HCT Programming Tool. The user can alter the Input% vs. Output%. The information will be updated to the DVC5/7/10 temporary memory once the Send Changes button has been pressed. The DVC5/7/10 then operates on the temporary values until the unit has been reset.
7.11 DVC21 (Sinking and Sourcing Digital Inputs) and the Loader Monitor The following screen appears when a DVC21 is connected to the DVC7/10 and the Status button for the DVC21 is pressed: The names of all DVC21 variables (which were defined in the application program) appear under the Digital Inputs 1 – 20 and Digital Inputs 21 – 40 headers, while the status of each input is displayed to the right of the DVC21 variable name.
Caution: If the MAC ID is changed to a value different from that in the DVC22 configuration screen and the Send Changes button is pressed, the new value will be saved to temporary memory. If the DVC7/10 is plugged in, it will not recognize or be able to communicate with the DVC22 until the application is changed and reloaded onto the DVC7/10.
connect directly to the DVC50 using the DVC7/10 cables. Also some graph functions are not available unless the user is connected directly to the DVC50. This screen appears when the Program Loader Monitor is directly connected to the DVC50. This screen enables the user to monitor the status of, and send changes to the DVC50 in the same way as with the DVC7/10 screen. External screens such as Output Groups and Factory Info etc. are accessed in the same way as with the DVC7/10.
7.15 DVC61 (Display Module) and the Loader Monitor The following screen appears when connected directly to the DVC61. This screen enables the user to monitor the status of the Inputs, Baud rate, Supply Voltage, Serial Number and MAC ID as well as changing some of the features of the DVC61. When viewing this screen while connected to the DVC5/710 certain features will be “grayed out” because changes cannot be sent to the DVC61 through the DVC5/7/10.
7.16 DVC70 (Logging Module) and the Loader Monitor This screen appears when you monitor the DVC70 through the DVC7/10. The window is a status display and to change settings or download accumulated data you will need to connect the Program Loader Monitor directly to the DVC70. The following screen appears when connected directly to a DVC70. This screen enables monitoring of Memory bucket space and the download of data from the DVC70 to your PC.
Device Status Box – This is the location where users can make changes. Users are able to change the MAC ID and Baud Rate for the DVC70. Send Changes Button – Once the user has made the desired changes to the MAC ID and / or Baud Rate, pressing the Send Changes button forces the changes to take place in the DVC70 unit. Exit Button – exits the DVC70 Loader Monitor Screen.
Viewing the Output File(s) Whenever an allocation block is extracted, an output “.csv” file is created. The output files have the same name as the Allocation Block/Memory bucket name specified while developing the application using the Programming Tool with the added extension “.CSV” (i.e. EngineTrend.csv). In order to view the DVC70 output files, do the following: Open Microsoft Excel Click on File and select Open Select Text Files (*.prn; *.txt; *.
When connected directly to the DVC80, the following screen will appear: In addition to the information displayed when connected to the DVC80 via the DVC5/7/10, the following can also be monitored: Config button – allows the user to modify extra parameters in the DVC80 configuration. When connected to the DVC5/7/10 the user can only modify the Log Rate. Otherwise, the user can modify the MAC ID, DVC80 CAN Baud, User Defined PGN, and Display Message. Detail button – displays a help window.
than the rate in use by the DVC7/10 and the Send Changes button is pressed, the new value will be saved to temporary memory. If the DVC7/10 is plugged in, it will not be able to communicate with the DVC80 until its baud rate is changed to match that of the DVC80. When connected directly to the DVC80 and the detail button is on, a help window appears and the user can point his/her mouse to each indicator in order to see specific information on programming.
8 Programming Notes 8.1 Examples of Program Statements and Logical Operators Dim Fault as Uint Dim Timer_0 as Timer Dim Scale_Factor as EEmem Const Low_Limit = 256 PWM_1.Enable = True If (Dig_1 AND Dig_2) Then PWM_1 = Ana_1 / Scale_Factor ElseIf (Dig_1 OR Dig_2) Then PWM_1 = (Ana_1 / Scale_Factor) / 2 ElseIf (Dig_3 XOR Dig_4) Then PWM_1 = ((Ana_1 / Scale_Factor) * 2) ElseIf (Dig_1 = NOT Dig_5) Then PWM_1 = 0x0200 Else PWM_1 = Low_Limit End If If (Uni_1 <= 5.
5 Digit Uint Displays the actual value of the variable being displayed with no scaling factor applied an as a 5 character field right justified. DVC products support Uint numbers from 0 to 65535. Supply Volts Scales the displayed value of a variable to units of Supply Volts. For example, if the variable being displayed was named Supply and the Power In voltage was 13.8 volts the displayed value would be 13.8.
8.4 Program Debugging and Variable tracing Use the Virtual Display facility of the Program Loader Monitor, D206 Graphical Display or DVC61 display. Refer to the Binary Counter programming example for an illustration in the use of the Virtual Display. The advantage of using a DVC61 is that it can be attached directly to the DVC5/7/10 RS232 connector or the CAN Bus and does not require a PC to be connected. 8.
9 Application Notes 9.1 CAN Bus Configuring DVC modules communicate using the CAN Bus protocol and wiring scheme. Each module (including the master DVC10) has an identifying CAN Bus MAC ID number. The two digits number MAC ID of each module must be unique. MAC ID numbers can be assigned in two ways. Using the Programming Tool each module in your project has a configuration window that contains a MAC ID entry field. Generally the default values will not need to be changed.
10 Hardware Installation Listed below are the hardware connection diagrams for the various DVC products. Additional information can be found on the website, http://www.highcountrytek.com/web/index.htm. 10.
** Power and GND are not supplied to the CAN Bus by the DVC5 10.2 DVC7 Hardware Connections DVC7 30 Pin Metri-Pak connector Pin Function Pin Function Pin Function L1 L2 L3 M1 M2 M3 N1 RS232 TXD RS232 RXD RS232 RTS CAN H GND GND CAN L P2 P3 R1 R2 R3 S1 S2 ANA 1 GND UNI 2 ANA 2 REF OUT UNI 3 DIG 1 T3 W1 W2 W3 X1 X2 X3 DIG 3 PWM 1 PWM 2 HS 5 HS 2 HS 4 HS 6 N2 N3 P1 GND GND UNI 1 S3 T1 T2 DIG 2 HS 1 HS 3 Y1 Y2 Y3 (+) POWER IN (+) POWER IN (+) POWER IN 10.
A3 B1 B2 B3 C1 C2 C3 PWM OUT 1 HS OUT 1 HS OUT 2 PWM OUT 1 HS OUT 3 HS OUT 4 PWM OUT 2 D3 E1 E2 E3 F1 F2 F3 PWM OUT 2 PWR COM PWM OUT 3 PWM OUT 3 PWR COM PWR COM PWR COM DVC10 5 Pin J1939 connecter (P4) Pin Function 1 2 3 4 5 DRAIN **V+ (NC) **V+ (NC) CAN H CAN L ** Power and GND are not supplied to the CAN Bus by the DVC5 10.
DVC21 18 Pin Metri-Pak connector (P6) Pin Function Pin Function A1 A2 A3 B1 B2 B3 C1 C2 C3 DIG IN 26 (SOURCE) DIG IN 27 (SOURCE) DIG IN 28 (SOURCE) DIG IN 29 (SOURCE) DIG IN 30 (SOURCE) DIG IN 31 (SOURCE) DIG IN 32 (SOURCE) DIG IN 33 (SOURCE) DIG IN 34 (SOURCE) D1 D2 D3 E1 E2 E3 F1 F2 F3 DIG IN 35 (SOURCE) DIG IN 36 (SOURCE) DIG IN 37 (SOURCE) DIG IN 38 (SOURCE) DIG IN 39 (SOURCE) DIG IN 40 (SOURCE) RXD TXD SIG COM DVC21 5 Pin J1939 connecter (P7) Pin Function 1 2 3 4 5 DRAIN **V+ (NC) **V+ (NC) C
C3 D1 DIG IN 4 (SINK) DIG IN 5 (SINK) G1 G2 DIG IN 14 (SINK) DIG IN 15 (SINK) K2 K3 DIG IN 24 (SINK) DIG IN 25 (SINK) DVC22 18 Pin Metri-Pak connector (P20) Pin Function Pin Function A1 A2 A3 B1 B2 B3 C1 C2 C3 DIG IN 26 (SINK) DIG IN 27 (SINK) DIG IN 28 (SINK) DIG IN 29 (SINK) DIG IN 30 (SINK) DIG IN 31 (SINK) DIG IN 32 (SINK) DIG IN 33 (SINK) DIG IN 34 (SINK) D1 D2 D3 E1 E2 E3 F1 F2 F3 DIG IN 35 (SINK) DIG IN 36 (SINK) DIG IN 37 (SINK) DIG IN 38 (SINK) DIG IN 39 (SINK) DIG IN 40 (SINK) RXD TXD
C1 C2 C3 D1 HS OUT 3 SIG COM PWR COM HS OUT 4 F2 F3 G1 G2 HS OUT 9 HS OUT 10 HS OUT 11 PWR COM J3 K1 K2 K3 (+) POWER IN 3 (+) POWER IN 1 (+) POWER IN 2 (+) POWER IN 3 DVC41 5 Pin J1939 connecter (P9) Pin Function 1 2 3 4 5 DRAIN **V+ (NC) **V+ (NC) CAN H CAN L ** Power and GND are not supplied to the CAN Bus by the DVC5 Special Notes: 1. (+) Power IN 1 supplies power to the DVC41 module and HS OUT 1, HS OUT 2, HS OUT 3 and HS OUT 4. 2.
D1 (+) 5V POT REF G2 ANALOG IN 3 K3 DIG 8 INPUT DVC50 18 Pin Metri-Pak connector (P17) Pin Function Pin Function A1 A2 A3 B1 B2 B3 C1 C2 C3 (+) POWER IN (+) POWER IN PWM OUT 1 HS OUT 1 HS OUT 2 PWM OUT 1 HS OUT 3 HS OUT 4 PWM OUT 2 D1 D2 D3 E1 E2 E3 F1 F2 F3 HS OUT 5 HS OUT 6 PWM OUT 2 PWR COM PWM OUT 3 PWM OUT 3 PWR COM PWR COM PWR COM DVC50 5 Pin J1939 connecter (P18) Pin Function 1 2 3 4 5 DRAIN **V+ (NC) **V+ (NC) CAN H * ** Power and GND are not supplied to the CAN Bus by the DVC50 10.
* For Active High connections, the SPST switch will be connected between the appropriate input and (+) power. * For Active Low connections, the SPST switch will be connected between the appropriate input and ground. 10.
B3 C1 C2 C3 (+) 5VDC TERM1 TERM2 E3 F1 F2 F3 PWR COM PWR COM DVC80 5 Pin J1939 connecter (P15) Pin Function 1 2 3 4 5 NC NC NC CAN H CAN L P/N: 021-00154, Rev. A.6 - updated for V4.
11 Safety is Everyone’s Responsibility Safe work practices need to be observed in building the hardware connections, mounting the units to the machinery, and programming the controllers. 11.1 Safety in building the hardware connections Safety should be at the forefront of the development team’s thoughts. Many times during development, technicians and engineers will fabricate test fixtures, care must be taken not to short circuit power supplies and output devices.
Appendix A Compiler Keywords Always, ALWAYSCODE AI1BITS0, AI2BITS0, AI3BITS0 BACKLIGHTON, BACKLIGHTOFF BREG9, BREG8, BREG7, BREG6, BREG5, BREG4, BREG3, BREG2, BREG1, BREG0, BITTEMP DIGBITS DVCLED_1, DVCLED_2, DVCLED_3, DVCLED_4 EECOMMAND, EEREAD, EEWRITE Else, ElseIf, End if FALSE, FAULTON, FAULTOFF, FAULTBLINK IF, IFTEST, INIT K9, K8, K7, K6, K5, K4, K3, K2, K1, K0, KNOKEY, KEND, KCLEAR, KF4, KF3, KF2, KF1, KHOME, KDOWN, KUP, KENTER, KRIGHT, KLEFT LEFTBIT LONGREG0, LONGREG1, LONGREG2, LONGREG3, LONGREG4,
Appendix B Programming Statement Examples Dim Fault as Uint Dim Timer_0 as Timer Dim Scale_Factor as EEmem Const Low_Limit = 256 PWM_1.Enable = True If (Dig_1 AND Dig_2) Then PWM_1 = Ana_1 / Scale_Factor ElseIf (Dig_1 OR Dig_2) Then PWM_1 = (Ana_1 / Scale_Factor) /2 ElseIf (Dig_3 XOR Dig_4) Then PWM_1 = ((Ana_1 / Scale_Factor) * 2) ElseIf (Dig_1 = NOT Dig_5) Then PWM_1 = 0x0200 Else PWM_1 = Low_Limit End If If (Uni_1 <= 5.5%) Then HS1 = True HS2 = False ElseIf (Uni_1 > 5.
Dim Timer_0 Timer If (Timer_0 = 0) Then Dig_1 = Not (Dig_1) Timer_0 = 2s End If Dim STRname as String “string “ VirtualDisplay.v1 = STRname P/N: 021-00154, Rev. A.6 - updated for V4.7 Tools Toggles a Digital input every time the Timer times out Defines STRname as string type and assigns “string” to it.
Appendix C Troubleshooting Systems Basic Electronics Theory and DVC System Troubleshooting Electronics is not nearly as scary as a high-pressure hydraulic leak and is much less messy. With basic understanding and simple tools, electronics can be applied and trouble shot easily and successfully. All of HCT's products involve electronics and HCT’s goal is to make it easy for you to quickly get them to work in your systems.
breaks or restrictions in the current's path through the chassis as they add resistance to the circuit and thereby lower the current flow and the resultant magnetic force produced. If more than one circuit uses the same wires, they interact, just as would happen if an undersized hose were used to return the fluid from many valves to tank. The pressure drop across the restriction in the wire is the resistance multiplied by the sum of all the currents using the wire.
Flashing LEDs on HCT’s products usually indicate that a problem. How to isolate the cause of the problem is what we will cover next. HCT products typically have a power LED to indicate that there is enough voltage to run the specific module/product. The power LED should be steady on! Off or flashing indicates a power problem and you must find it and fix it before worrying about any other symptoms.
Our DVC products have an available computer interface to your PC. This is by far the most effective way to setup and troubleshoot our products. We provide all of the information represented by the LEDs plus a lot more. Meters and running graphs give quick looks at what your system is doing, while enunciators tell you what the unit is trying to do. Data logging and remote operation can be used to consult with our staff to help debug difficult problems.
Appendix D Current Regulation using PID techniques PID, proportional integral differential control, is a powerful and popular method of regulating systems. Typical applications include speed control and position control. HCT uses PID to control a proportional valve’s performance to compensate for the variations in system parameters such as the wire lengths and other resistance sources that can effect the positioning of a valve.
always get there before the system does. Proportional control alone is the simplest to use, but will result in some steady state error. Increasing the proportional term enough to limit the steady state error to a small value can cause over shoot and oscillation. The integral term adds up the error as a function of time and drives the output harder as the error increases and as time in error increases. An analogy is that the integral of the flow rate of water is the depth in a bucket.
Appendix E Pulse Width Modulation (PWM) and Dither HCT’s DVC products provide selectable PWM and Dither capabilities for each proportional valve in your system. Our default settings will generally suffice for most applications but a user can specify different values if desired. The DVC product’s control circuits and internal BIOS automatically handle the application of the PWM and Dither control signals. Current flowing through a valve’s coil creates a magnetic field.
SWITCH CLOSED +POWER +COIL VALVE DRIVER DIODE + VALVE POWER SUPPLY + - COIL -COIL PWM SWITCH CURRENT FIG. 2 PWR COM A simplified explanation of coil inductance is required to explain the preceding sentence. The coil's magnetic field stores more energy as the current increases, much as a flywheel stores mechanical energy as the rotational speed increases. Inductance is the measure of the electrical inertia that acts to oppose increasing or decreasing the coil current.
switch is on compared to the time the switch is off (FIG. 4). The switch would be always open and no coil current flows at a 0 % duty cycle. The switch is always closed and maximum current flows at 100 % duty cycle. SUPPLY COIL VOLTS 0 V -0.5 V FULL COIL CURRENT 0A ON SWITCH OFF FIG. 4 TIME Stiction (static friction or friction when the valve is at rest compared to the lower friction when the valve is moving) and hysterisis can make controlling valves seem erratic and unpredictable.
LOW FREQUENCY PWM FULL COIL CURRENT 0A ON SWITCH OFF TIME FIG. 6 The amount of dither changes as the average coil current changes. The dither is a maximum at 50% duty cycle and decreases to zero at 0 and 100 % duty cycles. This may result in too much dither at some current levels and not enough at others. The dither current amplitude at a given average current is a function of coil inductance and PWM frequency.
HIGH FREQUENCY PWM WITH DITHER GEN FULL COIL CURRENT 0A DITHER GEN FIG. 8 TIME The dither current waveform can be regulated to maintain the desired amplitude regardless of the inductance of the coil. The dither amplitude decreases toward zero as the duty cycle nears 0 or 100%, but is constant over the rest of the current range. The valve will not be used at zero or full current in many systems and the dither amplitude will be constant over the usable range of coil current.
Appendix F Flowchart (Sequence of Operations) example This example will demonstrate how to create a flowchart and Sequence of Operations. This example may or may not work, it is for educational purposes only.
Step #2 Step #2a Holding position, wait for operator input for direction. if joystick is in center position. Stop motion Then Left wheels pump, 0% displacement, neither forward/reverse enable Right wheels pump, 0% displacement, neither forward/reverse enable if joystick is in forward position. Forward Then Left wheels pump, ramp 50% displacement, forward enable Right wheels pump, ramp 50% displacement, forward enable Step #2b if joystick is in back position.
Now, create the framework for the different bubbles P/N: 021-00154, Rev. A.6 - updated for V4.
Notice the bubbles are directly related to the flowchart steps, now the programmer needs to write code for the individual bubbles. This is a very simple example, but it gives a demonstration of how the flowchart can be created and then converted into the bubble logic. Appendix G HCT Terminology and Definitions Always bubble – Time critical logic needs to be contained here because this bubble will be executed based on the process update time(default 10ms).
Appendix H Sensor Manufacture recommendations Specifications for inputs and output parameters can be located in section 3 Programming the DVC Family The following list of device manufactures have been used in projects with the DVC family. HCT is not endorcing the following manufactures, just simply giving the end user a partial list of usable devices. MTS sensos: http://www.mtssensors.com/ Linear position and liquid-level sensors. Cherry sensors: http://www.cherrycorp.com/ various switches.
Appendix I Frequently Asked Questions Description: DVC controller goes into programming mode when powered on. Models Affected: DVC5, DVC7 and DVC10 Background: The DVC controller is in programming mode when its MS and NS LEDs blink green in an alternating pattern. When the controller is in normal execution mode the MS and NS LEDs will be solid green, red or not illuminated.
Re-Commissioning DVC Master Modules Introduction This procedure should be used to regain use of a DVC Master Module (DVC10, DVC7 or DVC5) if the module Flash Memory becomes corrupt due to a power interruption during a BIOS/Application Program download or any other reason. The presenting symptoms include a module that will not communicate with a PC or other modules on the buss and the Module Status (MS) and Node Status (NS) indicators are flashing green alternately at a one second interval.
Figure 1 Figure 2 P/N: 021-00154, Rev. A.6 - updated for V4.
Figure 3 Figure 4 BIOS / PLM Version 4.2 and Higher This procedure should be used with PLM version 4.2 and higher. 1. 2. 3. 4. 5. 6. 7. Within the PLM, Select the DVC10 MASTER switch to open the Main DVC10 Screen. Reference Figure, 1. Within the Main DVC10 Screen Select the Program Loader switch to open the Program Loader Screen. Reference Figure, 2 and 3.
How can I program a variable voltage output? We refer to this capability as a Dan Foss output. We ship DVC controllers with the necessary circuitry preconfigured. Each output group can be configured as a Dan Foss type when you order the unit. Should you wish to configure a Dan Foss output to normal PWM output you need to add a resistor and capacitor. DVC PWM Pin +Supply ------1kohm resistor-----O-------4.7k resistor-----O Dan Foss Output | | | .1 microfarad cap | | | Ground PWM Cmd > | | .
High Country Tek Inc. 208 Gold Flat Court Nevada City, CA, 95959. Customer Service Phone: 1 530 265 3236 www.highcountrytek.com High Country Tek Inc. was started in 1980 as a high quality contract electronics manufacturing company and we have grown over the years to expand not only this aspect of our business, but also moving into the arena of providing our many successful customers with innovative and elegant electro-hydraulic control solutions.