SD01189C/07/EN/04.17
Endress+Hauser
29
The following examples in Pseudocode show how a program can access the functionality over Modbus.
// Example program (Pseudocode)
Write ModeChangeRequest “Fieldbus”
IF Write access returns error
Abort procedure with error
DO
Read ModeChangeStatus
WHILE ModeChangeStatus is “Busy”
IF ModeChangeStatus is NOT “WaitingForRequest”
Abort procedure with error
// now fieldbus mode is active
6.1.3 How-to execute actions
6.1.3.1 How-to execute a Measurement
The analyzer has to be in the operation mode “Fieldbus” to start an action. The current operation mode can
be verified by pressing the soft-key labeled “MODE” at the device menu or by reading the Modbus register
MANUAL_CHANGE_STATUS.
// execute a measurement
Write AnalyzerRequest “Measurement”
IF Write access returns error
Exception code == 3
(ILLEGAL_DATA_VALUE)
== 0 (Ready to start action)
Write Multiple Register (FC10)
„Change operation mode to “Fieldbus”
Read Input Register (FC03)
Read Input Register (FC03)