In Iridium Studio there are some output templates to automatically convert value to text.
There is $V to show integer value, there is $F to show a float.
But what if we need some other conversion from equipment output to human readable labels?
Is there a way to let a custom function do this for us? I think there is something like this in Iridium server, called script modifier, but how about in a panel-project?
In my project I have a modbus driver that provides 12 tags that read times in minutes.
These times have to be displayed on various pages on the panel in human readable form:
i.e. 5 = 00:05 and 1439 = 23:59
So, since I could not find the automatic conversion from value to text in label properties, I now have to do in JS script for all 12 time-values:
// Tag listener
IR.SetGlobalListener(IR.EVENT_GLOBAL_TAG_CHANGE, function(name, value)
IR.Log("Minutes: " + minutes);
var l_date = new Date(0,0,0,0,minutes);
return ("0" + l_date.getHours()).slice(-2) +
":" + ("0" + l_date.getMinutes()).slice(-2);
minutes2Time(IR.GetVariable("Drivers.WAGO Main PLC.Time1")));
minutes2Time(IR.GetVariable("Drivers.WAGO Main PLC.Time12")));
IR.SubscribeTagChange("Drivers.WAGO Main PLC.Time1");
IR.SubscribeTagChange("Drivers.WAGO Main PLC.Time12");
// script end.
I would rather just drag the drive tag to the label I want to display it in. And then in the label properties specifiy my minutes2Time function to handle the conversion from value to text.
Customer support service by UserEcho