From OpenSCADAWiki
Jump to: navigation, search

Functions of the controller object (SYS.DAQ["Modul"]["Controller"]):

  • ElTp cfg( string nm ) — gets the value of the configuration field nm of the object.
  • bool cfgSet( string nm, ElTp val ) [access to the appropriate subsystem] — sets the configuration field nm of the object to the value val.
  • string name( ) — name of the controller object.
  • string descr( ) — description of the controller object and controller.
  • string status( ) — status of the controller.
  • bool messSet( string mess, int lev, string type2Code = "OP", string prm = "", string cat = "") — sets of the DAQ-sourced message mess with the level lev, for the parameter prm ({PrmId}), additional category information cat and the type code type2Code. This function forms the messages with the unified DAQ-transparency category {type2Code}{ModId}:{CntrId}[.{PrmId}][:{cat}], where:
    • type2Code — the message type two-symbol code, by default means the operator actions "OP";
    • ModId — identifier of the module;
    • CntrId — identifier of the controller object;
    • PrmId — parameter identifier, from the argument prm;
    • cat — additional category information which specific for the type type2Code.
  • bool alarmSet( string mess, int lev = -5, string prm = "", bool force = false ) — sets/removes of the violation mess with the level lev (negative to set otherwise to remove), for the parameter prm ({PrmId}\n{PrmNm}). The alarms clearance, as the setting also, works in the toggling mode, so means of passing the clearance messages to the message buffer, and the same clearance, only at the according violations presence, what may be disabled setting force. The function forms the alarms with the category al{ModId}:{CntrId}[.{PrmId}] and the text {CntrNm} > {PrmNm}: {MessText}, where:
    • ModId — identifier of the module;
    • CntrId — identifier of the controller object;
    • PrmId — parameter identifier, from the argument prm;
    • CntrNm — name of the controller object;
    • PrmNm — parameter name, from the argument prm;
    • MessText — message text.
  • bool enable( bool newSt = EVAL ) — gets the status "Enabled" or changes it by the argument newSt assign.
  • bool start( bool newSt = EVAL ) — gets the status "Running" or changes it by the argument newSt assign.