Replies: 3 comments
-
Would it be possible to calculate f(x) in the IOC and expose that as a "derived" PV? Another way to solve it is to use one of the built-in formula functions. Using these is much more efficient than executing scripts. For your use case: if x values are represented in an array PV named x_values, you could for the Y axis use the "scale" formula function like so:
|
Beta Was this translation helpful? Give feedback.
-
Hi Georg, In order to do that what you have suggested I need the X Y widget Property PV X to be set. Best Regards |
Beta Was this translation helpful? Give feedback.
-
Array formula functions are documented in the Help. Search for formula and select topic "Formula" (not "Formula Functions"). There are additional formula functions besides array manipulation, but these are "documented in code", see for instance package https://github.com/ControlSystemStudio/phoebus/tree/master/core/formula/src/main/java/org/csstudio/apputil/formula |
Beta Was this translation helpful? Give feedback.
-
Hello,
How to plot the function with supplied parameters trough PVs using the X/Y Plot.
let's assume that I have two PVs: PV_A and PV_B and I want to draw a function:
f(x)=PV_A*x+PV_B
I tried to use the scripts using the traces[0].y_value but the script did not work.
It is probably the traces[0].y_value does not accept indexing like traces[0].y_value[i] ?
or maybe it is another way?
Best Regards
Mirek
Beta Was this translation helpful? Give feedback.
All reactions