Newbie mitsubishi question

mickyblu

Member
Join Date
Nov 2009
Location
HD
Posts
2
Hi guys,

I have a newbie question about a mitsubishi instruction in a program.

CMP K2M170 K2M180 M150.

So im not really sure how the comparison is done. Compare 2 nibbles starting from M170 with 2 nibles starting from M180 or compare 2 bits starting from M170 with 2 bits starting from 180?

I understand the part where if the value 1 < value 2 => M150 turns on
if val 1 = val 2 M151 turns on, etc.

Thank you

Micky
 
It's the first way you mentioned.
K2M170 = M170 to M177
K2M180 = M180 to M187

You can use any value K1 to K4 with CMP
You can use any value K5 to K8 with DCMP (Double word compare)
 

Similar Topics

Hello , Here is the problem: I am a fresh grad with absolutely no experience and no knowledge to start off with. The bigger problem is...
Replies
6
Views
3,532
I have a QO2H Mitsubishi processor with a QJ71PB92V Profibus Master in slot 01 connected to a Beckoff BK3100 modual with 80 Digital inputs and 56...
Replies
1
Views
2,192
Okay PLC pros, I could use a little help getting off of dead-center. Silly me, thought I could just open up the com port and log the data that...
Replies
2
Views
5,300
Hello all, I'm a new member here. I've joined as I want to learn about PLC programming. I've got a few questions to begin with. To get me...
Replies
37
Views
4,561
Howdy folks. Been doing PLC programming for like 15 years now in LD and ST, but I'm trying to learn SFC now and have a kind of dumb question... I...
Replies
4
Views
1,405
Back
Top Bottom