EPICS Home

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  <20172018  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  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: problem connecting serial device with moxa 5150A
From: Mark Rivers <[email protected]>
To: Sunny Badkul <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Wed, 18 Jan 2017 12:58:31 +0000
The fact that you can ping the Moxa means that your Linux networking is OK.

The fact that telnet does not connect suggests that the port you are using (4001) is not working.

On the Moxa you need to make sure that the port address is set to 4001 for the serial port you are using, and that the port is in the correct "mode".  On my Moxa box (NPort 5610) the mode I use is called "TCP Server" mode.

Mark

________________________________
From: Sunny Badkul [[email protected]]
Sent: Wednesday, January 18, 2017 6:35 AM
To: Mark Rivers
Cc: [email protected]
Subject: Re: problem connecting serial device with moxa 5150A


Thank you Mark,
              I tried commands as you suggested and following is the result
~> ping 192.168.127.254
PING 192.168.127.254 (192.168.127.254) 56(84) bytes of data.
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=1 ttl=255 time=0.857 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=2 ttl=255 time=0.831 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=3 ttl=255 time=0.823 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=4 ttl=255 time=0.808 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=5 ttl=255 time=0.714 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=6 ttl=255 time=0.757 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=7 ttl=255 time=0.766 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=51 ttl=255 time=0.840 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=52 ttl=255 time=0.723 ms
64 bytes from 192.168.127.254<http://192.168.127.254>: icmp_seq=53 ttl=255 time=0.857 ms
64 bytes from 192.168.

________________________________127.254: icmp_seq=54 ttl=255 time=0.742 ms
^C
--- 192.168.127.254 ping statistics ---
54 packets transmitted, 54 received, 0% packet loss, time 53000ms
rtt min/avg/max/mdev = 0.691/0.783/0.857/0.054 ms



telnet 192.168.127.254:4001<http://192.168.127.254:4001>
telnet: 192.168.127.254:4001<http://192.168.127.254:4001>: Name or service not known



:~> telnet 192.168.127.254
Trying 192.168.127.254...
telnet: connect to address 192.168.127.254<http://192.168.127.254>: Connection timed out


Also I attached screenshot of the configuration of Ethernet port which is connected to moxa. I am weak in Networking so thare are chances for mistake in configuration.

thanks

On Wed, Jan 18, 2017 at 5:28 PM, Mark Rivers <[email protected]<mailto:[email protected]>> wrote:
Hi Sunny,

What happens if you try to ping the Moxa device from the Linux command line?

ping 192.168.127.254<http://192.168.127.254:4001>

What happens if you try to telnet to the port and type some commands for the Keithley?

telnet 192.168.127.254:4001<http://192.168.127.254:4001><http://192.168.127.254:4001>

Are you sure that one of your Ethernet ports is correctly configured for the subnet with the 192.168.127.254<http://192.168.127.254:4001> subnet?

Mark


________________________________
From: [email protected]<mailto:[email protected]> [[email protected]<mailto:[email protected]>] on behalf of Sunny Badkul [[email protected]<mailto:[email protected]>]
Sent: Wednesday, January 18, 2017 4:56 AM
To: [email protected]<mailto:[email protected]>
Subject: problem connecting serial device with moxa 5150A

hello all,
I am designing an IOC for my serial device which is an  keithley picoammeter. I am using Linux opensuse and EPICS base 3.14.12.5 and stream device. when I  am connecting my device with usb/serial cable it works file. st.cmd for above setup is

#!../../bin/linux-x86_64/K6485

## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("P","$(P=K6485:)")
< envPaths
epicsEnvSet("STREAM_PROTOCOL_PATH","${TOP}/db")
cd "${TOP}"

## Register all support components
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
##############################################################################
dbLoadRecords "/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18/db/asynRecord.db" "P=$(P),R=asyn,PORT=L0,ADDR=-1,OMAX=0,IMAX=0"
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
#drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
asynSetTraceMask("L0",-1,0x09)
asynSetOption("L0", -1, "baud", "9600")
asynSetOption("L0", -1, "bits", "8")
asynSetOption("L0", -1, "parity", "none")
asynSetOption("L0", -1, "stop", "1")
asynSetOption("L0", -1, "clocal", "Y")
asynSetOption("L0", -1, "crtscts", "Y")
asynOctetSetInputEos("L0", -1, "\r\n")
asynOctetSetOutputEos("L0", -1, "\r\n")
asynSetTraceIOMask("L0",-1,0x2)
asynSetTraceMask("L0",-1,0x09)
###############################################################################
dbLoadRecords "db/devK6485.db" "P=$(P),R=1:,PORT=L0,A=-1,NELM=1000"
#dbLoadRecords "/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18/db/asynRecord.db" "P=$(P),R=asyn,PORT=L0,ADDR=-1,OMAX=0,IMAX=0"
## Load record instances
#dbLoadRecords("db/xxx.db","user=pxbl21-1Host")

cd "${TOP}/iocBoot/${IOC}"
iocInit

## Start any sequence programs
#seq sncxxx,"user=pxbl21-1Host"



Now I want to connect my device through moxa 5150A board which is a Ethernet to serial converter having default IP address 192.168.127.254 I changed st.cmd and the error log is like --

