Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
ParameterLib
Collaboration diagram for ParameterLib:

Modules

 Name, Attribute, Unit
 
 Minimum, Maximum
 
 Data, Default
 
 Command, Status
 
 Auxiliary function
 
 Version and Permission
 
 Structs, Types, ...
 

Detailed Description

This library contains functions which can be used to read and write parameters of control or sercos objects.

A parameter is a quantity that serves to relate functions and variables.

Note
During the execution of a command for loading basic parameters (e.g. via parameter C-0-1000), all regarding parameter values will be set to their initial values. Considering that IndraWorks use some parameters for global identification etc., you have to save and restore some parameter values therewith you are able to reconnect with Indraworks without another project download.
Control parameter (C) Save and restore parameter...
C-0-1000 C-0-0030, Control name
C-0-0033, Project identification number
C-0-0203, Engineering, user name
Axis parameter (A) Save and restore parameter...
A-0-1000 A-0-0002, Axis name
A-0-0016, Project identification number
A-0-0008, Link axis, master axis selection
A-0-0630, Controller axis, controller name
Kinematic parameter (K) Save and restore parameter...
K-0-1000 K-0-0002, Kinematic name
K-0-0008, Axis configuration list
K-0-0016, Project identification number
K-0-0031, Transformation scheme
K-0-0121 to K-0-0136, Coordinate names
Touch probe parameter (M) Save and restore parameter...
M-0-1000 non
PLS parameter (N) Save and restore parameter...
N-0-1000 non
Oscilloscope parameter (O) Save and restore parameter...
O-0-1000 non

Every parameter consists of up to seven elements. 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.

Note
The defines and functions within 'util/mlpiParameterHelper.h' supports you on parrameter access.


Parameter structure

Element No. Description Requirement
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


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 specific IDN (S or P) 0: Standard IDN (S-x-xxxx)
1: Product-specific IDN (P-x-xxxx)
14-12 Parameter sets sercos specifies IDNs with parameter set 0 only.
0-11 Data block or Function group Data block number (if SI = SE = 0)
Function group (if SI or SE is not 0)


Parameter element 'Attribute'

Bit No. Short description Description
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 display format 000: Data type: Binary number; 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.
Note
The ParameterLib functions trace their debug information mainly into the module MLPI_PARAMETER_LIB and in addition into the modules APS_EXP_PARSING, APS_EXP_PROCESSING, APS_PARAM_HANDLER and MLPI_BASE_MODULES. For further information, see also the detailed description of the library TraceLib and the notes about Using the Trace for debugging.


Sample
This sample provides a step by step instruction on how to proceed if there is only the parameter number (e.g. "A-0-0100.0.0") given and the data of it is required.
First of all the data type of the parameter needs to be identified. Therefor you can look into the documentation of the parametersystem, e.g. the IndraWorks help. For the parameter A-0-0100.0.0 it is FLOAT. If you have no access to this kind of information, you can use utilParameterGetDataTypeFromAttribute from the UtilParameterHelper to determine the datatype. In this case you can continue like it is done in the example of the function. For further knowledgement you should check the sample 'Using the Parameterlib'. Another possibility it to use the universal function mlpiParameterReadDataString, which does not require a data type, but therefore gives the data in a WCHAR16 string.
After that the proper function for the data type needs to be picked. In this case it is mlpiParameterReadDataFloat.
The function needs the MLPIHANDLE as first argument. As second argument you can use the MLPI_ADDRESS_x macro to create the 64-bit address identifier. The macro is used like MLPI_ADDRESS(MLPI_ADDRESS_MODE_LOGICAL, masterAddress, slaveAddress) in this case. For the third argument one of the macros from MLPI_SIDN_x can be used to determine the SIDN of the parameter. In this case it is MLPI_SIDN_A(100).
At the end the function call should look like this:

FLOAT data = 0.0;
ULLONG masterAddress = 0;
ULLONG slaveAddress = 1;
MLPIRESULT result = mlpiParameterReadDataFloat(connection, MLPI_ADDRESS(MLPI_ADDRESS_MODE_LOGICAL, masterAddress, slaveAddress), MLPI_SIDN_A(100), &data);