EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Setting macro value from commandline
From: "Chen, Xihui" <[email protected]>
To: "Kasemir, Kay" <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 27 Feb 2012 13:28:14 -0500

Hi Xinyu,

 

I guess you are asking about open BOY OPI files from command line. For that, you can input macros to the OPI files like this:

 

Input Macros from command line

When you startup css from command line, you can specify the OPI files you want to run and their macros input:

css --launcher.openFile "<path_to_opi>/file1.opi macro1=value1, macro2=value2" "<path_to_opi2>/file2.opi"

It also allows embedding [\ascii-code] in macros when inputting macros from command line. For example:

css --launcher.openFile "<path_to_opi>/file1.opi macro1=A[\58]B, macro2=value2" "<path_to_opi2>/file2.opi"

In above example, the value of macro1 is A:B.

If there is already a CSS instance running, it will open the OPIs in the running CSS. The option --launcher.openFile is not necessary if following lines were added to css.ini:

--launcher.defaultAction

openFile

Note1: For Linux GTK, ":" is not allowed in macros. Instead using [\58].
Note2: To make this command line work for Linux machine, you may need to add follow lines to your css.ini which is under your CSS directory (this line should be added before
-vmargs):

-vm

/path to/libjvm.so

You may able to find the path to libjvm.so by using command locate libjvm.so See https://bugs.eclipse.org/bugs/show_bug.cgi?id=331122

Thanks,
Xihui

 

 

 

 

> -----Original Message-----

> From: Kasemir, Kay [mailto:[email protected]]

> Sent: Monday, February 27, 2012 9:07 AM

> To: [email protected]; [email protected]

> Subject: Re: Setting macro value from commandline

>

> Hi:

>

> You can set macros at these levels:

>

> 1.BOY Runtime Preference Setting (-pluginCustomization ...)

> 2.User Preference settings (Menu Edit, Preferences, CSS Applications,

> Display, BOY, OPI Runtime)

> 3.Macro parameter of Action that opens the *.opi file

> 4.Display *.opi file property "Macros"

> 5.Grouping/Linking/Tabbed Container that wraps the widgets

>

>

> Setting a macro within an Action overrides settings from

> the user preferences.

> Setting them within the Grouping container overrides

> those from the Action and so on.

>

>

> The first option is basically the command line:

>

> You can define any setting for CSS in a plugin customization file

> that has the format

>

> # Comment

> plugin.name/setting_name=value

>

> For example:

>

> # BOY Macros, format

> # macro1,value1|macro2,"value 2"|macro3,"another value"

> org.csstudio.opibuilder/macros=MyMacro1,"value 1"|MyOtherMacro,"Another

> Value"

>

>

> # EPICS Settings

> org.csstudio.platform.libs.epics/addr_list=127.0.0.1 123.45.67.89

>

>

>

> The format of the settings available for BOY

> are in the file org.csstudio.opibuilder/preferences.ini.

> The format of the settings available for EPICS Channel Access

> are in the file org.csstudio.platform.libs.epics/preferences.ini.

> The format of the settings for plugin ABC

> should be in a file ABC//preferences.ini.

>

>

>

>

> You put all those defaults that you want into a file

> my_plugin_customization.ini

> and then start CSS with the command-line option

>

>    css -pluginCustomization /path/to/my_plugin_customization.ini

>

> See also chapter "Hierarchical Preferences"

> in http://cs-studio.sourceforge.net/docbook/css_book.pdf

>

> Thanks,

> -Kay

>

>

> On 2/26/12 17:31 , "[email protected]" <[email protected]> wrote:

> >Sorry, I mean how do you set macro values from the command line for

> BOY.

> >(I'm new to EPICS and BOY. )

> >

> >Thanks

> >

> >Xinyu

> >

> >On 27/02/2012, at 4:22 AM, Eric Norum wrote:

> >

> >> When starting a soft IOC you can set the value of iocsh variables

> from

> >>shell environment variables using the epicsEnvSet iocsh command like

> >>this:

> >>

> >> epicsEnvSet(KEITHLEY2400_ETHERNET,

> >>"$(KEITHLEY2400_ETHERNET=164.54.49.10:4001)")

> >>

> >>

> >>

> >> So, if you start the IOC like this:

> >> ./st.cmd

> >> the iocsh KEITHLEY2400_ETHERNET variable will be set to

> >>164.54.49.10:4001

> >>

> >> but if you start the IOC like this:

> >> KEITHLEY2400_ETHERNET=192.168.1.2 ./st.cmd

> >> the  iocsh KEITHLEY2400_ETHERNET variable will be set to 192.168.1.2

> >>

> >> The '=' part to supply a default value can be omitted if you like.

> >>

> >> On Feb 26, 2012, at 2:20 AM, <[email protected]> wrote:

> >>

> >>> Hi,

> >>>

> >>> The documentation seems to imply that you can set macro values from

> >>>the command line. Can anyone tell me how to do it please?

> >>>

> >>> Thanks

> >>>

> >>> Xinyu WU

> >>> ASKAP Computing

> >>> Australia Telescope National Facility

> >>> CSIRO Astronomy and Space Science

> >>> phone: +61 2 9372 4727

> >>> postal: PO Box 76 Epping, NSW. 1710

> >>>

> >>>

> >>

> >> --

> >> Eric Norum

> >> [email protected]

> >>

> >>

> >>

> >>

> >

> >Xinyu WU

> >ASKAP Computing

> >Australia Telescope National Facility

> >CSIRO Astronomy and Space Science

> >phone: +61 2 9372 4727

> >postal: PO Box 76 Epping, NSW. 1710

> >

> >

>

>

 


References:
Re: Setting macro value from commandline Xinyu.Wu
Re: Setting macro value from commandline Kasemir, Kay

Navigate by Date:
Prev: Re: Access PV from JavaScript in BOY Kasemir, Kay
Next: Re: Sequencer build rules Janet Anderson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Setting macro value from commandline Kasemir, Kay
Next: Access PV from JavaScript in BOY Xinyu.Wu
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·