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 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
<== Date ==> <== Thread ==>

Subject: Re: problem connecting serial device with moxa 5150A
From: "Priller, John" <priller@frib.msu.edu>
To: Sunny Badkul <sunnybadkulji@gmail.com>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Wed, 18 Jan 2017 12:51:22 +0000
Can you bring up the Moxa's web page in a browser?  If it pings but doesn't let you connect to port 4001, my guess is that it's not configured as "TCP Server Mode".

On 1/18/2017 7:37 AM, Sunny Badkul wrote:

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: 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



Trying 192.168.127.254...


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 <rivers@cars.uchicago.edu> wrote:
Hi Sunny,

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

ping 192.168.127.254<MailScanner warning: numerical links are often malicious: http://192.168.127.254:4001>

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

telnet MailScanner warning: numerical links are often malicious: 192.168.127.254:4001<MailScanner warning: numerical links are often malicious: 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<MailScanner warning: numerical links are often malicious: http://192.168.127.254:4001> subnet?

Mark


________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Sunny Badkul [sunnybadkulji@gmail.com]
Sent: Wednesday, January 18, 2017 4:56 AM
To: tech-talk@aps.anl.gov
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","MailScanner warning: numerical links are often malicious: 192.168.127.254:4001<MailScanner warning: numerical links are often malicious: 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 MailScanner warning: numerical links are often malicious: 192.168.127.254:4001<MailScanner warning: numerical links are often malicious: 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 MailScanner warning: numerical links are often malicious: 192.168.127.254:4001<MailScanner warning: numerical links are often malicious: 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 MailScanner warning: numerical links are often malicious: 192.168.127.254:4001<MailScanner warning: numerical links are often malicious: 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



-- 
John A. Priller             | Phone : (517) 908-7375
MSU Cyclotron Laboratory    | Email : priller@frib.msu.edu
640 S. Shaw Lane room 4303  | Web   : http://people.nscl.msu.edu/~priller/
East Lansing, MI 48824      |

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

Navigate by Date:
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  <2017
Navigate by Thread:
Prev: RE: problem connecting serial device with moxa 5150A Mark Rivers
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  <2017
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·