Parameter set

This chapter describes the ParameterSet interface, which enables updating of a set of signals within one sample.

Properties:

  • A parameter set is a set of (predefined) signal values.

  • It is created from a set of signals using the CreateParameterSet method on the AxisControl interface or via XML configuration as explained in ParameterSet.

  • The signals in the parameter set correspond 1-to-1 to the signals used to create the set.

  • It can be applied using the Apply method on the ParameterSet interface, an ApplyParameterSet command, or a move command.

  • When using a parameter set to update the configuration of a filter, all writable signals of the filter must be added to the parameter set. E.g. when updating BiQuadParameter0 using a parameter set, the signals BiQuadType and BiQuadParameter0 through BiQuadParameter4 must all be added to the parameter set.

Usage

Usage pattern of the ParameterSet interface is as follows:

  1. Parameter set is created by either:

    1. Creating it using the CreateParameterSet method on the AxisControl interface.

    2. Defining it in an XML as described in ParameterSet.

  2. When the parameter set is created using Item 1.a, signal values of the parameter set are configured by either:

    1. Setting all signal values at once using the SetValues method on the ParameterSetBase interface.

    2. Setting each signal value separately via the signal collection.

  3. Parameter set is applied by either:

    1. Queuing an IApplyParameterSet or IMoveCommand with this parameter set configured.

    2. Calling the Apply method on the ParameterSet interface.

  4. Repeat Item 2 and Item 3 as many times as desired.

A parameter set is destroyed by calling Dispose (for C#) or Destroy (for C++).

Parameter set behavior shows the difference between writing a signal (e.g. MaximumVelocity) directly or via a parameterset (called P0 in this example).

Parameter set behavior

Parameter set behavior

Validation

When a parameter set is configured, the signal values are validated in the following way:

  1. When using ValueUint32 or ValueDouble (for C#) or WriteUint32 or WriteDouble (for C++) on the Signal interface:

    The parameter set is validated during the signal write. If the parameter set contains signals whose validity depends on other signals in the parameter set, it is the users responsibility to ensure that each signal write results in a valid parameter set.

  2. When using the SetValues method on the ParameterSetBase interface:

    Supplied floating-point values are converted to the data type of the target signal. For signal data types Uint32, Enum, Mask and Bool the floating-point value must represent an integral value and may not contain a fractional part. The converted signal values are validated.

  3. When using XML (see ParameterSet):

    Supplied values are parsed according to the data type of the target signal. The parsed signal values are validated.

If validation fails, the signal value(s) supplied with the call are not stored in the parameter set and an exception is thrown.

Signal names

The name of a signal in a parameter set is equal to the full name of the target signal excluding the full name of the parent of the parameter set.

E.g. when the MaximumAcceleration signal of TrajectoryGenerator of AxisControl0 is part of a parameter set of AxisControl0 named MyParameterSet, the signal name in the parameter set is “TrajectoryGenerator/MaximumAcceleration”. The full name of that same signal is MyController/Axis- Control0/MyParameterSet/TrajectoryGenerator/MaximumAcceleration, where MyController is the name of the controller.

When using SetValues function or XML to configure the parameter set, target signals must be referenced by their parameter set signal name.

Signal order

The initial signal collection order is equal to the order of the signal collection specified via the CreateParameterSet method on the AxisControl interface.

Lockable Parameter set

Lockable parameter sets require exclusive editing rights for signals added to the parameter set. This exclusive right is shared between all lockable parameter sets that are a child of the same parent (i.e. robot). Upon disposing, the signals are unlocked and can be edited through other mechanisms like a command or API call.

See also

ParameterSet

XML configuration example of the parameter set interface.