Indexing Bit Level RSLOGIX 500

PFrog

Member
Join Date
Apr 2011
Location
Ohio
Posts
83
Hello,

I am working within the RSLOGIX 500 software and am trying to index at the bit level. I have attached a screen shot. When using MOV instructions, it can only be at the word level... The B3:7 word contains alarm bits that I would like to scroll through, without writing many lines of code.


Is there an easy way of doing this?


Thanks,

Keith

Capture.PNG
 
Nearly all good, except....

a. That GEQ should be a GRT, or you will never address bit 15 of B3:7

b. B3:7/[N7:0] is a bit-level address, so it can only be used with bit instructions XIC, XIO etc.


I am assuming you want N15:0 to contain the bit addresses that are ON in B3:7, so you could....

XIC B3:7/[N7:0] MOV N7:0 N15:0

... but N15:0 would never get cleared when there are no bits ON in B3:7, and another problem is that 0 is a valid bit address in B3:7, so clearing (to zero) N15:0 would be the same as saying B3:7/0 is ON.

What I would do is something like making N15:0 have, say, -1 in it if the addressed bit in B3:7 is OFF, so....

MOV -1 N15:0
XIC B3:7/[N7:0] MOV N7:0 N15:0


You can then test bit 15 of N15:0, if it's ON, (indicating a negative number), then disregard it. If it is OFF, the number in N15:0 is the bit number in B3:7 that is ON.


However - say bits 0 and 15 are the only bits ON in B3:7, there would be a huge delay between their respective messages are produced.


More detail of what you want will bring some good ideas....
 
Last edited:
While you have it working,

be careful with Bit 15, that's the sign bit and I have had an issue on some models of the slc 500 and micrologix families.

I did an indexed search in 20 words for a message display.
one unit it worked (my office), the actual unit didn't.
I had to rewrite code to ignore bit 15.

james
 

Similar Topics

Normally when writing to the PF525 over ethernet i use the active bit in the stop command as told to do so by many. this is fine for most...
Replies
18
Views
3,481
Hello, I'm in the process of converting a slicer from an Ultra3000 drive to a Kinetix 5100 using the KNX software version 4.00. The current...
Replies
0
Views
492
Hello! The equipment I'm working on uses a lot of indexed tags I guess you'd call them. I thought it was indirect addresses maybe but all the...
Replies
9
Views
981
Hello, Please see the attached rungs of some sort of indexed sampling routine that is currently in a SLC500. I am tasked with migrating to a...
Replies
2
Views
1,256
Hi everyone. Been banging my head against a wall trying to figure out tracking on a servo driven conveyor. I already have a tracking array setup...
Replies
12
Views
3,347
Back
Top Bottom