60 likes | 211 Views
SAVE/RESTORE ROUTINES FOR EPICS. Leo R. Dalesio, Los Alamos National Laboratory EPICS COLLABORATION MEETING NOVEMBER, 1995. 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
E N D
SAVE/RESTORE ROUTINES FOR EPICS Leo R. Dalesio, Los Alamos National Laboratory EPICS COLLABORATION MEETING NOVEMBER, 1995
LIMITATIONS • The routines are loaded and executed invxWorks • The maximum save rate is limited by thefile I/Oto about once every 2 seconds • The files are loaded into memory - usingabout 2 times the size of the request file
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 accessmonitor • To save channels - the channel access GET isused:no deadbands applied vs. slower
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
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:settingNo Value File Formats
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 databaseinitialization • Produces a backup file if the restore is successful: • savefile_name.bu • Restore incomplete sets is an option: • sr_restore_incomplete_sets_ok = 1;