Sign in to follow this  
Followers 0
Rich1

Mitsubishi FMOV instruction

13 posts in this topic

I have an F2Xn processor with the following instruction: FMOV K0 K4M0 K1. Just what is this telling me? The manual is of little help.

Share this post


Link to post
Share on other sites
The manual JY992D88101-D actually explains FMOV quite clearly in section 5.2.7. And the digit designation (K4M0) in section 4.14.1. Fill move is a fill move of the same value to a range of addresses. You are moving the number 0 to K4M0, which means 4 nibbles starting at M0. That's 16 bits. The K1 on the end means 1 word. So basically it's turning off M0 through M15. Kinda dumb way to do it. ZRST M0 M15 would be my typical method.

Share this post


Link to post
Share on other sites
Because the quantity of destination words in FMOV K0 K4M0 K1 instruction is equal to 1, it's full equivalent to MOV K0 K4M0. MOV is faster instruction then ZRST Edited by Inntele

Share this post


Link to post
Share on other sites
I agree MOV is slightly faster than ZRST. But ZRST is easier for most to understand than K4M0. I prefer to write simple code for the end electrician who has to support the system after I have left. ZRST is actually slightly slower than FMOV, both of which are much slower than MOV.

Share this post


Link to post
Share on other sites
You are right, often ZRST is more demonstrative. I use both command in programs, but ZRST especially good if is necessary to reset big array of bits. Edited by Inntele

Share this post


Link to post
Share on other sites
MY guess would be that the original programmer was used to programming A series plc's where there is no ZRST instruction but you can use FMOV K0 K4M0 K1 for the same effect on those.

Share this post


Link to post
Share on other sites
Always a possibility... Newer PLCs, newer commands... Like all the new ones in the FX3U... Or direct access to bits in words, such as D0.4 or D0.F...

Share this post


Link to post
Share on other sites
I have inherited some mitsi controlled machinery, and am unsure of how the following FMOV commands break down: [FMOV K0 K4Y20 K4] [FMOV K0 K4Y50 K4] [FMOV K0 K1M0 K175] [FMOV K0 T0 K16] The four above commands, at the beginning of the prog, being actioned from a pulsed n/c stop pushbutton input, and look to be providing an overall reset of, outputs, int outputs, and timers upon activation. Just to further confuse, also at the beginning of the prog, another line has the following FMOV commands: [FMOV K0 K4Y70 K4] [FMOV K0 K4M700 K50] These being actioned from an adjacent m/c (controlled by the same plc) stop p/b input pulse, which would then appear to do an overall reset on that particular m/c. Prob i have is that stopping 1st m/c, also stops the 2nd m/c. This is not neccessary, and i need to address. Whole prog looks badly constructed and will sort in due time, but would appreciate any advice re FMOV command in this instance. TIA. Edited by jbowden

Share this post


Link to post
Share on other sites
As we have already explained in this thread, the FMOV is a fill move. The K4Y20 means 4 nibbles (total 16 bits) starting at Y20, so Y20-Y37 in an FX Series, or Y20-Y2F in a Q Series. The K4 on the end means 4 words total, so this is setting 64 bits starting at Y20 to zero. FMOV (source data, in your case the number 0) (destination location) (number of words) Please see the programming manuals for the appropriate processor for more detail.

Share this post


Link to post
Share on other sites
Thanks. I thought that was what it meant, but i wanted to be sure before I made any modifications to the code.

Share this post


Link to post
Share on other sites
Hello, I am a beginner and am having trouble entering FMOV into the program. When I pick the instruction, a window pops up, I fill in Fmov space K0 space do space k4, press enter, the result is an error window. What am I doing wrong? Thanks

Share this post


Link to post
Share on other sites
well, if you wrote it exactly as above - the 'do' should be 'd0' - thats 'zero' instead of the letter 'o'

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