> I have tried to divide the value of ai record using ASLO field. But It doesn't work.
record(ai, "AI0") {
field(DTYP,"s7nodave")
field(INP,"@lcpcPLC DB6.DBD36 float")
field(LINR,"LINEAR")
field(HOPR,"20")
field(LOPR,"0")
field(ASLO,"0.001")
field(PREC,"4")
field(SCAN,"1 second")
field(EGU,"Bar")
field(EGUF,"32767")
field(EGUL,"-32768")
}
From the INP field it looks like the PLC is returning a float? Perhaps the s7dave device support is not using ASLO for float inputs from the PLC?
For the asyn device support the use of ASLO and AOFF for the ai record using the asynFloat64 interface was only added in 2017 with this commit:
commit 4337169e576511d1156e0a5bdea863ed036d4732
Author: Ralph Lange <ralph.lange at gmx.de>
Date: Thu Dec 7 17:12:38 2017 +0100
devEpics: add ASLO/AOFF/SMOO conversion to ai/ao float64
Perhaps the s7dave device support does not have the equivalent?
Mark
________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, September 17, 2020 6:05 AM
To: EPICS Tech Talk
Subject: Re: ASLO doesn't work
On Thu, 17 Sep 2020 at 11:10, Vishnu Patel via Tech-talk <tech-talk at aps.anl.gov<mailto:tech-talk at aps.anl.gov>> wrote:
record(ai, "AI0") {
field(LINR,"LINEAR")
field(EGUF,"32767")
field(EGUL,"-32768")
}
The PLC the value is 1003.124 in mBar, i have to display as 1.0031 Bar.
As you are using linear conversion already,
wouldn't setting EGUF to 32.767 and EGUL to -32.768 result in a VAL that is smaller by a factor of 1000?
Cheers,
~Ralph
- References:
- ASLO doesn't work Vishnu Patel via Tech-talk
- Re: ASLO doesn't work Ralph Lange via Tech-talk
- Navigate by Date:
- Prev:
Re: Issues connecting to siemens PLC Mark Rivers via Tech-talk
- Next:
Re: ASLO doesn't work Hu, Yong 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
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: ASLO doesn't work Hu, Yong via Tech-talk
- Next:
Re: ASLO doesn't work Ben Franksen 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
2023
2024
2025
|