Experimental Physics and Industrial Control System
|
I set the crLinkP.lockDevice to 1 as Eric suggested, and it does the
trick! My ioc locked the devices exclusively.
Additional findings:
1, the ICS 8065 Ethernet-GPIB controller has a configurable timeout for
the communications with the TCP/IP clients. If the ioc does not
communicate with any GPIB devices for the timeout amount of time, the
8065 will release all locks created by the ioc.
2, if the ioc is terminated by the iocshell "exit" command, the 8065
does not release the locks created by the ioc until the communication
timeout expires.
3, if the ioc is terminated by ctrl-c in the iocshell, the 8065 releases
the locks created by the ioc immediately. It seems that the ioc upon
"exit" does not unlock the links nor close the sockets, whereas ctrl-c
at least does one of them.
Thank you Eric and Mark for your help.
Best regards,
William
Eric Norum wrote:
Here's the code at the beginning of the vxiCreateDeviceLink routine. As you can see, the lockDevice parameter is always set to 0.
static BOOL vxiCreateDeviceLink(vxiPort * pvxiPort,
char *devName,Device_Link *pDevice_Link)
{
enum clnt_stat clntStat;
Create_LinkParms crLinkP;
Create_LinkResp crLinkR;
BOOL rtnVal = FALSE;
asynUser *pasynUser = pvxiPort->pasynUser;
crLinkP.clientId = (long) pvxiPort->rpcClient;
crLinkP.lockDevice = 0; /* do not try to lock the device */
crLinkP.lock_timeout = 0;/* if device is locked, forget it */
crLinkP.device = devName;
.
.
.
You could try setting lockDevice to 1 and see if this gets you the effect that you want.
I don't have my VXI-11 documents handy right now to see what happens if a client disappears suddenly (from a power-fail or such) without explicitly releasing the lock.
On Dec 2, 2010, at 9:10 AM, William Lu wrote:
Hello,
I am using asyn records with the vxi-11 driver in a soft ioc to control the HP3458A GPIB devices through an ICS 8065 Ethernet-GPIB Controller. I want to lock the devices using the vxi-11 locking so that the ioc has an exclusive access to the devices. Does asyn vxi-11 driver or asyn record already provide the vxi-11 locking function for users to lock and unlock GPIB devices and if they do, how do I use them?
Best regards,
William Lu
--
Weiwei Lu
757-269-7476
[email protected]
--
Weiwei Lu
757-269-7476
[email protected]
- Replies:
- RE: Asyn VXI-11 Driver and VXI-11 Locking Mark Rivers
- Re: Asyn VXI-11 Driver and VXI-11 Locking Eric Norum
- References:
- Asyn VXI-11 Driver and VXI-11 Locking William Lu
- Re: Asyn VXI-11 Driver and VXI-11 Locking Eric Norum
- Navigate by Date:
- Prev:
Re: string array PV Pierrick Hanlet
- Next:
RE: Asyn VXI-11 Driver and VXI-11 Locking 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
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Asyn VXI-11 Driver and VXI-11 Locking Eric Norum
- Next:
RE: Asyn VXI-11 Driver and VXI-11 Locking 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
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 02 Dec 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|