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  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Every thing is working
From: "Tran, Phi Dung via Tech-talk" <tech-talk at aps.anl.gov>
To: "Pearson, Matthew" <pearsonmr at ornl.gov>, "Johnson, Andrew N." <anj at anl.gov>, "Rivers, Mark L." <rivers at cars.uchicago.edu>, "Goetze, Kurt A." <goetze at anl.gov>, "Tran, Phi Dung" <ptran1 at bnl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 3 Nov 2023 20:15:35 +0000
Hi Matt,

Thank you for asking about MRES and point me in the right direction MRES.
field(MRES, "2.84352e-06") #reinitialized by calcout

I have another record which reads another motor.MRES and set the soft motor to be the same.
However, by commenting out this record and I don't know why, it solves the problem.
#Initialize MRES
#record(calcout,"$(P)-YmoveMRES"){
#field(INPA, "$(INBOARDMTR).MRES PP MS")
#field(CALC,"A")
#field(OUT, "$(P).MRES PP MS")
#field(PINI,"YES")
#

I wish to express my gratitude for all your guidance.  You have saved my weekend.
Have a nice weekend everybody,
Phi



From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Tran, Phi Dung via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, November 3, 2023 3:45 PM
To: Pearson, Matthew <pearsonmr at ornl.gov>; Johnson, Andrew N. <anj at anl.gov>; Rivers, Mark L. <rivers at cars.uchicago.edu>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: Re: fanout is not working
 
Hi Matt,

I tried caput 1 and it did not work.  I tried MRES with a value and it did 
not work so I commented it out and it was the same.  I stripped out everything except for the field below and it did not work either.
record(motor, "$(P)"){
        field(DTYP, "Soft Channel")
        field(OUT, "$(P)-F PP MS")
        field(PREC,"7")
        #field(TPRO,"1") #debug

This portion is in my src/Makefile, maybe it does not know what a soft
channel is,
virtMotorsMD3_DBD += base.dbd
virtMotorsMD3_DBD += motorSupport.dbd devSoftMotor.dbd
virtMotorsMD3_DBD += devIocStats.dbd

virtMotorsMD3_LIBS += motor softMotor
virtMotorsMD3_LIBS += devIocStats

Phi


From: Pearson, Matthew <pearsonmr at ornl.gov>
Sent: Friday, November 3, 2023 3:18 PM
To: Johnson, Andrew N. <anj at anl.gov>; Tran, Phi Dung <ptran1 at bnl.gov>; Rivers, Mark L. <rivers at cars.uchicago.edu>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: RE: fanout is not working
 

Hi,

 

I noticed you had:

 

field(DHLM, "5.0")

field(DLLM, "-5.0")

 

but then you sent “20”, which is out of bounds. Is that the issue?

 

Also, you’re not setting MRES (at least, it’s commented out), which would define the smallest allowed step size.

 

Cheers,

Matt

 

From: Johnson, Andrew N. <anj at anl.gov>
Sent: Friday, November 3, 2023 2:51 PM
To: Tran, Phi Dung <ptran1 at bnl.gov>; Pearson, Matthew <pearsonmr at ornl.gov>; Rivers, Mark L. <rivers at cars.uchicago.edu>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] Re: fanout is not working

 

I haven't used it myself and can't guarantee it's still 100% functional but the IOC does have the ability to set breakpoints and to single-step through record processing. See the documentation here for some details. Note that CA links will break the stepping chain since they cross a thread boundary, but it looks like you're only using DB links which should be fine.

 

- Andrew

 

-- 

Complexity comes for free, Simplicity you have to work for.

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Tran, Phi Dung via Tech-talk <tech-talk at aps.anl.gov>
Date: Friday, November 3, 2023 at 1:36 PM
To: Pearson, Matthew <pearsonmr at ornl.gov>, Rivers, Mark L. <rivers at cars.uchicago.edu>, Goetze, Kurt <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: Re: fanout is not working

Hi, 

I celebrated too early.  

 

As a recap, my virtual motor $(P) moves $(P)-F real motors

I set TRPO for $(P), $(P)-F, $(P)-I,$(P)-DMOV,$(P)-PD to 1, great tool Matt.

 

when I caput $(P)-F 10,

I got expected results

dbProcess of $(P)-F'

ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of '$(P)-PD'

scanOnce: dbProcess of '$(P)-DMOV'

CAC-event: dbProcess of '$(P)'

scanOnce: dbProcess of '$(P)-DMOV'

 

However, when I caput $(P) 20 which sends it value to $(P)-F, expecting similar response as above, I just got 

ca:ptran1 at xf19id2-ws3.nsls2.bnl.local: dbProcess of ''$(P)"

