This code module functionality provides configurable camshaft and crankshaft encoder and decoder support implemented on a Configurable I/O module or Simulink®-programmable FPGA I/O module.
Cam and Crank Encoder:
The Crank Encoder module generates a crankshaft position signal. Use the driver block mask to configure characteristics such as the number of crank teeth and missing teeth.
The Cam Encoder module complements the Crank Encoder and allows you to emulate a camshaft signal which is in sync with the crankshaft. Multiple camshaft signals can be added to a single crankshaft. You can change the position and duration of each cam tooth during runtime to simulate fault scenarios.
The base version of both modules generates a binary representation of a cam- or crankshaft signal using general-purpose digital I/O lines. You can extend the modules using an analog extension to generate analog-equivalent signals of a cam- or crankshaft sensor, for example, a variable reluctance or hall effect sensor.
Use the Knock Generator extension to emulate a signal from a knock sensor. The Knock Generator module generates an analog signal. You can configure the signal's angle, amplitude, frequency, and time constant in the block mask or through dedicated inputs.
Use the Event Capture extension to capture digital pulses and determine the exact shaft position and duration of digital pulses. This module allows you to capture the exact timing of pulses, for example, firing or injection signals generated by the ECU.
Cam and Crank Decoder:
The Cam and Crank Decoder modules determine the shaft position and speed based on a digital pair of cam and crank signals. The crank signal alone allows you to measure the speed of the crankshaft. When combined with the cam signal, you can determine the exact position in the engine cycle. Use the driver block mask to configure the characteristics of the signals, such as the number of teeth.
The Crank Decoder Event module allows you to generate precisely timed pulses at a specific shaft position. The position and duration can be defined in the block mask.