Skip to content

CSS pv() function missing in Phoebus #3745

@rjwills28

Description

@rjwills28

Many of the functions available in CS-Studio are also available in Phoebus, however I have noticed that one that we make heavy use of is missing and that is the pv() function. This basically turns whatever is inside it into a PV object that CSS then gets the value of.

In many instances we can just replace that with the Phoebus syntax using backticks ``.

However there are some cases that do not work in Phoebus, for example, functions within the backticks or nested backticks. An example of what was done in CSS is shown below:

=pv(concat(pv("XXX:NAME:OF:PV"), ":HELLO"))

where:

  • pv("XXX:NAME:OF:PV") would return the value of this PV, which is a string with the name of another PV, e.g. XXX:NAME:OF:PV.val = "TEST:VAC:01"

  • concat(..., ":HELLO") takes the string PV value from above and appends "HELLO" to it to get a new PV name, e.g. "TEST:VAC:01:HELLO"

  • then =pv(...) gets the value of "TEST:VAC:01:HELLO"

As far as I can tell, there is no easy way of doing this in Phoebus except using scripts.

I was just wondering whether there was a reason that the pv() function from CSS wasn't re-implemented in Phoebus? Would it be beneficial to have it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions