This is a mind experiment. The select operation will need to specify which table it shall read, and in this example I just drew the Modbus Table and used a relation between the select statement and the table. I am not sure if I want to allow this, but it is an option. Tables can be displayed several places, so ModbudTable1 can be defined in another diagram and only referenced here. What this should do is to call select – which in this case execute a read that read 30000 to 30002 every second. And once we get a responce we trigger the “GotData” event.
Using a relation like this is a bit misuse of the technique, but it is an interesting idea that actually add readability to the code – ok, we can change the line type to avoid confusion, but this diagram is actually readable and it makes it very visible what we are doing.
ModbusTable is an abstracted Modbus interface that allows you to view Modbus as a table with continious registers – what you see is Input (Read) and Holding(Write). This will only support a small subset of Modbus so we will need an adition Full Modbus version, but this abstraction takes care of 99% of usage + it makes it easy to map registers to variables inside BSA.
“ModbusTable1” is a specification that is implemented as a read/write modbus message and an internal cash table. The rest of the system will see this as a datatable accessing registers by name. I need to do a bit adaption as I test here, but I think I prefer to use Select rather than a specialized Read in this case simply to avoid to many statemenst doing similar things.