Writing a IEC61850 point with select and operate

As described in the subject, I'm trying to write to an IEC61850 slave using the select and operate method.

First of all, I see that I cannot call the functions in 'system.iec61850' from a vision client, because they are only available in the gateway and perspective scope...
To try the functions, I made a gateway event script and saved the results in a test file.

I tried the 'system.iec61850.getControlParams' function and I correctly receive a list of available control names; one of the dictionary in the list is:

{name=AA1J1Q03A1CTRL/CBCSWI1.Pos, ctlModel=4, T=30000, Check=0, ctlNum=0, orCat=8, orIdent=process, Test=false}

If I try to execute the script:

mapParams = {'name': u'name=AA1J1Q03A1CTRL/CBCSWI1.Pos', 'T':30000, 'orCat': 8, 'orIdent': u'process', 'Check': 0, 'Test': False}
system.iec61850.select('TESTIEC', mapParams, 1)

I receive the error:

control not found: name=AA1J1Q03A1CTRL/CBCSWI1.Pos

What am I doing wrong?

Thank you

Remove name= from the beginning of the value in mapParams.

1 Like

Consider using a gateway message handler and system.util.sendRequest:

Thank you, my fault.
I tried so many different things that I lost track of the variable name...

Thank you, know it seems to work.

Tomorrow I will write the function using 'system.util.sendRequest'. I was using a gateway event script just for test/debugging purposes.