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  2014  2015  2016  2017  2018  <20192020  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  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: USBTMC Device can not autoConnect
From: Mark Rivers via Tech-talk <[email protected]>
To: 'Eric Norum' <[email protected]>, Christopher Herrmann <[email protected]>
Cc: Marty Kraimer via Tech-talk <[email protected]>
Date: Fri, 19 Jul 2019 13:56:41 +0000

Ø  I  checked that autoConnect code and it does print the error message supplied by the driver:

 

I found the problem.  Eric’s comment above that asynManager.c does print the correct error message means that he must be using asyn R4-32 or earlier.  In R4-33 I made this change:

 

-    if(status!=asynSuccess) {

-        asynPrint(pasynUser,ASYN_TRACE_ERROR,

-            "%s %s %d autoConnect could not connect\n",

-            pasynUser->errorMessage,pport->portName,addr);

+        if (status != asynSuccess) {

+            reportConnectStatus(pport, portConnectDriver,

+                "%s %d autoConnect could not connect\n", pport->portName, addr);

+        } else {

+            reportConnectStatus(pport, portConnectSuccess,

+                "%s %d port is now connected\n",

+                pport->portName, addr);

+        }

 

The asynPrint was replaced with a call to reportConnectStatus.  This was done so there is a single message printed when the port changes its connect status, rather than a continuous stream of messages when the device is not available.  However, I neglected to include the pasynUser->errorMessage in the string passed to reportConnectStatus.  I have now fixed that in the master branch, and when I run the testUSBTMC application on a system with no USBTMC devices I now get this error message.

 

usbtmcConfigure("usbtmc1")

No device information specified.  Will connect to first USB TMC device found.

2019/07/19 08:35:12.828 usbtmc1 -1 autoConnect could not connect: No Vendor/Product/Serial match found

 

Mark

 

 

From: Eric Norum <[email protected]>
Sent: Wednesday, July 17, 2019 12:28 PM
To: Christopher Herrmann <[email protected]>; Mark Rivers <[email protected]>
Cc: Marty Kraimer via Tech-talk <[email protected]>
Subject: Re: USBTMC Device can not autoConnect

 

I  checked that autoConnect code and it does print the error message supplied by the driver:

 

    if (!pdpCommon->connected) {

        epicsMutexMustLock(pport->synchronousLock);

        status = pasynCommon->connect(drvPvt,pasynUser);

        epicsMutexUnlock(pport->synchronousLock);

    }

    if(status!=asynSuccess) {

        asynPrint(pasynUser,ASYN_TRACE_ERROR,

            "%s %s %d autoConnect could not connect\n",

            pasynUser->errorMessage,pport->portName,addr);

    }



So the fact that there’s nothing printed between the time and the port name implies that the USBTMC connect method is returning a value other than asynSuccess but is not filling in an error message.

I had a look through drvAsynUSBTMC.c and can see no place that its connect method returns asynError without filling a value into pasynUser->errorMessage.

What version of ASYN are you using?

Mark, any idea what’s going on here?



On Jul 17, 2019, at 9:55 AM, Christopher Herrmann <[email protected]> wrote:

 

I tried the command you suggested. Here is the output when running the IOC.

 

usbtmcConfigure("U0", 0x05E6, 0x2230, "", 0, 0)
Will connect to first USB TMC device found with vendor ID 0x05e6 and product ID 0x2230.
2019/07/17 12:53:34.209 U0 -1 autoConnect could not connect

 

 


References:
USBTMC Device can not autoConnect Christopher Herrmann via Tech-talk
Re: USBTMC Device can not autoConnect Eric Norum via Tech-talk
Re: USBTMC Device can not autoConnect Eric Norum via Tech-talk
Re: USBTMC Device can not autoConnect Eric Norum via Tech-talk

Navigate by Date:
Prev: RE: SmarAct MCS2 ASCII-based IOC Stubbs Scott Allen (PSI) via Tech-talk
Next: Channel Access and channel name weirdness Michael Westfall via Tech-talk
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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: USBTMC Device can not autoConnect Mark Rivers via Tech-talk
Next: Re: USBTMC Device can not autoConnect Eric Norum via Tech-talk
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  <20192020  2021  2022  2023  2024 
ANJ, 19 Jul 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·