It appears my OUT link in $(P) did not cause $(P)-F to process even

though I am using PP?

 

Here is my record

record(motor, "$(P)"){

        field(DTYP, "Soft Channel")

        field(DESC, "Move Y,ib,ob,ds mtrs")

        # "Use Readback Interface"

        field(URIP, "Yes")

 

        # Where to read the readback from or input

        field(RDBL, "$(P)-I NPP MS")

 

        # Where to write the setpoint to

        # Output to upstream, inboard and outboard motors

        field(OUT, "$(P)-F PP MS")

        field(PREC,"7")

        #field(TPRO,"1") #debug

 

        # How to stop this motion, from or input

        field(STOO, "$(P)-STOP PP MS")

 

        # Where to get "done moving" status from or input

        field(DINP, "$(P)-DMOV NPP MS")

 

        # Dial Limits

        field(DHLM, "5.0")

        field(DLLM, "-5.0")

 

        # MRES here only determines the smallest

        # allowed movement. Decrease/increase as

        # appropriate.  

        #field(MRES, "2.84352e-06") #reinitialized by $

        field(RRES, "1.0")

        field(PREC, "3")

        field(EGU,  "mm")

}

 

Is there a more detail debbugger or trace for EPICS?

 

Thank you kindly for your help,

Phi

 


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Tran, Phi Dung via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, November 2, 2023 11:57 AM
To: Pearson, Matthew <pearsonmr at ornl.gov>; Mark Rivers <rivers at cars.uchicago.edu>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: Re: fanout is not working

 

Hi Matt,

 

I had a typo, 'O' instead of '0,' and ChatGPT identified that I was also missing a quotation mark. It should be smooth sailing from here.

 

Thank you everyone for your wisdom.

Phi


From: Pearson, Matthew <pearsonmr at ornl.gov>
Sent: Wednesday, November 1, 2023 4:13 PM
To: Mark Rivers <rivers at cars.uchicago.edu>; Tran, Phi Dung <ptran1 at bnl.gov>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: RE: fanout is not working

 

Hi,

 

As Mark mentioned, there may be a different issue, but it’s hard to say without more information.

 

When loading the IOC database, are there any errors?

 

I did test my database snippet, and it works fine for 3 motors (3 simulation motors) that are in a different IOC. I did have a typo (no quote after the name of the first dfanout record).

 

If you set the TPRO field of the top ao record to 1, then try sending a new position, you should see the 3 records processing in the IOC shell output, something like:

 

dbProcess of 'dist'

dbProcess of 'dist_fanout'

dbProcess of 'dist_go'

 

If that seems to be working, but the motors in the other IOC are not moving, there may be a channel access issue. Is there any activity at all for the 3 motors? Ie. is TWV set, but then TWF fails to cause motion?

 

Cheers,

Matt

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Wednesday, November 1, 2023 3:03 PM
To: Tran, Phi Dung <ptran1 at bnl.gov>; Pearson, Matthew <pearsonmr at ornl.gov>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] RE: fanout is not working

 

Ø  I received the following message in EPICS: "CA client library is unable to contact CA repeater after 50 tries." I believe this issue is the root of my problem, as I am attempting to create a different virtual IOC to control motors located in another existing IOC.

 

That is not your problem.  CA repeater is needed only to see beacon messages when an IOC restarts, etc.  I makes your client reconnect quicker under those circumstances, but is not required for normal function.

 

Mark

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Tran, Phi Dung via Tech-talk
Sent: Wednesday, November 1, 2023 1:49 PM
To: Pearson, Matthew <pearsonmr at ornl.gov>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: Re: fanout is not working

 

Hi Matt,

 

After implementing the changes you suggested and it is still not working.   I received the following message in EPICS: "CA client library is unable to contact CA repeater after 50 tries." I believe this issue is the root of my problem, as I am attempting to create a different virtual IOC to control motors located in another existing IOC.  Should I just add your suggestions into the existing ioc so it does not need to search globally for the motor PV.

 

 

Please advice

Phi

 

 


From: Pearson, Matthew <pearsonmr at ornl.gov>
Sent: Wednesday, November 1, 2023 10:40 AM
To: Tran, Phi Dung <ptran1 at bnl.gov>; Goetze, Kurt A. <goetze at anl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: RE: fanout is not working

 

Hi Phi,

 

I changed TWV to REL and used caput to test each motor separately since I want to make relative motions. 

 

I’m not sure I understand that. TWV is a number (the relative distance to move).

 

I just added DOL into my fanout field but it did not work either. 

 

Using the DOL field also requires setting the OMSL to “closed_loop”.

 

If you want to move all 3 motors the same relative distance, the way I’d do this is something like:

 

record(ao, “relative_dist”) {

