Ramp Control Design
Index:
References:
Overview:
The ramp control program is meant for slow, time uncritical software ramping of parameters. The fastest control update rate is 1 second. There are three basic concepts in the program: Ramps, Events & Parameters. Ramps define the variation of a control value as a function of time. They are defined by a sequence of ramp elements. Each element defines a part of the ramp - a vector, a flattop etc. A special ramp element is the event element. This element will stay on same output value until the event is fulfilled. Several ramps can contain the same event. In order to run the ramps parameters must be assigned to the ramps. Several parameters can be assigned to one each ramp. The class structure and naming follows the concepts described above. The Ramp control application is implemented as a standard MFC MDI application. All ramp control is done through the MDI document. Several different views are used to edit and control the ramping: The CControlFormView is responsible for the ramp control. Different list views are used to display the ramp, parameter and event lists. Any number of independent Ramp document/view sets can exist concurrently.
Class list:
CRampElement: This is the base class for ramp elements. A ramp is defined as a sequence of ramp elements. Before the ramp is started the ramp element must be initialised by CRampElement::InitElement. When a element is reached in the ramp sequence the current control values must be set by CRampElement::SetStartValues. The control method now call the CRampElement::Update method repeatedly with the relative time since start of this element as input. The CRampElement::Update calculates the output control value and return the remaining time or 0, if the element has finished. Derived classes: CEventElement, CFlattop, CRampSetValue, CRateVector, CVector
CRamp: Implements the ramp as an ordered list of CRampElements.
CRampParameter: Storage and control class for ConSys parameters assigned to a CRamp. The class contains the information needed to access the control system and display the parameter, control and status data and ramp control attributes. A CRampParameter has a pointer to associated CRamp. The CRampParameter::Update method call the current ramp element Update method, and take care of changing to the following elements as ramp elements finish. The CRampParameter::Update must be called regularly until the ramp has finished.
CRampEvent: Base class for all events. The CEventElement ramp element contain a pointer to a CRampEvent. The CEventElement::Update method check the CRampElement::Test function to determine if should keep waiting (CEventElement::Update return 1) or continue (CEventElement::Update return 0). Some derived ramp events is used to send an control value to the ConSys control system an always return true. Derived classes: CRampEventTime (wait for a specific time condition), CRampConSysEvent (Wait for ConSys parameters fulfils specified conditions), CRampSetBitEvent (Set a ConSys bit), CEventSetWord (Set ConSys word) and CEventCopyValue.
CSoftRamp: This class is responsible for the software ramp control. It owns the ConSys client used to access the ConSys control system. The CSoftRamp notifies the control document, CRampControlDoc, by calling the data change methods in the control document. The CSoftRamp::UpdateSoftRamp is called regularly during ramping to update the ramps. It in turn calls the CRampParameter's Update methods.
CRampControlDoc: This is the Ramp control document in the standard MFC document/view structure. The document stores the lists of CRamp, CRampParameter and CRampEvent. It also the necessary control attributes. All user interactions are done through document methods. The CRampControlDoc create and own the CSoftRamp object running the Ramp. All ConSys data changes during ramping are notified to CRampControlDoc from CSoftRamp.
CControlFormView: The ramp control view - always exist when the when a ramp document is loaded. Responsible for the edit/run control and overall status display.
CRampControlListView: View showing a list of the defined CRampParameters, their current state and current ConSys values. Optional.
CRampControlView: View showing a list with the sequence of ramp elements defining a ramp. Optional.
CEventListView: View showing a list defined events. Optional
Last Modified 11 January 2019