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  2017  2018  <20192020  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  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Modbus Problems
From: 黄佳伟 via Tech-talk <[email protected]>
Date: Wed, 6 Nov 2019 17:07:19 +0800
Hi,
    I meet some problems with modbus module.
   No errors and warnings when I execute the cmd file. However the 'STAT's of all pvs are 'UDF' when I execute "dbpr" in iocsh and if I caget these pvs, it shows "Channel connect timed out" and cannot fine the pv.
    Anyone knows what's wrong?

    Here is my `cmd` file:

 #!../synApps/support/modbus-R3-0/bin/linux-x86_64/modbusApp
dbLoadDatabase("../synApps/support/modbus-R3-0/dbd/modbus.dbd")
modbus_registerRecordDeviceDriver(pdbbase)

drvAsynIPPortConfigure("AC500", "153.160.2.101:502", 0, 0, 1)

modbusInterposeConfig("AC500", 0, 5000, 0)

# drvModbusAsynConfigure(modbusPort,              asynPort,  0, modbus_function, offset, data_length, data_type, timeout, debug)
drvModbusAsynConfigure(  "ChamberVaccum0",       "AC500",    0, 4,               200,    2,           8,         1000,     "AC500")
drvModbusAsynConfigure(  "ChamberVaccum1",       "AC500",    0, 4,               202,    2,           8,         1000,     "AC500") 
# drvModbusAsynConfigure(  "P04show",               "AC500_1", 0, 4,                                                                 )
drvModbusAsynConfigure(  "P40show",              "AC500",    0, 4,               204,    2,           8,         1000,     "AC500") 
# drvModbusAsynConfigure(  "POilshow",              "AC500_1", 0, 4,                     )
# drvModbusAsynConfigure(  "Tplus1",     "AC500_1", 0, )
# drvModbusAsynConfigure(  "DiPlus16",  "AC500_1", 0, 5, 1604, 6, 0, 100, "AC500_1")
# drvModbusAsynConfigure(  "DiSub16", "AC500_1", 0, 5, 1605, 6, 0, 100, "AC500_1")
# drvModbusAsynConfigure(  "DiPlus01", "AC500_1", 0, 5, 1608, 6, 0, 100, "AC500_1") 
# drvModbusAsynConfigure(  "DiSub01", "AC500_1", 0, 5, 1609, 6, 0, 100, "AC500_1")
# drvModbusAsynConfigure(  "Protect", "AC500_1", 0, 5, )
# drvModbusAsynConfigure(  "VaccumProtect01", "AC500_1", 0, 5)
# drvModbusAsynConfigure(  "VaccumProtect02", "AC500_1", 0, 5)
# drvModbusAsynConfigure(  "Tplus0",  "AC500_1", 0, )
# drvModbusAsynConfigure(  "fireProtect", "AC500_1", 0, 5)
# drvModbusAsynConfigure(  "FIRE", "AC500_1", 0, 5)
# drvModbusAsynConfigure(  "KM1", "AC500_1", 0, 5)
# drvModbusAsynConfigure(  "KM2", "AC500_1", 0, 5)

asynSetTraceIOMask("AC500", 0, 255)

asynSetTraceIOMask("ChamberVaccum0", 0, 255)
asynSetTraceIOTruncateSize("ChamberVaccum0", 0, 512)

dbLoadTemplate("abb.substitutions")

iocInit

and here is my substitution file:
file "../synApps/support/modbus-R3-0/db/aiFloat64.template" {pattern
    {P,    R,              PORT,            OFFSET, LOPR, HOPR,   PREC, SCAN,       DATA_TYPE}
    {AC1:, Vac0,           ChamberVaccum0,  0,      0.,   10000., 11,   "I/O Intr", "MODBUS_DATA"}
    {AC1:, Vac1,           ChamberVaccum1,  0,      0.,   10000., 11,   "I/O Intr", "MODBUS_DATA"}
    # {AC1:, PrsAtGasCylinder, P04show,         0,      0.,   10000., 11,   "I/O Intr", "MODBUS_DATA"}
    {AC1:, PrsAtPumpTube,  P40show,         0,      0.,   10000., 11,   "I/O Intr", "MODBUS_DATA"}
}


Thanks,
Jasper

Navigate by Date:
Prev: Re: Two v7.0.3.1 questions Pierrick M Hanlet via Tech-talk
Next: Re: Waveform record not sending monitor on .NORD field Lucas Russo 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Two v7.0.3.1 questions Pierrick M Hanlet via Tech-talk
Next: init a waveform Alfio Rizzo 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  <20192020  2021  2022  2023  2024 
ANJ, 06 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·