Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
80821members
346892posts

Migrating from Quantum to M580 Data Alignment

Solved
EMurphy
Crewman
Crewman
3
1226

Migrating from Quantum to M580 Data Alignment

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:

 

DataType.jpg

Then I located the structure to the misaligned variables:

Table.jpg

and then modified the code:

Code.jpg

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.

Tags (2)

Accepted Solutions
RoozeeR
Lt. Commander Lt. Commander
Lt. Commander
2
1204

Re: Migrating from Quantum to M580 Data Alignment

Why don't you use Unity M580 Application Converter (UMAC)? UMAC will handle the  (mis-)alignment for you. 

Migrating from Quantum to M580 will always require a plant shutdown when you exchange the Quantum CPU for M580.

UMAC can be found on exchange shop. You will need the standard version (licensed) to handle the alignment.

R.Roozee
Sr Solution Architect (SAE Master)

See Answer In Context

Tags (1)
3 Replies 3
RoozeeR
Lt. Commander Lt. Commander
Lt. Commander
2
1205

Re: Migrating from Quantum to M580 Data Alignment

Why don't you use Unity M580 Application Converter (UMAC)? UMAC will handle the  (mis-)alignment for you. 

Migrating from Quantum to M580 will always require a plant shutdown when you exchange the Quantum CPU for M580.

UMAC can be found on exchange shop. You will need the standard version (licensed) to handle the alignment.

R.Roozee
Sr Solution Architect (SAE Master)
Tags (1)
EMurphy
Crewman
Crewman
0 Likes
1
1161

Re: Migrating from Quantum to M580 Data Alignment

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.  

Tags (1)
RoozeeR
Lt. Commander Lt. Commander
Lt. Commander

Re: Migrating from Quantum to M580 Data Alignment

Hello Ed,

 

Please read the following FAQ which explains this:

https://www.se.com/ww/en/faqs/FA328449/

 

br

Rene Roozee

R.Roozee
Sr Solution Architect (SAE Master)
Tags (1)