Dear readers,
I am working with a M251 Modicon controller in Somachine V4.1SP1and have an analog expansion. These are read to the known system registers.
Every analog input/output has its own register and these can be assigned to self created variables, great. But can't this be done by assigning the 'root' of the tree to a structure instead assigning every member to a single variable?
This also applies to Modbus slave devices. Problem is that I 'm having Modbus devices like the DucoBox. This device has 50 sub-devices and all have the same basic structure layout all starting at a fixed register offset. For example, sub-device 0 starts at offset 0000, sub-device 1 at address offset 0100, etc.
Am I able to make a GLOBAL structure and assign the WHOLE device range to a structure, instead of assigning each variables one-by-one?
This could be done by using the declaration below, but isn't there something cleaner to use? This feels like a hack.
DeviceName AT %QW0: StructureType ;
best regards,
Tjarco