I am building a screen in ProcessBook and the point I am hitting in my PLC is in Seconds and I need my screen to read out in hours.
How is the best way to convert Seconds to Hours in ProcessBook?
Can you please provide some context around what you are specifically doing in ProcessBook that needs this time unit conversion? Are you needing to convert time units in an Expression Calculation dataset etc?
I am building a screen in ProcessBook that displays a time in hours, but the PLC tag I am hitting is in seconds.
I can create a tag in seconds and then create a calc tag and multiply by 60 to show minutes and then create another calc tag and multiply the minutes by 60 to get the hours.
I am sure there is an easier way, I just don't know how to do it.
There are multiple approaches for this.
1) You can configure a PI Calc Dataset that takes the tag and converts it to hours. Here is an example configuration:
This is real simple but will start to get tedious and can affect performance if you plan on converting a large amount of tags. This leads me to the second method which I believe is much better in the long term.
2) You can use AF. The AF Server is unit aware which means if you specify that the tag for an attribute is recording in seconds. You can pull in the data using the attribute and automatically convert it to the unit of your choice:
Here I'm pulling in data about the density of Actinium into my Processbook display. I can use the dropdown menu to choose the unit of measure I wish to display. The AF Server will convert the value with the appropriate factor. This is great for scaling up your displays if you plan on having many values in your displays.
Retrieving data ...