Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: RE: Modbus help
From: "Mark Rivers" <rivers@cars.uchicago.edu>
To: <emma.shepherd@diamond.ac.uk>, <tech-talk@aps.anl.gov>
Date: Wed, 25 Nov 2009 08:10:59 -0600
Hi Emma,
 
I've just had a quick look at your startup script.  The only think that catches my eye is the start address of 1.  Is this Modbus address supported by the device?  I doubt if this is the problem though, because even with an invalid address I think the device should be sending back an error response if it received a command with the correct slave address.  Have you checked the simple stuff, like whether you need a null modem (swap pins 2 and 3)?
 
#drvModbusAsynConfigure(portName,tcpPortName,modbusFunction,modbusStartAddress,modbusLength,dataType,pollMsec,plcType);
modbusRead = 3
drvModbusAsynConfigure("readTemp", "ty_72_0", modbusRead, 1, 1, 0, 1500, "N2300")

Mark
 

________________________________

From: emma.shepherd@diamond.ac.uk [mailto:emma.shepherd@diamond.ac.uk]
Sent: Wed 11/25/2009 3:37 AM
To: Mark Rivers; tech-talk@aps.anl.gov
Subject: RE: Modbus help



Hi Mark,

I've attached my startup script (the modbus stuff is at the bottom).
There are actually 8 devices in an RS-485 chain, at the moment I'm just
trying to talk to the one which is configured with address '1' (although
I have tried the others as well).  They use serial/RTU.

I turned on trace for the Modbus port as well, here's what I get:

01 03 00 01 00 01 d5 ca
2009/11/25 09:33:41.823 drvModbusAsyn::doModbusIO port readTemp error
calling writeRead, error=, nwrite=5/5, nread=0
2009/11/25 09:33:42.173 readTemp queueRequest synchronous
2009/11/25 09:33:42.173 ME02P-DI-TMON-01:TEMP1 devAsynFloat64::process
read error
2009/11/25 09:33:43.323 drvModbusAsyn::doModbusIO port readTemp has I/O
error
2009/11/25 09:33:43.323 drvModbusAsyn::doModbusIO port readTemp
disconnect device OK
2009/11/25 09:33:43.323 drvModbusAsyn::doModbusIO port readTemp connect
device OK
2009/11/25 09:33:43.323 /ty/72/0 write 8

01 03 00 01 00 01 d5 ca
2009/11/25 09:33:44.823 drvModbusAsyn::doModbusIO port readTemp error
calling writeRead, error=, nwrite=5/5, nread=0
2009/11/25 09:33:46.323 drvModbusAsyn::doModbusIO port readTemp has I/O
error
2009/11/25 09:33:46.323 drvModbusAsyn::doModbusIO port readTemp
disconnect device OK
2009/11/25 09:33:46.323 drvModbusAsyn::doModbusIO port readTemp connect
device OK
2009/11/25 09:33:46.323 /ty/72/0 write 8

Thanks a lot,
Emma


> -----Original Message-----
> From: Mark Rivers [mailto:rivers@cars.uchicago.edu]
> Sent: 24 November 2009 17:32
> To: Shepherd, Emma (DLSLtd,RAL,DIA); tech-talk@aps.anl.gov
> Subject: RE: Modbus help
>
>
> Hi Emma,
>
> Here are some questions/suggestions:
>
> - Can you send your startup script? 
> - How have you set the interpose interface, etc? 
> - Does your device use serial/RTU (binary) or serial/ASCII protocol? 
> - What is the slave address of your device?
> - You have turned on asynTrace for the underlying asyn serial
> port. Please also turn on asynTrace for the Modbus asyn port.
>  That should be very helpful.
>
> Once I know how it is configured I can figure out if those 8
> characters it is sending are correct.
>
> Mark
>
>
> -----Original Message-----
> From: tech-talk-bounces@aps.anl.gov
> [mailto:tech-talk-bounces@aps.anl.gov] On Behalf Of
> emma.shepherd@diamond.ac.uk
> Sent: Tuesday, November 24, 2009 10:52 AM
> To: tech-talk@aps.anl.gov
> Subject: Modbus help
>
> Hi,
>
> I'm trying to get an RS-485 chain of N2300 temperature
> monitors talking to EPICS using the asyn modbus support
> (R1-3) and so far am not having much luck.  Basically I just
> get no response back from any of them, although I'm pretty
> confident I'm sending out the right message (I checked it
> with a serial analyser) and have configured the correct comms setting.
>
> After iocInit I get the following message on the console
> (with asynTrace turned on):
>
> 2009/11/24 16:03:34.302 drvModbusAsyn::doModbusIO port
> readTemp is disconnected
>
> and then lots of I/O errors:
>
> 02 03 00 01 00 01 d5 f9
> 2009/11/24 16:03:38.952 drvModbusAsyn::doModbusIO port
> readTemp error calling writeRead, error=, nwrite=5/5, nread=0
> 2009/11/24 16:03:39.302 ME02P-DI-TMON-01:TEMP1
> devAsynFloat64::process read error 2009/11/24 16:03:40.452
> drvModbusAsyn::doModbusIO port readTemp has I/O error
> 2009/11/24 16:03:40.452 /ty/72/0 write 8
>
> 02 03 00 01 00 01 d5 f9
> 2009/11/24 16:03:41.952 drvModbusAsyn::doModbusIO port
> readTemp error calling writeRead, error=, nwrite=5/5, nread=0
> 2009/11/24 16:03:43.452 drvModbusAsyn::doModbusIO port
> readTemp has I/O error 2009/11/24 16:03:43.452 /ty/72/0 write 8
>
> ....... etc
>
> asynReport prints the following:
>
> modbus port: readTemp
>     asynOctet server:   ty_72_0
>     modbusFunction:     3
>     modbusStartAddress: 01
>     modbusLength:       01
>     plcType:            N2300
>     I/O errors:         119
>     Read OK:            0
>     Write OK:           0
>     pollDelay:          1.500000
>     Time for last I/O   0 msec
>     Max. I/O time:      0 msec
> value = 0 = 0x0
>
> Am I likely to be chasing a wiring/hardware issue here or is
> there something standing out that indicates a problem higher
> up? This is the first time I've tried to use modbus so I'm
> not sure what a 'working' system looks like!
>
> Thanks in advance,
>
> Emma
>
>
> --
> This e-mail and any attachments may contain confidential,
> copyright and or privileged material, and are for the use of
> the intended addressee only. If you are not the intended
> addressee or an authorised recipient of the addressee please
> notify us of receipt by returning the e-mail and do not use,
> copy, retain, distribute or disclose the information in or
> attached to the e-mail. Any opinions expressed within this
> e-mail are those of the individual and not necessarily of
> Diamond Light Source Ltd.
> Diamond Light Source Ltd. cannot guarantee that this e-mail
> or any attachments are free from viruses and we cannot accept
> liability for any damage which you may sustain as a result of
> software viruses which may be transmitted in or with the
> message. Diamond Light Source Limited (company no. 4375679).
> Registered in England and Wales with its registered office at
> Diamond House, Harwell Science and Innovation Campus, Didcot,
> Oxfordshire, OX11 0DE, United Kingdom
> 
>
>
>
>
>



--

This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.

Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.

Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.

Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom













References:
RE: Modbus help emma.shepherd

Navigate by Date:
Prev: Addition of command primitives to Asyn motor matthew.pearson
Next: Re: Next generation EPICS display manager Darren Dale
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: RE: Modbus help emma.shepherd
Next: RE: Modbus help Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·