Is there a list of BFormat examples?

It is useful to have a list of BFormat cases. Here it is.

Note: BFormat is case sensitive!

BFormat

Description

%.%

Value + Status of the Out slot

%out.value%

Value of the Out slot

%out.status%

Status of the Out slot

%Hours%

Get the total elapsed time in hours

%Minutes%

Get the total elapsed time in minutes

%displayName%

Display Name of the component

%displayName.substring(0,3)%

Display Name of the component showing only the part from the first to the third character

%displayName.substring(-2)%

Display Name of the component showing only the end part from the second-last character

%name%

Name of the component

%parent.displayName%

Display Name of the parent component

(1 level up)

%parent.name%

Name of the parent component

(1 level up)

%parent.parent.name%

Name of the parent of the parent component

(2 levels up)

%parent.proxyExt.device.name%

Name of the device in which a proxy point resides

(no matter how many levels above the point)

%parent.proxyExt.network.name%

Name of the network in which a proxy point resides

(no matter how many levels above the point)

%proxyExt.topic%

On an MQTT point, returns the "topic" text

%user()%

Returns the username of the user logged in

(use "ord" "station:|slot:/")

%time()%

Returns the current time

(use "ord" "station:|slot:/")

%alarmData.sourceName%

(to use on Alarm Extension Text)

Returns the "Source Name" within the Fault, Offnormal or Normal text of an alarm 

%alarmData.highLimit%

(to use on Alarm Extension Text)

Returns the "High Limit" within the Fault, Offnormal or Normal text of an alarm 

%alarmData.lowLimit%

(to use on Alarm Extension Text)

Returns the "Low Limit" within the Fault, Offnormal or Normal text of an alarm 

%out.prevDay%

Using the "CurrentTime" block available from the kitControl palette, these bFormat examples will take the full date and time of the previous day, month or year according to the current time

%out.prevMonth%

%out.prevYear%

%out.Hour%

 

Using the "CurrentTime" block available from the kitControl palette, these bFormat examples will take the individual Hour, Minute, Day, Month or Year data of the current time

 

%out.Minute%

%out.Day%

%out.Month%

%out.Year%

 

 

Practical examples

 

The %out.value% BFormat gets the "value" of the "out" slot of a component, but you can use this format for any other slot/property.

Example:

You could check the "value" of slot "in10" for example on a Boolean Writable component using %in10.value%.

 

Always check the correct name of the slot using the Slot Sheet view, on the column "Name":

 

Static text can be used together with BFormat strings. All the static text is placed outside % signs.

Example:

Value = %out.value% is my value

Assuming the "out" slot value of the component is 22.3 °C, the returned text is going to be:

Value = 22.3 °C is my value

 

Multiple BFormat can be used in the same text

Example 1:

%parent.name% - %name% -  %out.value%

Will show the slot name of the component 1 level up, followed by the fixed text " - ", the name of the component, followed again by the fixed text " - " and then the value of the "out" slot.

Like Points - WSupplyTemp - 59.5 °C

Example 2:

%displayName.substring(0,3)% %displayName.substring(-2)%

Will show the Display Name of a component named "AHU_01" as "AHU 01" (a space instead of the underscore)

 

In alarm text boxes, this can be useful to provide additional information about an alarm

Example:

%alarmData.sourceName% > %alarmData.highLimit%!

Would return something like Hot Water Temp > 60 °C!