Experimental Physics and Industrial Control System
Hi Andrew,
I think this is what should be done to the subArray Record. I haven't
tested it though.
Carl
*** 152,159 ****
if (!pact && psa->pact) return(0);
psa->pact = TRUE;
- psa->udf=FALSE;
recGblGetTimeStamp(psa);
monitor(psa);
/* process the forward scan link record */
--- 152,166 ----
if (!pact && psa->pact) return(0);
psa->pact = TRUE;
recGblGetTimeStamp(psa);
+
+ if (status) {
+ psa->udf = TRUE;
+ recGblSetSevr(psa,UDF_ALARM,INVALID_ALARM);
+ } else {
+ psa->udf=FALSE;
+ }
+
monitor(psa);
/* process the forward scan link record */
***************
*** 314,320 ****
if (psa->nord <= 0)
{
status = -1;
- psa->indx = 0;
}
return(status);
}
--- 321,326 ----
Gillingham, IJ (Ian) wrote:
This thread has come at a very timely moment, as I have been stumped for
a couple of days as to why a some of my waveform records have had their
INDX fields set to zero for no apparent reason. My waveforms in
question contain status and interlock information from PLCs, which is
populated via streams/RS232. This has caused some of our interlock
tables to be referencing the wrong interlocks (those allocated to the
word at INDX = 0) and causing some confusion! Having discussed this
thread with Pete Leicester, it transpires that this issue is more
widespread than realised. A fix would be much appreciated. In the mean
time, I shall probably have to monitor these INDX values and correct
them if/when they get reset to zero.
Ian Gillingham
Diamond Light Source
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Carl Lionberger
Sent: 09 November 2007 01:01
To: Andrew Johnson
Cc: [email protected]
Subject: Re: subArray INDX field set to 0 if NORD <= 0
I'm pretty sure that the reason I put this in is the poor way the
waveform record, on which subarray was based, posts invalid status.
Certainly the subarray record support does not ever set INVALID and the
waveform record does it only in a part that looks unreachable to me.
The readValue() returns bad status but the process routine ignores it.
It seems to me that the record should go invalid if it can't obtain
input.
Although I think Lewis' argument is compelling, I also think more needs
to be done than just eliminating the assignment of indx to zero.
Carl
Andrew Johnson wrote:
Hi Lewis,
J. Lewis Muir wrote:
I have found that if a subArray record reads 0 elements into its
array, it sets its INDX field to 0. Is this behavior intended? I
would rather it not change its INDX field in this situation.
I agree that this behavior seems a little strange and I'm inclined to
apply your patch (there's nothing mentioned in the Record Reference
Manual about what should happen). The record's author is listed as
Carl Lionberger who is still a member of this community - Carl, do you
have any comments on this change?
- Andrew
--
Carl Lionberger
510 486 7503
Software Developer, Engineering Division
Lawrence Berkeley National Laboratory
- Replies:
- Re: subArray INDX field set to 0 if NORD <= 0 Andrew Johnson
- References:
- RE: subArray INDX field set to 0 if NORD <= 0 Gillingham, IJ (Ian)
- Navigate by Date:
- Prev:
RE: subArray INDX field set to 0 if NORD <= 0 Gillingham, IJ (Ian)
- Next:
Re: Stream Raw converter and un/signed integrer Emmanuel Mayssat
- 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:
RE: subArray INDX field set to 0 if NORD <= 0 Gillingham, IJ (Ian)
- Next:
Re: subArray INDX field set to 0 if NORD <= 0 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
2016
2017
2018
2019
2020
2021
2022
2023
2024