public class S7Functions extends Object
Constructor and Description |
---|
S7Functions() |
Modifier and Type | Method and Description |
---|---|
static LinkedHashSet<research.ch.cern.unicos.utilities.IDeviceInstance> |
get_instances_FI(String deviceType)
Function for getting the Fast Interlock HashSet of objects of the DeviceType specified
|
static String |
getTargetDeviceInformationParam(String parameterName,
String typeName)
Get the value of an attribute defined in the TargetDeviceInformation family from the Device type definition.
|
static void |
initialize()
Initialize the value of the internal member
isLargeApplication . |
static boolean |
isFastInterlock(research.ch.cern.unicos.utilities.IDeviceInstance deviceInstance)
Function for checkin if a particular instance is fast interlock
|
static boolean |
isLargeApplication()
Get the value of the class member isLargeApplication @see
initialize() |
static String |
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.
|
static String |
s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject,
String name)
This function provides the symbol name of the DB for a given instance name (e.g.
|
static String |
s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject,
String name,
boolean isDBSimpleRequested)
This function provides the symbol name of the DB for a given instance name (e.g.
|
static String |
s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject,
String name,
String deviceTypes)
This function provides the symbol name of the DB for a given instance name (e.g.
|
static String |
s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject,
String name,
String deviceTypes,
boolean isDBSimpleRequested)
This function provides the symbol name of the DB for a given instance name (e.g.
|
static String |
s7db_id(String name)
This function provides the symbol name of the DB for a given instance name (e.g.
|
static String |
s7db_id(String name,
boolean isDBSimpleRequested)
This function provides the symbol name of the DB for a given instance name (e.g.
|
static String |
s7db_id(String name,
String deviceTypes)
This function provides the symbol name of the DB for a given instance name (e.g.
|
static String |
s7db_id(String name,
String deviceTypes,
boolean isDBSimpleRequested)
This function provides the symbol name of the DB for a given instance name (e.g.
|
public static void initialize()
isLargeApplication
. The value is taken from the
UnicosApplication.xml file, parameter: SiemensPLC:SiemensSpecificParameters:GeneralConfiguration:LargeApplication
.
The method must be called once for each application generation before calling any of the s7dbid(...)
class methods.public static LinkedHashSet<research.ch.cern.unicos.utilities.IDeviceInstance> get_instances_FI(String deviceType)
deviceType
- Device Type which fast interlock objects are returnedpublic static boolean isFastInterlock(research.ch.cern.unicos.utilities.IDeviceInstance deviceInstance)
deviceInstance
- The instance to be checkedpublic static String s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject, String name, String deviceTypes) throws Exception
s7db_id(specFile, AIRinstance1Name, "AnalogInputReal")
returns DB_AIR_All.AIR_SET
).
Calling this method is equivalent to: s7db_id(IInstancesFacade, String, String, boolean)
with the boolean parameter equal to false.
Example:
FeedbackOn = instance.getAttributeData("FEDeviceEnvironmentInputs:Feedback On") if FeedbackOn != "": s7db_id_result=self.thePlugin.s7db_id(self.theUnicosProject, FeedbackOn, "DigitalInput") self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
theUnicosProject
- Java representation of the UNICOS specifications file.name
- Is the name of the instance that we want to processdeviceTypes
- Device type list (comma separated)Exception
public static String s7db_id(String name, String deviceTypes) throws Exception
s7db_id(AIRinstance1Name, "AnalogInputReal")
returns DB_AIR_All.AIR_SET
). The function
will use the same specs. file used in the application to search for the specified instance. Calling this method
is equivalent to: s7db_id(IInstancesFacade, String, String, boolean)
with the boolean parameter equal
to false.
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;''')
name
- Is the name of the instance that we want to processdeviceTypes
- Device type list (comma separated)Exception
public static String s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject, String name, String deviceTypes, boolean isDBSimpleRequested) throws Exception
s7db_id(specFile, AIRinstance1Name,"AnalogInputReal", false)
returns DB_AIR_All.AIR_SET
).
Note:
isDBSimpleRequested
is TRUE
, andAnalogInputReal
or a DigitalInput
deviceDB_<RepresentationName>_All_S.<RepresentationName>_SET.
Example:
FeedbackOn = instance.getAttributeData("FEDeviceEnvironmentInputs:Feedback On") if FeedbackOn != "": s7db_id_result=self.thePlugin.s7db_id(self.theUnicosProject, FeedbackOn, "DigitalInput", false) self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
theUnicosProject
- Java representation of the UNICOS specifications file.name
- Is the name of the instance that we want to processdeviceTypes
- Device type list (comma separated)isDBSimpleRequested
- TRUE if the DB Simple is requested.Exception
public static String s7db_id(String name, String deviceTypes, boolean isDBSimpleRequested) throws Exception
s7db_id(AIRinstance1Name,"AnalogInputReal", false)
returns DB_AIR_All.AIR_SET
). The
function will use the same specs. file used in the application to search for the specified instance.
Note:
isDBSimpleRequested
is TRUE
, andAnalogInputReal
or a DigitalInput
deviceDB_<RepresentationName>_All_S.<RepresentationName>_SET.
Example:
FeedbackOn = instance.getAttributeData("FEDeviceEnvironmentInputs:Feedback On") if FeedbackOn != "": s7db_id_result=self.thePlugin.s7db_id(FeedbackOn, "DigitalInput", false) self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
name
- Is the name of the instance that we want to processdeviceTypes
- Device type list (comma separated)isDBSimpleRequested
- TRUE if the DB Simple is requested.Exception
public static String s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject, String name) throws Exception
s7db_id(specFile, AIRinstance1Name)
returns DB_AIR_All.AIR_SET
). Calling this method is
equivalent to calling: s7db_id(IInstancesFacade, String, boolean)
with the boolean parameter equal to false.
Example:
FeedbackOn = instance.getAttributeData("FEDeviceEnvironmentInputs:Feedback On") if FeedbackOn != "": s7db_id_result=self.thePlugin.s7db_id(self.theUnicosProject, FeedbackOn) self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
theUnicosProject
- Java representation of the UNICOS specifications file.name
- Is the name of the instance that we want to processException
public static String s7db_id(String name) throws Exception
s7db_id(specFile, AIRinstance1Name)
returns DB_AIR_All.AIR_SET
). The function will use
the same specs. file used in the application to search for the specified instance. Calling this method is
equivalent to calling: s7db_id(IInstancesFacade, String, boolean)
with the boolean parameter equal to false.
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;''')
name
- Is the name of the instance that we want to processException
public static String s7db_id(research.ch.cern.unicos.utilities.IInstancesFacade theUnicosProject, String name, boolean isDBSimpleRequested) throws Exception
s7db_id(specFile, AIRinstance1Name, false)
returns DB_AIR_All.AIR_SET
).
Note::
isDBSimpleRequested
is TRUE
, andAnalogInputReal
or a DigitalInput
deviceDB_<RepresentationName>_All_S.<RepresentationName>_SET.
Example:
FeedbackOn = instance.getAttributeData("FEDeviceEnvironmentInputs:Feedback On") if FeedbackOn != "": s7db_id_result=self.thePlugin.s7db_id(self.theUnicosProject, FeedbackOn, false) self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
theUnicosProject
- Java representation of the UNICOS specifications file.name
- Is the name of the instance that we want to processisDBSimpleRequested
- TRUE if the DB Simple is requested.Exception
public static String s7db_id(String name, boolean isDBSimpleRequested) throws Exception
s7db_id(specFile, AIRinstance1Name, false)
returns DB_AIR_All.AIR_SET
). The function
will use the same specs. file used in the application to search for the specified instance.
Note:
isDBSimpleRequested
is TRUE
, andAnalogInputReal
or a DigitalInput
deviceDB_<RepresentationName>_All_S.<RepresentationName>_SET.
Example:
FeedbackOn = instance.getAttributeData("FEDeviceEnvironmentInputs:Feedback On") if FeedbackOn != "": s7db_id_result=self.thePlugin.s7db_id(self.theUnicosProject, FeedbackOn, false) self.thePlugin.writeInstanceInfo('''$Name$.HFOn:='''+s7db_id_result+FeedbackOn+'''.PosSt;''')
name
- Is the name of the instance that we want to processisDBSimpleRequested
- TRUE if the DB Simple is requested.Exception
public static String s7db_id(research.ch.cern.unicos.utilities.IDeviceInstance instance, boolean isDBSimpleRequested) throws Exception
s7db_id(Instance1Name, false)
returns DB_AIR_All.AIR_SET
).
Note:
isDBSimpleRequested
is TRUE
, andAnalogInputReal
or a DigitalInput
deviceDB_<RepresentationName>_All_S.<RepresentationName>_SET.
instance
- The device instance.isDBSimpleRequested
- TRUE if the DB Simple is requested.Exception
public static boolean isLargeApplication() throws research.ch.cern.unicos.plugins.interfaces.GenerationException
initialize()
initialize()
.research.ch.cern.unicos.plugins.interfaces.GenerationException
public static String getTargetDeviceInformationParam(String parameterName, String typeName)
parameterName
- Name of the parameter in the TargetDeviceInformation family.typeName
- Device type name.Copyright © 2010–2020 CERN. All rights reserved.