#!../../bin/linux-x86_64/K6485
## You may have to change K6485 to something else
## everywhere it appears in this file
epicsEnvSet("P","K6485:")
< envPaths
epicsEnvSet("ARCH","linux-x86_64")
epicsEnvSet("IOC","iocK6485")
epicsEnvSet("TOP","/home/pxbl21-1/programs/epics/bl21/K6485")
epicsEnvSet("ASYN","/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18")
epicsEnvSet("STREAM","/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/stream-2-5-1")
epicsEnvSet("EPICS_BASE","/home/pxbl21-1/programs/epics/base-3.14.12.5")
epicsEnvSet("STREAM_PROTOCOL_PATH","/home/pxbl21-1/programs/epics/bl21/K6485/db")
cd "/home/pxbl21-1/programs/epics/bl21/K6485"
## Register all support components
dbLoadDatabase "dbd/K6485.dbd"
K6485_registerRecordDeviceDriver pdbbase
##############################################################################
# Set up ASYN ports
# drvAsynIPPortConfigure port ipInfo priority noAutoconnect noProcessEos
#drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0)
drvAsynIPPortConfigure("L0","192.168.127.254:4001<http://192.168.127.254:4001><http://192.168.127.254:4001>",0,0,0)
asynSetTraceMask("L0",0,0x09)
#asynSetOption("L0", 0, "baud", "9600")
#asynSetOption("L0", 0, "bits", "8")
#asynSetOption("L0", 0, "parity", "none")
#asynSetOption("L0", 0, "stop", "1")
#asynSetOption("L0", 0, "clocal", "Y")
#asynSetOption("L0", 0, "crtscts", "Y")
#asynOctetSetInputEos("L0", 0, "\r\n")
#asynOctetSetOutputEos("L0", 0, "\r\n")
asynSetTraceIOMask("L0",0,0x2)
asynSetTraceMask("L0",0,255)
###############################################################################
dbLoadRecords "db/devK6485.db" "P=K6485:,R=1:,PORT=L0,A=0,NELM=1000"
dbLoadRecords "/home/pxbl21-1/programs/epics/modules/synApps_5_6/support/asyn-4-18/db/asynRecord.db" "P=K6485:,R=asyn,PORT=L0,ADDR=0,OMAX=0,IMAX=0"
## Load record instances
#dbLoadRecords("db/xxx.db","user=pxbl21-1Host")
cd "/home/pxbl21-1/programs/epics/bl21/K6485/iocBoot/iocK6485"
iocInit
Starting iocInit
############################################################################
## EPICS R3.14.12.5 $Date: Tue 2015-03-24 09:57:35 -0500$
## EPICS Base built Sep 15 2016
############################################################################
2017/01/18 16:13:59.525 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:16:06.248 asynManager connect queueCallback port:L0
2017/01/18 16:16:06.248 Open connection to 192.168.127.254:4001<http://192.168.127.254:4001><http://192.168.127.254:4001>  reason:0  fd:-1
2017/01/18 16:16:26.243 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.480 L0 K6485:1:Measure: pasynCommon->connect() failed: Can't connect to 192.168.127.254:4001<http://192.168.127.254:4001><http://192.168.127.254:4001>: Connection timed out
2017/01/18 16:18:13.480 asynManager connect queueCallback port:L0
2017/01/18 16:18:13.480 Open connection to 192.168.127.254:4001<http://192.168.127.254:4001><http://192.168.127.254:4001>  reason:0  fd:-1
2017/01/18 16:18:13.480 _main_ K6485:1:Measure: @init handler failed
2017/01/18 16:18:13.480 _main_ K6485:1:Measure: Record initialization failed
2017/01/18 16:18:13.481 K6485:asyn: queueRequest failed

2017/01/18 16:18:13.481 K6485:asyn: queueRequest failed

2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
2017/01/18 16:18:13.983 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:13.983 L0 schedule queueRequest timeout
iocRun: All initialization complete
## Start any sequence programs
#seq sncxxx,"user=pxbl21-1Host"
epics> 2017/01/18 16:18:18.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:18.482 L0 schedule queueRequest timeout
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:18.978 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:18.978 L0 schedule queueRequest timeout
2017/01/18 16:18:23.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:23.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:23.482 L0 schedule queueRequest timeout
2017/01/18 16:18:23.974 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:28.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:28.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:28.482 L0 schedule queueRequest timeout
2017/01/18 16:18:33.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:33.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:33.482 L0 schedule queueRequest timeout
2017/01/18 16:18:38.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:38.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:38.482 L0 schedule queueRequest timeout
2017/01/18 16:18:43.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:43.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:43.482 L0 schedule queueRequest timeout
2017/01/18 16:18:48.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:48.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:48.482 L0 schedule queueRequest timeout
2017/01/18 16:18:53.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:53.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:53.482 L0 schedule queueRequest timeout
2017/01/18 16:18:58.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:18:58.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:18:58.482 L0 schedule queueRequest timeout
2017/01/18 16:19:03.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:19:03.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:19:03.482 L0 schedule queueRequest timeout
2017/01/18 16:19:08.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:19:08.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:19:08.482 L0 schedule queueRequest timeout
2017/01/18 16:19:13.477 L0 asynManager:queueTimeoutCallback
2017/01/18 16:19:13.482 L0 addr -1 queueRequest priority 3 not lockHolder
2017/01/18 16:19:13.482 L0 schedule queueRequest timeout




I did configuration for moxa, setting baudrate 9600 and operating mode -- TCP server. My RS232 is straight through.
is there any problem in networking or I am missing something in IOC??
hoping for fast reply and solution.

thanks in advance



regards..
Sunny




Replies:
RE: problem connecting serial device with moxa 5150A Mark Rivers
References:
problem connecting serial device with moxa 5150A Sunny Badkul
RE: problem connecting serial device with moxa 5150A Mark Rivers
Re: problem connecting serial device with moxa 5150A Sunny Badkul

Navigate by Date:
Prev: Re: problem connecting serial device with moxa 5150A Priller, John
Next: Re: Knowing if a server application is running Bo Jakobsen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: problem connecting serial device with moxa 5150A Sunny Badkul
Next: RE: problem connecting serial device with moxa 5150A Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024