.

Test Output

Overview

Overview

The Test Output block is used to connect the output of a MechaWare block to the user buffer. Each Test Output block is connected to a single 32-bit user buffer register for integer and float outputs and two 32-bit registers for double and long integer types. These registers overlap with the buffer used by Memory In User Buffer, Memory Out User Buffer, and Scope blocks. Each model has a set of 16 of these output registers.

The Test Point Number defines the user buffer location that will be written to by this block. The data types that are output by the block to the user buffer are float (32 bits), double (64 bits), integer (32 bits) or Long integer (64 bits). If the data being accessed from the user buffer is 64 bits, odd user buffer numbers should be specified, and the next even test output should not be used.

The user buffer location written to by the block is determined by the following formula:

Index  = (Model Number * 32) + 16 + Test Point Number

So, a Test Output block in Model 2 with a Test Point Number of 6 will put its output in User Buffer[86].

Example

The following example demonstrates how to use MechaWare for operations such as Mathematics. In this scenario, the Test Input Block is used, the input is raised to the 3rd power (specified in the block parameters), and the 3rd power is output using the Test Output block.

The Test Output block writes data to the User Buffer similar to the Memory Out User Buffer Block. However, if your model performs the exact operation, but for a different axis (ie simple PID control for Axis 0 and 1, but using the same model for both), and using the User Buffer blocks, each model would try to read and write to the same location. This causing undesirable read/write conditions.

The Test Output block allows you to load an identical MechaWare model into different Model slots on the controller based on the Model Slot #, the Test Output block references a different User Buffer Location.

The User Buffer index is specified as follows:

Index  = (Model Number * 32) + 16 + Test Point Number

Note: Test Input block in Model 2 with a Test Point Number of 6 reads its input from User Buffer[86].

The following parameters are used to configure this block at load time:

Test Point Number

The number of the register within model’s set of 16 user buffer registers.

Data Type

Data Type.

Defines the data type of the data being written to 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

The Input of the Test Output block is a single value from another block. This block has no outputs.

The Test Point Number determines which of the model’s 16 user buffer output registers are used as the destination of data for the block.

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

TEST_OUTPUTBlock

Declaration

Public Method

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

Required Header: mechaware.h

Description

The Test Output block is used to redirect output to the user buffer. This block has no configurable parameters.

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