Skip to main content
Version: 7.9

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

TypeParameterDescription
StringequipmentSourceSome new equipment settings will be retrieved from this equipment connection. Specify the source equipment connection name.
StringnewEquipmentNameThe name of the new equipment connection.
BooleanenabledIf set to false, the new equipment connection will be disabled after it is created.
StringactiveAddressIP Address of new equipment. Must be specified if the SECS/GEM module is used in Active mode. Otherwise, do not use this parameter.
IntegeractivePortPort number of new equipment. Must be specified if the SECS/GEM module is used in Active mode. Otherwise, do not use this parameter.
StringpassiveAddressIP Address of new equipment. Must be specified if the SECS/GEM module is used in Passive mode. Otherwise, do not use this parameter.
IntegerpassivePortPort number of new equipment. Must be specified if the SECS/GEM module is used in Passive mode. Otherwise, do not use this parameter.
IntegerdeviceIdUnique identifier of new equipment. This value must be an integer, and is specified within the equipment.
StringdbTablePrefixSECS/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.
StringdescriptionThe 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

Code Snippet - Copy Equipment
system.secsgem.copyEquipment(equipmentSource="ToolOne", newEquipmentName="ToolTwo", enabled=True, activeAddress="192.168.1.5", activePort=15500, deviceId=0)