Subsection: Parameter
The section Parameter with the subsections SetParameter and AddParameter serves to add or modify parameters of devices. This allows to generate specific settings of devices (example: cycle time).
SEC DeviceGenerator //optional: yes, modifier: [UPDATE]
SEC Parameters : <parameter name> //optional: yes, modifier: [UPDATE]
SEC SetParameter : <parameter name> //optional: yes, modifier: [UPDATE]
ParameterID := <parameterID name>; //optional: no, type: literal/string
ElemPath := <elempath name>; //optional: no, type: literal/string
ConnectorID := <connector ID>; //optional: yes, type: literal/string
Value := <value name>; //optional: no, type: literal/string
ChildIndex := <device ID>;
Download := <boolean value> // opional: yes, type: boolean
END_SEC
SEC AddParameter : <parameter name> //optional: yes, modifier: [UPDATE]
ParameterID := <parameterID name>; //optional: no, type: literal/string
ParameterName := <parameter name>; //optional: no, type: literal/string
ParameterType := <parameter type>; //optional: no, type: literal/string
ChannelType := <channel type>; //optional: yes, type: enum
ConnectorID := <connector ID>; //optional: yes, type: literal/string
ChildIndex := <device ID>;
END_SEC
END_SEC
END_SECThe
Parameterssection has a target, with which theDeviceIDof the target device is defined, whose parameter should be edited. The target device will be searched first in the devices of the module and then in their parent history. Wildcard devices or other devices are also possible. It is assumed that this devices have the corresponding parameter or that the corresponding parameter can be added. If the scan cannot find the target device a warning will be displayed.The targets of the sections
SetParameterandAddParameterdefine the Id of the respective section but have no further use.
SetParameter:ParameterIDdefines theParameterIDof the parameter of the device which will be modified.ElemPathspecifies the exact element of the parameter which will be changed.The parameter
ConnectorIDoptionally defines the connector of the device, whose HostParemeterSet contains the parameter Id. If noConnectorIDis specified, theParameterIDis searched for under the DeviceParameterSet.Valuedefines the value which will be assigned to the element of the specified parameter. This value must be compatible to the element type. The value can be an expression for example[paramID] + 2*MODULE_SLOT_INDEXThere[paramID]defines a target ID of a parameter, so that[paramID]will be replaced by the parameter value. TheMODULE_SLOT_INDEXkeyword is replaced by the slot index that a module instance of the defined module type would have after insertion.If the parameter cannot be found in the target device, the generator check will create warnings.
ChildIndexdefines the subordinate device, under which the parameter is added or set. If this subordinate device with the specific index does not exist, then a warning is generated during the generation.Download: Optional entry. If this entry has the valueFALSE, then the parameter will not be downloaded to the device. This makes sense to use, for example, to disableCheckVendorIdfor CAN devices, for example.
AddParameter:ParameterIDdefines the new ID of the parameter to be added. This must be unique among the other ParameterIDs of the target device.The parameter
ConnectorIDoptionally defines the connector of the device, whose HostParemeterSet contains the parameter Id to be added. If no connector ID is defined the Parameter ID will be added in DeviceParameterSet.ParameterNamedefines the name of the parameter added to the target device.ParameterTypedefines the type of the parameter added to the target device. This type is named according to IEC type notation with type prefix. Therefore example:std:boolwill create a boolean parameter.If the parameter cannot be added, the generator check will create warnings.
ChannelTypedefines the type of the channel. Possible values areNONE,INPUT,OUTPUT, andOUTPUTREADONLY.ChildIndexdefines the subordinate device, under which the parameter is added or set. If this subordinate device with the specific index does not exist, then a warning is generated during the generation.
Both sections AddParameter and SetParameter can be used together to add a parameter to a device and to assign a value to it at the same time.
SEC Parameters : Buskoppler1
SEC AddParameter : ExpertSettings
ParameterID := '805306368';
ConnectorID := '1';
ParameterName := 'ExpertSettings';
ParameterType := 'std:int';
ChannelType := OUTPUT;
END_SEC
SEC SetParameter : ExpertSettings
ParameterID := '805306368';
ElemPath := '';
ConnectorID := '1';
Value := dwParameterOffset + 2 * MODULE_SLOT_INDEX;
END_SEC
END_SEC