Example configuration of measurement slots with MeasurementFunctio-
nAnalogConfig
Fig. 2: Configuration of measurement slots with MeasurementFunctionAnalog-
Config
In the example above, the second measurement slot is configured so that the dif-
ference between two digital triggers should be measured.
Since each slot can only be used as a digital or analog slot, an additional slot is re-
quired to record the trigger.
Both measurement slots are linked with the MonitoredSlot.
Table 13: Example configuration
Description
Value
FunctionNumber
5
ModuleNumber
3
ChannelNumber
1
AnalogType
1
Status
1
MonitoredSlot
1
TimeGrid
0
TimeGrid2
0
Offset
0
Result:
Time difference (start and stop) between the value of module 3 / channel 1 and
slot 1.
Method MeasurementFunctionGetJsonConfig
This method can be used to configure the measurement functions using a JSON-
coded string.
There is no differentiation made between digital and analog slots.
Only the necessary parameters must be available in the JSON object.
All JSON values are integers.
Table 14: JSON entries
JSON Key
function
slot
startModule
startBit
startType
startEdge
stopModule
AVENTICS™ AES OPC-UA | R412028203-BAL-001-AB | English
Definition
Analog value difference be-
tween two results
Must be a module with ana-
log data
(Width: 8 Bit or 16 Bit)
Input / output number of
module
Input
Difference between start and
stop of the monitored slot
Measurement slot providing
the trigger
No meaning in this example
No meaning in this example
Offset to be deducted from
the values
(No meaning in this example)
Corresponding data type in Measurement-
FunctionBitConfig and MeasurementFunctio-
nAnalogConfig
FunctionNumber
SlotNumber
StartModuleNumber
StartBitNumber
StartType
StartEdge
StopModuleNumber
JSON Key
stopBit
stopType
stopEdge
module
channel
type
activState
monitoredSlot
timeGrid
time2
offset
Method MeasurementFunctionGetJsonConfig
The current configuration of the measurement slot can be read out with this
method. This method returns a JSON-coded string.
The format was defined in the methodMeasurementFunctionSetJsonConfig.
The method expects the SlotNumber whose configuration should be read out as
the input parameter. See g Table 14.
Output of configured measurement functions
The results of the measurement functions can be retrieved in the ReturnValues-
object.
Options for accessing the results:
Access to return values of a specific slot
2 values are provided via the FunctionXXOutput objects.
FunctionOutput (result of the measurement slot) and FunctionResultIndex
(counter value).
The counter value is increased by one for each completed measurement. At 256
measurements, the measurement starts with 1 again.
If the counter value is 0, a successful measurement has not yet been performed.
Exception
The index of analog functions monitoring a digital measurement slot. Here, the
counter number is set to the value corresponding to the counter of the measure-
ment slot. This allows these values to be clearly assigned.
Read out of all return values via the variables CollectedFunctionValues
This variable returns a string, which contains the return values of all measure-
ment slots and counters in the hexadecimal format.
An update of the data takes place every 50 ms.
Table 15: Structure of the string
Description
Time stamp (ms since device start, decimal
coded)
Comma
Return value FunctionSlot 1 (hex coded, 8
characters)
Index FunctionsSlot 1 (hex coded, 2 charac-
ters)
Return value FunctionSlot 2 (hex coded, 8
characters)
Index FunctionsSlot 2 (hex coded, 2 charac-
ters)
...
Index FunctionsSlot 30 (hex coded, 8 charac-
ters)
Index FunctionsSlot 30 (hex coded, 2 charac-
ters)
This example results in the following string:
123456,00000BB8E2FFFFF83003...000000055F
4.2.4 Module sequence
The input and output data used by the modules to communicate with the con-
troller consist of a byte string. The lengths of the valve system input and output
data are calculated from the number of modules and the data width of the indi-
vidual module. The data is only counted in bytes. If a module has less than 1 byte
of input or output data, the left-over bits are "stuffed" to the byte boundary us-
ing non-information bits.
Corresponding data type in Measurement-
FunctionBitConfig and MeasurementFunctio-
nAnalogConfig
StopBitNumber
StopType
StopEdge
ModuleNumber
ChannelNumber
AnalogType
Status
MonitoredSlot
TimeGrid
Time2
Offset
Meaning
System has been running for 123 seconds
and 456 ms
-
Result of the measurement of function slot 1
= 3000 (decimal coded)
Measurement index of function slot 1 = 226
(decimal coded)
Result of the measurement of function slot 2
= -2000 (decimal coded)
Measurement index = 3 (decimal coded)
Results of measurement slots 3 ... 29
Result of the measurement of function
slot 30 = 5 (decimal coded)
Index of function slot 30 = 95 (decimal
coded)
15