Beckhoff-USA-Community / SPT-Libraries

MIT License
70 stars 16 forks source link

IO Mapping? #57

Open StammWeinig opened 1 month ago

StammWeinig commented 1 month ago

Is there an efficient way to implement a mapping action within the SPT framework?

Currently, I have STRUCT for each IO type with PLC inputs and outputs and create an instance of each STRUCT in the GVL for each physical IO device. For example, I can call my EL1008 on term 2 as term2.<E1..E8>. This lets me activate my configuration once and if I have to move my inputs around, I can do that with online changes by simply assigning my target variable to a different termN.~ variable.

This mapping action is something I can auto-generate in one location for easier commissioning. One thing I've noticed with declaring an interface and assigning it to a FB is that seeing input/output values is a little tricky when online on the XAE. Having this mapping action lays this all out?

Am I maybe missing something that makes this possible/easy? Do I just need to build my mapping as FB instances instead of STRUCTs?

AB#4765