Skip to content

Commit

Permalink
Merge pull request #1386 from ISISComputingGroup/Ticket6915
Browse files Browse the repository at this point in the history
adding beckhoff engineering view opi
  • Loading branch information
daryakoskeroglu authored Jan 17, 2022
2 parents 07b9b97 + c812c90 commit 9d62a12
Show file tree
Hide file tree
Showing 4 changed files with 742 additions and 0 deletions.
12 changes: 12 additions & 0 deletions base/uk.ac.stfc.isis.ibex.opis/resources/opi_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,18 @@
</categories>
</value>
</entry>
<entry>
<key>Beckhoff Engineering View</key>
<value>
<type>DEBUG</type>
<path>twincat/twincat_engineering.opi</path>
<description>The OPI giving a detailed engineering view of a Beckhoff.</description>
<macros/>
<categories>
<category>Miscellaneous motion control</category>
</categories>
</value>
</entry>
<entry>
<key>SCIMAG3D</key>
<value>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from org.csstudio.opibuilder.scriptUtil import PVUtil

def get_macros():
return display.getPropertyValue("macros").getMacrosMap()


def reload_widget(widget):
original_opi = widget.getPropertyValue("opi_file")
widget.setPropertyValue("opi_file", "null.opi")
widget.setPropertyValue("opi_file", original_opi)


def add_macro(widget, name, value):
macros = widget.getPropertyValue("macros")
macros.put(name, str(value))
widget.setPropertyValue("macros", macros)
reload_widget(widget)


widget = display.getWidget("link1")
spinner = display.getWidget("spinner")
value = spinner.getPropertyValue("text")
add_macro(widget, "AXIS", value)
Loading

0 comments on commit 9d62a12

Please sign in to comment.