m4SLogicReadVariableBySymbol64
Logic Block: Read data from a single 64bit symbolic variable.
Description
This block reads scalar or array data from a single 64bit symbolic variable and converts it to values of type double or to two uint32 values.
The symbolic variables must be available in the 'symbol configuration' of the PLC.
Note: If the output format double is used, make sure that the content of the symbolic variable is a valid double value.
Block Inputs
connection defines the connection that will be used. The input must be a scalar uint32 value provided by m4SApiConnect.
result defines if the block will be executed. The input must be a scalar int32 value. The block will not be executed if this value is negative. For negative values the input result is directly fed through to the output result.
Block Outputs
connection contains the connection identifier. The input port connection is fed through to this output. The default value of this port is 0.
result contains the return value of the block. The output is a scalar int32 value. If the output is negative other outputs are invalid. The default value of this output is 0. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.
data contains the data read from the symbolic variable. The data type of the output corresponds to the setting in parameter Output data type. If parameter Output data type is double, output data will be a Nx1 vector of type double. If parameter Output data type is two uint32 (high and low), output data will be a Nx2 matrix of type uint32. Number N is the number specified in the dialog parameter Number of elements. The default values of the elements is 0.
numElements contains the number N of elements read from the symbolic array variable. The output is a scalar uint32 value. The default value is 0.
Parameters and Dialog Box
Symbolic variable defines the complete instance path of the symbolic variable. The parameter must be a 1xL char array. The symbolic variable must be a LINT or a ULINT PLC variable.
Data type defines the data type of the symbolic variable. The symbolic variable must be either a signed or an unsigned 64bit integer data type.
Output data type defines the data type and dimension of output data. The parameter can either be double to convert the symbolic 64bit variable into a 64bit floating point value or it can be two uint32 (high and low) to convert the symbolic 64bit variable into high uint32 and low uint32 value.
Number of elements defines the number of elements that will be read from the symbolic variable. For scalar variables set the parameter to 1. The parameter must be a scalar uint32 value.
Sample time (-1 for inherited) specifies the time interval between samples. To inherit the sample time, set this parameter to -1. This block supports discrete sample time, but not continuous sample time.
Characteristics
Direct Feedthrough | Yes |
Sample Time | Fixed Step |
Example Model
Here you will find instructions to use the examples.
The following example is available in the folder ./mlpi/mlpi4Simulink/blocks:
See also
Copyright
Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0