When migrating from Quantum to M580 one issue is the alignment of REAL variables. Quantum allows REALs to be located on any address, where M580 forces it to be on an even address, i.e. %MW0 versus %MW1. It was not convenient to readdress all the variables, so I created a data structure with an Integer at the beginning to get around the Build error:
Then I located the structure to the misaligned variables:
and then modified the code:
Everything appears to work. The data alignment seems to be a Build issue, not a hardware one. Is there a problem with faking out the Builder and using 32-bit values on a odd address?
Could not readdress original variables since the plant was online, and the data was being used by the SCADA HMI, Local HMI and peer-to-peer communication. It would require a plant shutdown to correct all these at once.
Thank you for the info on UMAC. I used it on a test program and it added the necessary PUSH/PULL instructions to align the data.
I did discover an issue with the simulator though. The data alignment on the simulator is different than on a real CPU. The real CPU appears to pad addresses to assure alignment whereas the simulator does not.