tjarcoboerkoel Posted March 30, 2017 Report Posted March 30, 2017 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now