# Interfacing to the PLC best practice

**URL:** <https://forum.inductiveautomation.com/t/interfacing-to-the-plc-best-practice/101887>\
**Category:** Ignition\
**Created:** [February 5, 2025, 7:09am UTC](https://forum.inductiveautomation.com/t/interfacing-to-the-plc-best-practice/101887 "2025-02-05T07:09:00Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 6, 2025, 2:40pm UTC](https://forum.inductiveautomation.com/t/interfacing-to-the-plc-best-practice/101887/10 "2025-02-06T14:40:21Z")

</div>

> [@bmusson](#):
>
> backing DINT.

DINT for 0, 1, and 2 ?? Oy!

I prefer:

```python
XIC(On) XIC(Auto) OTE(InAuto)
XIC(On) XIO(Auto) OTE(InManual)

```

Then you can pack a bunch of named mode bits into just a few DWORDs. Poorly designed data types hurt you all over the place: memory usage and excess message traffic in particular.

You can also use the following to robustify the original Auto & Manual bits:

```python
XIC(Auto) XIO(Manual) OTE(InAuto)
XIC(Manual) XIO(Auto) OTE(InManual)

```

As seen with real Hand-Off-Auto switches feeding PLC inputs.

---

_[View the full topic](https://forum.inductiveautomation.com/t/interfacing-to-the-plc-best-practice/101887)._
