Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4MATLAB)  1.26.2
LogicBlocks
Collaboration diagram for LogicBlocks:
Logic Blocks

Logic Blocks

Description

The logic block group contains functions to control and manage the PLC runtime system on the target device. Furthermore this function group provides the symbolic read and write access to logic variables and the possibility to read and write memory areas such as the input area.

More Information

For more information, refer to mlpiCore documentation: LogicLib.

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4SLogicGetAddressOfSymbol

m4SLogicGetAddressOfSymbol

m4SLogicGetAddressOfSymbol

Logic Block: Read address of a single symbolic variable.

Description

This block reads the physical kernel space address of one symbolic variable of a PLC application.

The symbolic variable must be available in the 'symbol configuration' of the PLC.

Note: This block can only be used within a real time application on the target and only within the kernel space!

Attention: The address might change on every download or online change of the PLC application.

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.

address contains the address of the symbolic 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.

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

m4SLogicGetNumberOfApplications

m4SLogicGetNumberOfApplications

m4SLogicGetNumberOfApplications

Logic Block: Read number of applications.

Description

This block reads the number of applications on a MLPI target.

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.

numOfApps contains the number of applications. The output is a scalar uint32 value. The default value is 0.

Parameters and Dialog Box

Master name specifies the name of the fieldbus master. The parameter must be a 1xL char array.

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

m4SLogicGetSizeOfSymbol

m4SLogicGetSizeOfSymbol

m4SLogicGetSizeOfSymbol

Logic Block: Read size of a single symbolic variable.

Description

This block reads the size of a single symbolic variable.

The symbolic variables must be available in the 'symbol configuration' of the PLC.

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.

size contains the size of a symbolic variable in byte. 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.

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

m4SLogicGetTypeOfSymbol

m4SLogicGetTypeOfSymbol

m4SLogicGetTypeOfSymbol

Logic Block: Read data type of a single symbolic variable.

Description

This block reads the type and subtype of a symbolic variable of a PLC application.

The symbolic variables must be available in the 'symbol configuration' of the PLC.

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.

type contains the type of the symbolic variable. The MlpiLogicType enumeration of the symbolic variable will be casted to uint32. The output is a scalar uint32 value. The default value is 0.

subtype contains the subtype of the symbolic variable. The MlpiLogicType enumeration of the symbolic variable will be casted to uint32. 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.

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

m4SLogicReadMemoryAreaArray

m4SLogicReadMemoryAreaArray

m4SLogicReadMemoryAreaArray

Logic Block: Read array data from a memory area.

Description

This block reads the following memory areas: Ix (Input), Qx (Output) and Mx (Marker) from the target defined by the parameter Area. The block reads the raw bit stream from the memory and reconstructs the data array with the data type as defined by the parameter Data type.

The meaning of the input offset depends on the parameter Data type. The offset value is an offset in bytes for all types except boolean. If the type of data is boolean, offset is a bit-offset.

The block does not support reading an array of boolean values.

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.

offset defines the offset from where the data will be read. If the data type is boolean it will be a bit-offset, otherwise it is a byte-offset. The input must be a scalar uint32 value.

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 memory area. The data type of the output corresponds to the setting in parameter Data type. The output is a Mx1 vector. The default value of the elements is 0.

numElements contains the number M of elements actually read from the memory area. The output is a scalar uint32 value. The default value is 0.

Parameters and Dialog Box

Application defines the name of the application that manages the memory area. The parameter must be a 1xL char array.

Area defines the type of the memory area. For details refer to the enumeration MlpiApplicationMemoryArea

Data type defines the data type of the output data.

Number of elements defines the number of elements that shall be read. 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

m4SLogicReadMemoryArea

m4SLogicReadMemoryArea

m4SLogicReadMemoryArea

Logic Block: Read data from a memory area.

Description

This block reads the following memory areas: Ix (Input), Qx (Output) and Mx (Marker) from the target defined by the parameter Area. The block reads the raw bit stream from the memory and reconstructs the data and the data type as defined by the parameter Data type.

The meaning of the input offset depends on the parameter Data type. The offset value is an offset in bytes for all types except boolean. If the type of data is boolean, offset is a bit-offset.

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.

