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  <20172018  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  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: ASG local/remote mode problem
From: [email protected]
To: [email protected]
Date: Wed, 05 Jul 2017 03:58:37 -0400
Hi,
I want to give access based on local/remote switch at my embedded IOC. For this As per message at tech-talk www.aps.anl.gov/epics/tech-talk/2011/msg00728.php titled "About ASG usage" and www.aps.anl.gov/epics/tech-talk/2009/msg01270.php


1. I have made following acf file

HAG(local) {mylocalIP,127.0.0.1}
HAG(remote){myremoteIP}
ASG(loMode){
	INPA("acndHost:xxxExample:MODE_PV")
	RULE(1,READ)
	RULE(1,WRITE)
	{
		HAG(local)
		CALC("A=0")
	}
}
ASG(reMode){
	INPA("acndHost:xxxExample:MODE_PV")
	RULE(1,READ)
	RULE(1,WRITE)
	{
		HAG(remote)
		CALC("A=0")
	}
}

2. I am using default example generated using
makeBaseApp.pl -t example myexample
makeBaseApp.pl -i -t example myexample

and then modified dbExample1.db for field ASG
record(xxx, "$(user):xxxExample")
{
field(DESC, "xxx record")
field(ASG, "loMode")
field(EGU, "Counts")
field(HOPR, "10")
field(HIHI, "8")
field(HIGH, "6")
field(LOW, "4")
field(LOLO, "2")
field(HHSV, "MAJOR")
field(HSV, "MINOR")
field(LSV, "MINOR")
field(LLSV, "MAJOR")
}

3. I also added field MODE_PV in record xxx with ASL1

field(MODE_PV,DBF_CHAR) {
		 prompt("MODE VALUE local=0, remote=1")
		 asl(ASL1)
		 pp(TRUE)
	}




4. Also,at ioc shell
epics> dbtr "acndHost:xxxExample"
ACKS: MAJOR         ACKT: YES           ADEL: 0             ALST: 0
ASG: loMode         BKPT: 00            DESC: xxx record    DISA: 0
DISP: 0 DISS: NO_ALARM DISV: 1 DTYP: SoftChannel
EGU: Counts         EVNT: 0             FLNK:CONSTANT 0     HHSV: MAJOR
HIGH: 6             HIHI: 8             HOPR: 10            HSV: MINOR
HYST: 0             INP:CONSTANT        LALM: 2             LCNT: 0
LLSV: MAJOR         LOLO: 2             LOPR: 0             LOW: 4
LSV: MINOR          MDEL: 0             MLST: 0             MODE_PV: 0
NAME: acndHost:xxxExample NSEV: NO_ALARM NSTA: NO_ALARM
PACT: 0             PHAS: 0             PINI: NO            PREC: 0
PRIO: LOW           PROC: 0             PUTF: 0             RPRO: 0
SCAN: Passive       SDIS:CONSTANT       SEVR: MAJOR         STAT: LOLO
TIME: 2017-07-05 13:00:35.793148400     TPRO: 0             TSE: 0
TSEL:CONSTANT       UDF: 0              VAL: 0


5. The asprules at iocshell is showing  the following

epics> asprules
ASG(DEFAULT)
ASG(loMode) {
	INPA(acndHost:xxxExample.MODE_PV) INVALID value=0.000000
	RULE(1,READ,NOTRAPWRITE)
	RULE(1,WRITE,NOTRAPWRITE) {
		HAG(local)
		CALC("A=0") result=TRUE
	}
}
ASG(reMode) {
	INPA(acndHost:xxxExample.MODE_PV) INVALID value=0.000000
	RULE(1,READ,NOTRAPWRITE)
	RULE(1,WRITE,NOTRAPWRITE) {
		HAG(remote)
		CALC("A=1") result=FALSE
	}
}
epics>



5. But the command  at local machine shows:

$:cainfo acndHost:xxxExample
acndHost:xxxExample
    State:            connected
    Host:             www.acnd.docsrv:5064
    Access:           read, no write
    Native data type: DBF_DOUBLE
    Request type:     DBR_DOUBLE
    Element count:    1

But the ACCESS is shown as read, no write. instead of READ,WRITE.

6. further trying
epics> dbpf acndHost:xxxExample.MODE_PV,1
DBR_CHAR:           1         0x1
epics> asprules
ASG(DEFAULT)
ASG(loMode) {
	INPA(acndHost:xxxExample.MODE_PV) INVALID value=0.000000
	RULE(1,READ,NOTRAPWRITE)
	RULE(1,WRITE,NOTRAPWRITE) {
		HAG(local)
		CALC("A=0") result=TRUE
	}
}
ASG(reMode) {
	INPA(acndHost:xxxExample.MODE_PV) INVALID value=0.000000
	RULE(1,READ,NOTRAPWRITE)
	RULE(1,WRITE,NOTRAPWRITE) {
		HAG(remote)
		CALC("A=1") result=FALSE
	}
}

Still the rules are not changed...

Please suggest what is going wrong!!!

Best Regards
Sandeep,
B.A.R.C, Mumbai
India







Navigate by Date:
Prev: Re: Plotting X-Y Data from the archive in CSS Michael Davidsaver
Next: devlib2 release 2.9 Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Plotting X-Y Data from the archive in CSS Michael Davidsaver
Next: devlib2 release 2.9 Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·