Experimental Physics and Industrial Control System
|
Hi Stefen,
On 11/27/19 5:08 AM, Stefen Paul via Tech-talk wrote:
Anybody having idea about how to access Time of Day clock on VMVE-6100 CPU board using vxWorks 6.9 and get the actual time and date ?
You should be able to build a vxWorks image for the mv6100 with INCLUDE_RTC enabled (by default it is excluded). The API they provide is not called by EPICS since it isn't standardized, but you should be able to write code to read and write the time using it
(sysRtc.c even provides a setAnsiSysTime() routine that calls clock_settime() but I'm not sure if/when it might be called). The BSP documentation says about it:
Real-Time Clock
Support for a real-time clock is provided. The clock is implemented with the M48T37 Timekeeper SRAM.
Real-time clock support is included in the BSP by defining INCLUDE_RTC in config.h. This support by default is excluded.
The real-time clock can be set in your application code with a call to sysRtcSet(). The following information needs to be supplied in order to set the RTC: century, year, month, day of month, day of week, hour, minute, and second. The current RTC settings
can be retrieved with a call to sysRtcGet(). The current RTC date and time can be displayed with a call to sysRtcShow(). However, the real-time clock must be set via sysRtcSet() or via the MotLoad "set" command the first time the board is used. The sysRtcDateTimeHook()
routine is provided as a hook to the VxWorks dosFsLib as a means of providing the date and time for file timestamps.
You should be able to write a clock-time provider for the EPICS generalTime system if you wanted to use that as a source of time for your IOCs, but I haven't tried doing that myself. Getting at the BSP's header files isn't trivial and it looks like you might
need them to use the API.
Alternatively you might want write your own driver; accessing the RTC is surprisingly easy.
Dirk Zimoch's post here shows how, although he's only reading the chip's battery status bit. I would also look at the code in the BSP's m48t37.c and m48t37.h files.
HTH,
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
|
- References:
- Getting TOD Stefen Paul via Tech-talk
- Navigate by Date:
- Prev:
areaDetector and GigE Prosilica GE680 Bekman, Ilja via Tech-talk
- Next:
Re: areaDetector and GigE Prosilica GE680 Mark Rivers 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
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Getting TOD Stefen Paul via Tech-talk
- Next:
areaDetector and GigE Prosilica GE680 Bekman, Ilja 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
<2019>
2020
2021
2022
2023
2024
|
ANJ, 27 Nov 2019 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|