.

Memory User Buffer

Overview

Overview

Description

The Memory User Buffer block is used to input a user buffer register’s contents into a MechaWare block. Any of the controller’s user buffer registers can be accessed by the Memory User Buffer block. Currently, there are 1024 user buffer registers (defined by MFWUserDataSize).

The Memory User Buffer Number defines the register location that will be accessed by this block. The data types that are input to the block from the user buffer are float (32 bits), double (64 bits), short integer (16 bits), integer (32 bits) or long integer (64 bits).

Example

This example shows how to implement a cyclic error compensation based on actual position. In this scenario, an un-balanced pulley is spinning horizontally on a motor shaft. Gravity causes the imbalance to require more force to rotate the heavy side up, then require less force as the heavy side makes its way down.

Switch Block outputs Input 0 whenever the Switch State value = 0, otherwise it outputs Input 1. In this case it is choosing whether or not to use Gravity Compensation when the User Buffer value is not zero


The configuration values for this block are as follows:

 
Memory User Buffer Number

Memory User Buffer Number.

Defines the user buffer register that is accessed by this block.

Data Type

Defines the data type of the data being accessed in the user buffer.

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

memout

The Memory User Buffer Number defines the register location that will be accessed to by this block. Data Type defines the data type of the internal variable being written to by the block.

0 = float (32 bits)
1 = double (64 bits)
2 = short integer (16 bits)
3 = integer (32 bits)
4 = long integer (64 bits)

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

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:

output_sim2

 

 

C++ API

MEMORY_USERBlock

Declaration

Public Method

 
class MEMORY_USERBlock: public virtual Block
{
public:
	// User accessible coefficients
};   
 

Required Header: mechaware.h

Description

The Memory User Buffer block is used to direct input from the user buffer.

Methods

Block Methods

See Also

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

 

 

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