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  2012  2013  2014  2015  <20162017  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  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: macro value
From: Pete Jemian <[email protected]>
To: <[email protected]>
Date: Wed, 31 Aug 2016 13:12:42 -0500
First off, it is assumed you are starting CSS BOY with some top level .opi screen and that screen has a MenuButton widget with an action to call up the 4motor_form.opi display.

Also assumed that these are the four motor PVs to connect:
IOC:m1
IOC:m2
IOC:m3
IOC:m4

In the OPEN_DISPLAY "action" that calls 4motor_form.opi, make sure you define these macros:
P	IOC:
M1	m1
M2	m2
M3	m3
M4	m4

You can find examples in the xxx.opi file.
For the XML syntax, look for the text:  <path>topMotors4.opi</path>
https://github.com/epics-modules/xxx/blob/master/xxxApp/op/opi/xxx.opi

The XML code for the MenuButton widget action on your top level .opi screen might look like this:

      <action type="OPEN_DISPLAY">
        <path>4motor_form.opi</path>
        <macros>
          <include_parent_macros>true</include_parent_macros>
          <P>IOC:</P>
          <M1>pm1</M1>
          <M2>pm2</M2>
          <M3>pm3</M3>
          <M4>pm4</M4>
        </macros>
        <replace>0</replace>
        <description>Motor form: motors 1-4</description>
      </action>

Hope this helps,
    Pete


On 8/31/2016 10:19 AM, Mooney, Tim M. wrote:
Hi Li,

How are you supplying macro values to 4motor_form.opi?  You probably
want to call up 4motor_form.opi from a related display button.  (That's
what the button type is called in MEDM, anyway.  I forget what it's
called in BOY.)

Tim Mooney ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab

------------------------------------------------------------------------
*From:* [email protected] [[email protected]] on
behalf of l123173 [[email protected]]
*Sent:* Wednesday, August 31, 2016 8:17 AM
*To:* [email protected]
*Subject:* macro value

Hi all,
      After I started the IOC and 4motor_form.opi (
${MOTOR}/motorApp/op/opi ) in CSS, the pv contain "$(P)$(M) ,$(P)$(M1),
$(P)$(M2)" all disconnetcted.
      But IOC start up successfully.  And when I changed the pv name to
IOC:m2, it connected.
      why does other contain $(P)$(M) disconnected.

dbl list was like these:
epics> dbl
IOC:4
IOC:m2
IOC:m3
IOC:m4
KOZ:m1
*******
the st.cmd file was ( part of st.cmd file):

dbLoadDatabase("$(TOP)/dbd/WithAsyn.dbd")
WithAsyn_registerRecordDeviceDriver(pdbbase)

dbLoadTemplate("motor.substitutions")
drvAsynSerialPortConfigure("serial","/dev/ttyS0",0,0,0)
...
******
and the motor.substitutions was:

file "$(MOTOR)/db/basic_motor.db"
{
pattern
{P,     N,  M,        DTYP,      C,  S,  DESC,          EGU,      DIR,
VELO,  VBAS,  ACCL,  BDST,  BVEL,  BACC,  MRES,  PREC,  DHLM,  DLLM,  INIT}
{IOC:,  1,  "m$(N)",  "SC-800",  0,  0,  "motor $(N)",  mm,  Pos,
1,     .1,    .2,    0,     1,     .2,    0.01,  5,     100,   -100,  ""}
{IOC:,  2,  "m$(N)",  "SC-800",  0,  1,  "motor $(N)",  degrees,  Pos,
1,     .1,    .2,    0,     1,     .2,    0.01,  5,     100,   -100,  ""}
{IOC:,  3,  "m$(N)",  "SC-800",  0,  2,  "motor $(N)",  degrees,  Pos,
1,     .1,    .2,    0,     1,     .2,    0.01,  5,     100,   -100,  ""}
{IOC:,  4,  "m$(N)",  "SC-800",  0,  3,  "motor $(N)",  degrees,  Pos,
1,     .1,    .2,    0,     1,     .2,    0.01,  5,     100,   -100,  ""}
}


Thanks,
Li xing





References:
macro value l123173
RE: macro value Mooney, Tim M.

Navigate by Date:
Prev: EPICS V4.6.0-rc1 Releases Andrew Johnson
Next: VCM-D1 shutter driver Hu, Yong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: macro value Pete Jemian
Next: EPICS V4.6.0-rc1 Releases Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Aug 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·