Hi Greg,
You need to keep in mind that the data types specified in command like this:
drvModbusAsynConfigure("watlow_AI_Num_1.1", "watlow1", 0, 4, 360, 62, 7, 2000, "watlow1");
can be overridden in the .template file with lines like this:
field(INP, "@asyn(watlow_AI_Num_1.$(mod),$(Ain=0),2000)FLOAT32_BE")
So the data type in the drvModbusAsynConfigure is just a default and may not be used at all.
Mark
Sent from my iPhone
On Aug 24, 2021, at 5:24 PM, Leblanc, Gregory via Tech-talk <tech-talk at aps.anl.gov> wrote:
Hi folks!
This question is probably specific to Gary, but I’m sending it to the list, because the information will hopefully be helpful to the next person who tries this.
Also, apologies for the lengthy email, but I’m trying to make sure all the information is included.
I’m trying to understand how the modbus read functions are designed. I see following line in your st.cmd [1]:
drvModbusAsynConfigure("watlow_AI_Num_1.1", "watlow1", 0, 4, 360, 62, 7, 2000, "watlow1");
which is reading 62 bytes starting at modbus address 360, and assume that they are type INT32_BE
2 lines later it says:
drvModbusAsynConfigure("watlow_AI_Enum_1.1", "watlow1", 0, 4, 362, 82, 6, 2000, "watlow1");
Which says read 82 bytes starting at address 362, and assume that they are type INT32_LE_BS [2]
I mapped the information from the manual, and put it in a file at:
https://github.com/gregoryleblanc/CsHeater/blob/main/AnalogInput.md
I’m guessing that the num line is reading in floats, and the enum line is reading in the same data, but reading the uint values, and there is something wonky about the byte order that you can’t read them into the same space.
Based on what I’ve gleaned, I’ve pared things down to a small config. I’m not seeing any errors when I run st.cmd, and inside my ioc I see:
epics> dbl
:SE:Watlow:1:ControlModeActive1
:SE:Watlow:1:AutotuneStatus1
:SE:Watlow:1:ControlModeActive2
:SE:Watlow:1:AutotuneStatus2
:SE:Watlow:1:HeatPower1
:SE:Watlow:1:CoolPower1
:SE:Watlow:1:ProcessValue1
:SE:Watlow:1:ActiveSV1
:SE:Watlow:1:HeatPower2
:SE:Watlow:1:CoolPower2
:SE:Watlow:1:ProcessValue2
:SE:Watlow:1:ActiveSV2
Next, I tried grabbing ProcessValue 1 and 2:
$ caget :SE:Watlow:1:ProcessValue1 :SE:Watlow:1:ProcessValue2
:SE:Watlow:1:ProcessValue1 3.59505e-06
:SE:Watlow:1:ProcessValue2 0
Which doesn’t seem to match up at all with what I see on the controller:
https://www.flickr.com/gp/gregoryleblanc/gD9270
https://www.flickr.com/gp/gregoryleblanc/2TRm59
I’m not sure where to go from here.
Greg
P.S. I’m hoping to map out the other data read blocks later in the week.
P.P.S. I have a patch to replace the numerical datatypes in your st.cmd with more descriptive strings. Should I submit a pull request?
1: https://github.com/tauferg/Watlow-PM/blob/ea5096bf72f29eb42e3f2c2f5ee1a12ceb089863/Watlow_PM862FJ-3LEJAA_IOC/st.cmd.ModbusAddresses%20Only#L27
2: Little-endian byte swapped? Somehow there’s got to be a tie between PDPs and Modbus, and I’m a bit scared.
--
Gregory Leblanc
Accelerator Engineer
Edwards Accelerator Lab - Ohio University
123 University Terrace
Athens, OH 45701
leblanc at ohio.edu<mailto:leblanc at ohio.edu>
M: (401) 52-OUAL1 or (401) 526-8251
- Replies:
- RE: Watlow_PM communication Taufer, Gary via Tech-talk
- References:
- Watlow_PM communication Leblanc, Gregory via Tech-talk
- Navigate by Date:
- Prev:
Watlow_PM communication Leblanc, Gregory via Tech-talk
- Next:
Re: CA Gateway converts int/float value to hex andrej.manojlovic--- 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
- Navigate by Thread:
- Prev:
Watlow_PM communication Leblanc, Gregory via Tech-talk
- Next:
RE: Watlow_PM communication Taufer, Gary 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
|