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 2023 2024 2025 | 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 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Problems with soft motors |
From: | Mark Rivers <[email protected]> |
To: | "'Mooney, Tim M.'" <[email protected]>, "Peterson, Kevin M." <[email protected]>, "Johnson, Andrew N." <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Fri, 7 Sep 2018 22:31:35 +0000 |
Hi Tim, Ø
Do you see the error message "cannot find dbCaLink task." in the IOC console output after iocInit? No, but there are definitely problems in devSoftAux.cc. I have found that there were 2 problems.
1)
devSoftAux::soft_motor_task has calls to the CA library like this: SEVCHK(ca_search(mr->dinp.value.pv_link.pvname, &dinp), "ca_search() failure"); This means that if there is a CA error then it kills the task and no other needed CA callbacks get established. In one of my IOCs where no soft motor callbacks were happening at all, this was the issue. The soft_motor_task did not exist,
whereas it did exist in all the other IOCs. I tracked the problem down to one soft motor in the system that does not have string defined for the DINP link. In previous versions of base this worked OK. However, in base 7 it caused the task to exit with the
following error: CA.Client.Exception............................................... Error: "Invalid string" Context: "ca_search() failure" Source File: ../devSoftAux.cc line 172 Current Time: TUE SEP 04 2018 13:39:36.049462058 This is the code that did it: if (mr->dinp.value.constantStr == NULL) ptr->default_done_behavior = true; else { ptr->default_done_behavior = false; SEVCHK(ca_search(mr->dinp.value.pv_link.pvname, &dinp), "ca_search() failure"); The problem is that since when the link is not defined dinp.value.pv_link.pvname is NULL, and ca_search returns an error. I don’t know why this worked in 3.14 and 3.15, but it did. I was able to fix this problem by not calling the CA
functions if dinp.value.pv_link.pvname is NULL. if (mr->dinp.value.constantStr == NULL) ptr->default_done_behavior = true; else if (mr->dinp.value.pv_link.pvname != NULL) { ptr->default_done_behavior = false; printf("devSoftAux::soft_motor_task: adding dinp link for motor %s link=%s\n", mr->name, mr->dinp.value.pv_link.pvname); SEVCHK(ca_search(mr->dinp.value.pv_link.pvname, &dinp), "ca_search() failure"); I also temporarily added the debugging printf for each type of link that gets callbacks established in this function. That let me see what the second problem is.
2)
The second problem is exposed with the printf statements added when the callbacks are established. This is what I see during iocInit: devSoftAux::soft_motor_task: adding dinp link for motor 13BMA:pm1 link=13BMA:KBVB:Done devSoftAux::soft_motor_task: adding urip link for motor 13BMA:pm1 link=13BMA:KBVB:Readback.G devSoftAux::soft_motor_task: adding urip link for motor 13BMA:pm2 link=13BMA:KBVB:Readback.H devSoftAux::soft_motor_task: adding dinp link for motor 13BMA:pm3 link=13BMA:KBVP:Done devSoftAux::soft_motor_task: adding urip link for motor 13BMA:pm3 link=13BMA:KBVP:Readback.G devSoftAux::soft_motor_task: adding urip link for motor 13BMA:pm4 link=13BMA:KBVP:Readback.H devSoftAux::soft_motor_task: adding dinp link for motor 13BMA:pm5 link=13BMA:KBVT:Done devSoftAux::soft_motor_task: adding urip link for motor 13BMA:pm5 link=13BMA:KBVT:Readback.G devSoftAux::soft_motor_task: adding urip link for motor 13BMA:pm6 link=13BMA:KBVT:Readback.H The above output shows the problem. For each soft motor it should be adding callbacks for both the dinp (done moving) and urip (position) links. It is correctly adding the urip link for each motor. However, it is only adding the dinp
links for every other motor (pm1, pm3, pm5). It is not adding the dinp link for (pm2,pm4,pm6). I don’t understand this, since pm1 and pm2 seem to be defined identically for their DINP links. ioc13bma> dbpr "13BMA:pm1",2 ACCL: 0.1 ACKS: NO_ALARM ACKT: YES ADEL: 0 ASG: ATHM: 0 BACC: 0.1 BDST: 0 BKPT: 00 BVEL: 1 CDIR: 0 CNEN: Disable DCOF: 0 DESC: Curvature DHLM: 10000 DIFF: 0 DINP:DB_LINK 13BMA:KBVB:Done NPP NMS DIR: Pos DISA: 0 DISP: 0 DISS: NO_ALARM DISV: 1 DLLM: -10000 DLY: 0 DMOV: 1 DOL:CONSTANT DRBV: 0.25 DTYP: Soft Channel DVAL: 0.25 EGU: mm ERES: 1.0e-04 EVNT: FLNK:CONSTANT FOF: 0 FOFF: Frozen FRAC: 1 HHSV: NO_ALARM HIGH: 0 HIHI: 0 HLM: 10000 HLS: 0 HLSV: NO_ALARM HOMF: 0 HOMR: 0 HOPR: 0 HSV: NO_ALARM HVEL: 0.1 ICOF: 0 IGSET: 0 INIT: JAR: 10 JOGF: 0 JOGR: 0 JVEL: 1 LCNT: 0 LDVL: 0.25 LLM: -10000 LLS: 0 LLSV: NO_ALARM LOCK: NO LOLO: 0 LOPR: 0 LOW: 0 LRLV: 0 LRVL: 2500 LSPG: Go LSV: NO_ALARM LVAL: 0.25 LVIO: 0 MDEL: 0 MISS: 0 MOVN: 0 MRES: 1.0e-04 NAME: 13BMA:pm1 NSEV: NO_ALARM NSTA: NO_ALARM NTM: NO NTMF: 2 OFF: 0 OMSL: supervisory OUT:DB_LINK 13BMA:pm1DVAL.VAL PP MS PACT: 0 PCOF: 0 PHAS: 0 PINI: NO POST: PP: 0 PREC: 3 PREM: PRIO: LOW PUTF: 0 RBV: 0.25 RCNT: 0 RDBD: 1.0e-04 RDBL:DB_LINK 13BMA:KBVB:Readback.G NPP NMS RDIF: 0 REP: 0 RHLS: 0 RINP:CONSTANT RLLS: 0 RLNK:CONSTANT RLV: 0 RMOD: Default RMP: 2500 RPRO: 0 RRBV: 2500 RRES: 1 RTRY: 0 RVAL: 2500 RVEL: 0 S: 50 SBAK: 50 SBAS: 5 SCAN: Passive SDIS:CONSTANT SET: Use SEVR: NO_ALARM SMAX: 50 SPMG: Go SREV: 200 SSET: 0 STAT: NO_ALARM STOO:DB_LINK 13BMA:KBVB:Stop PP MS STOP: 0 SUSE: 0 SYNC: 0 TDIR: 0 TIME: 2018-09-07 17:04:51.807438608 TPRO: 0 TSE: 0 TSEL:CONSTANT TWF: 0 TWR: 0 TWV: 0.2 UDF: 0 UDFS: INVALID UEIP: No UREV: 0.02 URIP: Yes VAL: 0.25 VBAS: 0.1 VELO: 1 VERS: 6.1 VMAX: 1 VOF: 0 value = 0 = 0x0 ioc13bma> dbpr "13BMA:pm2",2 ACCL: 0.1 ACKS: NO_ALARM ACKT: YES ADEL: 0 ASG: ATHM: 0 BACC: 0.1 BDST: 0 BKPT: 00 BVEL: 1 CDIR: 0 CNEN: Disable DCOF: 0 DESC: Ellipticity DHLM: 10000 DIFF: 0 DINP:DB_LINK 13BMA:KBVB:Done NPP NMS DIR: Pos DISA: 0 DISP: 0 DISS: NO_ALARM DISV: 1 DLLM: -10000 DLY: 0 DMOV: 1 DOL:CONSTANT DRBV: -0.0999 DTYP: Soft Channel DVAL: -0.0999 EGU: mm ERES: 1.0e-04 EVNT: FLNK:CONSTANT FOF: 0 FOFF: Frozen FRAC: 1 HHSV: NO_ALARM HIGH: 0 HIHI: 0 HLM: 10000 HLS: 0 HLSV: NO_ALARM HOMF: 0 HOMR: 0 HOPR: 0 HSV: NO_ALARM HVEL: 0.1 ICOF: 0 IGSET: 0 INIT: JAR: 10 JOGF: 0 JOGR: 0 JVEL: 1 LCNT: 0 LDVL: -0.0999 LLM: -10000 LLS: 0 LLSV: NO_ALARM LOCK: NO LOLO: 0 LOPR: 0 LOW: 0 LRLV: 0 LRVL: -999 LSPG: Go LSV: NO_ALARM LVAL: -0.0999 LVIO: 0 MDEL: 0 MISS: 0 MOVN: 0 MRES: 1.0e-04 NAME: 13BMA:pm2 NSEV: NO_ALARM NSTA: NO_ALARM NTM: NO NTMF: 2 OFF: 0 OMSL: supervisory OUT:DB_LINK 13BMA:pm2DVAL.VAL PP MS PACT: 0 PCOF: 0 PHAS: 0 PINI: NO POST: PP: 0 PREC: 3 PREM: PRIO: LOW PUTF: 0 RBV: -0.0999 RCNT: 0 RDBD: 1.0e-04 RDBL:DB_LINK 13BMA:KBVB:Readback.H NPP NMS RDIF: 0 REP: 0 RHLS: 0 RINP:CONSTANT RLLS: 0 RLNK:CONSTANT RLV: 0 RMOD: Default RMP: -999 RPRO: 0 RRBV: -999 RRES: 1 RTRY: 0 RVAL: -999 RVEL: 0 S: 50 SBAK: 50 SBAS: 5 SCAN: Passive SDIS:CONSTANT SET: Use SEVR: NO_ALARM SMAX: 50 SPMG: Go SREV: 200 SSET: 0 STAT: NO_ALARM STOO:DB_LINK 13BMA:KBVB:Stop PP MS STOP: 0 SUSE: 0 SYNC: 0 TDIR: 0 TIME: 2018-09-07 17:04:51.807438608 TPRO: 0 TSE: 0 TSEL:CONSTANT TWF: 0 TWR: 0 TWV: 0.1 UDF: 0 UDFS: INVALID UEIP: No UREV: 0.02 URIP: Yes VAL: -0.0999 VBAS: 0.1 VELO: 1 VERS: 6.1 VMAX: 1 VOF: 0 value = 0 = 0x0 So one problem is fixed, and I know what the other problem is, but not yet how to fix it. Mark From: Mooney, Tim M. <[email protected]>
Hi Mark, I'll make a wild guess: The function, soft_init(), in motor/motorApp/SoftMotorSrc/devSoftAux.cc, seems vulnerable to changes in EPICS base that might not have had consequences for other code I know
of. This code has always seemed a little hinky to me. Do you see the error message "cannot find dbCaLink task." in the IOC console output after iocInit? Tim Mooney ([email protected]) (630)252-5417 From: Mark Rivers <[email protected]> Hi, |