Newbie Question about address

osiberis

Member
Join Date
Jun 2007
Location
alaska
Posts
16
Using RSLogix500 trying to address a input to mulitiple addresss such as O:2/ 4 though 6. I know this is probly a basic way to do this, and would realy appreciate any help that you could give me on this issue.
thanks
 
Can you give us a few more details?
Are you trying to turn on outputs O:2/4, O:2/5, and O:2/6 when one input is true? If so just use parallel outputs.

Here's an example:
output_many.png
 
The idea behind this is that i want to activate 14 individual outputs with a single input, IE reset counters 5:0 though 5:13 with a single input from a panel view I can do this with multilpe rungs and tons of binaries or lots of subrungs but that adds to the clutter that is already there. I love the idea of this move bit but i'm fairly unfamilar with it's ussage. Could you explain a little more information on how it's used? I have read about it and in theory i get the idea but how it's used and it's function is a little beyond my grasp.
Thanks
 
RoTaTech's masked move example will not work with your counter reset example. The masked move will only work on a continuous group of bits. Counter resets are not a continuous string of bits.

A masked move is useful if you are only concerned about a specific group of bits in a word and you only want to work with their status. It is also useful in building up a word out of two bytes or separating a word into it's two byte values. For example, to conserve space some devices will pack two unrelated byte values together into a single word and transfer that to and from the plc. An easy way to get these bytes back apart on the plc side is to use two masked moves, one with a mask of FF00h and the other with a mask of 00FFh. However, this same result could be achieved with a word AND.

Just as importantly you can put two bytes together into a single word with a masked move. When using the masked move, bits in the destination aligned with a 0 in the mask are left unchanged. So you can MOV in the low byte, multiply the high byte by 256 and then MVM the result through a mask of FF00h into the word already containing the low byte without affecting the low byte bit pattern.

I used bytes in my example but the concept applies to any number of bits in a word. And the mask bit patterns does not need to be continuous.

As for your counter case I don't know of a real sexy way to do that. Your best bet is probably to just use the direct approach with branches.

Keith
 
Is there a way to post maybe a move bit into the accumulated value of the counters to multiple word address levels? Such as have an output value of C5: (0/5).0 ot something along those lines? I keep thinking there have to be a way to input a value to multiple output spaces such as a fill command or something along those lines.
 
Last edited:
Outside of using indirect addressing I can't think of any other way to do this. All of the instructions I know of work from a starting point on a continuous block of data. For example, there is the FLL instruction (file fill) but that works from the start point continuously through the number of elements. So in a counter case not only would you reset the accumulated values and the status bits you would reset the preset as well.


Keith
 
osiberis said:
The idea behind this is that i want to activate 14 individual outputs with a single input, IE reset counters 5:0 though 5:13 with a single input from a panel view I can do this with multilpe rungs and tons of binaries or lots of subrungs but that adds to the clutter that is already there. I love the idea of this move bit but i'm fairly unfamilar with it's ussage. Could you explain a little more information on how it's used? I have read about it and in theory i get the idea but how it's used and it's function is a little beyond my grasp.
Thanks

You do not need multiple rungs or tons of binaries, just use RES (reset) instruction. All you need is one rung with a conditioning input and 13 RES instructions.

abtimerreset.jpg


No clutter there and fairly self explanatory what is being done.
 
What would be nice.

If the original poster would come back and tell what solution he found; whether he figured it how or he got it here.
 
Final Solution came down to cursing allen bradley for not giving me the option of a variable output address, and using 13 subrungs on a single binary input line. Maybe in Rslogix 6000 they can include a way to make macro's or a way to use a fill command to multiple word level address as well as a bit level.
 
Not sure why using 13 RES instructions was so bad. If you were using RSLogix5000 then you could put it all on one line.

Back to RSL500, it does allow macros; Use this dialog (reached via the Tools > Visual Basic > Run Macro) to run, edit, or delete the selected macro. You can also create a macro from the Macros dialog box.

Back to the original post, how you do something depends on the situation, in most cases all you have to do is insert a condition on the line to turn on/off an output or to reset a timer/counter.

NOTE: This is not a program, it is 3 lines of example code.
abexamples.jpg



You never really explained exactly what you wanted to do.
 
Yes my apologies for Never explaining the purpose of this whole excusion. It was put into the program that run the hydrualics of the plant so I can count when motors are overload and see which ones are causing trouble because I had a motortronics that was tripping out for almost a month before they told me. So I wanted to have the Counters to count up everytime one trips out then Broadcast that to the web server feature so it will be displayed which motors are tripping and need to inspected. The Reset was going to be a push button inside the actualy panel itself.
 
You could use a addition instruction instead of a counter. Then use a copy instruction to reset Trip counts See Pic below. Lots of ways to skin this cat. Just add more add instruction and increase the length of copy inst to suit your needs.


AddTrips.jpg
 
Depends on several factors but since you are going to be maintaining the information in a database you could date/time stamp it. This would allow you to see what has happened on what day and at what time. This will probably work best with a RTC (real time clock).

You could use a counter, everytime it counts up you send the data to the database, then have it auto-reset every 24 hours, week, or month as desired. The auto-reset would remove the need to have the pushbutton(s) etc.

If there is an HMI being used I think I would have a nag screen to make them notify someone when a motor overloads twice in one month, let alone 30 times.
 

Similar Topics

Howdy folks. Been doing PLC programming for like 15 years now in LD and ST, but I'm trying to learn SFC now and have a kind of dumb question... I...
Replies
4
Views
1,405
Hello. New to Unity and had a couple quick questions. Can a Modicon M340 output to a small multiline LCD screen and not a full HMI?
Replies
4
Views
964
Hi. I'm learning AOI programming in RSLogix 5000. I created an AOI with several input and output parameters but when I choose the AOI in the main...
Replies
17
Views
3,217
Good morning, I've had an inverter fail with firmware revision 5.002, the only spare is Rev 7.001, when updating the project with the new...
Replies
2
Views
1,260
Oh, I hope someone can help! I have one little problem holding me up from studying this weekend. I'm using Rslogix micro starter light, it's a...
Replies
7
Views
2,991
Back
Top Bottom