# Writing a IEC61850 point with select and operate

**URL:** <https://forum.inductiveautomation.com/t/writing-a-iec61850-point-with-select-and-operate/95857>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [September 11, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/writing-a-iec61850-point-with-select-and-operate/95857 "2024-09-11T15:29:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![taglias](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@taglias](https://forum.inductiveautomation.com/u/taglias)\
**Post date:** [September 11, 2024, 3:29pm UTC](https://forum.inductiveautomation.com/t/writing-a-iec61850-point-with-select-and-operate/95857/1 "2024-09-11T15:29:49Z")

</div>

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:

```python
{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:

```python
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:

```python
control not found: name=AA1J1Q03A1CTRL/CBCSWI1.Pos

```

What am I doing wrong?

Thank you

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 11, 2024, 3:35pm UTC](https://forum.inductiveautomation.com/t/writing-a-iec61850-point-with-select-and-operate/95857/2 "2024-09-11T15:35:08Z")

</div>

> [@taglias](#):
>
> `name=AA1J1Q03A1CTRL/CBCSWI1.Pos`

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

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 11, 2024, 3:51pm UTC](https://forum.inductiveautomation.com/t/writing-a-iec61850-point-with-select-and-operate/95857/3 "2024-09-11T15:51:15Z")

</div>

> [@taglias](#):
>
> To try the functions, I made a gateway event script and saved the results in a test file.

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

> **[system.util.sendRequest | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-sendRequest)**
>
> This function sends a message to the Gateway, working in a similar manner to the sendMessage function, except sendRequest expects a response to the message.

---

<div class="post-metadata">

**Author:** ![taglias](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@taglias](https://forum.inductiveautomation.com/u/taglias)\
**Post date:** [September 11, 2024, 4:08pm UTC](https://forum.inductiveautomation.com/t/writing-a-iec61850-point-with-select-and-operate/95857/4 "2024-09-11T16:08:46Z")

</div>

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.
