News:

  • August 21, 2026, 03:28:12 AM

Login with username, password and session length

Author Topic: UDT Mapping to Discrete I/O  (Read 6130 times)

RBPLC

  • Hero Member
  • *****
  • Posts: 586
UDT Mapping to Discrete I/O
« on: January 12, 2020, 11:56:05 AM »
Is there a way to directly map a UDT field to a physical I/O? For example, if I have the UDT Tank0.HighLimSwitch, can this be directly mapped to say X0, or would I have to use something like the COPY command to write the X0 value to the UDT field?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: UDT Mapping to Discrete I/O
« Reply #1 on: January 12, 2020, 02:37:20 PM »
Use the MAPIO instruction.

You could also use COPY (it works for any data type, not just bits, which is what MAPIO only supports).

Both are table-based instructions, so you can map/copy multiple entries in a single instruction.