Interface IS7SymbolTemplate


public interface IS7SymbolTemplate
Interface to provide methods to access the Step 7 symbols. The interface is implemented by the Siemens Step 7 plug-ins (S7CodeGenerator and S7LogicGenerator)
Author:
Ivan Prieto Barreiro
  • Method Summary

    Modifier and Type
    Method
    Description
    This function provides the symbol name of the DB for a given instance name (e.g.
    s7db_id(String name, boolean isDBSimpleRequested)
    This function provides the symbol name of the DB for a given instance name (e.g.
    s7db_id(String name, String deviceTypes)
    This function provides the symbol name of the DB for a given instance name (e.g.
    s7db_id(String name, String deviceTypes, boolean isDBSimpleRequested)
    This function provides the symbol name of the DB for a given instance name (e.g.
    s7db_id(research.ch.cern.unicos.utilities.IDeviceInstance instance, boolean isDBSimpleRequested)
    This function provides the symbol name of the DB for a given instance name (e.g.
  • Method Details

    • s7db_id

      String s7db_id(String name, String deviceTypes) throws Exception
      This function provides the symbol name of the DB for a given instance name (e.g. s7db_id(AIRinstance1Name,"AnalogInputReal") returns DB_AIR_All.AIR_SET).

      Example:

       FeedbackOn = instance.getAttributeData("FEDeviceEnvironmentInputs:Feedback On")
       if FeedbackOn != "":
           s7db_id_result=self.thePlugin.s7db_id(FeedbackOn, "DigitalInput")
           self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
       

      Parameters:
      name - Is the name of the instance that we want to process
      deviceTypes - Device type list (comma separated)
      Returns:
      The symbol name.
      Throws:
      Exception
    • s7db_id

      String s7db_id(String name, String deviceTypes, boolean isDBSimpleRequested) throws Exception
      This function provides the symbol name of the DB for a given instance name (e.g. s7db_id(AIRinstance1Name,"AnalogInputReal") returns DB_AIR_All.AIR_SET).

      Note:

      • If the flag isDBSimpleRequested is TRUE, and
      • If the specified instance is an AnalogInputReal or a DigitalInput device
      Then, the returned String will be DB_<RepresentationName>_All_S.<RepresentationName>_SET.

      Example:

       FeedbackOn = instance.getAttributeData ("FEDeviceEnvironmentInputs:Feedback On")
       if FeedbackOn != "":
           s7db_id_result=self.thePlugin.s7db_id(FeedbackOn, "DigitalInput")
           self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
       

      Parameters:
      name - Is the name of the instance that we want to process
      deviceTypes - Device type list (comma separated)
      isDBSimpleRequested - TRUE if the DB Simple is requested. * @return The symbol name.
      Returns:
      The symbol name.
      Throws:
      Exception
    • s7db_id

      String s7db_id(String name) throws Exception
      This function provides the symbol name of the DB for a given instance name (e.g. s7db_id(AIRinstance1Name) returns DB_AIR_All.AIR_SET).

      Example:

       FeedbackOn = instance.getAttributeData ("FEDeviceEnvironmentInputs:Feedback On")
       if FeedbackOn != "":
           s7db_id_result=self.thePlugin.s7db_id(FeedbackOn)
           self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
       

      Parameters:
      name - Is the name of the instance that we want to process
      Returns:
      The symbol name.
      Throws:
      Exception
    • s7db_id

      String s7db_id(String name, boolean isDBSimpleRequested) throws Exception
      This function provides the symbol name of the DB for a given instance name (e.g. s7db_id(AIRinstance1Name,false) returns DB_AIR_All.AIR_SET).

      Note:

      • If the flag isDBSimpleRequested is TRUE, and
      • If the specified instance is an AnalogInputReal or a DigitalInput device
      Then, the returned String will be DB_<RepresentationName>_All_S.<RepresentationName>_SET.

      Example:

       s7db_id_result=self.thePlugin.s7db_id("DigitalInput_1")
       

      Parameters:
      name - Is the name of the instance that we want to process
      isDBSimpleRequested - TRUE if the DB Simple is requested.
      Returns:
      The symbol name.
      Throws:
      Exception
    • s7db_id

      String s7db_id(research.ch.cern.unicos.utilities.IDeviceInstance instance, boolean isDBSimpleRequested) throws Exception
      This function provides the symbol name of the DB for a given instance name (e.g. s7db_id(AIRinstance1,false) returns DB_AIR_All.AIR_SET).

      Note:

      • If the flag isDBSimpleRequested is TRUE, and
      • If the specified instance is an AnalogInputReal or a DigitalInput device
      Then, the returned String will be DB_<RepresentationName>_All_S.<RepresentationName>_SET.

      Example:

       FeedbackOn = instance.getAttributeData ("FEDeviceEnvironmentInputs:Feedback On")
       if FeedbackOn != "":
           s7db_id_result=self.thePlugin.s7db_id(FeedbackOn, true)
           self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
       

      Parameters:
      instance - Is the instance which symbol is requested.
      isDBSimpleRequested - TRUE if the DB Simple is requested.
      Returns:
      The symbol name.
      Throws:
      Exception