1. EPICS IOC on CompactRIO EPICS Collaboration Meeting Fall 2011.
SAVE/RESTORE ROUTINES FOR EPICS
-
Upload
harrison-terrance -
Category
Documents
-
view
29 -
download
0
description
Transcript of SAVE/RESTORE ROUTINES FOR EPICS
![Page 1: SAVE/RESTORE ROUTINES FOR EPICS](https://reader036.fdocuments.in/reader036/viewer/2022072013/56812ae0550346895d8eca96/html5/thumbnails/1.jpg)
SAVE/RESTORE ROUTINES FOR EPICS
Leo R. Dalesio, Los Alamos National Laboratory
EPICS COLLABORATION MEETINGNOVEMBER, 1995
![Page 2: SAVE/RESTORE ROUTINES FOR EPICS](https://reader036.fdocuments.in/reader036/viewer/2022072013/56812ae0550346895d8eca96/html5/thumbnails/2.jpg)
LIMITATIONS
• The routines are loaded and executed in vxWorks
• The maximum save rate is limited by the file I/O to about once every 2 seconds
• The files are loaded into memory - using about 2 times the size of the request file
![Page 3: SAVE/RESTORE ROUTINES FOR EPICS](https://reader036.fdocuments.in/reader036/viewer/2022072013/56812ae0550346895d8eca96/html5/thumbnails/3.jpg)
SAVE• Periodic: create_periodic_set (filename,period)
– save every period• Triggered: create_triggered_set
(filename,trigger_channel)– save when trigger channel is non-zero
• On: create_monitor_set (filename)– save when min_period is expired and one channel
has changed• Manual: create_manual_set (filename,period)
– save when manual_save(filename) is called• The trigger channel and monitor sets use the channel
access monitor• To save channels - the channel access GET is used: no
deadbands applied vs. slower
![Page 4: SAVE/RESTORE ROUTINES FOR EPICS](https://reader036.fdocuments.in/reader036/viewer/2022072013/56812ae0550346895d8eca96/html5/thumbnails/4.jpg)
SAVE• There is only one save set per "filename" even if multiple
methods are enabled.
• The data is currently saved to the save file name:
– default is "filename".sav (filename is truncated to the first '.'
– set_savefile_name(filename,"savefile name");
• There are two global variables limiting the frequency of the save:
– min_period = 4.0; Save no more frequent than once every 4 secs
– min_period = 1.0; Check if save is required every 1
• Save incomplete sets is an option:
– sr_save_incomplete_sets_ok = 1;
• fdblist(); will print all enabled save files
![Page 5: SAVE/RESTORE ROUTINES FOR EPICS](https://reader036.fdocuments.in/reader036/viewer/2022072013/56812ae0550346895d8eca96/html5/thumbnails/5.jpg)
File Formats
• File for the enable routines:
• ArcVoltage• ArcCurrent• ArcPower• ArcVoltage.FRED• RF1:setting
• Savefile:• # save/restore
V1.0 .......• ! 2 channel(s) not
connected - ......• ArcVoltage 2.8• ArcCurrent 123.7• ArcPower on 1• ArcVoltage.FRED
Search Issued• RF1:setting No Value
![Page 6: SAVE/RESTORE ROUTINES FOR EPICS](https://reader036.fdocuments.in/reader036/viewer/2022072013/56812ae0550346895d8eca96/html5/thumbnails/6.jpg)
Restoring Saved Files
• Using Channel Access:– fdbrestore(savefile_name)– Works across the network– Must be called after IOC initialization is complete
• Using Database Access:– reboot_restore(savefile_name)– Works only on the local IOC– Can be called in init_hooks before database
initialization• Produces a backup file if the restore is successful:
– savefile_name.bu• Restore incomplete sets is an option:
– sr_restore_incomplete_sets_ok = 1;