EPICS Home

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: epicsTimer
From: "Szalata, Zenon M." <[email protected]>
To: Matthieu Bec <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 3 Jun 2010 14:52:29 -0700
Thanks All for answering.
I did consider using the hardware timer on the mvme6100 board.  This would require to use vxWorks specific calls, which I wanted to avoid, as well as other complications.

I went ahead and implemented the functionality I was seeking in external hardware, namely NIM.  It seems to be working OK.  I might learn how to program the epicsTimer some other time.

Thanks again,
Zen

-----Original Message-----
From: Matthieu Bec [mailto:[email protected]] 
Sent: Thursday, June 03, 2010 2:48 PM
To: Szalata, Zenon M.
Cc: [email protected]
Subject: Re: epicsTimer


Hi Zen
I seem to recall using some SBC that had programmable auxiliary clock(s) 
one could programme to trigger at predefined rate: maybe your h/w has 
that capability.
"sysClkRateSet(5000)" from vxWorks, indeed be very cautious !

Matthieu


On 06/03/10 17:35, Ron Sluiter wrote:
> Addressing the limits of the VxWorks system clock....
>
> With VxWorks 5.5, the upper limit on the system clock is set by the
> SYS_CLK_RATE_MAX parameter in the <WIND_BASE>/target/config/mv<cpubrd>.h
> file. For a MVME5100 board, the default limit is 5000 Hz (200 us). The
> default system clock rate to 60 Hz. You can change the system clock
> (before EPICS iocInit is called and only with EPICS R3.14 and above)
> with a "sysClkRateSet(5000)" call. Of course, setting the system clock
> to 5000 Hz is going to cause a timer interrupt every 200 us and create a
> lot of overhead; use with caution.
>
> Ron
>
> Eric Norum wrote:
>> The epicsTimer quantum is that of the vxWorks system clock and is
>> almost certainly too large for this to be accomplished.
>> If you have a hardware timer available you could use it to generate
>> interrupts and perform the timing that way.
>> If you need really precise timing you might have to move all this out
>> to custom hardware.
>>
>>
>> On Jun 3, 2010, at 1:15 PM, Szalata, Zenon M. wrote:
>>
>>> I have a VME system, which is external trigger driven. I wrote a
>>> device driver for one of the modules in the VME crate. The device
>>> driver is so far OSI. I am using EPICS R3.14.11 and vxWorks 6.6.
>>>
>>> In my device driver, I need to execute a command a few hundred of
>>> micro seconds after the trigger. The device driver responds to the
>>> trigger, by queuing a call back routine. I would like to setup in the
>>> trigger handling call back routine another call back routine to be
>>> called a few hundred microseconds later. I don't want to call vxWorks
>>> routines directly. Looking through "EPICS: Input/Output Controller
>>> Application Developer's Guide", it seems to me that epicsTimer is a
>>> good candidate. Unfortunately, as it is for me, this guide is very
>>> good once I know what I am doing. Since I have not used epicsTimer
>>> before, the description in the guide is not explicit enough to be
>>> useful.
>>>
>>> I would greatly appreciate if someone sent me an example of how to
>>> accomplish my goal in a device driver written in C.
>>>
>>> Thank you,
>>> Zen
>>>
>>
>


-- 
Matthieu Bec              Gemini Observatory
Tel: +56 51 205785        c/o AURA, Casilla 603
Fax: +56 51 205650        La Serena, Chile


References:
epicsTimer Szalata, Zenon M.
Re: epicsTimer Eric Norum
Re: epicsTimer Ron Sluiter
Re: epicsTimer Matthieu Bec

Navigate by Date:
Prev: Re: epicsTimer Matthieu Bec
Next: EPICS supported RGAs Ralph Lange
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: epicsTimer Matthieu Bec
Next: EPICS supported RGAs Ralph Lange
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