You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old September 14th, 2018, 08:45 AM   #1
PFrog
Member
United States

PFrog is offline
 
Join Date: Apr 2011
Location: Ohio
Posts: 57
Indexing Bit Level RSLOGIX 500

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
Attached Images
File Type: png Capture.PNG (24.9 KB, 44 views)
  Reply With Quote
Old September 14th, 2018, 09:56 AM   #2
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,387
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....
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem



Last edited by daba; September 14th, 2018 at 10:07 AM.
  Reply With Quote
Old September 14th, 2018, 10:30 AM   #3
PFrog
Member
United States

PFrog is offline
 
Join Date: Apr 2011
Location: Ohio
Posts: 57
I tried this and I believe it will work well! Thanks!
  Reply With Quote
Old September 14th, 2018, 10:46 AM   #4
PFrog
Member
United States

PFrog is offline
 
Join Date: Apr 2011
Location: Ohio
Posts: 57
Just tweaked it and all is good. Thanks again.
  Reply With Quote
Old September 14th, 2018, 11:30 AM   #5
James Mcquade
Member
United States

James Mcquade is offline
 
Join Date: Oct 2007
Location: Tennessee
Posts: 2,237
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
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Allen Bradley Enable Analog Channel in RSLogix 500 // First Scan Bit, COP function James275 LIVE PLC Questions And Answers 3 September 11th, 2018 07:17 AM
RSLogix 5000 and 64 bit windows 7 compatibility sparkytex LIVE PLC Questions And Answers 14 October 12th, 2017 06:29 PM
Software for MicroLogix1200 SirCharles1 LIVE PLC Questions And Answers 7 July 17th, 2013 02:36 AM
RSlinx Lite and RSLogix 500 Starter... FREE geniusintraining LIVE PLC Questions And Answers 21 February 24th, 2012 05:11 PM
RSLogix 5000 V15 Features Samneggs LIVE PLC Questions And Answers 18 April 20th, 2006 06:45 PM


All times are GMT -5. The time now is 07:14 AM.


.