Query the IO Map to Determine if a Variable is Mapped

Is there a library function to read the PLC variables connected to the IO map?

I had this idea to do different things in code if a variable is included in IO Map. It might be mapped for some hardware configurations but not others.

Hi @Rachel_M_Bond ,
We have few function blocks in the library AsIO that will help you:

  1. AsIOListDP and AsIOFListDP can be used to determine the existing I/O data points (for example: %QX.SS1.IF1.ST2.DigitalOutput02)
  2. AsIOPVInfo will tell which PV is linked with a data point.

We have an example in the Help of AsIO function usage

I see we have another post regarding AsIO library: How to use AsIO Library function AsIOFListDP() to get the pointer of a certain IO?

Thanks
Ciao
Valerio

4 Likes

Note: These FBs will execute immediately when run in the init part. So iterating through all I/O will take only a few milliseconds, compared to maybe minutes in the cyclic part, where each FB use at least one scan-time to complete.