170 likes | 271 Views
EPICS <-> ACNet Integration with EpicsDevice. MOOC Front-end Based EPICS Wrappers Duane C. Voy AD Instrumentation. Manfred Wendt’s Instrumentation Requirements. Correlated data across subsystems ACNet collect on event & one-shot data acquisition LClk event
E N D
EPICS <-> ACNet IntegrationwithEpicsDevice MOOC Front-end Based EPICS Wrappers Duane C. Voy AD Instrumentation
Manfred Wendt’s Instrumentation Requirements • Correlated data across subsystems • ACNet collect on event & one-shot data acquisition LClk event • Timestamped data (wall clock/shot number?) • Multicast LClk with event counters & available as ACNet devices • Full MATLAB access to all readings/settings • ACNet Java API & MATLAB wrappers • Easy to use GUI Development • Synoptic with Display Builder & EDM for ACNet
HINS/NML Controls Plan? CLX GUI CLX Console Eng. Matlab ACNet & Channel Access Java ACNet data acquisition database logging alarms etc. OPI GUI Dev. Download OAC CA MOOC & ACNet Channel Access ClassACNet IOC EPICS FE MOOC MOOC & ACNet Classic & ACNet IOC EPICS IOC EPICS ••• FE MOOC HRM ACNet Channel Access IOC EPICS IOC EPICS OPI GUI •••
What Remains to be Done? CLX GUI CLX Console Eng. Matlab ACNet & Channel Access Java ACNet data acquisition database logging alarms etc. OPI GUI Dev. Download OAC CA MOOC & ACNet Channel Access ClassACNet IOC EPICS FE MOOC MOOC & ACNet Classic & ACNet IOC EPICS IOC EPICS ••• FE MOOC HRM ACNet Channel Access IOC EPICS IOC EPICS OPI GUI •••
EpicsDevice & ClassACNet CLX GUI CLX Console Eng. Matlab ACNet & Channel Access Java ACNet data acquisition database logging alarms etc. OPI GUI Dev. Download OAC CA MOOC & ACNet Channel Access ClassACNet IOC EPICS FE MOOC MOOC & ACNet Classic & ACNet IOC EPICS IOC EPICS ••• FE MOOC HRM ACNet Channel Access IOC EPICS IOC EPICS OPI GUI •••
Philosophy • Treat EPICS as a field bus • Use ClassACNet to bridge to any EPICS Process Variable field • Handle the basics: • Reading, Setting & Reading of Setting • Basic Status & Basic Control • Continuous and Snapshot fast (720 Hz) plots • Alarms & Limits
Features • Transparent ACNet <-> EPICS Bridge • Supports local & remote Process Variables • Adapts to IOC’s PV record fields • Data type • Array size
EpicsDevice - ‘Standard Record’ // constructor for 'standard' process variables // data objects: reading resides in pvName.VAL, setting resides in pvName.SET // control objects: reading resides in pvName.BSTA, setting resides in pvName.BCTL EpicsDeviceDB( ePortalStatus * const statusPtr, char const * const namePtr, unsigned int const deviceID, bool const controlObject, char const * const pvNamePtr, eDiagnosticControl const diagnosticControl = kDiagnosticDisable ); Example: (void) new EpicsDevice( &stat, “Z:EPICS”, 0x0001, kData, “ACNetTest”); (void) new EpicsDevice( &stat, “Z:EPICS”, 0x0001, kCtrl, “ACNetTest”);
EpicsDevice - More General // constructor for general process variables // reading and setting may reside in any specified <record_name.field_name> // if reading or setting is not required use NULL for associated xxxNamePtr parameter EpicsPv( ePortalStatus * const statusPtr, char const * const namePtr, unsigned int const deviceID, bool const controlObject, char const * const readingNamePtr, char const * const settingNamePtr, eDiagnosticControl const diagnosticControl = kDiagnosticDisable ); Example: (void) new EpicsDevice( &stat, “Z:EPICS”, 0x0001, kData, “ACNetTest.VAL”, “ACNetTest.SET” ); (void) new EpicsDevice( &stat, “Z:EPICS”, 0x0001, kCtrl, “ACNetTest.BSTA”, “ACNetTest.BCTL” ); (void) new EpicsDevice( &stat, “Z:EPICSA”, 0x0003, kData, “ACNetTest.WAVE”, NULL );
sineRecord.dbd recordtype(sine) { include "dbCommon.dbd" field(VAL,DBF_FLOAT) { prompt("Reading") special(SPC_NOMOD) } field(SET,DBF_FLOAT) { asl(ASL0) prompt("Setting") special(SPC_MOD) } field(BSTA,DBF_ULONG) { prompt("Status") special(SPC_NOMOD) } field(BCTL,DBF_ULONG) { asl(ASL0) prompt("Control") special(SPC_MOD) } ... ... field(WAVE,DBF_NOACCESS) { prompt(”Waveform") special(SPC_DBADDR) extra(“float wave[1024]”) } }
sineRecord.db record(sine,"ACNetTest") { field(DESC, "sine wave test channel") field(SET, “1.0” ) field(BCTL, “1” ) field(SCAN, ”.1 second") }
Proposed SSDN SSDNHX xxxxxx (0000/0018/0000/0000) ! |||| |||| |||| |||| ! |||| |||| |||| ||-->>>>chan :== deviceChannel ! |||| |||| |||| -->>>>typ :== deviceType ! |||| |||| ---->>>>misc ! |||| ---->>>>oid :== classID ! ||||>>>>misc2 :== dbrType ! ! Where: ! deviceType 1: array device ! deviceType 2: channel device ! deviceType 3: byte length/offset device ! ! dbrType: one of DBR_xxx from db_access.h !
Proposed Download ! ! DI: device index ! PI: property index ! PV name: (e.g., “mydata.VAL” or “mydata.SET”) ! dbrType: one of DBR_xxx from db_access.h !
Remaining Work • Add support for RETDAT_REQUEST & RETDAT_CANCEL • Clone a New ClassACNetEPICS supporting: • Device index rather than deviceID • Individual property indices • Dehong Zhang’s EPICS fast data collection • Add new EpicsDevice constructors supporting individual property operation
What I Want from Controls Dept. • DI to be in plot_set and snaps_set structures • FTP fixed in MOOC/ACNet under VW 6.x • Device name to DI/SSDN lookup support
References • See ClassACNet documentation on Beams Document Server for more on ClassACNet and other ClassACNet object accessors