One button stop and start

If you really want the OSR instruction here is how I do it:

Add a NO contact to a rung (because it's usually the most convenient), click and highlight the contact, type "OSR" (without quotes), hit enter. This should change the contact to a OSR.

OR

If you look at the buttons where you add rungs, branches and contacts you will see little tabs. Probably set on Favorite, at least it is by default. Click "Bit" and you will see the OSR instruction as well as the more popular ONS instruction.
 
Excuse me. I meant OSN. In my Logix 500 I have a push-button contact and then an ONS that is b3:5/0 and it goes to output B3;5/1. So in the 5000 I do not have to give the ONS a bit number ?
 
So you have to give it a tag address. This will be a tag that you create and the tag will have to be a boolean data type or some type of integer. If you use an integer data type (SINT/INT/DINT) then you would have to specify a bit. If your datatype is BOOL, then you would not because they are just 1 or 0.

Lets say you create a tag called MyONS that is a DINT and you wanted to use this tag for your ONS. You would have to put MyONS.0 to use bit zero for your ONS. Lets say you want to add another ONS. The next one would be MyONS.1 and so on.

Another way to do this is create a tag that is a BOOL data type. Lets say it's called BoolONS. You would use BoolONS in your ONS instruction.

And yet another way would be to create an Array of boolean data types. So BoolArray[32]. The addressing for a ONS would look like BoolArray[0] for your ONS and if you wanted to add another, the address would be BoolArray[1] and so on.

No matter how you do it, make sure you don't use the tag address twice. Cross-referencing isn't the same as in the MicroLogix so get used to clicking on tag names and pressing CTRL+E to cross reference.
 
I created some B tags in two separate programs. One program I set them up as DATA TYPE BOOL B.0 In my next machine I created them as DATA TYPE DINT B[0]. Which is correct ? If I change the data type will it affect my logic. I use the Bs as internal relays.
 
First off, I suggest you break the B habit. For most cases just create a tag that has a meaningful name. It will make programming, cross referencing, and troubleshooting easier.

Now to answer your question. If all you are doing is accessing them as bits there there is no performance difference between a 32 bit boolean array and a DINT. However, you cannot access a boolean array as a word while you can do that with a DINT, so if you ever want to clear or initialize the entire array in a single step then use a DINT. On the flip side, a boolean array is not limited to 32 bits, you can create boolean arrays in 32 bit steps of 64 bit, 96 bit, 128 bit or whatever size you need.


In my case I prefer to create a boolean array that is reserved exclusively for oneshot storage and I call it OneShots.

OneShots[0]
-----] [--------[ONS]-------------( )--

 
Not clear on "just creating a tag". You mean when I need to add an internal output all I need to do is just give it a name ? SO when I use an a contact from this output all I have to type the name of the output and that is it ? What if I am a hundred rungs down the program and I need a contact from this output and have forgotten it's name ? Go back and find it or is there a drop down list where I can find it. I go to my tags and name them. Then when I make my logic on notebook paper I just put in the input or output number.
Not trying to be smart but this is the first time I have worked with the 5000. We have a small company and no schooling on the 5000. Very familiar with the PLC3, 5 and SLC.
 
I agree with TConnoly on naming. I also have the same preference for using boolean arrays for one-shots.

Technically the data types you posted above (post #10) are backwards. The BOOL data type would be B[0] and the DINT data type would be B.0. Both are technically correct so which way you go is up to preference, just be consistent.
 
Yes, just give it a name. A name is much easier to remember than having to go back and hunt for what bit you used in some obscure B array somewhere. I usually use a tagname that matches the component tag from the drawing plus a brief description. For example, photo eye 412 detects boxes, so it is named PE412_BoxDetected.

Now someone looking at the program knows that he can find the relevant photo eye on page 4 line 12 of the electrical drawing. Likewise, if someone checks the drawing first he knows what to look for in the PLC program. If you are in the habit of tagging your devices then the instrument tech who looked at the instrument first now knows where to find it in the electrical drawing and in the program.

And the autocomplete feature helps as well. If you start typing "PE" you get a dropdown tag selection tool that lists every PE and lets you select the exact sensor you want.

It will also make trouble shooting a lot easier because when Bubba is trying to figure out why SOL_633 won't come on he knows exactly what to look for in the program, he doesn't have to go and figure out its I address and then figure out what B address is mapped with it - he can open the tag monitor pane, type SOL633 in the filter field and every tag that has SOL633 in its name will show up.

Tagnames are also self documenting. If I'm looking at a program I just uploaded without comments then tag b[17] doesn't mean a thing, I have to reverse engineer the program to figure what it means. However a tag name like ProcessAtTemperature means something and I don't have to guess at it.
 
Last edited:

Similar Topics

Hi, Complete novice on PLCs and need your help (again). On GT Designer3 what sort of button/switch do I need to add to Start/Stop a water pump...
Replies
7
Views
1,952
I am using durus development software of GE FANUC. i want to know how will i develop a logic for operating an output with only one start and stop...
Replies
5
Views
2,571
Hi All, Can someone tell me the difference between a stop/start button & a toggle button. And why use one instad of the other? This is in...
Replies
10
Views
3,593
hi guys, i have just started learning plc programming and stuck with one tutorial question. question is: using DIFU create a programe to...
Replies
32
Views
26,796
Does anyone have a sample of logic using one button to start and the same button to stop an output. I am trying to do this in RSLogix 500 and due...
Replies
49
Views
60,297
Back
Top Bottom