.

Pulse

Overview

Overview

The Pulse block generates a pulse when the input transitions from 0 to 1 (or non-zero). The Delay and Width parameters are both expressed in terms of samples.

Example

The following example uses the Bit Input block to read in a specific Digital IO (Node 1, Bit 2), the Digital Bit triggers a Latch which is sent to a pulse generator. The Pulse triggers the Clear Position command. The UserBuffer[0] is used to monitor the state of the Latch Output.

The Pulse block generates a pulse ‘N’ samples wide (specified by the Width parameter), and can be delayed ‘X’ number of samples (specified by Delay parameter). The pulse will only activate when the input to the pulse block changes from a zero to a non-zero value and will not trigger again until the input returns to a zero state.


The configuration values for this block are as follows:

 
Delay Delay of the start of the output pulse in samples.
Width Width of output pulse in samples.
Evaluate Block

This block allows you to specify whether the block executes Every Sample, Every Other Sample (Odd or Even), or Every Fourth Sample (and specify the First, Second, Third, or Fourth) or background. This provides greater flexibility in controlling the execution of a model and to preserve performance for other areas of motion control.

User Defined Block Priority When selected, allows you to enter a Priority Code to modify Execution Ordering of this block. For more information, see Block Execution Order and User Defined Block Priority.
Priority For an explanation of how the Priority field is used by the MechaWare Model Downloader, see Block Execution Order and User Defined Block Priority.
User Data 0 Application-specific data. See User Data Storage.
User Data 1 Application-specific data. See User Data Storage.

Matlab/Simulink

Simulink Interface

The Pulse block generates a pulse when the input transitions from 0 to 1 (non-zero). The output goes to 1 after a programmable delay (Delay, samples) after the input transition and remains 1 for a programmable duration (Width, samples). Input transitions during the output pulse are ignored (see diagram).

The block has two user data fields (User Data 0, User Data 1) to store application-specific data for convenient storage and retrieval. For more information, see User Data Storage.

The block's update schedule is determined by the Evaluate Block. The following Parameter Dialog Box can be opened by double-clicking on the block in a Simulink model:

 

C++ API

PULSEBlock

Declaration

Public Method

 
class PULSEBlock: public virtual Block
{
public:
	// User accessible coefficients
	long	Delay;
	long	Width;
};
 

Required Header: mechaware.h

Description

The Pulse block generates a pulse when the input transitions from 0 to 1 (non-zero).

double

Delay Number of samples after the rising edge trigger to wait before pulsing high.

double

Width Number of samples to remain high.

Methods

Block Methods

See Also

Delay

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2012 Motion Engineering