Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4MATLAB)  1.26.2
ParameterLib
Collaboration diagram for ParameterLib:
Parameter Functions

Parameter Functions

Description

This function group contains functions to read and write parameters.

Sercos automation bus specifies S- and P-parameters that basically include all information to operate a sercos device. S-parameters are parameters that are sercos specific parameters while P-parameters are those which are product specific, which means vendos specific, but their structure is sercos conform.

While S- and P-parameters are very drive centric, IndraMotion XLC/MLC provides A-, C-, K-, M-, N- and O-parameters which are related to axis, control, kinematics, touch-probe, CAM switches and oscilloscop functions and properties. More information about parameters can be found in the IndraWorks help. Several S- and P-parameters are mapped to these parameters.

A parameter is basically a quantity that serves to relate functions and variables. Every parameter consists of up to seven elements.

Parameter structure

Element  Description          Requirement
No.
-------------------------------------------------------------
1        IDN                  global unique identifier,
                              mandatory
2        Name                 name of parameter, optional
3        Attribute            properties of parameter
                              (attribute), changeable,
                              mandatory
4        Unit                 unit of parameter, changeable,
                              optional
5        Minimum input value  minimum value of operation data,
                              changeable, optional
6        Maximum input value  maximum value of operation data,
                              changeable, optional
7        Operation data       operation data, changeable,
                              mandatory

In a parameter, elements 1, 3 and 7 are mandatory and shall always be present. Elements 2, 4, 5, and 6 are optional and may be supported depending on configuration. Elements 5 and 6 are mandatory for cycle time parameters only. All parameters are assigned to IDNs.

Parameter element IDN

Bit No.  Short description   Description
-------------------------------------------------------------
40-63    Reserved                –
32-39    EIDN types              Extend standard or product
                                 specific IDN
                                 (e.g. C-x-xxxx, A-x-xxxx,...)
31-24    Structure instance (SI) Number of structure instance
                                 (SI)
23-16    Structure element (SE)  0-127: Standard SE
                                 128-255: Product-specific SE
15       Standard or Product     0: Standard IDN (S-x-xxxx)
         specific IDN (S or P)   1: Product-specific IDN
                                    (P-x-xxxx)
14-12    Parameter sets          sercos specifies IDNs with
                                 parameter set 0 only.
0-11     Data block or           Data block number (if SI = SE = 0)
         Function group          Function group (if SI or SE is not 0)

Parameter Attribute

Bit   Short description      Description
No.
-------------------------------------------------------------
31    –  Reserved
30    Write protected in CP4 0: Operation data is writable
                             1: Operation data is write
                                protected
29    Write protected in CP3 0: Operation data is writable
                             1: Operation data is write
                                protected
28    Write protected in CP2 0: Operation data is writable
                             1: Operation data is write
                                protected
24-27 Decimal point          0000..1111: No place to 15
                             places after decimal point
                             (maximum)
23    –                      Reserved
20-22 Data type and          000: Data type: Binary number;
      display format         Display format: Binary
                             001: Data type: Unsigned integer;
                             Display format: Unsigned decimal
                             010: Data type: Integer; Display
                             format: Signed decimal
                             011: Data type: Unsigned integer;
                             Display format: Hexadecimal
                             100: Data type: Extended character
                             set; Display format: UTF8
                             101: Data type: Unsigned integer;
                             Display format: IDN
                             110: Data type: Floating-point
                             number; Display format: Signed
                             decimal with exponent
                             111: Data type: sercos time;
                             Display format: 4 octets seconds
                             and 4 octets nano seconds, starts
                             with 1.1.1970 computed in UTC
19    Command                0: Parameter is not a procedure
                             command
                             1: Parameter is a procedure
                             command
16-18 Data length            000: Reserved
                             001: Operation data is two octets
                             long
                             010: Operation data is four octets
                             long
                             011: Operation data is eight octets
                             long
                             100: Variable length with one-octet
                             data strings
                             101: Variable length with two-octet
                             data strings
                             110: Variable length with four-octet
                             data strings
                             111: Variable length with eight-octet
                             data strings
