Sign in to follow this  
Followers 0
CJH

16-32 bit D register conversion in FX1N

4 posts in this topic

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 by Sergei Troizky

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0