offset defines the offset from where the data will be read. If the data type is boolean it will be a bit-offset, otherwise it is a byte-offset. The input must be a scalar uint32 value.

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 memory area. The data type of the output corresponds to the setting in parameter Data type. The output is scalar. The default value is 0.

Parameters and Dialog Box

Application defines the name of the application that manages the memory area. The parameter must be a 1xL char array.

Area defines the type of the memory area. For details refer to the enumeration MlpiApplicationMemoryArea

Data type defines the data type of the output data.

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

m4SLogicReadVariableBySymbol64

m4SLogicReadVariableBySymbol64

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

m4SLogicReadVariableBySymbolArray

m4SLogicReadVariableBySymbolArray

m4SLogicReadVariableBySymbolArray

Logic Block: Read array data from a single symbolic variable.

Description

This block reads scalar or array data from a single symbolic variable.

The symbolic variables must be available in the 'symbol configuration' of the PLC.

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 Data type. The output is a Nx1 vector. N is the number of elements specified in the dialog box parameter Number of elements. Use the standard Simulink block Reshape to form a 2D matrix if needed. The default values of the elements are 0.

Some data types available in the PLC environment are not available as native data types in MATLAB. The following data types will be returned as described: * TIME: uint32 value as time in milliseconds. * DATE: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * DATEANDTIME: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * TIMEOFDAY: uint32 value as time in milliseconds, time begins at 12:00 a.m. (00:00 a.m.). * ENUM: int16 value.

Other PLC data types are not supported.

numElements contains the number 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.

Data type defines the data type of the symbolic variable.

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

m4SLogicReadVariableBySymbol

m4SLogicReadVariableBySymbol

m4SLogicReadVariableBySymbol

Logic Block: Read data from a single symbolic variable.

Description

This block reads data from a single symbolic variable.

The symbolic variables must be available in the 'symbol configuration' of the PLC.

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 Data type. The output is scalar. The default value is 0.

Some data types available in the PLC environment are not available as native data types in MATLAB. The following data types will be returned as described: * TIME: uint32 value as time in milliseconds. * DATE: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * DATEANDTIME: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * TIMEOFDAY: uint32 value as time in milliseconds, time begins at 12:00 a.m. (00:00 a.m.). * ENUM: int16 value.

Other PLC data types are not supported.

Parameters and Dialog Box

Symbolic variable defines the complete instance path of the symbolic variable. The parameter must be a 1xL char array.

Data type defines the data type of the symbolic variable.

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

m4SLogicWriteMemoryAreaArray

m4SLogicWriteMemoryAreaArray

m4SLogicWriteMemoryAreaArray

Logic Block: Read scalar or array data to a memory area.

Description

This block writes scalar or array data to the following memory areas: Ix (Input), Qx (Output) and Mx (Marker) of the target defined by the parameter Area.

This block does not support array data of type boolean. A scalar boolean value can be written.

The meaning of the input offset depends on the parameter Data type. The offset value is an offset in bytes for all types except boolean. If the data type of the input data is boolean, offset is a bit-offset.

Caution: It is possible to execute the block with Area = INPUT for some particular cases. However, this will cause an error in a physical target as write access is not allowed for physical inputs.

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.

offset defines the offset from where the data will be written. If the data type of data is boolean it will be a bit-offset, otherwise it is a byte-offset. The input must be a scalar uint32 value.

data defines the data that will be written to the memory area. The input must be scalar, a Mx1 or 1xM vector with numeric values. If the data type is boolean, data must be scalar.

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.

Parameters and Dialog Box

Application defines the name of the application that manages the memory area. The parameter must be a 1xL char array.

Area defines the type of the memory area. For details refer to the enumeration MlpiApplicationMemoryArea

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

m4SLogicWriteMemoryArea

m4SLogicWriteMemoryArea

m4SLogicWriteMemoryArea

Logic Block: Read data from a memory area.

Description

This block writes data to the following memory areas: Ix (Input), Qx (Output) and Mx (Marker) of the target defined by the parameter Area.

