Jump to content

16-32 bit D register conversion in FX1N


Recommended Posts

Posted
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
Posted
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.
Posted
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.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...