system.secsgem.copyEquipment
This function is used in Python Scripting.
Description
Creates a copy of an equipment connection. Common settings can be overridden for the new connection.
An exception is thrown if the new Equipment Connection cannot be created.
Client Permission Restrictions
Permission Type: SECS/GEM Management
Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when called in the Gateway scope.
Syntax
This function accepts keyword arguments.
system.secsgem.copyEquipment( equipmentSource, newEquipmentName, enabled, activeAddress, activePort, passiveAddress, passivePort, deviceId [, dbTablePrefix] [,description])
Parameters
Type | Parameter | Description |
---|---|---|
String | equipmentSource | Some new equipment settings will be retrieved from this equipment connection. Specify the source equipment connection name. |
String | newEquipmentName | The name of the new equipment connection. |
Boolean | enabled | If set to false, the new equipment connection will be disabled after it is created. |
String | activeAddress | IP Address of new equipment. Must be specified if the SECS/GEM module is used in Active mode. Otherwise, do not use this parameter. |
Integer | activePort | Port number of new equipment. Must be specified if the SECS/GEM module is used in Active mode. Otherwise, do not use this parameter. |
String | passiveAddress | IP Address of new equipment. Must be specified if the SECS/GEM module is used in Passive mode. Otherwise, do not use this parameter. |
Integer | passivePort | Port number of new equipment. Must be specified if the SECS/GEM module is used in Passive mode. Otherwise, do not use this parameter. |
Integer | deviceId | Unique identifier of new equipment. This value must be an integer, and is specified within the equipment. |
String | dbTablePrefix | SECS/GEM database table names will use the specified prefix for the new equipment connection. If no prefix is specified, the description of the source equipment will be used. Optional. |
String | description | The description for the new equipment connection. If no description is specified, the description of the source equipment will be used. Optional. |
Returns
None
Scope
Designer, Client
Address and Port Parameters
When calling this function, only one set of address and port parameters need to be specified: Either activeAddress and activePort, or passiveAddress and passivePort. Optionally, both sets of parameters may be specified, but the function will throw an exception if neither are specified.
Code Examples
system.secsgem.copyEquipment(equipmentSource="ToolOne", newEquipmentName="ToolTwo", enabled=True, activeAddress="192.168.1.5", activePort=15500, deviceId=0)