Ken Roach
Lifetime Supporting Member + Moderator
Hi guys, this should be a very simple question. I'm a CoDeSys novice using version 2.3 with an older Schneider LMC20 motion controller. In CoDeSys you still have the IEC style "%" memory addresses but your actual operands are Tags, many of which are mapped to memory addresses.
The addressing of controller memory based on data type is what's confusing me.
I understand that %MW means a 16-bit internal address word. It's similar to the N7:x address memory in the PLC-5/SLC-500 Allen-Bradley controllers I'm familiar with.
%MW47, for example, represents the 48th 16-bit Word in the internal memory addressing space of the controller. That memory space starts at Word 0.
I also have some tags that are mapped to memory addressed as %MX, which is individual Bits. It looks like the bit numbers range from 0 to 15.
So I assume (there's that word !) that an address like %MX11.5 means that it's bit 05 of Word 11.
So is %MX11.5 part of the same data word as %MW11 ?
I'm trying to figure this out because my HMI treats the CoDeSys controller like a big Modbus holding register, where %MW0 = Modbus Address 40001.
The addressing of controller memory based on data type is what's confusing me.
I understand that %MW means a 16-bit internal address word. It's similar to the N7:x address memory in the PLC-5/SLC-500 Allen-Bradley controllers I'm familiar with.
%MW47, for example, represents the 48th 16-bit Word in the internal memory addressing space of the controller. That memory space starts at Word 0.
I also have some tags that are mapped to memory addressed as %MX, which is individual Bits. It looks like the bit numbers range from 0 to 15.
So I assume (there's that word !) that an address like %MX11.5 means that it's bit 05 of Word 11.
So is %MX11.5 part of the same data word as %MW11 ?
I'm trying to figure this out because my HMI treats the CoDeSys controller like a big Modbus holding register, where %MW0 = Modbus Address 40001.