Data Read

This MotoHawk™ block reads value(s) from data defined by a Data Definition block.

Block ID

motohawk_data_read

Library

MotoHawk_lib/Data Storage Blocks

Description

This MotoHawk™ block reads value(s) from data defined by a Data Definition block.

The 'Data Source' may be resolved by name, or by explicitly providing a dynamic reference signal. If "Structure Name" is selected, then the name of the structure instance must be specified along with the name of the field. If "Structure Reference" is selected, then the field is selected and a structure reference is provided as an input.

The 'Data Structure' may be a Scalar, Vector, or Matrix. If Vector or Matrix is selected, an option is available to either output the entire data structure as a vector or matrix signal, or to use zero-based index inputs to determine the appropriate item(s) within a larger data structure.

The selection for 'Data Structure' and 'Data Type' must match the definition.

See also Data Coherency for a discussion on ensuring data coherency when accessing global data across multiple threads of execution.

Block Parameters

Parameter Field Values Comments/Description
Data Source Select method of obtaining source of data.
  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  
Data Structure Select Structure of Data (must match the referenced Data Definition block)
  Scalar Single discrete value.
Vector Array of values (single row or column).
Matrix Table of Values (rows/columns).
Data Type Drop-down list Specify data type (must match the referenced Data Definition block), or choose to obtain by reference.
Data Name Alpha-numeric text, single-quote enclosed The referenced Data Definition when Lookup by Name is selected for Data Source
Operation Select method for reading structured data (field not available for "Scalar" selection in "Data Structure").
  Read scalar from location by index Read scalar, according to coordinate(s) index. Supplying a vector of indexes will return a vector of results.
Read entire data structure at once Read entire vector or matrix; enables size fields per structure selected (Vector Size for Vector, or Numbers of Rows/Columns for Matrix).
Vector Size Numeric The vector's size must be specified when Vector data structure is selected and the entire data structure is to be read or protected access is to be used. This value should match the referenced Data Definition specification.
Number of Rows Numeric The matrix's row dimension must be specified when a Matrix data structure is selected and the entire data structure is to be read or protected access is to be used. This value should match the referenced Data Definition specification.
Number of Columns Numeric The matrix's column dimension must be specified when a Matrix data structure is selected and the entire data structure is to be read or protected access is to be used. This value should match the referenced Data Definition specification.
Use Protected Access Check box (enable) The protected access option is available when a matrix or vector data structure is in use and the selected operation is to read via an index. When checked the target will generate bounds checking code that will force an illegal index to be within bounds before the access will occur. When not checked an illegal memory access will result if the supplied index is out of bounds.
Show Protected Access Status Check box (enable) This option (which is only visible when Use Protected Access is checked) will expose an output port that returns true if the bounds checking identified an illegal index value and false otherwise.
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.
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 detected to be null(0).