.

AMP_ENABLE

Overview

Overview

Description

The AMP_ENABLE block is used to enable or disable a particular motor’s amp. Note that the actual state of amp enable output also depends upon the actual wiring and the polarity chosen in the instance of the MPIMotorConfig structure.

The block only writes to the amplifier when the Execute signal is non-zero. When non-zero, the amp enable value follows the Enable value (0 = disable, non-zero = enable) with each sampling. Because other parts of the system may change the amp enable state (for example, motor or user limits), the Execute signal should be kept at zero except when the model needs to enable to disable the amplifer.

Example

The first example is a simple PID Filter controlling Axis 0. It shows how to abort an axis based on an Analog Input, and enable/disable the amplifier based on a Digital Input.

In the second example, the Digital Input Bits 0 and 1 from Node 0 is being used to Enable/Disable the amplifier. When Bit 1 is High and Bit 0 is High the amp is enabled. When the Bit 1 is High and Bit 0 is Low, the amp is disabled. When Bit 1 is Low, the state of the amplifier is left unchanged.


The configuration values for this block are as follows:

 
Motor Number The number of the motor whose amp is controlled. 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) 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 Itrp (opt) output is an output which only relates to simulation.

Note: This output is only used when simulating within Simulink and is ignored when the model is downloaded to a controller.

The Interrupt pin is used on all Motion Simulation blocks to allow them to communicate with a central trajectory planner, interpret events, and change the trajectory as required. When Bit 1 is triggered by the Amp Enable block, verify that no faults are lingering before re-enabling the amplifier. If a fault is present, use the Motion Reset to clear the fault.

The Motor Number of the Amp_Enable block specifies which motor’s amp is to be controlled.

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

AMP_ENABLEBlock

Declaration

Public Method

 
class AMP_ENABLEBlock: public virtual Block
{
public:
	// User accessible coefficients
	long MotorNumber;
};
 

Required Header: mechaware.h

Description

Each AMP_ENABLE block provides direct control over a particular motor amp. An input value of zero is interpreted as disable and a non-zero input value is interpreted as enable. The amp enable is set to match the input interpretation at each sampling.

Parameters

long MotorNumber Motor number

Methods

Block Methods

See Also

Stop | EStop | Abort | MOTION_RESET

 

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