training supplement
TRANSCRIPT
M E C H A T R O N I C C O N T R O L S O L U T I O N S
CONTACT INFORMATION
Let us know how we can help!
To contact us by telephone, please call 877.234.1410
To request a quote, please contact [email protected]
For New Eagle orders, please contact [email protected]
Product and tools support
http://www.neweagle.net/support/wiki/
Training Agenda 2
Training Projects System Overview 3
Training Projects Block Diagram 4
Controller Acronyms 5
Analog Digital Counts 7
PWM Description 8
Fixed Point MotoTune Example 9
Data Type Definition 11
Memory Layout 12
Fault Behavior 13
TRAINING SUPPLEMENT
MotoHawk Training Supplement - Page 2 Phone: 877.234.1410 [email protected] www.neweagle.net
DAY 1 DAY 2 DAY 3
Morning
Introduction
Software installation
Basics of MATLAB/Simulink & MotoHawk
Simple Simulink model
First build, kit setup, and flash
Basics of MotoTune
Fault management
Throttle project: Faults
Throttle project: PID control
Throttle project: CAN
Libraries
Components
Afternoon
Triggers
I/O
Calibrations, probes, & overrides
Throttle project: I/O
Data storage
Throttle project: Data storage
CAN
New Eagle hardware & software offerings
Questions
Evaluation
Basic MotoHawk Training Agenda
MotoHawk Training Supplement - Page 3 Phone: 877.234.1410 [email protected] www.neweagle.net
Training Projects System Overview
MotoHawk Training Supplement - Page 4 Phone: 877.234.1410 [email protected] www.neweagle.net
Training Projects Block Diagram
GCM-0563-048-0801GCM-0563-048-0802
ECUP
BATT
DG1M (10KPU), VR1+ or DG1M (51K1PD)
XDRP
XDRG
AN1M (220KPD, 100PU)
AN8M (220KPD)
AN9M (220KPD)
AN10M (220KPD)
AN11M or DG3M (220KPD, 1KPU)
MPRD
DRVPA
LSO1
LSO2
LSO3
LSO4
LSO5
Connected to B-23, LSO6
LSO7
H1+
H1-
B-22
B-08
B-05
B-04
B-16
B-15
B-24
B-01
B-02
B-03
B-10
B-11
A-10
A-11
A-09
A-12
B-09
B-12
B-18
B-19
A-15
A-21
A-20
A-02
A-13
A-07
A-08
A-14
A-05
A-23
A-01
A-17
DRVGA
DRVGB
A-16
B-17
CAN1+
CAN1-
B-20
B-21
TPS
APP
KEY SWITCHBUTTON
FROMBATTERY +
TOBATTERY -
FUSE
FUELINJECTOR
ETCMOTOR
MAIN POWERRELAY
TERMINATIONRESISTOR
TO COMPUTER
DRVPBA-22
DRVGC
A-24
HSO1
HSO2
A-04
A-18
STOPB-23
AN17M (220KPD), VR1-
DG2M (10KPU), VR2+ or DG2M (51K1PD)
AN18M or DG8M (3KPD), VR2-
AN2M (220KPD, 100PU)
AN3M (220KPD, 1KPU)
AN4M (220KPD, 1KPU)
AN5M (220KPD, 51K1PD)
AN6M (220KPD, 51K1PD)
AN7M (220KPD, 51K1PD)
AN12M or DG4M (220KPD, 1KPU)
AN13M or DG5M (3KPD)
AN14M or DG6M (3KPD)
AN15M (220KPD, 1KPU)
AN16M or DG7M (3KPD)
CAN2+
CAN2-
CAN3+
CAN3-
B-07
B-06
B-14
B-13
JUNCTIONBOX
BOOT KEY(when needed)
USB-TO-CAN
A-06
A-03
A-19
MotoHawk Training Supplement - Page 5 Phone: 877.234.1410 [email protected] www.neweagle.net
GCM-0563-048-0801 GCM-0563-048-0802
Acronym : …Literally Means : Other Notations : General Notes :
BATT BATTery ~180mA at 13.8V (module only, no external loads); connected directly to battery+; low-current power to analog/digital core of module; allows controlled shutdown
ECUP ECU Power KEYSW, WAKE ~5mA at 13.8V; derived (through switch) from battery+; ”wake-up” signal to module to initiate execution of software algorithm (when power removed, operations continue until software commands a shutdown)
STOP Emergency STOP ESTOP when asserted, disables the main power relay through hardware (on other modules, may disable engine-related outputs such as EST and FUELP); input for boot mode signal
DRVPx DRiVer Power DRVPWRx through MPR, provides battery+ to actuators; internally provides power to H-bridges (allows controlled shutdown on modules without BATT)
DRVGx DRiVer Ground GNDx, PWRGRNDx connected directly to battery-
XDRPx TRANSDuceR Power XDRPWRx 300mA maximum; 5V reference for sensors
XDRGx TRANSDuceR Ground XDRGNDx internal connection to DRVG; low reference for sensors
ANxM ANalog sensor input Monitor ANx has a pull-up and/or pull-down internal resistor; time constant through an internal capacitor and additional internal resistor
DGxM DiGital sensor input Monitor DGx same as analog sensor input monitor, but may also resolve frequency
VRx+, VRx- Variable Reluctance sensor input typically used to resolve frequency (on other modules, used to resolve engine crankshaft position)
MPRD Main Power Relay Driver controls the main power relay
LSOx Low-Side driver Output LSDx connection to DRVG through transistor; PWM capable
HSOx High-Side Output HSDx connection to DRVP through power switch; PWM capable
Hx+, Hx-, H-Bridge output HBxA, HBxB, ETCx, HBRIDGExA, HBRIDGExB
on some modules, can also be operated independently as low-side or high-side driver outputs
CANx+, CANx- Controller Area Network communication CAN 2.0B protocol
Controller Acronyms
MotoHawk Training Supplement - Page 6 Phone: 877.234.1410 [email protected] www.neweagle.net
Common Acronyms Found On Other Modules:
Acronym : …Literally Means : Other Notations : General Notes :
GNDREF GrouND REFerence ground reference signal
CNK+, CNK- CraNKshaft encoder sensor input CNKVR+, CNKVR-,CNKDG
typically used to resolve engine crankshaft position (with variable reluctance and/or digital sensor inputs)
CAM+, CAM- CAMshaft encoder sensor input CAMDG typically used to resolve engine camshaft position (with variable reluctance and/or digital sensor inputs)
SPDx, SPD- SPeeD (frequency) sensor input SPEEDx typically used to resolve frequency (with variable reluctance and/or digital sensor inputs)
EKxP, EKxN Engine Knock sensor input KNKx+, KNKx- used with wide-range piezoelectric knock sensors
EGOxP, EGOxN Exhaust Gas Oxygen sensor input dual differential amplifier targeted at lambda oxygen sensor signal processing
HEGOx Heated Exhaust Gas Oxygen sensor input O2x+, O2x- used with switching type oxygen sensor (heated or unheated)
LSUxUN, LSUxIA, LSUxIP, LSUxVM
Lambda Sensing Unit sensor input used with the Bosch CJ125 exhaust gas oxygen sensor
INJx fuel INJector driver output FINJx, FIx low-side output to drive high-impedance fuel injector
ESTx Electronic Spark Timing output 5V signal to drive logic level (“”smart””) ignition coil;on some modules, may be used as additional analog inputs
EST RTN EST ReTurN reference level for logic level (“smart”) ignition coils
FUELPR FUEL Pump Relay FUELP low-side output to drive fuel pump relay
BATT_OUT BATTery OUT supply voltage for external input devices
TACH_LINK TACHometer output or LINK interface tachometer output or LINK serial interface
SCL+, SCL- Serial Communication Link RS-485A, RS-485B RS485 serial communication link
ISO9141K, ISO9141L ISO9141 communication link ISO9141 communication link
Controller Acronyms (continued)
MotoHawk Training Supplement - Page 7 Phone: 877.234.1410 [email protected] www.neweagle.net
Analog Digital Counts (ADC)
MotoHawk Training Supplement - Page 8 Phone: 877.234.1410 [email protected] www.neweagle.net
PWM Description
PWM stands for Pulse Width Modulation
A PWM signal s a square signal that has 3 defining properties: Amplitude (A), in Volts. Amplitude is set by the voltage source (e.g. DRVP),
which is typically fairly constant. Frequency (f = 1/T), in Hertz. Duty cycle (DC = TH / T), in %. The duty cycle is the percentage of the
signal that is non-zero (when analyzed over 1 cycle.)
When used to control an output, the combined electrical and mechanical response of the actuator results in an effective average voltage (this is a ore efficient method of controlling power than with resistive methods). The PWM frequency is matched to the actuator to minimize oscillations.
A PWM-driven output can also be used in conjunction with a low-pass electrical filter to produce an analog voltage, where the duty cycle is proportional to the voltage.
PWM Block
MotoHawk Training Supplement - Page 9 Phone: 877.234.1410 [email protected] www.neweagle.net
Fixed Point MotoTune Example
MotoHawk Training Supplement - Page 10 Phone: 877.234.1410 [email protected] www.neweagle.net
Fixed Point MotoTune Example (continued)
MotoHawk Training Supplement - Page 11 Phone: 877.234.1410 [email protected] www.neweagle.net
Data Type Definition
Data Type Range Size [Bytes]
uint8 0..…255 1
int8 -128…..127 1
uint16 0…..65535 2
int16 -32768.....32767 2
uint32 0.....4294967295 4
int32 -2147483648..…2147483647 4
boolean 0…..1 1
single -inf..…inf 4
double -inf..…inf 8
Original Data Type Conversion Final
232.32 uint8 232
232.32 int8 127
232.32 uint16 232
232.32*100 uint16 23232
Gain: Capture the resolution of the engineering unit number provided resulting number is within the fixed point range.
Offsets: Push the range of an engineering unit number into an unsigned integer range such that the higher positive range of a uint can be utilized.
Floating Point: Dynamically adjust resolution of engineering unit number such that the number of decimal places are maximized given the size of the number and the bits available.
Advantages: Convenience, no need for scalars and offsets to track.
Development speed
Simplicity in testing and debugging
Disadvantages: Code space/size
Decreased CPU throughput
MotoHawk Training Supplement - Page 12 Phone: 877.234.1410 [email protected] www.neweagle.net
Memory Layout
Inputs Analog, discrete, frequency, crank/cam and corresponding resource circuitry
A/D Converter For analog inputs, converts voltage into ADC’s
MIOS Modular Input/Output System, asychronous (non-angle-based) operations only
TPU Time Processing Unit, synchronous (angle-based) or asynchronous operations
CAN Controller Area Network communication
Serial RS485 serial communication (RS232 on some modules)
RAM Random Access Memory, volatile variable, stack, and heap storage
Flash Constant data and executable code
Serial EEPROM Electrically-Erasable Programmable Read-Only Memory; nonvolatile variable storage
External RAM Select modules only; same as RAM above (but slower)
Parallel EEPROM
constant variable storage, calibration in development units only
Outputs Circuitry to drive the following outputs: discrete, PWM, engine-specific (fuel injector, EST), H-bridge, low-side output, high-side output
Block Storage Setting
MotoHawk Calibration
Calibration Dev: stored in Parallel EEPROM, Prod: stored as constant in flash (only can be changed through reflash); viewed as calibration in MT
Display Stored in RAM; viewed as display variable in MT
Calibration NV Stored in Serial EEPROM; viewed as calibration in MT
Display NV Stored in Serial EEPROM; viewed as display variable in MT
MotoHawk DataDef
Constant Dev: stored in Parallel EEPROM, Prod: stored as constant in flash (only can be changed through reflash)
Volatile Stored in RAM
Nonvolatile Stored in Serial EEPROM
Fixed Nonvolatile Stored in Serial EEPROM (capability to maintain over program cycles)
Note: for all the above, viewed as calibration or display variable in MT as specified in block mask parameters
Data Storage TypesComponent Descriptions
MotoHawk Training Supplement - Page 13 Phone: 877.234.1410 [email protected] www.neweagle.net
Fault x/y setting 3/5
cycle number -> 1 2 3 4 5 1 2 3 4 5
key
cycl
e
1 2 3 4 5
fault behavior Fault input -> 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0
enabled Fault status -> … S S A A A A A O O … S … … …
sticky Fault status -> … S S A A A A A A A … S … … …
save-occurred Fault status -> … S S A A A A A O O O S O O O
sticky-persistant Fault status -> … S S A A A A A A A A A A A A
Fault Behavior
S = Suspected
A = Acted
O = Occurred