| Volume pwrb | |
| Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class PiSpeed
|
||
|---|---|---|
| Version | 1.0 | |
| Modified | 08-MAR-2026 11:05:32.00 | |
| Code | rt_plc_arithm.c | |
Derivative a pulse Pi-signal.

Converts a pulse signal, e.g. volume to flow, distance to velocity, etc. The pulse difference becomes correct even if the input signal gets overflow.Example
If Gain is in m³/pulse the division gives m³/seconds. By TimFact = 3600 seconds/h the result will be in m³/h.
| RtBody attributes pwr_sClass_pispeed | |||
|---|---|---|---|
| Int32 | PulsIn | IN | Number of pulses. The input is connected to a GetPi or Count object. |
| Float32 | ActVal | VAL | Rate of change. ( Change per unit of time ). ActVal(t) = Gain * TimFact * ( PulseIn(t) - PulseIn(t-1)) / ScanTime where TimFact is the derivative time |
| Float32 | Gain | Gain | Conversion factor. Engineering value / pulse. |
| Float32 | TimFact | TimFact | |
| Pointer to Float32 | ScanTime | ScanTime | The program cycle period (= sampling interval) in seconds is stored automatically at the compilation. |
| DevBody attributes | |||
|---|---|---|---|
| PlcNode | PlcNode | ||
| GraphPlcNode | |
|---|---|
| object_type | 135 |
| parameters[0] | 1 |
| parameters[1] | 0 |
| parameters[2] | 1 |
| parameters[3] | 0 |
| subwindows | 0 |
| graphmethod | 0 (standard, individual attributes) |
| graphindex | 0 |
| default_mask[0] | 1 |
| default_mask[1] | 1 |
| segname_annotation | 1 |
| compmethod | 35 |
| compindex | 0 |
| tracemethod | 0 |
| traceindex | 0 |
| executeordermethod | 2 |
| objname | PiSpeed |
| graphname | PiSpeed |
| debugpar | |
| Template Object | |
|---|---|
| TimFact | 1.0 |
| PulsIn Input | ||
|---|---|---|
| Class | Input | |
| Type | Int32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | IN | |
| Body | RtBody | |
Number of pulses. The input is connected to a GetPi or Count object.
| ActVal Output | ||
|---|---|---|
| Class | Output | |
| Type | Float32 | |
| Flags | STATE | NOEDIT | REDUTRANSFER | |
| GraphName | VAL | |
| Body | RtBody | |
Rate of change. ( Change per unit of time ). ActVal(t) = Gain * TimFact * ( PulseIn(t) - PulseIn(t-1)) / ScanTime where TimFact is the derivative time
| Gain Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Gain | |
| Body | RtBody | |
Conversion factor. Engineering value / pulse.
| TimFact Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | TimFact | |
| Body | RtBody | |
| ScanTime Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Pointer to Float32 | |
| Flags | INVISIBLE | POINTER | PRIVATE | |
| GraphName | ScanTime | |
| Body | RtBody | |
The program cycle period (= sampling interval) in seconds is stored automatically at the compilation.
| PlcNode Buffer | ||
|---|---|---|
| Class | Buffer | |
| Type | PlcNode | |
| Flags | INVISIBLE | |
| Body | DevBody | |