MotoHawk:Blocks:Data Write Block

From MotoHawk
Jump to navigationJump to search

Data Write

Current Version Help Data Write Help

This MotoHawkâ„¢ block writes a value to data defined by a MotoHawk Data Definition block.

Block ID

motohawk_data_write

Library

MotoHawk_lib/Data Storage Blocks

Description

Data Write.PNG

Write value(s) to data defined by a MotoHawk Data Definition block. No type, bounds, or data structure checking is provided on the target. Such issues can be caught by simulation, with explicit warnings.

Block Parameters

Parameter Field Values Comments/Description
Data Source Select method of obtaining source of data. An error is given if this does not match when the data source is by name. However, if the source is by input reference, the tool will not provide static error checking.
Lookup by Name Get data from source selected by name as entered in Data Definition block; if this option is selected the "Data Name" field is available for name entry.
Input Reference Signal Get data from explicitly provided dynamic reference signal.
Lookup by Name in Structure Get data from source selected by name of data and of structure as entered in Data Definition block (for Data Type "struct"); if this option is selected the "Data Name" field is available for name entry.
Lookup by Name in Structure by Reference Get data from explicitly provided dynamic reference signal in structure.
Data Structure Select Structure of Data (must match that of Data Definition Block)
Scalar Single discrete value.
Vector Array of values (single row or column). Enables "Operation" selection field.
Matrix Table of Values (rows/columns). Enables "Operation" selection field.
Data Type Drop-down list Specify data type (must match that of Data Definition Block), or choose to obtain by reference.
Data Name Alpha-numeric text, single-quote enclosed Name of data source, if Lookup by Name is selected for Data Source. Must match exact name as defined in a Data Definition block. No special characters, such as spaces, dashes, commas (underscore allowed).
Allow writes to read-only data. Check box (enable) Check to enable writes to read-only data. The over-written data is not included in generated code.
Operation Select method for obtaining structured data (field not available for "Scalar" selection in "Data Structure").
Write scalar from location by index Write single scalar, according to coordinate(s) index.
Write entire data structure at once Write entire vector or matrix; enables size fields per structure selected (Vector Size for Vector, or Numbers of Rows/Columns for Matrix).
Vector Size Numeric If Vector is selected, and entire data structure is to be written (per "Operation" selection), then set the vector size here.
Number of Rows Numeric If Matrix is selected, and entire data structure is to be read (per "Operation" selection), then set the number of rows of matrix here.
Number of Columns Numeric If Matrix is selected, and entire data structure is to be written (per "Operation" selection), then set the number of columns of matrix here.
Structure Instance Name Alpha-numeric text, single-quote enclosed Name of data source structure; field available if Lookup by Name in Structure is selected for Data Source. Must match exact name and structure as defined in a Data Definition block. No special characters, such as spaces, dashes, commas (underscore allowed).
No operation when null reference is input Check box (enable) Check to enable no operation when an input by reference option is selected, and the input reference is null.