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 August 10th, 2018, 06:50 AM   #1
Frinehart
Member
United States

Frinehart is offline
 
Join Date: Jul 2018
Location: Ohio
Posts: 13
Indirect Addressing in Studio 5000

All,

I have a question on Indirect addressing, is it possible to use two bits to indirectly address in Studio5000 or do you have to use multiple bits to make this work? I know that you can do it in older processors, I am currently converting a PLC-5 to ControlLogix.
  Reply With Quote
Old August 10th, 2018, 06:55 AM   #2
jkerekes
Member
United States

jkerekes is offline
 
jkerekes's Avatar
 
Join Date: Aug 2007
Location: NJ
Posts: 2,166
Can you give an example? I'm not understanding fully your question.
__________________
John
  Reply With Quote
Old August 10th, 2018, 07:04 AM   #3
Frinehart
Member
United States

Frinehart is offline
 
Join Date: Jul 2018
Location: Ohio
Posts: 13
Previous program has an N[N7:52]:[N7:54] as the indirect address calling a different N bit. Once converted the bits change to N[N7_52][N7_54] and the value comes in as ?? for it not being found.
  Reply With Quote
Old August 10th, 2018, 07:25 AM   #4
chintankAne
Member
Canada

chintankAne is offline
 
Join Date: Apr 2014
Location: torronto
Posts: 75
If I am Not wrong you are talking about a two-dimensional array. Here I attach Picture for you.
Attached Images
File Type: png 2018-08-10_8-18-28.png (220.0 KB, 103 views)
  Reply With Quote
Old August 10th, 2018, 07:34 AM   #5
Frinehart
Member
United States

Frinehart is offline
 
Join Date: Jul 2018
Location: Ohio
Posts: 13
Thank you that makes more since than what i was thinking.
  Reply With Quote
Old August 10th, 2018, 08:12 AM   #6
AutoMax
Lifetime Supporting Member
United States

AutoMax is offline
 
AutoMax's Avatar
 
Join Date: Apr 2017
Location: Normal/Plymouth/Irvine
Posts: 274
Not to be a pedantic jerk, but please realize when referencing an "N" register in a PLC5 that is not a bit. A bit is boolean or binary, a 0 or 1. An "N" is a collection of 16 bits, commonly called a word or an INT in Studio5k.
This might sound like useless trivia but there is definite value in familiarizing yourself with data types.
  Reply With Quote
Old August 10th, 2018, 08:18 AM   #7
Frinehart
Member
United States

Frinehart is offline
 
Join Date: Jul 2018
Location: Ohio
Posts: 13
[quote=AutoMax;787526]Not to be a pedantic jerk, but please realize when referencing an "N" register in a PLC5 that is not a bit. A bit is boolean or binary, a 0 or 1. An "N" is a collection of 16 bits, commonly called a word or an INT in Studio5k.

I understand it is a register just using bit as a generic term.
  Reply With Quote
Old August 10th, 2018, 09:54 AM   #8
jstolaruk
Member
United States

jstolaruk is offline
 
Join Date: Dec 2004
Location: Detroit, SE Michigan
Posts: 3,244
Sadly, the 5000 implementation is actually indexed addressing. There is no pointer data type that would allow true indirect addressing, referring to pointers in Step 7.
__________________
"You can live to be a hundred if you give up all the things that make you want to live to be a hundred." Woody Allen
  Reply With Quote
Old August 10th, 2018, 01:13 PM   #9
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 9,870
You can do this in RSLogix 5000, but, if I remember right, you can only have one indirection per tag reference.

So in your case of file and word indirection you would be best served by making use of 2 dimensional arrays and improve the tag name scheme while you're at it.
__________________
It's not all the variables I am most concerned with, it's the undiscovered constants.
  Reply With Quote
Old August 11th, 2018, 08:00 AM   #10
Aardwizz
Member
United Kingdom

Aardwizz is offline
 
Aardwizz's Avatar
 
Join Date: Dec 2017
Location: Swindon
Posts: 183
Quote:
Originally Posted by Frinehart View Post
. Once converted the bits change to N[N7_52][N7_54]
I can't tell if you or the conversion program has the typo (probably you since you keep insisting on calling words "bits"), but the data structure should be N[N7_52, N7_54]

The problem you're going to have is that, if N7:52 (AKA N7[52], which is probably referenced by an alias tag "N7_52") has a value of '100', the conversion program would have created an N100, but it will not be linked to the two-dimensional array "N" that was also created.

If you have logic that references any N100[x] addresses, they won't manipulate the data in the N[x,y] array.

The conversion program is OK, but there's only so much that it can do, The PLC-5 / SLC just think differently than the CLX / CPX processors.

Okie gave you the best advice -- rewrite this section of logic from scratch, and improve the naming convention while you're at it.
  Reply With Quote
Old August 12th, 2018, 07:32 PM   #11
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 2,648
Quote:
Originally Posted by aardwizz View Post
okie gave you the best advice -- rewrite this section of logic from scratch, and improve the naming convention while you're at it.
+1
  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
Studio 5000 logix Designer CliveBaker LIVE PLC Questions And Answers 2 April 11th, 2016 02:31 PM
How To Enter Rslogix 5000???? sundar_scada LIVE PLC Questions And Answers 14 April 2nd, 2016 03:50 PM
New guy here, question about 1756-L72 and studio 5000 Jasondelane LIVE PLC Questions And Answers 8 March 12th, 2015 04:10 PM
Help With Indirect Addressing In Studio 5000 Conversion From Rs500 kentuckytech LIVE PLC Questions And Answers 7 January 21st, 2015 11:03 AM
PLC5 and Indirect Addressing kdcui LIVE PLC Questions And Answers 3 October 23rd, 2008 09:46 AM


All times are GMT -5. The time now is 10:27 PM.


.