Hi Luca,
What you're doing is fine. I'd use a bo record, but I don't think the choice really matters.
To reset the bi record, I'd use an output link from the aSub record, and I'd have that output link process the bi record, so that its VAL field gets posted, so clients can see it. Yes, this will get the aSub record processed again. There is an EPICS idiom for processing a record only on a rising or falling transition:
record(aSub, "$(SYS):$(MOD):COORD_CONVERTER") {
field(SDIS, "$(SYS):$(MOD):CONVERT_CMD")
field(DISV, "0")
...
}
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 Luca Cavalli [[email protected]]
Sent: Wednesday, July 13, 2016 7:18 AM
To: [email protected]
Subject: Trigger aSub record from bi record reflecting status
Dear all,
I have to perform a conversion of a set of coordinates using an aSub record.
I have set the SCAN field of the record to passive and any change in a bi record
($(SYS):$(MOD):CONVERT_CMD) triggers the processing.
This is an extract of the database:
record(bi, "$(SYS):$(MOD):CONVERT_CMD") {
field(DESC, "Convert command.")
field(PINI, "NO")
field(UDF, "0")
field(FLNK, "$(SYS):$(MOD):COORD_CONVERTER")
field(VAL, "0")
field(ZNAM, "DONE")
field(ONAM, "CONVERT")
}
record(aSub, "$(SYS):$(MOD):COORD_CONVERTER") {
field(INAM, "convAsubInit")
field(SNAM, "convAsubProcess")
field(FTA, "DOUBLE")
field(INPA, "$(SYS):$(MOD):SRVY:RA_SET_POS PP")
field(DESC, "Coordinate converter.")
field(SCAN, "Passive")
field(INPB, "$(SYS):$(MOD):SRVY:DEC_SET_POS PP")
field(INPC, "$(SYS):$(MOD):SRVY:X_SET_POS PP")
field(INPD, "$(SYS):$(MOD):SRVY:Y_SET_POS PP")
field(INPE, "$(SYS):$(MOD):SRVY:Z_SET_POS PP")
field(INPF, "$(SYS):$(MOD):SRVY:START_TIME PP")
field(INPM, "$(SYS):$(MOD):CONVERT_CMD")
field(FTB, "DOUBLE")
field(FTC, "DOUBLE")
field(FTD, "DOUBLE")
field(FTE, "DOUBLE")
field(FTF, "DOUBLE")
field(FTM, "ENUM")
}
Is this the proper way to achieve this task?
How to reset the $(SYS):$(MOD):CONVERT_CMD value to 0 from the C code of the convAsubProcess function?
Does this change from 1 (CONVERT) to 0 (DONE) will trigger an additional call to convAsubProcess?
Thanks for your help.
Luca
________________________________
<< Le informazioni contenute in questo messaggio di posta elettronica e relativi allegati sono riservate e confidenziali e ne è vietata la diffusione in qualunque modo eseguita. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invitiamo ad eliminarlo e a darcene gentile comunicazione. Quanto precede ai fini del rispetto delle Legge 675/96 e del Decreto Legislativo 30/06/2003 n.196, sulla tutela dei dati personali >>
<< This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person: to do so could be a breach of confidence. Thank you for your co-operation. Please contact our IT Helpdesk on +3902380481 or email [email protected] if you need assistance >>
- Replies:
- Re: Trigger aSub record from bi record reflecting status Luca Cavalli
- References:
- Trigger aSub record from bi record reflecting status Luca Cavalli
- Navigate by Date:
- Prev:
Re: AndorCCD binning Hinxx
- Next:
Re: Trigger aSub record from bi record reflecting status Luca Cavalli
- 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
- Navigate by Thread:
- Prev:
Trigger aSub record from bi record reflecting status Luca Cavalli
- Next:
Re: Trigger aSub record from bi record reflecting status Luca Cavalli
- 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
|