Sign in to follow this  
Followers 0
ian s

A1sjh Output word addressing

12 posts in this topic

Hi All I want to turn all outputs of a 16 point ouput card on and off in one instruction. This is to test all the slots in a rack and extension rack. I have started by loading D0 with 65535. But what is the instruction to write this data to the outputs. I tried DMOV D0 K4Y0 and MOV D0 K4Y0 but both of these failed to convert. What is wrong with them? thanks ian

Share this post


Link to post
Share on other sites
Try BMOV (I seem to recall that works)

Share this post


Link to post
Share on other sites
It has been a few years, but... I believe BMOV copies one group of words to another group of words. I believe the original code you listed is correct (mov d0 k4y0), however, it is entered differently depending on the software being used. In the days of MEDOC, you would enter no space between K4 and Y0, but in the windows software, I thought you had to hit the ENTER key in between the K4 and the Y0. Again, it has been several years, so I'm not sure if my memory serves me correctly. What software are you using?

Share this post


Link to post
Share on other sites
Have you verified that D0 has what you think in it? No other writes to the outputs? Try MOV HFFFF K4Y0

Share this post


Link to post
Share on other sites
MOV HFFFF K4Y0 should work, provided your card is at Y0. But then so should your original logic, but all bits on is not 65535. PLC uses sign bit as negative. -1 is all bits on. DMOV is for 32 bits, so you can't DMOV D0 K4Y0, since that's only writing 16 output bits. MOV D0 K4Y0 should work fine. Or MOV K-1 K4Y0.

Share this post


Link to post
Share on other sites
Hi All thanks for your replies. I am using GX DEV v8. The Program is 2 lines at the moment: M9033...............[MOV H0FFFF D0] NOTM9033.........[MOV k0 D0] END This converts OK. When I Add ...[MOV D0 K4Y0] before the end statement this line will not convert. I have tried all combinations in your posts and made sure the I/O racks pointed to are populated with output cards in the I/O Assignment page. The error message is There is a ladder which cannot be converted. correct the instruction at the cursor position. and the cursor is on the last mov instruction. ian

Share this post


Link to post
Share on other sites
What did you put in front of it? A MOV statement cannot be the entire rung, there has to be a contact in front.

Share this post


Link to post
Share on other sites
Worked ok for me, GX Dev 8.01B.

Share this post


Link to post
Share on other sites
and it worked for me as well. "A MOV statement cannot be the entire rung, there has to be a contact in front" I'm not sure why a contact is required but it has solved my problem. Does this apply to all outputs in misubishi programming? thanks for your help ian

Share this post


Link to post
Share on other sites
Standard rule of Mitsubishi programming. Look at the programming manuals, and all the examples have a contact in front of a coil or instruction. Only certain instructions can be tied to the left rail directly. That's why you have an always on bit in the PLC.

Share this post


Link to post
Share on other sites
Well there's always something to learn. In 15 years of working with Mitsi plcs I hadnt learnt that. Thanks for helping me out. ian

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