6
SAVE/RESTORE ROUTINES FOR EPICS Leo R. Dalesio, Los Alamos National Laboratory EPICS COLLABORATION MEETING NOVEMBER, 1995

SAVE/RESTORE ROUTINES FOR EPICS

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: SAVE/RESTORE ROUTINES FOR EPICS

SAVE/RESTORE ROUTINES FOR EPICS

Leo R. Dalesio, Los Alamos National Laboratory

EPICS COLLABORATION MEETINGNOVEMBER, 1995

Page 2: SAVE/RESTORE ROUTINES FOR EPICS

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

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

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

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

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;