Hi Zhefu,
I am sending this message again without the embedded images so it is much smaller. In the future please use cut-and-paste from your IOC output, not screen shots.
It looks to me like your device is accepting the socket connection on port 502, but then it is not responding to the messages that the IOC is sending. The driver is waiting 2 seconds and not getting any reply from your device. This is probably for 1 or more of the following 3 reasons:
1) You are not using the correct protocol. You are using Modbus TCP. Have you studied the manual for your device carefully and verified that it uses Modbus TCP, and not Modbus RTU?
2) You are not using the correct Modbus function codes. Are you sure that your device supports functions codes 3 and 16?
3) You are not using the correct Modbus addresses. Are you sure that your device supports reading 95 words at address 0 and writing 8 words at address 48?
Mark
________________________________
From: lzfneu [[email protected]]
Sent: Tuesday, March 29, 2016 1:40 AM
To: Mark Rivers; [email protected]
Subject: RE: Question about the connection refused
Hi Mark,
Thanks for your respond.
Sorry, I lost to modified the error and re-sent this email, in layer type TCP/IP no delay is needed,
so the command changed as follows:
> modbusInterposeConfig("UCOS123",0,0,0)
The modified input files are as follows:
#!../../bin/linux-x86_64/modbusApp
< envPaths
dbLoadDatabase("../../dbd/modbus.dbd")
modbus_registerRecordDeviceDriver(pdbbase)
# Use the following commands for TCP/IP
#read Device ID 2
drvAsynIPPortConfigure("UCOS123","192.168.1.125:502",0,0,1)
asynSetTraceIOMask("UCOS123",0,4)
asynSetTraceMask("UCOS123",0,9)
modbusInterposeConfig("UCOS123",0,0,0)
# Read 100 words (1600 bits). Function code=3.
drvModbusAsynConfigure("read123", "UCOS123", 0, 3, 0, 95, 0, 100,"M22A")
# Write 8 words (128 bits). Function code=16
drvModbusAsynConfigure("write123", "UCOS123", 0, 16, 48, 8, 0, 1,"M22A")
iocInit
and the the error messages are shown below:
>
- References:
- Question about the softioc connection refused ? lzfneu
- RE: Question about the softioc connection refused ? Mark Rivers
- RE: Question about the connection refused lzfneu
- RE: Question about the connection refused Mark Rivers
- RE: Question about the connection refused Mark Rivers
- RE: Question about the connection refused lzfneu
- RE: Question about the connection refused Mark Rivers
- RE: Question about the connection refused Mark Rivers
- RE: Question about the connection refused lzfneu
- Navigate by Date:
- Prev:
RE: About Pilatus IOC Error Messgae.. Mark Rivers
- Next:
Re: FFT and waveform Jan Marjanovic
- 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:
RE: Question about the connection refused lzfneu
- Next:
caget pv with a space 梁雅翔
- 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
|