PamaglaweUser and project guide
Pamaglawe · Objects

Calculate tank volume with a formula

Copy a cylinder formula into the project and use it for value output. A 0.5-metre level gives approximately 392.7 litres.

Help ID OBJ-FORMULA4 original screenshotsExample version 2.61.489

1. Define geometry and units

Use an ideal upright circular cylinder with constant cross-section, inside diameter d=1 metre and level x=0.5 metre. The formula is pi * pow(d / 2, 2) * x * 1000. Area times level gives cubic metres; 1000 converts to litres. Result: 392.699… L. The drawing is not a geometry model: domed or conical bottoms are excluded. Total tank height is not a parameter. A 0.5 m level is 50% only if usable height is 1 m.

2. Select and test the global formula

Open value output properties → Convert PLC value → Manage formulas. In Global collection select Stehender Zylinder – Volumen in Liter. Keep d=1, enter test x=0.5 (0,5 in the screenshot) and Test formula. Expected result is 392.699082. Do not change the global formula or defaults for this exercise.

The global collection contains reusable templates.

3. Copy into the project

Click Copy to project (Ins Projekt übernehmen). The independent project copy can be used by several objects and is saved with the project. Later global-template changes do not update it automatically. The library test value is separate from the output’s preview. Close the library.

The imported formula is an independent project copy.

4. Assign the project formula

Under Calculation choose the copied cylinder formula. Set parameters d=1, unit L, one decimal, DEC and preview x=0.5. Preview should read 392.7 L. The formula receives x directly: disabled linear minimum/maximum fields do not pre-scale it. Convert real percentages, currents or raw sensor values to metres appropriately before using this formula. The unit label does not perform conversion; the factor 1000 does. Parameters may be adjusted per object.

The linear fields are disabled while a project formula is selected.

5. Apply and save

Apply conversion and properties, inspect the tank display and save Ctrl+S. The bar still has its own 50% preview and the input its own 60 value. Proximity creates no shared source or controller. Later live use must align signal scaling, geometry and units.

The former percentage display now shows liters. The bar and setpoint field remain separate objects.

6. Common questions

If missing from Calculation, first copy the global formula into the project. Check metres for both x and d; d is diameter, not radius, and 50% is not 50 m. A horizontal cylinder needs its separate formula. This result is a preview calculation, not a real measurement.

Keyboard shortcuts

Apply or close property dialogs, select objects on the canvas and leave any active text field before using an object shortcut.

Delete — delete selection
Deletes selected simple objects without another confirmation. Check the selection first.
Ctrl+Z / Ctrl+Y — undo / redo
Undoes or restores an available object edit. This is not a recovery mechanism for deleted pages or files.
Ctrl+C / Ctrl+V — copy / paste
Copies the selection and inserts an offset copy. Check names and process assignments afterward.
Ctrl+X — cut
Copies objects to the internal object clipboard and removes them from the page. Paste with Ctrl+V.
Ctrl+A — select all
Selects unlocked objects on the current page.
Arrow keys — move precisely
Moves the selection one pixel in the chosen direction within the page bounds.
Shift+Arrow — next grid position
Moves the selection in the grid direction using the page grid spacing.
Ctrl+L / Ctrl+Shift+L — lock / unlock
Locks the selection; Ctrl+Shift+L unlocks all locked objects on the current page.
Esc — end editor action
Cancels an action such as placement or clears the current selection.
Ctrl+S — save project
Saves applied changes. Save again after deleting, moving or copying.

The fixed global alarm area cannot be deleted or copied. Structural objects with assigned contents can ask an additional question about those contents.

Image viewer
Screenshot preview