Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: RBPLC on January 12, 2020, 11:56:05 AM

Title: UDT Mapping to Discrete I/O
Post by: RBPLC 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?
Title: Re: UDT Mapping to Discrete I/O
Post by: franji1 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.