I have an OPC server running on a milling machine and want to access the names of the tools which are currently available in the machine.
I do know that the names of the variables I am looking for are
Sinumerik/Tool/Catalogue/toolIdent[1]
Sinumerik/Tool/Catalogue/toolIdent[2]
and so on. I can see the corresponding values in a viewer such as uaexpert.
While I am able to access
Sinumerik/Tool/Catalogue/toolIdent
by successively walking down from the root, using commands such as
children=Position.get_children()
for child in children:
Position=child
this approach does not work for toolIdent[1]
since this is not a child.
How can I access these values of the array?
EDIT: One additional remark: The name of the tool is stored as a value of the node, not as a variable. I have come across the function get_array_dimensions, but this only seems to work for variables.
EDIT2: I have attached a screenshot of the UAExpert view of the array I am looking for. The three first values of the array are 3D_BLUM, 12, and 98.
EDIT3: In UAExpert, I am able to see to content of toolIdent[2]
by using the "add custom node" command, selecting a string node and offering " /Tool/Catalogue/toolIdent[2]" as parameter for the NodeId.
I am trying to find out how I can do the same using python (preferrably opcua library, and I am offering a bounty for reaching this goal in Python.
toolIdent
as a child of the node Catalogue,toolIdent[1]
is no child in the list of children of the node Catalogue. It seems that the fact that I can view it in uaexpert using anadd custom node
command does not mean that it actually IS a node. – Romain