.

Memory Out with Enable

Overview

Overview

The Memory Out with Enable block is used to output a MechaWare block’s output to an internal memory location, other than those provided by the standard blocks. Any internal variable on the controller can be written to by the MemoryOut blocks.

Note: Memory is only written to on samples where the Enable input is high (non-zero).

The Memory Address defines the internal variable memory location that is written to by this block. The data type of the internal variable that is written to can be float (32 bits), double (64 bits), integer (32 bits) or a long integer (64 bits).

Example

The following example demonstrates how to control a algorithm that is built in a vertical application where the force in the up direction have a higher limit than the down direction. This is because to move up, you must fight gravity, and to move down, gravity is helping.

To control the torque limits an Asymetric clip is used to limit the torque, and a complimentary Deadband filter is attached to an EStop command to stop motion if the command exceeds the limits of the Clip. Upon exceeding the limits, the faulting torque command is written to the User Buffer to help determine the cause of the fault.

The Memory Out With Enable block is used in this example to only write to the User Buffer when the torque command is outside of the Deadband limits. The Memory Out block writes the actual torque command to UserBuffer[0].


The configuration values for this block are as follows:

Memory Address

Defines location of the internal input variable. Format is Hexadecimal.

Data Type

Defines the data type of the internal variable memory being written to:

Float (32 bits)
Double (64 bits)
Short integer (16 bits)
Integer (32 bits)
Long integer (64 bits)

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 Memory Address of the MemoryOut block specifies which memory location the block is writing to. The address is in hexadecimal format. Addresses for output variables can be obtained using VM3.

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

MEMOUT_ENBlock

Declaration

Public Method

 
class MEMOUT_ENBlock: public virtual Block
{
public:
	// User accessible coefficients
	long Address;
	long DataType;
};
 

Required Header: mechaware.h

Description

The Memory Output with Enable block is used to output to memory locations other than those provided by the standard output blocks. Any internal variable on the controller can be written to using the Memory Output with Enable block. For more information, see Overview.

Parameters

long

Address
Memory Address of the internal variable being written to.

long

DataType

Data type of the internal variable being written to.

Methods

Block Methods

See Also

Memory | Noise Generator | Actual Position | Command Position | Position Error | Memory User Buffer | Command Acceleration | Command Velocity | Torque Output | Memory Out | Memory Out User Buffer | Scope | Feedback | Reset Status | Test In | Test Out

 

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