EcoStruxure Machine Expert version 1.1 does not support the M258, LMC058 and LMC078 controllers.

Device Parameters

Overview

To change a parameter, the parameter ID and the ParameterSet are required.

In order to find the required device and list the respective parameters, use the find method that finds objects by a given name or path in the project.

Script Engine Example

from __future__ import print_function
 
# Example-Device Lexium62
moduleName = 'DRV_Lexium62'

# find module/device in Project (you also can do this generic e.g. with get_children()...)
module = projects.primary.find(moduleName, True)[0]
 
# get all possible connectors for this device
connectors = module.connectors
print("Number of Connectors: ", connectors.Count)
print(" - ") 

cnt = 1
for c in connectors:
        print("Connector " +str(cnt) +" for "+moduleName +": ")
        params = c.host_parameters
        count = params.Count
        print("Number of available Parameters for this connector: ", count)

        if count > 0:
            for p in params:
                      print(p.visible_name + " - ID: %s " % p.id + " - Value: %s" % p.value)

            # example to get the value of a parameter by id:
            print(" - ")
            print(" - Example for a single Parameter (ObjectType) - ")
            objectType = params.by_id(268435457)
            print("ObjectType: ", objectType.value)

        cnt = cnt+1

        print("------------------------------------------------------------------")