  field(OUT, “relative_dist_fanout PP”)

}

 

record(dfanout, “relative_dist_fanout) {

  field(OUTA, “motor1.TWV”)

  field(OUTB, “motor2.TWV”)

  field(OUTC, “motor3.TWV”)

  field(FLNK, “relative_dist_go”)

}

 

record(dfanout, “relative_dist_go”) {

  field(VAL, “1”)

  field(OUTA, “motor1.TWF PP”)

  field(OUTB, “motor2.TWF PP”)

  field(OUTC, “motor3.TWF PP”)

}

 

Cheers,

Matt

 

 


From: Pearson, Matthew <pearsonmr at ornl.gov>
Sent: Wednesday, November 1, 2023 9:59 AM
To: Goetze, Kurt A. <
goetze at anl.gov>; Tran, Phi Dung <ptran1 at bnl.gov>
Cc: Tech-talk <
tech-talk at aps.anl.gov>
Subject: RE: fanout is not working

 

Hi,

 

Are you sure writing the position to $(M).TWF actually works with caput? Normally TWF (and TWR) just accept a ‘1’ to initiate a relative move specified by the distance in TWV. If the 3 motors are moving, they may just be moving a TWV relative distance.  

 

What you may want is this instead?

 

record(dfanout, "$(P)-F") {

    field(DESC, "move ib,ob,ds MTR")

    field(OUTA, "$(OUTBOARDMTR) PP MS")

    field(OUTB, "$(INBOARDMTR) PP MS")

    field(OUTC, "$(DOWNSTREAMMTR) PP MS")

 

Cheers,

Matt

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Goetze, Kurt via Tech-talk
Sent: Tuesday, October 31, 2023 1:48 PM
To: Tran, Phi Dung <ptran1 at bnl.gov>
Cc: Tech-talk <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] RE: fanout is not working

 

Hi Phi,

 

You’re close, but I don’t think you can poke the motor record’s value into the dfanout that way.

 

One way you could do it is by processing the motor record, FLNK the motor record to the dfanout, and have the dfanout’s .DOL field set to the motor record’s .VAL field (NPP).  That may not be the exact solution but that’s the direction I would head.

 

Kurt

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Tran, Phi Dung via Tech-talk
Sent: Tuesday, October 31, 2023 11:31 AM
To: tech-talk at aps.anl.gov
Subject: fanout is not working

 

Hi,

 

I have created a virtual motor and can successfully use the `caput` and `caget` commands to set and read its value, respectively. However, my `dfanout` record is not moving the motors with relative motions as expected. I have confirmed that the motors respond correctly when I use `caput` to directly interact with the fields in `dfanout`.

 

record(motor, "$(P)"){

      field(DTYP, "Soft Channel")

      field(DESC, "Move Y,ib,ob,ds mtrs")

 

      # Where to write the setpoint to

      # Output to upstream, inboard and outboard motors

      field(OUT, "$(P)-F PP MS")

      field(PREC,"7")

....}

 

#Move Y motors ib,ob,ds in same direction

record(dfanout, "$(P)-F") {

    field(DESC, "move ib,ob,ds MTR")

    field(OUTA, "$(OUTBOARDMTR).TWF PP MS")

    field(OUTB, "$(INBOARDMTR).TWF PP MS")

    field(OUTC, "$(DOWNSTREAMMTR).TWF PP MS")

    field(PREC, "7")

 

Please advice.

Thank you,

Phi


References:
fanout is not working Tran, Phi Dung via Tech-talk
RE: fanout is not working Goetze, Kurt via Tech-talk
RE: fanout is not working Pearson, Matthew via Tech-talk
Re: fanout is not working Tran, Phi Dung via Tech-talk
RE: fanout is not working Pearson, Matthew via Tech-talk
Re: fanout is not working Tran, Phi Dung via Tech-talk
RE: fanout is not working Mark Rivers via Tech-talk
RE: fanout is not working Pearson, Matthew via Tech-talk
Re: fanout is not working Tran, Phi Dung via Tech-talk
Re: fanout is not working Tran, Phi Dung via Tech-talk
Re: fanout is not working Johnson, Andrew N. via Tech-talk
RE: fanout is not working Pearson, Matthew via Tech-talk
Re: fanout is not working Tran, Phi Dung via Tech-talk

Navigate by Date:
Prev: Re: Cannot do successful RS-232 communication with baud rates <2400 with VME and IP module Joel Sherrill via Tech-talk
Next: RE: Cannot do successful RS-232 communication with baud rates <2400 with VME and IP module Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: fanout is not working Tran, Phi Dung via Tech-talk
Next: Get the type of a PV in C++ API Eusebio Naif Al-Soliman Fuentes via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 03 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·