310 Manual 13 1 0 VEHICLE SYSTEM CONTROLLER with VCL © 2009 CURTIS INSTRUMENTS, INC. 1310 Manual, p/n 36488001 Rev. B: December 2009 CURTIS INSTRUMENTS, INC. 200 Kisco Avenue Mt. Kisco, New York 10549 USA Tel. 914.666.2971 Fax 914.666.2188 www.curtisinstruments.
CONTENTS CONTENTS 1. OVERVIEW ..............................................................................1 2. INSTALLATION AND WIRING.............................................3 Mounting the Controller .....................................................3 High Current Connections .................................................5 Low Current Connections ...................................................6 Controller Wiring ..............................................................
FIGURES / TABLES FIGURES FIG. 1: FIG. 2: FIG. 3: FIG. B-1: Curtis 1320 vehicle system controller....................................... 1 Mounting dimensions, Curtis 1310 controller ........................ 3 Basic wiring diagram .............................................................. 11 Curtis 1311 handheld programmer .......................................B-1 TABLES TABLE 1: High current connections .......................................................
1 — OVERVIEW 1 OVERVIEW The Curtis 1310 vehicle system controller provides unprecedented flexibility and ease-of-use. It contains a powerful microcontroller, FLASH memory, and a wide range of inputs and outputs—which means it can be custom-programmed to provide complex and unique functions for your specific application. Custom software for the 1310 is written with VCL (Vehicle Control Language), an innovative programming language developed by Curtis.
1 — OVERVIEW ✔ Extended software functions of VCL simplify the integration of OEM requirements (BDI, hourmeters, PID, ramp, pot, CAN, etc.). ✔ Comprehensive Input and Output selection. ✔ Two analog outputs (0–10 V at up to 20 mA). ✔ Serial port for communication with the Curtis programmer or Curtis Model 840 “Spyglass” display. ✔ Two quadrature encoder inputs.
2 — INSTALLATION & WIRING 2 INSTALLATION AND WIRING MOUNTING THE CONTROLLER ☞ The outline and mounting hole dimensions for the 1310 controller are shown in Figure 2. It is recommended that the controller be fastened securely to a clean, flat metal surface with four #8 or M4 screws, using the holes provided. Care should be taken to prevent water from splashing or resting on the connector area.
2 — INSTALLATION & WIRING You will need to take steps during the design and development of your end product to ensure that its EMC performance complies with applicable regulations; see Appendix A for suggestions on managing EMC. The Curtis 1310 controller contains ESD-sensitive components. Use appropriate precautions in connecting, disconnecting, and handling the controller. See installation suggestions in Appendix A for protecting the controller from ESD damage.
2 — INSTALLATION & WIRING: High Current Connections HIGH CURRENT CONNECTIONS There are two options for supplying power to the 1310 controller: using pins 23 and 24 on the J1 connector, or using the B- and B+ connection tabs. Since the controller has many outputs, it is possible for it to draw a considerable load from the battery. If more than 3 amps current is expected in the total system, the B- connection tab must be used as the controller ground reference.
2 — INSTALLATION & WIRING: Low Current Connections LOW CURRENT CONNECTIONS Low current connections are made through four Molex Mini-Fit Jr. connectors. J1 is a 24-pin connector containing most of the standard inputs/outputs. J2 is a 6-pin connector dedicated to the CAN bus. J3 is a 4-pin connector dedicated to the Curtis serial bus port, used with the 1311 and 1314 programmers and the 840 Spyglass. J4 is a 16-pin connector for the analog inputs/outputs and encoder connections.
2 — INSTALLATION & WIRING: Connector J1 Table 2 Connector J1: Inputs/Outputs RELATED VCL PIN NAME DESCRIPTION FUNCTIONS REFERENCES 1 Input/Output 1 A digital input with an open collector high-frequency PWM output. This output also provides output current feedback. Signal is pulled to B- when output is on. Put_PWM Automate_PWM Get_ADC SW_1 SW_1_UP SW_1_Down PWM1 ADC15_Output 2 Input/Output 2 A digital input with an open collector high-frequency PWM output.
2 — INSTALLATION & WIRING: Connector J1 Table 2 Connector J1: Inputs/Outputs, cont’d RELATED VCL PIN DESCRIPTION FUNCTIONS REFERENCES 13 Input/Output 13 A switch to B+ digital input with an open collector high-frequency PWM output. Signal is pulled to B- when output is on. Put_PWM Automate_PWM SW_13 SW_13_UP SW_13_Down PWM13 14 Input/Output 14 A switch to B+ digital input with an open collector high-frequency PWM output. Signal is pulled to B- when output is on.
2 — INSTALLATION & WIRING: Connectors J2 & J3 Table 3 Connector J2: CAN Bus RELATED VCL PIN NAME DESCRIPTION FUNCTIONS 1 CAN Hi Positive CAN Bus rail. Setup_CAN Setup_Mailbox Send_Mailbox etc... 2 CAN Lo Negative CAN Bus rail. Setup_CAN Setup_Mailbox Send_Mailbox etc... 3 GND Ground reference. 4 +5V +5V for remote module(s). 5 Term H Connect Term H to Term L to create an end-of-bus termination (adds a 120Ω resistor across CAN Hi and CAN Lo). 6 Term L See Term H description above.
2 — INSTALLATION & WIRING: Connector J4 Table 5 Connector J4: Specialty I/O RELATED VCL PIN NAME DESCRIPTION FUNCTIONS REFERENCES 1 Encoder 1A Pulse count input, or encoder channel A. 2 Encoder 1B Encoder channel B. 3 Encoder 2A Pulse count input or encoder channel B. 4 Encoder 2B Encoder channel B. 5 Pot High The high voltage reference for the four potentiometer inputs.
2 — INSTALLATION & WIRING: Wiring Diagram CONTROLLER WIRING Because the 1310 controller is so versatile, there is no “standard” wiring configuration. The diagram shown as Figure 3 illustrates some of the possibilities for the various inputs and outputs. The power and battery connections shown are fairly standard, although other configurations are possible. The following paragraphs walk through the diagram. Fig. 3 Wiring diagram, Curtis 1310 vehicle system controller. Curtis 1310 Manual, Rev.
2 — INSTALLATION & WIRING: Wiring Power connection The battery is connected to the 1310 controller’s power tabs through a fuse and a keyswitch. The power tabs are used because there are inductive loads on the system (Aux Contactor and Proportional Valve coils) which could cause the current to exceed 3 amps. The fuse is required to protect the wiring, as the controller could draw significant power if there were a short or failure in the unit. The keyswitch is used to “start” the system.
2 — INSTALLATION & WIRING: Wiring Analog inputs Three types of analog inputs are used. The first two inputs use a 0–5V input. The next is a 3-wire connection for a potentiometer using both Pot High and Pot Low and the third is a 2-wire potentiometer or rheostat. Note that in all cases, the VCL code must be written to provide the necessary wiring and potentiometer fault checking. To accomplish this, the 1310 provides the measured voltage readings of Pot High and Pot Low connections.
2 — INSTALLATION & WIRING: I/O Signal Specifications INPUT/OUTPUT SIGNAL SPECIFICATIONS The input/output signals wired to the J1, J2, J3, and J4 connectors can be grouped by type as follows; their electrical characteristics are discussed below. — — — — — — digital inputs digital outputs analog inputs analog output power communications. Digital inputs These signal lines can be used as digital (on/off ) inputs. Normally, the On signal is made by a connection direct to B+ and Off is direct to B-.
2 — INSTALLATION & WIRING: I/O Signal Specifications Digital outputs These signal lines can be used as digital (on/off ) or Pulse Width Modulated (PWM) outputs. Each driver is active low, meaning the output will pull low (to B-) when commanded On. The PWM is at a fixed frequency (∼ 9.7kHz for Outputs 1–4 and ∼ 400Hz for Outputs 5–16), but can vary duty cycle from 0% (Off = 0) to 100% (On = 32767).
2 — INSTALLATION & WIRING: I/O Signal Specifications Analog outputs ☞ C AU T I O N ☞ Two signals provide low power analog outputs. These outputs are generated from filtered PWM signals and have about 1% ripple. The settling time (within 2% of final output) is about 30 ms for a 0–10V step. The Analog Outputs are protected against shorts to B+ or B-. During a FLASH software download, the DAC output voltages will float up and can reach as high as 10 volts.
2 — INSTALLATION & WIRING: I/O Signal Specifications Group B: These connections are used to supply power to the 1310 itself. Depending on the power requirements, the 1310 can be powered up through the B+ and B- power tabs or through the Mini-Fit Jr. pins listed.
3 — PROGRAMMABLE PARAMETERS 3 PROGRAMMABLE PARAMETERS The Curtis 1310 Vehicle System Controller is designed to be a universal control block, and therefore has only a few “ready-made” standard parameters that can be adjusted via the 1311 handheld programmer. Many custom parameters and menus can be added to meet the needs of the application, using the VCL programming language.
3 — PROGRAMMABLE PARAMETERS: Battery Parameters Battery Discharge Indicator algorithm The 1310 controller contains a sophisticated battery state-of-charge algorithm. Set up properly, this algorithm can track the remaining battery charge (in percent) using only a voltage reading from the B+ power tab or J1-24. To achieve any accuracy, it is critical to set the BDI parameters correctly for the vehicle, battery, and normal duty cycle of the application. Note that many of the parameters are in volts per cell.
3 — PROGRAMMABLE PARAMETERS: CAN Interface Parameters CANopen interface The 1310 controller can be easily interfaced to other CANopen modules. The parameters in the CAN Interface menu work with VCL to set up the basic CANopen IDs and rates. Refer to the Section G of the VCL Common Functions Manual for information on setting up CANopen PDO, SDO, and other CAN-related functions.
4a — MONITOR MENU 4a MONITOR MENU Through its Monitor menu, the 1311 programmer provides access to many internal variables that are continuously read and updated. This information is helpful during diagnostics and troubleshooting, and also while adjusting programmable parameters.
4a — MONITOR MENU Monitor Menu: POT INPUTS VARIABLE DISPLAY RANGE Pot # Pot#_Input 0–32767 0–32767 Analog value of the Pot Wiper input signal. # = 1 through 4. Pot High Pot_High 0–32767 0–32767 Analog reading of the Pot High signal Pot Low Pot_Low 0–32767 0–32767 Analog reading of the Pot Low signal. DESCRIPTION Monitor Menu: SWITCHES VARIABLE Switch # SW_# DISPLAY RANGE On / Off 0–255 DESCRIPTION Switch state. # = 1 through 26.
4a — MONITOR MENU Monitor Menu: CAN STATUS DISPLAY RANGE VARIABLE CAN NMT State CAN_NMT_State 0–127 0–127 PDO1 MOS1 COB ID PDO1 MOSI Byte Map* PDO1 MISO COB ID PDO1 MISO Byte Map* PDO2 MOS1 COB ID PDO2 MOSI Byte Map* PDO2 MISO COB ID PDO2 MISO Byte Map* DESCRIPTION CAN network state: 0=initialization, 4=stopped, 5=operational, 127=pre-operational. 0–65355 Communication object ID for the PDO1 Master Out Slave In message. 0 – 232 Mapping objects for PDO1 MOSI’s eight bytes.
4b — CONTROLLER INFO MENU 4b 24 CONTROLLER INFORMATION MENU This menu provides ID and version numbers for your controller hardware and software. CONTROLLER INFORMATION MENU VARIABLE DISPLAY RANGE Model Number Model_Number 0–4294967295 0–4294967295 Model number. For example, if you have a controller with the model number 1310-4501, the Model Number variable will have a value of 13104501. Serial Number Serial Number 0–4294967295 0–4294967295 Serial number.
5 — VCL 5 VEHICLE CONTROL LANGUAGE (VCL) The Curtis 1310 Vehicle System Controller is similar to other programmable logic controllers with application-specific functions generally found in the vehicle control industry. Key to the flexibility and application of the 1310 is a proprietary software language, VCL (Vehicle Control Language). VCL software provides a fast and easy way to implement unique and complex vehicle control functions.
5 — VCL VARIABLE TYPES & QUANTITIES VCL provides dedicated space in which to store custom variables. There are four types of variables, based on their type of storage: • volatile memory (RAM) • automatic non-volatile memory (EEPROM) • non-volatile block memory (EEPROM) • parameter non-volatile memory (EEPROM). ☞ Volatile memory variables (RAM) are stored only while power is on; they are lost at power-down.
5 — VCL VCL RUNTIME RATES VCL is an interpreted language. Each line of VCL code is converted by the WinVCL compiler into an array of pseudo-code which can then be flash loaded into the controller. The controller interprets these pseudo-codes one line at a time while the system is running (powered). The table below lists the service rate at which the VCL interpreter runs each of the various functions, and also lists how many instances of each function are available to the VCL software.
5 — VCL VCL FUNCTIONS SPECIFIC TO 1310 CONTROLLERS The VCL functions described in the VCL Common Functions manual are available on 1310 controllers. The 1310 also has the following additional or expanded functions. Pot wiper inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p. 29 Setup_POT(2) Analog inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . p. 30 Get_ADC(1) Analog (DAC) outputs . . . . . . . . . . . . . . . . . . . . . . . . p.
5 — VCL Pot wiper inputs Setup_POT(2) This function sets the type of input that will be connected to each of the four analog inputs. The system uses the concept of a potentiometer and thus these inputs are called Wiper inputs. The inputs can be set up as one-wire, two-wire, or three-wire, referring to the number of wires connected from the pot to the 1310.
5 — VCL Analog inputs Get_ADC(1) ☞ This function retrieves the present input value of the selected ADC (Analog to Digital Converter) channel. Although there are only 4 dedicated analog inputs (called Wiper 1–4), the 1310 actually monitors 12 channels of analog values. Many of these analog signals are internal to the 1310 hardware but can nevertheless be used in VCL.
5 — VCL Analog outputs Put_DAC(2) This function outputs an analog voltage on the selected DAC (Digital to Analog Converter) channel. A constant or a variable may be used as the output value. Parameters DAC# Value Identifies which DAC channel is to be read (DAC1 or DAC2). The digital value of the output voltage; the scale is 0–32767 = 0.0–10.0 volts. Returns 0 – New value did not go out. 1 – New value output on DAC. Error Codes Examples Bad_ID Incorrect DAC ID was used.
5 — VCL Digital outputs Put_PWM(2) This function outputs an Pulse Width Modulated voltage on the selected output pin. This function is used to control the state of the active low output FET drivers. A value of 0 is Off (the output is open). A value of 32767 is fully On (the output is closed to ground). Intermediate values provide a pulse train. A value of 16383 provides a 50% output (square wave). This can be useful to provide “average” voltages and regulate current in an inductive load.
5 — VCL Automate_PWM(2) ☞ This function is used to automatically update the PWM output. This function only needs to be called once. After this function is called, the PWM output will run continuously. Note that in this function, the output value must be a variable. Parameters PWM# Variable Identifies which PWM channel is to be read (PWM1–PWM16). The variable that holds the desired output voltage; the scale is 0–32767 = 0–100% On. Returns 0 – Setup did not execute. 1 – Setup successful.
5 — VCL Encoder outputs There are two quadrature encoder inputs. These inputs can detect direction, position, and velocity from a pulse train of two channels, offset 90 degrees from each other. Each encoder input must first be set up for use as a position counter or as a velocity measurement. After the encoders are set up, the VCL uses special functions to retrieve the count or velocity (in RPM) of the incoming pulse train. The setup also allows enabling error detection.
5 — VCL Get_Encoder_Count(1) This function retrieves the current position (count) of the encoder. Note that this function is not required to get the current count as it is continuously updated in the ENC#_Count variable. Data Values ENC#_Count Variable that is updated with the value of the encoder count. Parameters Enc# Identifies which encoder is to be read (ENC1 or ENC2). Returns N – Encoder count (0–32767). Error Codes Examples Bad_ID Incorrect ENC ID was used.
5 — VCL Get_Encoder_Dir(1) This function retrieves the current direction (CW or CCW) of the encoder. Note that this function is not required to get the current direction as it is continuously updated in the ENC#_Dir variable. However, if the encoder speed (ENC#_Vel ) is zero, the direction signal is not valid. Data Values ENC#_Dir Variable that is updated with the value of the encoder count. Parameters Enc# Identifies which encoder is to be read (ENC1 or ENC2).
5 — VCL Real-Time Clock (RTC) The 1310 controller contains a real-time clock with battery backup. The clock keeps accurate date and time for use by VCL (time stamping errors, clock display, timed events, etc). When first used, the RTC may need to be updated. If so, the RTC_Needs_Update variable will be set. The Setup_RTC function can be used to set the day and time. If the RTC stops working, the battery may need to be replaced; it should last for many years.
5 — VCL Setup_RTC(7) This function sets up the date and time on the Real-Time Clock. Note that the 24-hour format must be used to set the time. Parameters Hours Minutes Seconds Day Month Year DayofWeek Actual Hour in 24h format (0...23) Actual Minute (0...59) Actual Seconds (0...59) Actual Day (1...31) Actual Month (1...12) Year (00...99) Actual Day of Week (MONDAY...SUNDAY). Returns 0 – Setup did not execute. 1 – Setup successful. Error Codes Examples Param_Range A parameter is out of range.
5 — VCL UNIQUE I/O & VCL USAGE The Curtis 1310 Vehicle System Controller is designed to be extremely flexible, which means there is really no “standard configuration” or “standard wiring.” Because of its wide ranging application and large array of inputs and outputs, many features and possible uses of the 1310 may not be readily apparent. This section will introduce the unique features and uses of some of the 1310’s I/O and associated VCL.
5 — VCL All switch inputs are automatically debounced by the VCL operating system. This prevents noisy contacts or contact bounce from causing erroneous events in your VCL code. The debounce time can be varied from 0 to 32 milliseconds in 4ms steps, using this function: Setup_Switches(5); 20 milliseconds If this line is not in the VCL code, the default debounce time is set at 16 ms. The previous example “polls” the switch inputs at the the time the statement VCL is run.
5 — VCL Digital Outputs All 16 outputs on the 1310 are Pulse Width Modulated active low FET drivers. They are not simply 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.
5 — VCL 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.
5 — VCL Encoder Inputs The encoder inputs can also be used as digital inputs. Pulling any of these pins down to ground will cause the input to turn Off. Leaving it open will cause it to be read On, as internally these 4 encoder inputs are pulled high to 5V. Care must be taken not connect these inputs to any voltage above 5.5V or the controller may be damaged.
5 — VCL If (ADC11_Output > 1000) { ;Error! There is a short dragging down the supply ;or too much current draw. } If the sensor or encoder needs +12V power, that is available at J3-4 and the output current is sensed at ADC-12. Arrays Strings are handled in a unique way in VCL. All the string definitions are taken in THE order they appear in VCL and concatenated together into one large string array that is attached to the end of the VCL program.
6 — DIAGNOSTICS & TROUBLESHOOTING 6 DIAGNOSTICS AND TROUBLESHOOTING The following errors will be returned if VCL encounters a runtime error while running one of its internal library functions. The error code consists of the ID of the module where the error occurred and a Returned Error Value. The Module ID can be found in the variable Last_VCL_Error_Module. The Error Value is held in the variable Last_VCL_Error.
6 — DIAGNOSTICS & TROUBLESHOOTING Table 7 RETURNED ERROR 46 VALUE Returned Errors DESCRIPTION BAD_ID 01 Bad Index (device ID) PT_RANGE 02 Variable Table Access out of range AUTO_RUN 03 Attempt to access element running automatically UNIT_UNDEF 04 Element accessed before being set up PARAM_RANGE 05 Parameter is out of range UNIT_BUSY 06 Unit is already busy NO_FLASH_BLOCK 07 Could not find the specified flash block FLASH_CHECKSUM 08 Flash block checksum is bad TASK_OVR_RUN 09 Task
6 — DIAGNOSTICS & TROUBLESHOOTING Note: All the VCL faults share LED fault code 68. The controller’s two LEDs will display this repeating pattern: RED Curtis 1310 Manual, Rev.
7 — MAINTENANCE 7 MAINTENANCE The Real-Time Clock battery is the only user serviceable part in Curtis 1310 controller. This battery is accessed from the rear panel (with the label and Status LEDs.) No attempt should be made to open the front panel, remove the PCB, or otherwise modify the controller. Doing so may damage the controller and will void the warranty. Carefully follow the procedure below to replace the RTC battery.
7 — MAINTENANCE REPLACING THE RTC BATTERY It is not likely that you will need to replace the RTC battery as it is designed to last 10+ years. But if the RTC has stopped functioning, the battery may be dead. 1. Remove the six Phillips head screws on the rear panel (the panel with the Status LEDs). 2. Carefully slide out the battery, noting the polarity. 3. Replace with an identical lithium battery, taking care of the proper polarity. 4. Replace rear panel, noting the Status LEDs are on the lower right. 5.
APPENDIX A: EMC & ESD DESIGN CONSIDERATIONS APPENDIX A VEHICLE DESIGN CONSIDERATIONS REGARDING ELECTROMAGNETIC COMPATIBILITY (EMC) AND ELECTROSTATIC DISCHARGE (ESD) ELECTROMAGNETIC COMPATIBILITY (EMC) Electromagnetic compatibility (EMC) encompasses two areas: emissions and immunity. Emissions are radio frequency (RF) energy generated by a product. This energy has the potential to interfere with communications systems such as radio, television, cellular phones, dispatching, aircraft, etc.
APPENDIX A: EMC & ESD DESIGN CONSIDERATIONS their length. The RF voltages and currents induced in each wire are applied to the controller pin to which the wire is connected. The Curtis 1310 includes bypass capacitors on the printed circuit board’s sensitive input signals to reduce the impact of this RF energy on the internal circuitry. In some applications, additional filtering in the form of ferrite beads may also be required on various wires to achieve desired performance levels.
APPENDIX B: PROGRAMMER OPERATION APPENDIX B PROGRAMMERS Curtis programmers provide programming, diagnostic, and test capabilities for 1310 controllers. The power for operating the programmer is supplied by the host controller via a 4-pin connector. Two programmers are available: the PC Programming Station (1314) and the handheld programmer (1311). The Programming Station has features not available on the handheld unit; on the other hand, the handheld programmer has the advantage of being more portable.
APPENDIX B: PROGRAMMER OPERATION information from the controller. For experimenting with settings, the programmer can be left plugged in while the vehicle is driven. The bookmark keys can make parameter adjustment more convenient. To set a bookmark, press one of the three bookmark keys for more than two seconds. To jump to a bookmarked location, press the appropriate bookmark key quickly (for less than two seconds).
APPENDIX C: SPECIFICATIONS APPENDIX C SPECIFICATIONS Table C-1 SPECIFICATIONS: 1310 CONTROLLER Nominal input voltage Electrical isolation to case 24–48 V 500 V ac (minimum) Storage ambient temperature range Operating ambient temperature range -50°C to 90°C -40°C to 85°C Enclosure protection rating IP42 Weight 0.