Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4MATLAB)  1.26.2
UtilityBlocks
Collaboration diagram for UtilityBlocks:
Utility Blocks

Utility Blocks

Description

This block group provides functionality that can simplify development of models.

More Information

For more information, refer to mlpiCore documentation: Utility.

Copyright

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

m4SUtilMotionWait

m4SUtilMotionWait

m4SUtilMotionWait

Motion Block: Get the actual position of one axis.

Description

This block waits until a given motion commands is done or an error occured. A timeout has to be provided to abort waiting after that time. The success of the command execution is available in the output signal out. The block can be executed on one axis only.

Note that short cycle times can not be realized if this block is used as it interrupts the execution.

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.

mhdl defines the motion handle of the block that will be supervised. The input must be a 2x1 vector of type uint32.

timeout defines the timeout in milliseconds. The input must be a 2x1 vector of type uint32. Note that the simulation is blocked for that time and therefore is normally not usable for cyclic execution of a simulation.

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.

out contains the information if the motion command succeeded within the timeout. The output is a scalar boolean value. The default value is false.

Parameters and Dialog Box

Control number specifies the control number of the axis. The parameter must be a scalar numeric value.

Axis number specifies the axis number of the axis. The parameter must be a scalar numeric 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

m4SUtilRealTime

m4SUtilRealTime

m4SUtilRealTime

Utility Block: Slow simulation time down to real-time.

Description

This block can be used to adjust simulation time almost to real-time. When simulating a model the simulation time can be much faster than real- time. Using mlpi4Simulink blocks that interface the MLPI target it might be necessary to execute the simulation almost in real-time rather than as fast as possible. Therefore the simulation must be slowed down and executed with a simulation fixed step size. The block can slow down the execution of a Simulink model by adding a self-adjusting pause during simulation. The minimum pause time is 1ms. The block can not reach exactly real-time as it is executed in a non-real-time environment.

The block inherits its sample time from the Fixed-size setting of the solver in the Simulink configuration parameters dialog. The solver type must be fixed-step.

If the simulation time takes longer than the configured fixed step size the block will prompt a warning. Other software running on the host can cause random exceedance of the configured simulation step size.

The block can be used for host exection on Windows 32bit platforms but not for target execution. For target execution it is recommended to use the precise timing events as they are defined in MlpiTaskEvent.

Simulation computation power and computation power on the MLPI target can differ a lot. Therefore use the task viewer in IndraWorks to check the computation time of the model on the MLPI target if code generation for a MLPI target is used.

Block Inputs

no input ports

Block Outputs

no output ports

Parameters and Dialog Box

no parameter

Characteristics

Direct Feedthrough

No

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

m4SUtilTimerTic

m4SUtilTimerTic

m4SUtilTimerTic

Utility Block: Measure time difference between two block executions.

Description

This block can be used to measure the absolute time of the block execution and the time elapsed between two iterations of the block in seconds. Port absoluteTime outputs the absolute time since the first execution of the block. Port deltaTime outputs the time difference between the last and the actual execution of the block.

Output port absoluteTime can overrun. When an overrun occurs the value of deltaTime is shorter then the real time difference and therefore invalid for this iteration step.

The block can be used for host exection on Windows 32bit platforms but not for target execution. For target execution it is recommended to use more precise timers of the MLPI target.

Block Inputs

no

Block Outputs

absoluteTime contains the absolute time measured since the first execution of the block in seconds. The output signal is a scalar value of type double. The value can overrun and is reset to 0 in this case.

deltaTime contains the time difference between two executions of the block in seconds. The output signal is a scalar value of type double. If output absoluteTime overruns the value is shorter than real time and therefore invalid.

Parameters and Dialog Box

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

No

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