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  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ASYN Addition
From: Andrew Wagner <[email protected]>
To: "Mark Rivers" <[email protected]>
Cc: Eric Norum <[email protected]>, [email protected]
Date: Wed, 18 Aug 2010 16:24:10 -0700
I'm using ASYN 4-13-1. Only the sleep after asynOctetConnect is really needed. Let me know if there is problem with this version of ASYN or if I should set the timeout to something other than the default. 

Cheers, 

Andrew

On Aug 18, 2010, at 11:55 AM, Mark Rivers wrote:

> What version of asyn? Connection management chaned in 4-14.
> 
> Which sleeps are really needed? All of them?
> 
> You can set the autoconnect timeout and also the write timeout.
> 
> Mark
> 
> 
> -----Original Message-----
> From: Andrew Wagner [mailto:[email protected]]
> Sent: Wed 8/18/2010 1:39 PM
> To: Mark Rivers
> Cc: Eric Norum; [email protected]
> Subject: Re: ASYN Addition
> 
> Hi Mark, 
> 
> I found that I had to put sleep statements in as: 
> 
> drvAsynIPPortConfigure("PROLOGIX", 172.25.100.85:1234)
> asynOctetConnect("prologix", "PROLOGIX")
> epicsThreadSleep(1)
> asynOctetWrite("prologix", "++mode 1\n")
> epicsThreadSleep(1)
> asynOctetWrite("prologix", "++auto 0\n")
> epicsThreadSleep(1)
> asynOctetWrite("prologix", "++addr 9\n")
> epicsThreadSleep(1)
> asynOctetWrite("prologix", "++eot_enable 0\n")
> epicsThreadSleep(1)
> asynOctetDisconnect("prologix")
> 
> to avoid the error: 
> 
> drvAsynIPPortConfigure("PROLOGIX", 172.25.100.85:1234)
> asynOctetConnect("prologix", "PROLOGIX")
> asynOctetWrite("prologix", "++mode 1\n")
> 2010/08/18 11:11:07.614 Error in asynOctetWrite, nout=0, len=9 error 172.25.100.85:1234 disconnected:
> 
> ect.... 
> 
> I'm not sure exactly what caused this error. I've compiled EPICS and ASYN on 64 bit darwin (OSX 10.6.4) with 2.5 GHz Intel Core 2 Duo so perhaps without sleep statements ASYN is writing things before the socket is really established. I have had no trouble with the device support and can issue read/write commands without error with dbtr record_name. 
> 
> Cheers, 
> 
> Andrew
> 
> 
> On Aug 14, 2010, at 7:02 AM, Mark Rivers wrote:
> 
>> Hi Andrew,
>> 
>>>> drvAsynIPBootMsg("172.25.100.85",1234,"++mode 1\n++auto 0\n++addr 9\n++eot_enable 0\n")
>> 
>> I think you should be able to do this with the following iocsh commands:
>> 
>> drvAsynIPPortConfigure("PROLOGIX", 172.25.100.85:1234)
>> asynOctetConnect("prologix", "PROLOGIX")
>> asynOctetWrite("prologix", "++mode 1\n++auto 0\n++addr 9\n++eot_enable 0\n")
>> 
>> 
>> Let me know if there are problems with this.
>> 
>> Mark
>> 
>> 
>> ________________________________
>> 
>> From: [email protected] on behalf of Andrew Wagner
>> Sent: Thu 8/12/2010 8:55 PM
>> To: Eric Norum
>> Cc: [email protected]
>> Subject: Re: ASYN Addition
>> 
>> 
>> 
>> Hey Eric,
>> 
>> Thanks. I've probably just (re)created something un-necessary. I'm self taught so I don't know about all of the functions available in ASYN. I'll check out asynSynIO, though now I'm not sure why TDS3000Reboot is kept around. I guess legacy.
>> 
>> Andrew
>> 
>> On Aug 12, 2010, at 6:35 PM, Eric Norum wrote:
>> 
>>> Aren't there asynSyncIO iocsh functions that could perform this?
>>> 
>>> On Aug 12, 2010, at 5:07 PM, Andrew Wagner wrote:
>>> 
>>>> Hey everyone,
>>>> 
>>>> I've created an Epics function drvAsynIPBootMsg based on the TDS3000Reboot function in vxi11. The function connects to a socket exactly as in TDS3000Reboot but here the user can input both a port number and custom boot/init string. For example when I want to boot my PROLOGIX-Ethernet GPIB controller I issue
>>>> 
>>>> drvAsynIPBootMsg("172.25.100.85",1234,"++mode 1\n++auto 0\n++addr 9\n++eot_enable 0\n")
>>>> 
>>>> in st.cmd before issuing drvAsynIPPortConfig . These commands are necessary for the PROLOGIX interpreter to GPIB commands that my driver sends it correctly. Here the IP address is 172....., the port is 1234 and the last string is the message. The command is registered in drvAsynIPPort . So far this is just my private code and I was wondering if I could commit it somewhere or submit it to an expert for approval. If anyone is interested let me know and I'll send it to you.
>>>> 
>>>> Cheers,
>>>> 
>>>> Andrew
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> --
>>> Eric Norum
>>> [email protected]
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 



Replies:
RE: ASYN Addition Mark Rivers
References:
ASYN Addition Andrew Wagner
Re: ASYN Addition Eric Norum
Re: ASYN Addition Andrew Wagner
RE: ASYN Addition Mark Rivers
Re: ASYN Addition Andrew Wagner
RE: ASYN Addition Mark Rivers

Navigate by Date:
Prev: RE: ASYN Addition Mark Rivers
Next: hex stream processing with StreamDevice? Barker, Alan M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: ASYN Addition Mark Rivers
Next: RE: ASYN Addition Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·