bene Posted February 4, 2015 Report Posted February 4, 2015 Hello, I am currently swapping an FX2n with the equivalent FX3U model. I had no issues converting the progam over except for 3 lines of code I'm not familiar with (more of an AB kinda guy). Line 919 I believe I just need to change to DMOV. I've never seen the other two instructions when I've worked with Mitsubishi in the past. All three come back with a 6505 Syntax error when you run the PLC diagnostics. Can someone point me in the right direction? Much appreciated, Ben Quote
Theo V Posted February 4, 2015 Report Posted February 4, 2015 Dear Ben, If you use a 32Bit instructions like DMOV I guess that you can not move the result with a 16Bit instruction (MOV). The register is just too smal to contain data larger than 32676. I don't know why this was working in the FX2 PLC but if you still have this FX2 running you can monitor the value of D12 and D226 to see the actual values in your situation. Best regards, Theo V. Quote
JRoss Posted February 5, 2015 Report Posted February 5, 2015 Interesting. The counters in the highlighted instructions are 32-bit up/down counters (based on the address range), and should use only 32-bit instructions (D=, DMOV, and D>). Apparently when the program was first written, the compiler didn't check that, but now it does. This might actually be a compiler change (i.e. new programming software) causing the issure, rather than the processor change. You could test that theory by re-converting back to FX2N and see if it gives you the same error. Either way, change the instructions indicated to the 32-bit version, and you should be good. Quote
nehpets Posted February 5, 2015 Report Posted February 5, 2015 Not sure which version of GX Developer you are running, but in later versions if you change the processor type (on a copy to be safe) the compiler will automatically change the data types to the correct bit type. Steve Quote
bene Posted February 6, 2015 Author Report Posted February 6, 2015 (edited) Thank you all for your replies. Changing the instructions to 32 bit was indeed the cure. Side note: I also had to add a [M8000 DMOV K0 D8120] instruction and uncheck the "Operate communication setting" box in the Parameter field to get the PLC and HMI talking. Edited February 6, 2015 by bene Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.