# Scripting PLC connections

**URL:** <https://forum.inductiveautomation.com/t/scripting-plc-connections/98004>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 31, 2024, 2:47pm UTC](https://forum.inductiveautomation.com/t/scripting-plc-connections/98004 "2024-10-31T14:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Breeding](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Matthew\_Breeding](https://forum.inductiveautomation.com/u/Matthew_Breeding)\
**Post date:** [October 31, 2024, 2:47pm UTC](https://forum.inductiveautomation.com/t/scripting-plc-connections/98004/1 "2024-10-31T14:47:56Z")

</div>

Hey I had a question about scripting plc connections, is there any way to make a plc connection via script? Like if I wanted to connect to an Allen Bradley plc could I specify that and pass in parameters to a function?

PseudoCode:  
`creatPLC('AllenBradley', IpAddress, Port, Timeout)`

My use case is I am enabling the user to specify the states(color, icon, description etc.) the plc may throw out while also specifying the plc connection that these states will be used with.

any link to documentation would be appreciated, thanks!

---

<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:** [October 31, 2024, 2:59pm UTC](https://forum.inductiveautomation.com/t/scripting-plc-connections/98004/2 "2024-10-31T14:59:07Z")

</div>

> **[system.device.addDevice | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-device/system-device-addDevice)**
>
> This function is used in Python Scripting.
