Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4MATLAB)  1.26.2
IoBlocks
Collaboration diagram for IoBlocks:
I/O Blocks

I/O Blocks

Description

This block group contains functions to control and manage, read and write fieldbus I/Os.

In general, it is recommended to use the LogicLib blocks instead of the IoLib blocks to exchange data with I/O devices. The LogicLib allows you to share devices and data with the PLC. All data is mapped cyclically to the input and output area, regardless of the underlying bus driver.

More Information

For more information, refer to mlpiCore documentation: IoLib.

Copyright

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

m4SIoReadFieldbusIo

m4SIoReadFieldbusIo

m4SIoReadFieldbusIo

Io Block: Read I/Os from a fieldbus slave.

Description

This block reads scalar or array data from a fieldbus slave.

Note: Read the introduction in Fundamentals of MLPI Programming carefully to avoid unexpected results of this function as the IO access is shared with the target 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.

offset defines the offset within the I/O range of the fieldbus slave. If the defined data type is boolean, the offset is a bit-offset. Otherwise the offset is a byte-offset. The argument 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 fieldbus slave. The data type and the size are according to the definition of the block parameters. The default value of the output elements is 0.

size contains the number N of elements read from the fieldbus slave. The output is a scalar uint32 value. If the number N is higher than the number of elements available to read, the block execution will fail but the output contains the number of elements that could be read. 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.

Slave address defines the address of the fieldbus slave. The parameter must be a 1xL char array.

I/O area of access defines if data is read from the fieldbus input area or output area.

Data type defines the data type of the output port data.

Number of elements defines the number N of elements that shall be read. The parameter must be a scalar uint32 integer. The output data will be a Nx1 vector. If the data type is defines as boolean the number of elements must be 1 as the block does not support reading boolean array 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

m4SIoUdtFieldbusIo

m4SIoUdtFieldbusIo

m4SIoUdtFieldbusIo

Io Block: Update I/Os of a fieldbus.

Description

This block performs a bus cycle to update the fieldbus I/Os of all attached slaves of a master.

Note: Read the introduction in Fundamentals of MLPI Programming carefully to avoid unexpected results of this function as the IO access is shared with the target 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.

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

m4SIoWriteFieldbusIo

m4SIoWriteFieldbusIo

m4SIoWriteFieldbusIo

Io Block: Read I/Os from a fieldbus.

Description

This block performs a bus cycle to update the fieldbus I/Os of all attached slaves of a master.

Note: Read the introduction in Fundamentals of MLPI Programming carefully to avoid unexpected results of this function as the IO access is shared with the target 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.

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