Spoiled with Logix5000. Cant figure this out in Logix500

Join Date
Jul 2007
Location
Kiruna
Posts
600
Hi Guys,

Haven't much experience with Logix500 and something I need to do which would be fairly straightforward in Logix5000 is rather difficult in RSLogix500,

I have 30 devices. On Demand I need to turn on the first one and increment a counter associated with it by 1. Then on demand the next one and so forth.

The idea is the one with the least amount of turn ons will start first. A duty rotation scheme of pumps comes to mind.


Anyway in Logix5000 I would have a member of a UDT called TurnOns. Using an array of these objects I would simply loop through looking for an available one with the least amount of turnons.

Is this possible to achieve in RS500 without the use of arrays?
 
Create a seperate 'N' file. Use indirect addressing to address each. Eg - if N20 is created and N7:10 is the index then use N20:[N7:10] to address the location pointed to by the index. Make sure to not go outside the boundaries of the N file you create.
 
Hi Bernie,

So I create an N file. Lets call it N20. Do i need two N files? One to store the device number and the other to store the No of Activations? There are also some other premissives i need to examine before activation. I.e Available etc.
 
N7 is a default integer file, it already exists by default. It's a nice place to store all sorts of one-of data items - the the single item I would use as the indirect reference i mentioned - N7:10 (obviously it can be any integer but I'll refer to this location).

I like to keep a set of items I want to access using indirect to their own file. For me I can easily see the limits of the start and stop of the data. Without a special setting going outside those limits generates a great error.

So create N20 (for example) with 30 elements. So you'll have N20:0 through N20:29. These can be accessed as N20:[N7:10] with setting N7:10 to 0 through 29. But don't go to 30. You'll get the error I mentioned.

Also create N21 with the same limits. This is assuming the device number and number of activations are both integers. If the 'device number' will just be 0-29 then they are implied in the setting of N7:10.

UDT's are great in Controllogix and it's difficult to replicate them in RSLogix 500.
 
Last edited:
Hi Bernie,

That makes sense and I understand that all that fine. The problem I'm having is what to store in N20[N7:10]. Is it the number of turn ons?

I need to check a number of things. First is the device available, second has it the least amount of turn ons? If these conditions are satisfied the issue a command to turn on. I fail to see how this can be achieved with 30 elements in an N file.
 
Let's start with the structure of the UDT you use right now. If 'available' is a BOOL then create a 'B' file and use it in the same way. Let's say you create B22. Use the bits accessed by B22/[N7:10] as the 'available' bits.

So that makes two files, an N file for the number of activations and a B file for the 'available' bits.
 

Similar Topics

Hi Now customer's Citect PC is down, and there is nobody who knows to Citect. so how to help them set up new pc for the Citect and run it...
Replies
3
Views
1,636
Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
150
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
448
I'm a Siemens person, and this is one of my first AB programs. The customer wants everything programmed in Ladder. I have a lot of data (3...
Replies
14
Views
247
Good day everyone. if you have a logic for 3 pumps (lead/lag/off), would you please email it to me? I really appreciate it!
Replies
7
Views
229
Back
Top Bottom