.

CLEAR_POSITION

Overview

Overview

Description

The Clear Position block is used to zero the relative actual position from the current origin of an axis. This effectively moves the origin to the current encoder position..

For each sample which the Execute input is non-zero, the position of the specified axis is cleared to zero.

Example

This 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 fed 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 Clear Position block simply clears the position (set current position = 0) for a specified axis (specified by block parameter: Axis Number). In this example, whenever the Pulse block generates a pulse, the Clear Position block runs and sets the axis position = 0.


The configuration values for this block are as follows:

 
Motion Supervisor Number The number of the axis whose position is cleared. This number may be absolute or linked to the Model Number.

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). 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 Axis Number of the Clear Position block specifies which axis to zero on samples in which Execute is non-zero.

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

CLEAR_POSITIONBlock

Declaration

Public Method

 
class CLEAR_POSITIONBlock: public virtual Block
{
public:
	// User accessible coefficients
	long AxisNumber;
};
 

Required Header: mechaware.h

Description

The CLEAR_POSITION block sets a specified axis origin to the current encoder position, mapping the current actual position to zero. For more information, see overview.

Parameters

long

AxisNumber Axis number

Methods

Block Methods

See Also

Stop | EStop | Abort | MOTION_RESET

 

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