0-15 Conversion factor       The conversion factor is an unsigned
                             integer used to convert numeric data
                             to display format. The conversion
                             factor shall be set to a value of 1
                             when it is not needed for data
                             display.

CP2, CP3, CP4 mean sercos communication phase. CP2 is the communication mode in which most of the parameter setting can be done as the sercos bus is in non-cyclic mode. CP4 is the cyclic communication mode in which most of the parameter modification is no longer possible. Sercos communication phases can be changed by use of the function m4MSystemSetTargetMode.

More Information

For further information, refer to the mlpiCore documentation: ParameterLib

Copyright

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

m4MParameterCommand

m4MParameterCommand

m4MParameterCommand

Parameter-Function: Set command trough a parameter.

Description

This function sets a command through a parameter. The command will be executed and the function will return when the command was either executed successfully or with an error. The function is blocking while executing the command.

Syntax

m4MParameterCommand(connection, adrMode, masterAddress, ...
slaveAddress, paramString)
result = m4MParameterCommand(connection, adrMode, masterAddress,...
slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-1010.0.0': Full IDN string.
  • 'C-0-1010': Reduced IDN notation without structure element and structure instance.
  • 'C-1010': Short IDN notation with parameter class and parameter number.

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterCommand

Copyright

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

m4MParameterGetDataTypeFromAttribute

m4MParameterGetDataTypeFromAttribute

m4MParameterGetDataTypeFromAttribute

Parameter-Function: Get MLPI data type from MATLAB variable.

Description

This function determines the class of a MATLAB variable and returns the corresponding MlpiType enumeration. Only the following MATLAB data types are supported: int8, int16, int32, uint8, uint16, uint32, single, double and char.

Syntax

[mlpiType] = m4MParameterGetDataTypeFromAttribute(matlabVariable)

Input Arguments

matlabVariable defines the MATLAB variable. The argument can be scalar, 2-dimensional or 3-dimensional. The data type can be int8, int16, int32, uint8, uint16, uint32, single, double or char.

Output Arguments

mlpiType contains the MLPI data type as scalar MlpiType enumeration.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

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

m4MParameterGetDataType

m4MParameterGetDataType

m4MParameterGetDataType

Parameter-Function: Get parameter data type from attribute.

Description

This function extracts the data type which is coded in the parameter attribute and converts it to a MlpiType enumeration.

This function does not return the argument 'result' as it is an offline command.

Syntax

[paramType] = m4MParameterGetDataType(attribute)

Input Arguments

attribute defines the parameter attribute. The argument can be scalar or a Mx1 matrix. The data type must be uint32.

Output Arguments

paramType contains the parameter data type as MlpiType enumeration. The argument is scalar or a Mx1 matrix according to the input argument attribute.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiParameterReadAttribute

Copyright

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

m4MParameterReadAttribute

m4MParameterReadAttribute

m4MParameterReadAttribute

Parameter-Function: Read the attribute of a parameter.

Description

This function reads the attribute of a parameter (Parameter structure, sercos element 3).

Syntax

[attribute]         = m4MParameterReadAttribute(connection, adrMode,...
masterAddress, slaveAddress, paramString)

[attribute, result] = m4MParameterReadAttribute(connection, adrMode,...
masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a MlpiAddressMode32 enumeration and has to be scalar.

masterAddress defines the address of the sercos master. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

slaveAddress defines the address of the sercos slave. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

attribute contains the attribute of the parameter. The argument is a scalar uint32 value.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiParameterReadAttribute

Copyright

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

m4MParameterReadData

m4MParameterReadData

m4MParameterReadData

Parameter-Function. Reads the value of a parameter.

Description

This function reads the current value or values of the defined parameter. The return value has the data type of the parameter. If the parameter is a list parameter (array of values), an optional number of elements to be read has to be specified.

Note: List parameters can contain several elements. The input argument numElements can be used to specify the number of elements to be read. If numElements is lower than the number of elements contained in the list parameter the function call will fail. If numElements is larger than the number of elements contained in the list parameter the function pads zeros to the valid list elements. So it is necessary to read the correct number of elements contained in the list parameter. As some list parameters might have a dynamic number of elements it is necessary to read the actual number of elements. To get this number of elements the function can be called with the maximum number of readable elements for a list parameter specified in the constant M4M_CONST.MEX_PARAMETER_LIST_LENGTH_MAX. In this case the output argument value contains valid values and padded zeros. The output argument numElemRet contains the number of valid values in the output argument value. An easy way to read the exact number of list elements is to call the function first while neglecting the output argument value. Normally, the function call will succeed and returns the correct number of elements in the output argument numElemRet. Calling the function again setting numElements = numElemRet will return exactly the valid list elements in value.

If the parameter is of IEC type STRING the output argument numElemRet is equal to the number of characters in that string without zero termination. When reading the string the optional input argument numElements will disregarded. The maximum string length is 511 characters.

This function does not support code generation.

Syntax

[value, numElemRet]         = m4MParameterReadData(connection, adrMode,...
masterAddress, slaveAddress,paramString, varargin)
[value, numElemRet, result] = m4MParameterReadData(connection, adrMode,...
masterAddress, slaveAddress,paramString, varargin)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

varargin is optional and defines the number of values that will be read if the parameter is list parameter. The argument must be a positive numeric value. Internally it will be casted to type uint32.

Output Arguments

value contains the value of the parameter. The argument has the type of the called parameter. If the parameter value is scalar value is scalar. If the parameter is a list parameter value will be a Nx1 matrix. If varargin is greater than the number of available list elements of the parameter N will be equal to numElements but only the first numElemRet will be valid.

numElemRet contains the number of elements of a list parameter. The argument is scalar and of type uint32. numElemRet is 1 if the parameter value is scalar. numElemRet is equal to the number of elements if the parameter is a list parameter. If numElements is larger than numElemRet the first numElemRet in value are valid and the others are 0.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadData

Copyright

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

m4MParameterReadDefaultString

m4MParameterReadDefaultString

m4MParameterReadDefaultString

Parameter-Function. Reads the default value of a parameter as string.

Description

This function reads the default value of the defined parameter as character array. The parameter must be a scalar parameter.

Syntax

[valueString, numElemRet]         = m4MParameterReadDefaultString(...
connection, adrMode, masterAddress, slaveAddress, paramString)
[valueString, numElemRet, result] = m4MParameterReadDefaultString(...
connection, adrMode, masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

valueString contains the default value of the parameter as character array. The argument is a 1xL char array. If the length L of the char array exceeds M4M_CONST.MEX_PARAMETER_STRING_LENGTH_MAX the function will fail. In these cases it is recommended to read the value indivially with the function m4MParameterReadDefault and convert it to strings manually.

numElemRet contains the number of elements L of the output argument valueString. The argument is scalar and of type uint32.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadDefault

Copyright

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

m4MParameterReadDefaultValue

m4MParameterReadDefaultValue

m4MParameterReadDefaultValue

Parameter-Function. Reads the default value of a parameter to a predefined variable.

Description

This function reads the default value of the defined parameter. The values will be read to a predefined variable. The parameter must be a scalar parameter.

Important note: Even if the output argument value is not used a positive function call will change the input argument value.

Syntax

[value]         = m4MParameterReadDefaultValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)
[value, result] = m4MParameterReadDefaultValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

value predefines the size and the data type of the output argument. The argument must be scalar. The data type can be uint8, int8, uint16, int16, uint32, int32, single or double. Note that the parameter data type and the MATLAB data type should match. E.g. use uint32 for parameter data type ULONG. MATLAB can cast data types which do not match, e.g. cast(uint32(123456),'int8'), but this will cause inconsistencies if this function is used for code generation or the function call will fail. Therefore it is highly recommended that the user predefines matching data types. The function does not check proper data type definitions.

Use the function m4MParameterGetDataType to determine the data type of a parameter.

Output Arguments

value contains the default value of the parameter. The argument has the data type and size as specified by the input argument value.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadDefault

Copyright

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

m4MParameterReadDefault

m4MParameterReadDefault

m4MParameterReadDefault

Parameter-Function: Read default value(s) of a parameter.

Description

This function reads the default (factory setting) parameter data value or values of the indicated parameter. The return value has the data type of the parameter data.

Syntax

[value]         = m4MParameterReadDefault(connection, adrMode,...
masterAddress, slaveAddress, paramString)

[value, result] = m4MParameterReadDefault(connection, adrMode,...
masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a MlpiAddressMode32 enumeration and has to be scalar.

masterAddress defines the address of the sercos master. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

slaveAddress defines the address of the sercos slave. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

value is the default data of the parameter. The type of the argument is the data type of the parameter. The argument is scalar or a Mx1 matrix if the parameter is a list parameter. If the list parameter is a string data type the argument is a Mx1 cell array.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiParameterReadDefault

Copyright

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

m4MParameterReadMaximumString

m4MParameterReadMaximumString

m4MParameterReadMaximumString

Parameter-Function. Reads the maximum value of a parameter as string.

Description

This function reads the maximum value of the defined parameter as character array. The parameter must be a scalar parameter.

Syntax

[valueString, numElemRet]         = m4MParameterReadMaximumString(...
connection, adrMode, masterAddress, slaveAddress, paramString)
[valueString, numElemRet, result] = m4MParameterReadMaximumString(...
connection, adrMode, masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

valueString contains the maximum value of the parameter as character array. The argument is a 1xL char array. If the length L of the char array exceeds M4M_CONST.MEX_PARAMETER_STRING_LENGTH_MAX the function will fail. In these cases it is recommended to read the value indivially with the function m4MParameterReadMaximum and convert it to strings manually.

numElemRet contains the number of elements L of the output argument valueString. The argument is scalar and of type uint32.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadMaximum

Copyright

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

m4MParameterReadMaximumValue

m4MParameterReadMaximumValue

m4MParameterReadMaximumValue

Parameter-Function. Reads the maximum value of a parameter to a predefined variable.

Description

This function reads the maximum value of the defined parameter. The values will be read to a predefined variable. The parameter must be a scalar parameter.

Important note: Even if the output argument value is not used a positive function call will change the input argument value.

Syntax

[value]         = m4MParameterReadMaximumValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)
[value, result] = m4MParameterReadMaximumValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

value predefines the size and the data type of the output argument. The argument must be scalar. The data type can be uint8, int8, uint16, int16, uint32, int32, single or double. Note that the parameter data type and the MATLAB data type should match. E.g. use uint32 for parameter data type ULONG. MATLAB can cast data types which do not match, e.g. cast(uint32(123456),'int8'), but this will cause inconsistencies if this function is used for code generation or the function call will fail. Therefore it is highly recommended that the user predefines matching data types. The function does not check proper data type definitions.

Use the function m4MParameterGetDataType to determine the data type of a parameter.

Output Arguments

value contains the maximum value of the parameter. The argument has the data type and size as specified by the input argument value.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadMaximum

Copyright

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

m4MParameterReadMaximum

m4MParameterReadMaximum

m4MParameterReadMaximum

Parameter-Function: Read maximum value of a parameter.

Description

This function reads the maximum value of a parameter. The maximum is part of a parameter (see parameter structure, sercos element 5).

Syntax

[value]         = m4MParameterReadMaximum(connection, adrMode,...
masterAddress, slaveAddress, paramString)
[value, result] = m4MParameterReadMaximum(connection, adrMode,...
masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the address of the sercos master. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

slaveAddress defines the address of the sercos slave. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

value is the maximum data value of the parameter. The type of the argument is the data type of the parameter. The argument is scalar or a Mx1 matrix if the parameter is a list parameter.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiParameterReadMaximum

Copyright

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

m4MParameterReadMinimumString

m4MParameterReadMinimumString

m4MParameterReadMinimumString

Parameter-Function. Reads the minimum value of a parameter as string.

Description

This function reads the minimum value of the defined parameter as character array. The parameter must be a scalar parameter.

Syntax

[valueString, numElemRet]         = m4MParameterReadMinimumString(...
connection, adrMode, masterAddress, slaveAddress, paramString)
[valueString, numElemRet, result] = m4MParameterReadMinimumString(...
connection, adrMode, masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

valueString contains the minimum value of the parameter as character array. The argument is a 1xL char array. If the length L of the char array exceeds M4M_CONST.MEX_PARAMETER_STRING_LENGTH_MAX the function will fail. In these cases it is recommended to read the value indivially with the function m4MParameterReadMinimum and convert it to strings manually.

numElemRet contains the number of elements L of the output argument valueString. The argument is scalar and of type uint32.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadMinimum

Copyright

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

m4MParameterReadMinimumValue

m4MParameterReadMinimumValue

m4MParameterReadMinimumValue

Parameter-Function. Reads the minimum value of a parameter to a predefined variable.

Description

This function reads the minimum value of the defined parameter. The values will be read to a predefined variable. The parameter must be a scalar parameter.

Important note: Even if the output argument value is not used a positive function call will change the input argument value.

Syntax

[value]         = m4MParameterReadMinimumValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)
[value, result] = m4MParameterReadMinimumValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

value predefines the size and the data type of the output argument. The argument must be scalar. The data type can be uint8, int8, uint16, int16, uint32, int32, single or double. Note that the parameter data type and the MATLAB data type should match. E.g. use uint32 for parameter data type ULONG. MATLAB can cast data types which do not match, e.g. cast(uint32(123456),'int8'), but this will cause inconsistencies if this function is used for code generation or the function call will fail. Therefore it is highly recommended that the user predefines matching data types. The function does not check proper data type definitions.

Use the function m4MParameterGetDataType to determine the data type of a parameter.

Output Arguments

value contains the minimum value of the parameter. The argument has the data type and size as specified by the input argument value.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadMinimum

Copyright

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

m4MParameterReadMinimum

m4MParameterReadMinimum

m4MParameterReadMinimum

Parameter-Function: Read minimum value of a parameter.

Description

This function reads the minimum value of a parameter. The minimum is part of a parameter (see parameter structure, sercos element 5).

Syntax

[value]         = m4MParameterReadMinimum(connection, adrMode,...
masterAddress, slaveAddress, paramString)
[value, result] = m4MParameterReadMinimum(connection, adrMode,...
masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the address of the sercos master. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

slaveAddress defines the address of the sercos slave. The argument must be numeric and scalar. Internally the numeric value will be casted to uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

value is the minimum data value of the parameter. The type of the argument is the data type of the parameter. The argument is scalar or a Mx1 matrix if the parameter is a list parameter.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore function: mlpiParameterReadMinimum

Copyright

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

m4MParameterReadValueString

m4MParameterReadValueString

m4MParameterReadValueString

Parameter-Function. Reads the current value of a parameter as string.

Description

This function reads the current value or values of the defined parameter as character array. The parameter can be a scalar parameter or a list parameter.

Syntax

[valueString, numElemRet]         = m4MParameterReadValueString(connection, adrMode,...
masterAddress, slaveAddress, paramString)
[valueString, numElemRet, result] = m4MParameterReadValueString(connection, adrMode,...
masterAddress, slaveAddress, paramString)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

Output Arguments

valueString contains the current value of the parameter or values of a list parameter as character array. The argument is a 1xL char array. If the parameter is a list parameter the individual value strings will be concatenated and separated with a white space. If the length L of the char array exceeds M4M_CONST.MEX_PARAMETER_STRING_LENGTH_MAX the function will fail. In these cases it is recommended to read the list values indivially with the function m4MParameterReadValue and convert them to strings manually.

numElemRet contains the number of elements L of the output argument valueString. The argument is scalar and of type uint32.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadData

Copyright

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

m4MParameterReadValue

m4MParameterReadValue

m4MParameterReadValue

Parameter-Function. Reads the value of a parameter to a predefined variable.

Description

This function reads the current value or values of the defined parameter. The values will be read to a predefined variable. The parameter can be a scalar parameter or a list parameter.

Important note: Even if the output argument value is not used a positive function call will change the input argument value.

Note: List parameters can contain several elements. List parameters can have a fix number of elements or a variable number of elements.

The input argument value can be used to specify the number of elements to be read. If the number of elements in value is lower than the number of elements contained in the list parameter the function call will fail. value will not be changed in that case.

If the number of elements in value is larger than the number of elements contained in the list parameter the function does not change the additional elements. So it is necessary to know the correct number of elements contained in the list parameter. As some list parameters might have a dynamic number of elements it is necessary to read the actual number of elements. To get this number of elements the function returns the number of valid elements in value by the second output argument numElemRet.

The maximum length of a list parameter is specified in the constant M4M_CONST.MEX_PARAMETER_LIST_LENGTH_MAX. In order to get the number of valid elements in a list parameter, the input argument value can be specified with this maximum of elements and the valid number of elements is contained in the output argument numElemRet.

Syntax

[value, numElemRet]         = m4MParameterReadValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)
[value, numElemRet, result] = m4MParameterReadValue(connection, adrMode,...
masterAddress, slaveAddress, paramString, value)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

value predefines the size and the data type of the output argument. The argument can be scalar or a Mx1 matrix. The data type can be uint8, int8, uint16, int16, uint32, int32, single or double. Note that the parameter data type and the MATLAB data type should match. E.g. use uint32 for parameter data type ULONG. MATLAB can cast data types which do not match, e.g. cast(uint32(123456),'int8'), but this will cause inconsistencies if this function is used for code generation or the function call will fail. Therefore it is highly recommended that the user predefines matching data types. The function does not check proper data type definitions.

Use the function m4MParameterGetDataType to determine the data type of a parameter.

If a list parameter shall be read the number of elements M must be equal or larger than the number of elements in the list parameter. The function will fail if M is smaller than the number of elements in the list parameter. value must be scalar if the parameter is scalar.

Output Arguments

value contains the value of the parameter or values of a list parameter. The argument has the data type and size as specified by the input argument value. If the parameter value is scalar value must be scalar. If the parameter is a list parameter value will be a Mx1 matrix. Only element 1 .. numElemRet are valid values of a list parameter.

numElemRet contains the number of elements of a list parameter. The argument is scalar and of type uint32. numElemRet is 1 if the parameter value is scalar. numElemRet is equal to the number of elements in a list parameter.

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, the values should be handled as invalid. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterReadData

Copyright

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

m4MParameterWriteData

m4MParameterWriteData

m4MParameterWriteData

Parameter-Function: Writes the value of a parameter.

Description

This function writes a specified data value to a parameter. The internal system determines from the data type of the input value which type has to be written. This implies that the value must be explicitly typed within MATLAB.

Syntax

m4MParameterWriteData(connection, adrMode, masterAddress,...
slaveAddress, paramString, value)
result = m4MParameterWriteData(connection, adrMode, masterAddress,...
slaveAddress, paramString, value)

Input Arguments

connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.

adrMode defines the mode the parameter is addressed. The argument must be a scalar MlpiAddressMode32 enumeration.

masterAddress defines the master address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

slaveAddress defines the slave address. The argument must be a positive scalar numeric value. Internally the numeric value will be casted to type uint64.

paramString defines the sercos parameter IDN. The argument must be a 1xL char array. To simplify programming the parameter string can be provided in the following formats:

  • 'C-0-0209.0.0': Full IDN string.
  • 'C-0-0206': Reduced IDN notation without structure element and structure instance.
  • 'M-206': Short IDN notation with parameter class and parameter number.

value defines the new value for the parameter. The argument must be scalar for scalar parameters and Mx1 or 1xM for list parameters. The type of value must match the parameter type. Therefore the type of value must be defines explicitly. E.g. value = int32(10).

Output Arguments

result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Reference to mlpiCore

This function maps to the mlpiCore functions: mlpiParameterWriteData

Copyright

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