To add a new waveform to an existing algorithm "aaa", category "ccc" 1) Define waveserver id using one of the following: #define T_aaa_xxxx CTA_ccc(nn) #define IST_aaa_xxxx ISTA_ccc(nn) #define FST_aaa_xxxx FSTA_ccc(nn) #define E_aaa_xxxx EA_ccc(nn) #define S_aaa_xxxx SA_ccc(nn) 2) Fill-in archiving information in appropriate array. Typically: Targets(Continuous,IntStep,FltStep) aaa_target_info[] PointerTargets aaa_?????_info[] Error aaa_error_info[] ShapeVectors aaa_shape_info[] Command(ctrl output) aaa_cmd_info[] Note: "inherent number" and "physics zero" not used on NSTX. 3) For target waveforms: o Create waveform description for waveserver: the big long struct, which includes parameters for editting in IDL. o aaa_vectors() - Add case to convert waveserver vertex to r/t target val. Note: uses "waveform name" from waveform description. o aaa_vertices() - Add case to provide initial set of vertices for un-initialized waveform only. That's it. Use vectors within realtime routines: { val1 = targets[T_aaa_VALUE1-1]; /* remember the "-1" ! */ val2 = targets[FST_aaa_VALUE2-1]; ival = istargets[IST_aaa_INTVALUE-1]; errors[E_aaa_ERRVAL-1] = errorValue; shape[S_aaa_COMPUTED-1] = computedValue; }