Puddle
Member
I've been working on a project that requires communication with 40 temperature controllers over modbus RTU. I'm using a Siemens S7-1211 (asked for a 1214 but... lead times) and a KTP400 basic HMI.
The Siemens literature says I can have as many MB_MASTER blocks as I like, but as they have to be linked to the COMM_LOAD block this doesn't seem to strictly be true.
I've ended up with a huge program where the master executes, moves the data out, moves new settings to the master and does it again. I need to read two registers and write two registers so I have to run the master a lot. Once I've added in some error handling, the ability to disable unused controllers and few other bits, it's ended up taking around 80% of the work memory.
As I've been copying and pasting the same string of logic 160 times and using over 1000 tags I can't help but feel that there's a smarter way to be doing this. It's working fine and doing everything it should, but any changes take lots of copy and paste.
Time to learn STL?
The Siemens literature says I can have as many MB_MASTER blocks as I like, but as they have to be linked to the COMM_LOAD block this doesn't seem to strictly be true.
I've ended up with a huge program where the master executes, moves the data out, moves new settings to the master and does it again. I need to read two registers and write two registers so I have to run the master a lot. Once I've added in some error handling, the ability to disable unused controllers and few other bits, it's ended up taking around 80% of the work memory.
As I've been copying and pasting the same string of logic 160 times and using over 1000 tags I can't help but feel that there's a smarter way to be doing this. It's working fine and doing everything it should, but any changes take lots of copy and paste.
Time to learn STL?