The meaning of the input offset depends on the parameter Data type. The offset value is an offset in bytes for all types except boolean. If the data type of the input data is boolean, offset is a bit-offset.

Caution: It is possible to execute the block with Area = INPUT for some particular cases. However, this will cause an error in a physical target as write access is not allowed for physical inputs.

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.

offset defines the offset from where the data will be written. If the data type of data is boolean it will be a bit-offset, otherwise it is a byte-offset. The input must be a scalar uint32 value.

data defines the data that will be written to the memory area. The input must be a scalar numeric value.

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.

Parameters and Dialog Box

Application defines the name of the application that manages the memory area. The parameter must be a 1xL char array.

Area defines the type of the memory area. For details refer to the enumeration MlpiApplicationMemoryArea

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

m4SLogicWriteVariableBySymbol64

m4SLogicWriteVariableBySymbol64

m4SLogicWriteVariableBySymbol64

Logic Block: Write data to a single 64bit symbolic variable.

Description

This block converts values of type double or pairs of uint32 values to uint64 or int64 values and writes them to a scalar symbolic variable or a symbolic 64bit array variable.

The symbolic variables must be available in the 'symbol configuration' of the PLC.

Note: If the input format double is used, make sure that the content of the input matches a valid uint64 or int64 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.

data defines the data that will be written to the symbolic variable. The data type of the input corresponds to the setting in parameter Input data type. If parameter Input data type is double, input data must be a Nx1 vector of type double. If parameter Input data type is two uint32 (high and low), input data must be a Nx2 matrix of type uint32. Number N is the number specified in the dialog parameter Number of elements.

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.

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. The symbolic variable can be scalar, 2D or 3D.

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.

Input data type defines the data type and dimension of input data. The parameter can either be double to convert the input to a symbolic 64bit variable or it can be two uint32 (high and low) to convert the a pair of high uint32 and low uint32 value from the input to a symbolic 64bit variable.

Number of elements defines the number of elements that will be written to 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

m4SLogicWriteVariableBySymbolArray

m4SLogicWriteVariableBySymbolArray

m4SLogicWriteVariableBySymbolArray

Logic Block: Write data to a single symbolic array variable.

Description

This block writes scalar or array data to a single symbolic variable.

The symbolic variables must be available in the 'symbol configuration' of the PLC.

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.

data defines the data that will be written to the symbolic variable. The data type of the input must correspond to the PLC data type of the variable. The input can be a Nx1 or 1xN vector. N is the number of elements of the symbolic array variable. Use the standard Simulink block Reshape to form a vector from a 2D matrix if needed.

Some data types available in the PLC environment are not available as native data types in MATLAB. The following data types will be written as described: * TIME: uint32 value as time in milliseconds. * DATE: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * DATEANDTIME: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * TIMEOFDAY: uint32 value as time in milliseconds, time begins at 12:00 a.m. (00:00 a.m.). * ENUM: int16 value.

Other PLC data types are not supported.

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.

Parameters and Dialog Box

Symbolic variable defines the complete instance path of the symbolic variable. The parameter must be a 1xL char array.

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

m4SLogicWriteVariableBySymbol

m4SLogicWriteVariableBySymbol

m4SLogicWriteVariableBySymbol

Logic Block: Write data to a single symbolic variable.

Description

This block writes data to a single symbolic variable.

The symbolic variables must be available in the 'symbol configuration' of the PLC.

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.

data defines the data that will be written to the symbolic variable. The data type of the input must be defined explicitly. The data type must correspond to the data type of the symbolic PLC variable. The input must be scalar.

Some data types available in the PLC environment are not available as native data types in MATLAB. The following data types must be used as described: * TIME: uint32 value as time in milliseconds. * DATE: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * DATEANDTIME: uint32 value as time in seconds beginning with January 1, 1970 at 12:00 a.m. (00:00 a.m.). * TIMEOFDAY: uint32 value as time in milliseconds, time begins at 12:00 a.m. (00:00 a.m.). * ENUM: int16 value.

Other PLC data types are not supported.

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.

Parameters and Dialog Box

Symbolic variable defines the complete instance path of the symbolic variable. The parameter must be a 1xL char array.

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