Modify number formatting
- Last UpdatedApr 24, 2025
- 1 minute read
You can modify the number formatting used in a specific alarm and event message by creating a new culture for the owning application, editing the desired message, and then creating a culture-specific satellite assembly.
For example, libappResources\krunchStrings.resx contains the alarm and event message for KRN_SETPOINT_TIMEOUT. The baseline record is as follows:
|
Name |
Value |
Comment |
|---|---|---|
|
KRN_SETPOINT_TIMEOUT |
Setpoint command to {0:G} {1} timed out - current value = {2:G} {3} |
code=12; args=double, char *, double, char * |
Assume that an analog point has the engineering units used by {1} and {3} configured as PERCENT. If a setpoint issued with a value of 87.654321 times out because the value is 55, the system generates the following alarm and event message:
Setpoint command to 87.654321 PERCENT timed out – current value = 55 PERCENT
Changing the value to Setpoint command to {0:G5} {1} timed out - current value = {2:G2} {3} generates the following alarm and event message:
Setpoint command to 87.654 PERCENT timed out – current value = 55 PERCENT
Changing the value to Setpoint command to {0:N5} {1} timed out - current value = {2:N2} {3} generates the following alarm and event message:
Setpoint command to 87.65432 PERCENT timed out – current value = 55.00 PERCENT
For further information on how to configure the number formatting, refer to Microsoft online documentation for standard numeric format strings.