captainpatje

Silly question: bits calculation MOV command

5 posts in this topic

Dear all,

Just to let you know: I am not an PLC expert, but for my job I was send to our headquarters in Taiwan to learn basic PLC programming.

For context: We sell bandsawing machines (metalcutting saws) for industrial use, and we sell certain options with this (blade deviation detection, mist spray, laser light) which all use inputs/outputs on our Mitsubishi FX3G plcs.

Now I must say that I have learned more than originally thought, but one important thing I am not familiar with, which is the calculation behind bits.

What I mean by this is, when you use the MOV command, f.e K4X020 K4M020, I know this means K4 actually means 4x4=16bits it moves.

But then I don't know where the gap is, because I am tempted to count like this:

x20 = m20
x21 = M21
x22 = M22
X23=M23
x24= M24
x25=M25
x26=M26
x27=M27
x28=M28
x29=M29
x30=M30

etc

But i know this ain't right, because I should count until x25 and then forget x26, x27 and then go further with x28. Or something like this!

This is the easiest way how I could explain the problem I am facing, again I have not really mastered the knowledge of bits, but could someone explain to me how I should know which inputs/outputs I should skip? I was told once but I completely forgot.

Thanks in advance!!

 

Edited by captainpatje

Share this post


Link to post
Share on other sites

X28 and X29 with FX3G

LOL

"This is the easiest way how I could explain the problem" you're facing.

Edited by Inntele

Share this post


Link to post
Share on other sites

Hey Dutchie,

Je hebt het waarschijnlijk over een FX en die telt octaal 0-7 . Dus 8 9 en 10 bestaan niet.

 

 

Share this post


Link to post
Share on other sites
24 minutes ago, Gambit said:

Hey Dutchie,

Je hebt het waarschijnlijk over een FX en die telt octaal 0-7 . Dus 8 9 en 10 bestaan niet.

 

 

Ha! Ja dat klopt. Oh dus het steekt zo in elkaar. Bedankt! Duidelijk! ;-)

PS. Zit ik verdomme in mijn Device list te kijken zie ik inderdaad dat 8 en 9 niet bestaan. Zoveel kennis heb ik er dus van ;-) Weer wat geleerd!!

 

In English: @inntele, dang, I looked in my device list in GX works and can indeed see that 8 and 9 are non existent. Shows you how much knowledge I have of this haha!

Well hey, I am glad that you guys could understand my nonsense explanation and made some sense of it! Thanks!

Edited by captainpatje

Share this post


Link to post
Share on other sites

There is an instruction (D)PRUN [FNC 81], which copyring an octal set of bits to an octal set of bits. For example, PRUN K3X16 K3M16 will copy:
X16 -> M16
X17 -> M17
X20 -> M20
X21 -> M21
X22 -> M22
X23 -> M23
X24 -> M24
X25 -> M25
X26 -> M26
X27 -> M27
X30 -> M30
X31 -> M31

https://dl.mitsubishielectric.com/dl/fa/document/manual/plc_fx/jy997d16601/jy997d16601q.pdf  , page 460

 

Edited by Inntele

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