82 lines
2.5 KiB
Markdown
82 lines
2.5 KiB
Markdown
***
|
||
### If the change is on PLC S7 - 3xx - Reset Totallizer
|
||
***
|
||
* Check that on the BlenderCtrl_MFM Command tha command must be using 1 instead of 3 to reset the counters
|
||
|
||
```pascal
|
||
IF #mResetWaterTot THEN
|
||
#mWaterVFMCtrl := 1 ;
|
||
ELSE
|
||
#mWaterVFMCtrl := 0 ;
|
||
END_IF;
|
||
|
||
IF #mResetSyrupTot THEN
|
||
#mSyrupMFMCtrl := 1 ;
|
||
ELSE
|
||
#mSyrupMFMCtrl := 0 ;
|
||
END_IF;
|
||
|
||
IF #mResetCO2Tot THEN
|
||
#mCO2MFMCtrl := 1 ;
|
||
ELSE
|
||
#mCO2MFMCtrl := 0 ;
|
||
END_IF;
|
||
|
||
IF #mResetProductTot THEN
|
||
#mProductMFMCtrl := 1 ;
|
||
ELSE
|
||
#mProductMFMCtrl := 0 ;
|
||
END_IF;
|
||
```
|
||
|
||
### Resetting Totalizers via PROFIBUS PA (Promass F 300)
|
||
|
||
#### 1. PROFIBUS Module Mapping
|
||
|
||
| Slot | GSD Module | Associated Totalizer |
|
||
| ---- | -------------- | -------------------- |
|
||
| 9 | `SETTOT_TOTAL` | Totalizer 1 |
|
||
| 10 | `SETTOT_TOTAL` | Totalizer 2 |
|
||
| 11 | `SETTOT_TOTAL` | Totalizer 3 |
|
||
|
||
Each slot represents a 5‑byte output block sent **from the master to the transmitter**.
|
||
|
||
### Byte Layout (Master → Instrument)
|
||
|
||
| Byte | Field | Purpose | Allowed Values |
|
||
| ---- | ---------- | --------------- | --------------------------------------------------------- |
|
||
| 1 | **SETTOT** | Control command | ==0 = Run (totalise) <br> **1 = Reset** <br> 2 = Preset== |
|
||
| 2 | MODETOT¹ | Counting mode | 0 = Balance <br> 1 = Only + <br> 2 = Only – <br> 3 = Stop |
|
||
| 3‑5 | — | Reserved | — |
|
||
|
||
¹ The short module (default) omits `MODETOT`; only the long variant includes it.
|
||
|
||
### Byte Layout (Instrument → Master)
|
||
|
||
| Byte | Field | Description |
|
||
| ---- | ----- | ---------------------------------------- |
|
||
| 1‑4 | TOTAL | Current totalizer value (IEEE‑754 float) |
|
||
| 5 | STAT | Quality & status bits (0x80 = GOOD) |
|
||
|
||
---
|
||
|
||
## 2. Resetting a **Single** Totalizer
|
||
|
||
1. Identify the slot of the target totalizer (9, 10 or 11).
|
||
2. Write **1** to Byte 1 (`SETTOT`) of that slot.
|
||
3. Wait one bus cycle (≈ 10–100 ms).
|
||
4. Write **0** back to Byte 1 to resume counting.
|
||
5. Read `TOTAL` (bytes 1‑4 in the corresponding input module) and verify it is **0.0**.
|
||
|
||
> **Example – Reset Totalizer 2**
|
||
> Slot 10 / Byte 1 = **1 → 0**
|
||
|
||
|
||
---
|
||
|
||
## 3. Resetting **All** Totalizers
|
||
|
||
* Issue the **1** command simultaneously to Byte 1 of Slots 9, 10 and 11 **or**
|
||
* Activate the configurable discrete input *“Reset all totalizers”* for at least the debounce time (5–200 ms).
|
||
|