Advanced Digital I/O Blocks: Difference between revisions
No edit summary |
|||
Line 3: | Line 3: | ||
===MotoHawk:Blocks:Constant Current Control Output=== | ===MotoHawk:Blocks:Constant Current Control Output=== | ||
[[Image:CurrentControlOutputBlock.JPG] | [[Image:CurrentControlOutputBlock.JPG] | ||
Supply the numeric parameter values via the Current, Dither Amp, and Dither Freq inputs. Current assigns the output current in uA, while Dither Amp allots a current variance in uA, and Dither Freq allots variance in frequency, in .01 Hz increments. | Supply the numeric parameter values via the Current, Dither Amp, and Dither Freq inputs. Current assigns the output current in uA, while Dither Amp allots a current variance in uA, and Dither Freq allots variance in frequency, in .01 Hz increments. | ||
[[Image:CurrentControlOutputBlock2.JPG]] | [[Image:CurrentControlOutputBlock2.JPG]] | ||
==F== | ==F== | ||
Line 13: | Line 13: | ||
===MotoHawk:Blocks:Frequency In=== | ===MotoHawk:Blocks:Frequency In=== | ||
This MotoHawk® block determines the frequency of a digital input signal. The output signal is in units of 0.01 Hz, and is based on the last sample period from edge to edge, with a data type of uint32. | This MotoHawk® block determines the frequency of a digital input signal. The output signal is in units of 0.01 Hz, and is based on the last sample period from edge to edge, with a data type of uint32. | ||
Select a unique resource name. This name can be the name of the sensor that is being read. If none is given, it will either inherit the pin name or the vardec name, depending on whether calibratable I/O is selected. | Select a unique resource name. This name can be the name of the sensor that is being read. If none is given, it will either inherit the pin name or the vardec name, depending on whether calibratable I/O is selected. | ||
Choose the pin resource. | Choose the pin resource. | ||
Perform Duty Cycle Measurement: Add extra code to perform a duty cycle measurement along with period measurement. | Perform Duty Cycle Measurement: Add extra code to perform a duty cycle measurement along with period measurement. | ||
Provide Trigger: Provide a trigger after each N pulses. | Provide Trigger: Provide a trigger after each N pulses. | ||
Alias Protection: Alias protection is a characteristic that protects low frequency inputs from indicating the incorrect frequency when the frequency is very near the low threshold. It places execution burden upon the Framework because each edge results in the servicing of an interrupt. It should not be employed on inputs that consistently sit above the low frequency threshold under normal operation. The low frequency threshold is set at approximately 1.2 Hz for MPC5xx based modules. | Alias Protection: Alias protection is a characteristic that protects low frequency inputs from indicating the incorrect frequency when the frequency is very near the low threshold. It places execution burden upon the Framework because each edge results in the servicing of an interrupt. It should not be employed on inputs that consistently sit above the low frequency threshold under normal operation. The low frequency threshold is set at approximately 1.2 Hz for MPC5xx based modules. | ||
Alias protection will provide guaranteed uniform frequency response for all frequencies between 0 Hz and 39000 Hz. Inputs without alias protection may report incorrectly when they first start up, when they stop and while their frequency is near the low frequency threshold. | Alias protection will provide guaranteed uniform frequency response for all frequencies between 0 Hz and 39000 Hz. Inputs without alias protection may report incorrectly when they first start up, when they stop and while their frequency is near the low frequency threshold. | ||
The dutycycle describes the elapsed time between the occurrence of the non-synchronous edge and the synchronous edge. The synchronous edge is configured during the creation of the resource via the 'Edge Detect' attribute. 4096 represents 100% | The dutycycle describes the elapsed time between the occurrence of the non-synchronous edge and the synchronous edge. The synchronous edge is configured during the creation of the resource via the 'Edge Detect' attribute. 4096 represents 100% | ||
[[Image: FrequencyInBlock2.JPG|left|frame|Frequency Input Block with optional I/O]] | [[Image: FrequencyInBlock2.JPG|left|frame|Frequency Input Block with optional I/O]] | ||
[[Image:FrequencyInBlock.JPG|center|frame|Frequency Input Block with default I/O]] | [[Image:FrequencyInBlock.JPG|center|frame|Frequency Input Block with default I/O]] <br /> | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
Line 40: | Line 40: | ||
If "Get Duty Cycle" is selected, an additional port is displayed. | If "Get Duty Cycle" is selected, an additional port is displayed. | ||
Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference. | Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference. | ||
[[Image: FrequencyInputRawBlock.JPG]] | [[Image: FrequencyInputRawBlock.JPG]] | ||
===MotoHawk:Blocks:Frequency Input Raw Get=== | ===MotoHawk:Blocks:Frequency Input Raw Get=== | ||
Line 50: | Line 50: | ||
If "Get Duty Cycle" is selected, an additional port is displayed. | If "Get Duty Cycle" is selected, an additional port is displayed. | ||
Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference. | Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference. | ||
[[image: FrequencyInputRawGetBlock.JPG]] | [[image: FrequencyInputRawGetBlock.JPG]] | ||
===MotoHawk:Blocks:Frequency In Reference=== | ===MotoHawk:Blocks:Frequency In Reference=== | ||
Line 60: | Line 60: | ||
If "Get Duty Cycle" is selected, then the Frequency Input block must set up the resource to read duty cycle. | If "Get Duty Cycle" is selected, then the Frequency Input block must set up the resource to read duty cycle. | ||
Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference. | Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference. | ||
[[Image: FrequencyInRefBlock.JPG]] | [[Image: FrequencyInRefBlock.JPG]] | ||
===MotoHawk:Blocks:Frequency Input Trigger=== | ===MotoHawk:Blocks:Frequency Input Trigger=== | ||
This MotoHawk® block is used in conjunction with the corresponding Frequency Input block. It riggers whenever the selected number of edges have been detected on the pin selected in the corresponding Frequency Input block. When using this block, do not select Alias Protection under the Frequency Input block. | This MotoHawk® block is used in conjunction with the corresponding Frequency Input block. It riggers whenever the selected number of edges have been detected on the pin selected in the corresponding Frequency Input block. When using this block, do not select Alias Protection under the Frequency Input block. | ||
[[Image: FrequencyInputSourceBlock.JPG]] | [[Image: FrequencyInputSourceBlock.JPG]] | ||
===MotoHawk:Blocks:Fuel Injector Sequence=== | ===MotoHawk:Blocks:Fuel Injector Sequence=== | ||
The MotoHawk® Injector Sequence block sets up a sequence of injector drivers starting with the given pin and working up for each driver required by the sequence type. The input ports may be scalars or vectors. If vectors, the size must equal the number of cylinders defined by the Encoder Definition block. This number may be calibratable, in which case the vector must be as large as the Maximum Number of cylinders. | The MotoHawk® Injector Sequence block sets up a sequence of injector drivers starting with the given pin and working up for each driver required by the sequence type. The input ports may be scalars or vectors. If vectors, the size must equal the number of cylinders defined by the Encoder Definition block. This number may be calibratable, in which case the vector must be as large as the Maximum Number of cylinders. | ||
[[Image: FuelInjectorBlock.JPG]] | |||
==H== | |||
===MotoHawk:Blocks:High Res One Shot=== | |||
For this MotoHawk® block, when the Trigger input is TRUE, a one-shot digital pulse is generated. The pulse will have 2 periods in which 2 different PWM modulations are generated. Each period is described by Duration, Duty Cycle and Frequency. If the second period duration is 0, then that portion of the pulse is not generated. If the first period is 0, then only the second pulse is generated. If the Trigger input is FALSE, then a new one shot pulse is not triggered. If both pulses have not completed since the previous trigger event, then a new trigger does not occur. When the Cancel input is TRUE, all pulses are canceled. If FALSE, then pulses continue or can be retriggered. Duration is in microseconds, Duty Cycle is in a range of -4096 to 4096 where 0 is 0%, 4096 is 100%, and Frequency is in Hz. When negative duty cycle is applied, the polarity is reversed, which is only valid on PWM resources that are H-Bridge outputs. | |||
[[Image: HiResBlock.JPG]] | |||
===MotoHawk:Blocks:High Res One Shot Status=== | |||
This MotoHawk® block is the High Resolution, Modulated One Shot Status. The name field must match the name of a Hi Resolution Modulated One Shot block. The first port outputs a boolean if all valid pulses have completed. This will ignore pulses with a duration of 0. The second port outputs the last pulse that completed. Once the one shot is retriggered, this is set to 0. | |||
[[Image: HiResStatusBlock.JPG]] | |||
==I== | |||
===MotoHawk:Blocks:Injector Current Select=== | |||
This MotoHawk® block selects the peak-and-hold injector current driver between 3A peak / 1A hold, and 6A peak / 2A hold. This selection is only available on the ECU565-128 module. Input 'false' for 3A peak / 1A hold, and 'true' for 6A peak / 2A hold. | |||
[[Image: InjectorCurrentBlock.JPG]] | |||
===MotoHawk:Blocks:Injector Driver=== | |||
This MotoHawk® block has two similar modes available, Standard and Transient. In Standard mode, a single pulse is generated per cylinder TDC, with an electrical duration of 'Mech Duration' plus 'Mech to Elec Offset', and starting at a crank angle of 'SOI' plus 'Angle Offset'. In Transient mode, up to two pulses are generated. The first pulse is started at SOI, and if the the desired duration rises above the 'Make-Up Min Mech Duration' after the pulse has completed, then a second Make-Up pulse will be generated, ending at Make-Up EOI. If the first pulse has already extended beyond 'Make-Up EOI', the make-up pulse will not be generated. | |||
When using the Transient mode, there must be a separation between the EOI and next SOI that is larger than one crank encoder tooth. Enter an appropriate angle into 'Min EOI to SOI Angle'. 'Angle Offset' is normally the crank angle for the given physical cylinder, in degrees before TDC of cylinder 1. 'Peak Duration' is used with a Low-Impedance Injector, and controls the duration of the peak portion of the pulse. The remaining time is the hold time. The Update Mode selects whether the OS should protect against missing pulses and double pulse generation. | |||
If Application is selected, no error checking is provided, and the application is completely trusted. If OS is selected, some amount of checking is done by the OS. Pulses are only generated while the Enable input is True. When the Enable input goes False, any pulses already started will complete. | |||
[[Image: InjectorDriverBlock.JPG]] | |||
===MotoHawk:Blocks:Injector Pulse=== | |||
This MotoHawk® block generates a series of pulses, starting at a given encoder crank angle, and either stopping at an angle or after a certain duration. Stop Mode parameter selects which strategy to use. Two of these blocks may be used on a single Injector resource, to generate interleaved pulses, sharing a single pin. Each block must identify the pulse number (0 or 1). If no interleaving is needed, simply use pulse number 0. Pulse Angle Offset is used to apply a fixed offset to the given pulse, relative to TDC. The start and stop angles are then relative to this offset. The Update Mode selects whether the OS should protect against missing pulses and double pulse generation. If Application is selected, no error checking is provided, and the application is completely trusted. If OS is selected, some amount of checking is done by the OS. Pulses are only generated while the Enable input is True. Angle inputs are in units of 1/16th of a degree. Time inputs are in microseconds. | |||
[[Image: InjectorPulseBlock.JPG]] | |||
===MotoHawk:Blocks:Injector Sequence=== | |||
This MotoHawk® block sets up a sequence of injector drivers, starting with the given pin and working up, one for each driver required by the 'Sequence Type'. The input ports may be scalars or vectors, but if vectors, the size must equal the number of cylinders defined by the Encoder Definition block. This number may be calibratable, in which case the vector must be as large as the 'Maximum Number of Cylinders'. | |||
[[Image: InjectorSequenceBlock.JPG]] | |||
==K== |
Revision as of 16:58, 16 June 2010
C
MotoHawk:Blocks:Constant Current Control Output
[[Image:CurrentControlOutputBlock.JPG]
Supply the numeric parameter values via the Current, Dither Amp, and Dither Freq inputs. Current assigns the output current in uA, while Dither Amp allots a current variance in uA, and Dither Freq allots variance in frequency, in .01 Hz increments.
F
MotoHawk:Blocks:Frequency In
This MotoHawk® block determines the frequency of a digital input signal. The output signal is in units of 0.01 Hz, and is based on the last sample period from edge to edge, with a data type of uint32.
Select a unique resource name. This name can be the name of the sensor that is being read. If none is given, it will either inherit the pin name or the vardec name, depending on whether calibratable I/O is selected.
Choose the pin resource.
Perform Duty Cycle Measurement: Add extra code to perform a duty cycle measurement along with period measurement.
Provide Trigger: Provide a trigger after each N pulses.
Alias Protection: Alias protection is a characteristic that protects low frequency inputs from indicating the incorrect frequency when the frequency is very near the low threshold. It places execution burden upon the Framework because each edge results in the servicing of an interrupt. It should not be employed on inputs that consistently sit above the low frequency threshold under normal operation. The low frequency threshold is set at approximately 1.2 Hz for MPC5xx based modules.
Alias protection will provide guaranteed uniform frequency response for all frequencies between 0 Hz and 39000 Hz. Inputs without alias protection may report incorrectly when they first start up, when they stop and while their frequency is near the low frequency threshold.
The dutycycle describes the elapsed time between the occurrence of the non-synchronous edge and the synchronous edge. The synchronous edge is configured during the creation of the resource via the 'Edge Detect' attribute. 4096 represents 100%
MotoHawk:Blocks:Frequency Input Raw 16 Bit Get
This MotoHawk® block reports the raw counts reported by the framework.
If "Get Duty Cycle" is selected, an additional port is displayed.
Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference.
MotoHawk:Blocks:Frequency Input Raw Get
This MotoHawk® block reports the raw counts reported by the framework.
If "Get Duty Cycle" is selected, an additional port is displayed.
Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference.
MotoHawk:Blocks:Frequency In Reference
This MotoHawk® block determines the frequency of a digital input signal. The output signal is in units of 0.01 Hz, and is based on the last sample period from edge to edge, with a data type of uint32.
If "Get Duty Cycle" is selected, then the Frequency Input block must set up the resource to read duty cycle.
Choose the resource name (specified in the Frequency Input block) to specify the input channel to reference.
MotoHawk:Blocks:Frequency Input Trigger
This MotoHawk® block is used in conjunction with the corresponding Frequency Input block. It riggers whenever the selected number of edges have been detected on the pin selected in the corresponding Frequency Input block. When using this block, do not select Alias Protection under the Frequency Input block.
MotoHawk:Blocks:Fuel Injector Sequence
The MotoHawk® Injector Sequence block sets up a sequence of injector drivers starting with the given pin and working up for each driver required by the sequence type. The input ports may be scalars or vectors. If vectors, the size must equal the number of cylinders defined by the Encoder Definition block. This number may be calibratable, in which case the vector must be as large as the Maximum Number of cylinders.
H
MotoHawk:Blocks:High Res One Shot
For this MotoHawk® block, when the Trigger input is TRUE, a one-shot digital pulse is generated. The pulse will have 2 periods in which 2 different PWM modulations are generated. Each period is described by Duration, Duty Cycle and Frequency. If the second period duration is 0, then that portion of the pulse is not generated. If the first period is 0, then only the second pulse is generated. If the Trigger input is FALSE, then a new one shot pulse is not triggered. If both pulses have not completed since the previous trigger event, then a new trigger does not occur. When the Cancel input is TRUE, all pulses are canceled. If FALSE, then pulses continue or can be retriggered. Duration is in microseconds, Duty Cycle is in a range of -4096 to 4096 where 0 is 0%, 4096 is 100%, and Frequency is in Hz. When negative duty cycle is applied, the polarity is reversed, which is only valid on PWM resources that are H-Bridge outputs.
MotoHawk:Blocks:High Res One Shot Status
This MotoHawk® block is the High Resolution, Modulated One Shot Status. The name field must match the name of a Hi Resolution Modulated One Shot block. The first port outputs a boolean if all valid pulses have completed. This will ignore pulses with a duration of 0. The second port outputs the last pulse that completed. Once the one shot is retriggered, this is set to 0.
I
MotoHawk:Blocks:Injector Current Select
This MotoHawk® block selects the peak-and-hold injector current driver between 3A peak / 1A hold, and 6A peak / 2A hold. This selection is only available on the ECU565-128 module. Input 'false' for 3A peak / 1A hold, and 'true' for 6A peak / 2A hold.
MotoHawk:Blocks:Injector Driver
This MotoHawk® block has two similar modes available, Standard and Transient. In Standard mode, a single pulse is generated per cylinder TDC, with an electrical duration of 'Mech Duration' plus 'Mech to Elec Offset', and starting at a crank angle of 'SOI' plus 'Angle Offset'. In Transient mode, up to two pulses are generated. The first pulse is started at SOI, and if the the desired duration rises above the 'Make-Up Min Mech Duration' after the pulse has completed, then a second Make-Up pulse will be generated, ending at Make-Up EOI. If the first pulse has already extended beyond 'Make-Up EOI', the make-up pulse will not be generated.
When using the Transient mode, there must be a separation between the EOI and next SOI that is larger than one crank encoder tooth. Enter an appropriate angle into 'Min EOI to SOI Angle'. 'Angle Offset' is normally the crank angle for the given physical cylinder, in degrees before TDC of cylinder 1. 'Peak Duration' is used with a Low-Impedance Injector, and controls the duration of the peak portion of the pulse. The remaining time is the hold time. The Update Mode selects whether the OS should protect against missing pulses and double pulse generation.
If Application is selected, no error checking is provided, and the application is completely trusted. If OS is selected, some amount of checking is done by the OS. Pulses are only generated while the Enable input is True. When the Enable input goes False, any pulses already started will complete.
MotoHawk:Blocks:Injector Pulse
This MotoHawk® block generates a series of pulses, starting at a given encoder crank angle, and either stopping at an angle or after a certain duration. Stop Mode parameter selects which strategy to use. Two of these blocks may be used on a single Injector resource, to generate interleaved pulses, sharing a single pin. Each block must identify the pulse number (0 or 1). If no interleaving is needed, simply use pulse number 0. Pulse Angle Offset is used to apply a fixed offset to the given pulse, relative to TDC. The start and stop angles are then relative to this offset. The Update Mode selects whether the OS should protect against missing pulses and double pulse generation. If Application is selected, no error checking is provided, and the application is completely trusted. If OS is selected, some amount of checking is done by the OS. Pulses are only generated while the Enable input is True. Angle inputs are in units of 1/16th of a degree. Time inputs are in microseconds.
MotoHawk:Blocks:Injector Sequence
This MotoHawk® block sets up a sequence of injector drivers, starting with the given pin and working up, one for each driver required by the 'Sequence Type'. The input ports may be scalars or vectors, but if vectors, the size must equal the number of cylinders defined by the Encoder Definition block. This number may be calibratable, in which case the vector must be as large as the 'Maximum Number of Cylinders'.