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  <20142015  2016  2017  2018  2019  2020  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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: EPICS/ModbusTCP communication with Rockwell Micro 850 PLC
From: Mark Rivers <[email protected]>
To: "'[email protected]'" <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 3 Mar 2014 17:08:14 +0000
Hi Remi,

These messages are normal when you have more than one soft IOC running on a system:

cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 34829,
cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be
cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete

You can ignore those messages.

This message is not normal:
epics> 2014/03/03 16:48:54.659 drvModbusAsyn::doModbusIO port modbusPort is disconnected

It suggests that your Modbus system is not reachable or there is some configuration problem.

Mark

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of faure
Sent: Monday, March 03, 2014 10:26 AM
To: [email protected]; [email protected]; [email protected]
Subject: Re: EPICS/ModbusTCP communication with Rockwell Micro 850 PLC

Hi Mark and Hermann-Josef,

I want to read a boolean value (DO_0) that my Rockwell PLC Micro850 
publishes on ModbusTCP address 00001.
(still using the modbus module with asyn)

Now I keep getting the "cas warning: Configured TCP port was 
unavailable.(...)", and read operation fails.
Anybody sees what's wrong in my setup ?


The st.cmd executed:

[root@sdiLinux iocrockTest]# ./st.cmd
#!../../bin/linux-x86/rockTest
## You may have to change rockTest to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("ARCH","linux-x86")
epicsEnvSet("IOC","iocrockTest")
epicsEnvSet("TOP","/home/sdi/Bureau/epics3.14.11/rockTest")
epicsEnvSet("EPICS_BASE","/home/sdi/Bureau/epics3.14.11/base-3-14-11")
epicsEnvSet("ASYN","/home/sdi/Bureau/epics3.14.11/modules/softs/asyn4-19")
cd /home/sdi/Bureau/epics3.14.11/rockTest
## Register all support components
dbLoadDatabase "dbd/rockTest.dbd"
rockTest_registerRecordDeviceDriver pdbbase
drvAsynIPPortConfigure("Mirco850","134.158.42.116:502", 0, 1, 1)
modbusInterposeConfig("Mirco850", 0, 5000)
# Read the DigitalOutput DO0 at modbus adress 00001.
drvModbusAsynConfigure("modbusPort", "Mirco850", 0, 2, 00001, 1, 0,  
1000, "Rockwell")
## Load record instances
#dbLoadRecords("db/xxx.db","user=sdiHost")
dbLoadRecords("db/bi_test.db","P=DO, R=0")
cd /home/sdi/Bureau/epics3.14.11/rockTest/iocBoot/iocrockTest
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.11 $R3-14-11$ $2009/08/28 18:47:36$
## EPICS Base built Jul 23 2013
############################################################################
cas warning: Configured TCP port was unavailable.
cas warning: Using dynamically assigned TCP port 34829,
cas warning: but now two or more servers share the same UDP port.
cas warning: Depending on your IP kernel this server may not be
cas warning: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=sdiHost"
epics> 2014/03/03 16:48:54.659 drvModbusAsyn::doModbusIO port modbusPort 
is disconnected

epics>
epics> dbl
DO0
epics> dbtr DO0
ACKS: NO_ALARM      ACKT: YES           ASG:                BKPT: 00
COSV: NO_ALARM      DESC:               DISA: 0             DISP: 0
DISS: NO_ALARM      DISV: 1             DTYP: asynUInt32Digital
EVNT: 0             FLNK:CONSTANT 0
INP:INST_IO @asynMask(modbusPort, 0, 1, 1000)MODBUS_DATA    LALM: 0
LCNT: 0             MASK: 1             MLST: 0             NAME: DO0
NSEV: NO_ALARM      NSTA: NO_ALARM      ONAM: 1             ORAW: 0
OSV: MINOR          PACT: 0             PHAS: 0             PINI: NO
PRIO: LOW           PROC: 0             PUTF: 0             RPRO: 0
RVAL: 0             SCAN: 1 second      SDIS:CONSTANT       SEVR: NO_ALARM
SIML:CONSTANT       SIMM: NO            SIMS: NO_ALARM SIOL:CONSTANT
STAT: NO_ALARM      SVAL: 0             TIME: 2014-03-03 17:14:57.906900018
TPRO: 0             TSE: 0              TSEL:CONSTANT       UDF: 0
VAL: 0              ZNAM: 0             ZSV: NO_ALARM
epics>


The bi_test.db I made, copy of bi_bit.template:

# bi record template for register inputs
record(bi,"$(P)$(R)") {
     field(DTYP,"asynUInt32Digital")
     field(INP,"@asynMask(modbusPort, 0, 1, 1000) MODBUS_DATA")
     field(SCAN,"1 second")
     field(ZNAM,"0")
     field(ONAM,"1")
     field(ZSV,"0")
     field(OSV,"1")
}

Yours sincerely

--
Rémi FAURE
Assistant Engineer at Detectors and Instrumentation Department
LPSC Grenoble
53 av des Martyrs
38026 Grenoble Cedex
FRANCE
tel 33 (0)4 76 28 41 21
fax 33 (0)4 76 28 41 84
E-mail:[email protected]





Le 17/02/2014 13:34, Mark Rivers a écrit :
> Hi Rémi,
>
> Are you using the EPICS "modbus" module? It can be found here:
> http://cars.uchicago.edu/software/epics/modbus.html
>
> That has examples of how to build an IOC application, and has a test iocBoot directory to demonstrate it.
>
> Basically your IOC xxxInclude.dbd file needs this line:
> include "modbusSupport.dbd"
>
> and your IOC Makefile needs this line:
> PROD_LIBS += modbus
>
> If you are using the "modbus" module and still have questions please let me know.
>
>
> Mark
>
>
>
>
> ________________________________________
> From:[email protected]  [[email protected]] on behalf of faure [[email protected]]
> Sent: Monday, February 17, 2014 3:05 AM
> To:[email protected]
> Subject: EPICS/ModbusTCP communication with Rockwell Micro 850 PLC
>
> Hi,
>
> I want to create an EPICS IOC to communicate with a Rockwell Micro 850
> PLC via Modbus TCP, but I'm stuck at the start of the process.
>
> Which template of MakeSupport.pl is recommended for Modbus TCP?
>
> Where can I find "how to" document for Modbus TCP communication? It
> helped myself perfectly for my firsts Serial and GPIB tries.
>
> Thank you in advance.
> Yours sincerely
>
> --
> Rémi FAURE
> Assistant Engineer at Detectors and Instrumentation Department
> LPSC Grenoble
> 53 av des Martyrs
> 38026 Grenoble Cedex
> FRANCE
> tel 33 (0)4 76 28 41 21
> fax 33 (0)4 76 28 41 84
> E-mail:[email protected]
>
>



References:
EPICS/ModbusTCP communication with Rockwell Micro 850 PLC faure
RE: EPICS/ModbusTCP communication with Rockwell Micro 850 PLC Mark Rivers
Re: EPICS/ModbusTCP communication with Rockwell Micro 850 PLC faure

Navigate by Date:
Prev: Re: EPICS/ModbusTCP communication with Rockwell Micro 850 PLC faure
Next: Battling to start archive.engine on Postgresql db Ivan Kohler
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS/ModbusTCP communication with Rockwell Micro 850 PLC faure
Next: Re: IOC logging Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·