CJH Posted February 18, 2005 Report Posted February 18, 2005 I have not worked with Mitsubishis before, but the FX1N seems to be an ideal solution for a motion control project I will be embarking on shortly. The biggest selling point for me is the apparent 32-bit integer maths that it is capable of. My concern, however, is that nowhere in the manual can I find how you take a 16 bit D register and make it usable in a 32 bit operation (eg DDIV) (and vice versa) Can anyone clear this up, or am I totally missing something? Thanks Quote
Sergei Troizky Posted February 18, 2005 Report Posted February 18, 2005 For 32-bit instructions, the least significant word addresses are directly specified as the instruction operands. The most significant word is the register with the next following address. Example: DADD D0 D2 D4 The 32-bit registers in this 32-bit addition are D0D1, D2D3, D4D5. P.S. It is a good practice always to use even register numbers. This simplifies instructions converting to 32 bits, should it become necessary. Quote
CJH Posted February 21, 2005 Author Report Posted February 21, 2005 Sergei Thanks for the reply, but what I really want to know is, say for example, D0 is a 16 bit value. Do I need to explicitly convert D0 to a 32-bit register in another location (eg D8D9) before I can use it in a double operation? I'm concerned about the location of the sign bit (MSB) in these conversions. Quote
Sergei Troizky Posted February 21, 2005 Report Posted February 21, 2005 (edited) In correctly written program the 32-bit value should be such from the first appearance. In your case you can perform MUL D0 K1 D0. Edited February 22, 2005 by Sergei Troizky 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.