Sign in to follow this  
Followers 0
Kings and Barnhams Automation

cc link link buffer memory address question

4 posts in this topic

I am currently working on my first cc link project and have entered a program example from a mitsubishi manual and have acheived successful comms with all cc link stations ( 4 x AJ65SBT-64AD analogue-digital converter) and can read all analogue values fine. The first line of code contains [bMOV SW80 K1M1000 K1] and i believe SW80 is a buffer memory location used to check the data link status of cc link stations. Can anyone offer an explanation of how this code works, is it going to give me an error signal for all 4 of my stations and what kind of errors will cause a value to be written to SW80? Any help would be greatly appreiciated as i struggle to find user friendly explainations from mitsubishi manuals!

Share this post


Link to post
Share on other sites
BMOV moves a block of code from one location to another. For example, [ BMOV D0 D100 K10 ] copies the values in 10 (K10) data registers from D0-D9 to D100-D109. The BMOV you indicate only moves one piece of data, so it will operate identically to [ MOV SW80 K1M1000 ]. The K1M1000 is a way of grouping bits like a word. The K1 part is a constant refering to the number of "nibbles" that you are grouping. A nibble is four bits, so you can use K1-K4 in a 16-bit single, and K5-K8 in a 32-bit double. The M1000 part is the internal relay bit device being referred to. So K1M1000 treats the bit devices M1000 - M1003 as a binary number from 0-15. So, the instruction [ BMOV SW80 K1M1000 K1 ] moves the lowest four bits of SW80 into M1000 - M1003. If SW80 is, as you say, the data link status for your four stations, then the ON/OFF status of each of the bits should tell you which station has an error.

Share this post


Link to post
Share on other sites
answer is yes if you have CC parameters setup using SW80 as target Special Register (SW), you can use it to check connection status to each of the slaves (i think my CC-Link example was using SW0). instruction [bMOV SW80 K1M1000 K1] simply copies the SW80 into bits so one can access the status of each slave individually. depending on number of slaves you may need to increase K1 to something bigger. for just four stations K1 is enough.

Share this post


Link to post
Share on other sites
Thanks for the assistance guys i can now see how it works have now used M1000,1,2,3 to bring up alarms on the E1101 I have connected to show which station has gone into error.

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