Help with Micrologix bit comparison

nichollr

Member
Join Date
Dec 2005
Location
Utah
Posts
1
I'm trying to compare the upper 8 bits of a word with the lower 8 bits of another word. Is there a simple way of doing this? I can think of some complicated ways of moving these bits to a new word, then using the MEQ command, but haven't come up with some simple soulution. BTW, I'm using an AB Micrologix 1500 LSP Series C processor.
 
You can shift the high order byte of a word into the low order byte by dividing by 256.

If A is the word with the high order byte and B is the word with the low order byte, then MOV A to C. Bitwsie AND C with FF00h - this clears the low order byte of C, then divide C by 256. Move B to D, bitwise AND with 00FFh to clear the high order byte of D. Finally compare C to D.

Alternatively you could use a masked move to move only the high order byte of A to C and the low order byte of B to D and skip the bitwise AND.
 

Similar Topics

Hello, As my user name implies - I am totally new to the wonderful world of PLCs. I have though been tasked with integrating into our larger...
Replies
7
Views
2,201
Hello everyone, I'm having an issue trying to get a messaging instruction to work. I'm trying to get some data from a Micrologix 1400 to a L83E...
Replies
18
Views
6,184
Hi all Looking for some help please so I was connected to my MicroLogix 1000 threw rslinks had no issue. I download a program now this program...
Replies
46
Views
13,068
I've attached pics, below. I'm in the field right now an am trying to communicate to the Micrologix 1500 through the 1761-NET-AIC (Ugh!) to...
Replies
6
Views
1,946
Hello all. I need some help setting up a MSG instruction to transmit 10 bits of data from a compact Logix processor to a micrologix 1400. I have...
Replies
31
Views
20,041
Back
Top Bottom