This is a very inefficient way to access the IOC because each
time this function is called the IOC must be found with UDP, the TCP circuit
must be established, and the TCP circuit must be shutdown. If this
was called in a tight loop it could load your network.
> There is another two ways to do it :
> Either make whole program in Visual C
> or put CHID array into my wrapper DLL, together with CA_Initialize
> and others.
I am guessing that you are working in visual basic? I suspect that that
Kay Kasemir's work with DDE and Active X might be utilized as a clean link into
EPICS from Visual Basic. In any case, placing the chid array into the
initialization part of your program sounds like a better approach.
> DLL_API int CA_Get(char *name, void *value)
> {
> int status;
> chid mychid;
>
> ca_search(name,&mychid);
> ca_pend_io(5.0);
> status=ca_get(mychid->privType,mychid,value);
> ca_pend_io(5.0);
> ca_clear_channel(mychid);
> ca_pend_io(5.0);
> return status;
> }
The program provided above is probably not exactly the same as the
program which generated the messages provided so it is more difficult
to determine the cause of the problem. Nevertheless, I will guess that
the ca_pend_io() associated with the ca_search() is the one that is timing out.
This might indicate that your IOC is not always available. This might
happen if the network link is broken, the IOC is turned off, or
the IOC's CPU is temporarily saturated. If there
isn't any simple explanation for the IOC not being available then I would
increase the timeout to see if this results from a transient load on your
network or a transient saturation of the IOC's CPU. It would also
be interesting to know the number of times the operation succeeds compared
to the number of times it fails.
We have heard reports that an old version of Microsoft's winsock II
DLL on W95 can result in unreliable behavior of CA. I am not aware of any other
reason why R3.13.1 CA would perform differently on W95 compared with other OS.
Jeff
PS: I will be leaving on a 1 week vacation later today
> -----Original Message-----
> From: Dennis M. Reichhold [mailto:[email protected]]
> Sent: Thursday, July 20, 2000 11:57 AM
> To: [email protected]
> Subject: EPICS on a PC
>
>
> Hell0
>
> A co-worker is writing a program in Win9x to read out many channels and he
> frequently runs into problems (he mail to me follows). He's reading 288
> each from two of the IOC's (they're the ones that time-out most often).
> Is this something that will plague us as long as we're running on a PC, or
> is there a way around it? He's based his code on 3.13.1 for PC. Thanks.
>
> -Dennis
>
> ***************************************************************************
>
> I have some problems accessing different EPICS channels with
> this diagnostic message:
> =======================================================
> CA.Client.Diagnostic..............................................
> Message: "User specified timeout on IO operation expired"
> Severity: "Warning" Context: "ca_pend_io failure"
> ..................................................................
> CA.Client.Diagnostic..............................................
> Message: "The request was ignored because the specified channel is disconnected"
> Severity: "Error" Context: "ca_get failure"
> =======================================================
>
> It seems to be wrong timeout parameter in ca_pend_io.
> I'd tried to set it to 20 seconds but stil get this messages.
> I'm sending you small piece of my code, which I put
> into a DLL, may be it's wrong (I'm not so familiar with EPICS).
> The main program just calls:
>
> CA_Initialize();
> while(!Terminated) {
> CA_Get(...); // for each variable name (about 400 calls) in each cycle.
> }
> CA_Task_Exit();
>
> The reason for clearing channels after each reading is as follows:
> It's hard to implement CHID structure in my program,
> therefore I can't keep CHID for each variable.
> There is another two ways to do it :
> Either make whole program in Visual C
> or put CHID array into my wrapper DLL, together with CA_Initialize
> and others.
> Could you advise something or explain me what's wrong with that ?
> May be timeout is still too small ?
>
> ================== Code goes here =================
>
> DLL_API int CA_Initialize(void)
> {
> return ca_task_initialize();
> }
>
> DLL_API int CA_Task_Exit(void)
> {
> return ca_task_exit();
> }
>
> DLL_API int CA_Get(char *name, void *value)
> {
> int status;
> chid mychid;
>
> ca_search(name,&mychid);
> ca_pend_io(5.0);
> status=ca_get(mychid->privType,mychid,value);
> ca_pend_io(5.0);
> ca_clear_channel(mychid);
> ca_pend_io(5.0);
> return status;
> }
>
- References:
- EPICS on a PC Dennis M. Reichhold
- Navigate by Date:
- Prev:
EPICS on a PC Dennis M. Reichhold
- Next:
delphi interface to EPICS? matthias muntwiler
- 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:
EPICS on a PC Dennis M. Reichhold
- Next:
delphi interface to EPICS? matthias muntwiler
- 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
|