• No results found

Tips, Shortcuts and Warnings

Use The Data Table To Find Unused Bits As You Write Your Program.

If you are writing a large program and using many B3 file bits, it is easy to lose track of what bits are available.

Right-click on an instruction and choose Goto Data Table. Click the “Usage” button and an “X” will show what addresses you have already used. This technique works with any type of file, such as timers, counters and integers.

You Cannot Add Program Files Or Expand Data Tables When You Are In Run Mode.

Try to think ahead and include all the files as you write the program offline. Sometimes you don’t have the option of shutting a machine down because, for example, you have used all the timers in your T4 file and you need a new timer.

Use Search And Replace With Caution.

Try to avoid the “Replace All” button unless you are absolutely, positively sure that things will come out right. There is no “Undo”.

It is much safer to use the “Find Next” and “Replace” buttons. That way you can evaluate each change you make.

Attach Rung Comments To The Output, Not The Rung Number.

The default in RSLogix is to attach comments to the rung number.

Choose Tools > Options… > System Preferences and select “Output Address”.

Don’t Fault The Processor In Run Mode.

Make sure you don’t ask the PLC to do anything like dividing by zero. The PLC will fault and the machine will stop. This can be very embarrassing.

Backup Your Files Frequently.

The easiest way is to “rev” your filename every so often, at least once every 30 minutes.

Choose File > Save as and put a number in the filename.

Sometimes, files are corrupted through no fault of your own. You can always go back to the previous version so that you have not lost all of your work.

Disable A Rung With An AF.

If you want to temporarily disable a rung, set aside a bit that you know will always be false.

Label it “AF” for “always false” and use it with an XIC to temporarily disable a rung.

Don’t Turn Off Power To The PLC OR Your Computer During An Online Edit.

There is a good chance this will corrupt your current file.

Keep The Original Program In A Very Safe Place.

If you need to make some changes on an existing program, upload the program from the PLC and store it on a floppy or a CD. If things go awry with your editing, you can always put the program back the way it was.

Keep Track Of What You Are Doing If You Modify An Existing Program.

People will want to know.

Rung Comments Are Extremely Important.

Not only will they explain the operation of the program to someone else, they will remind you of why you programmed the logic the way you did.

Set The Date And Time.

Double click on “Processor Status” in the “Project” tree. To the right, you will see the fields you need to fill in to set the date and time. You can also use these words (S:37 through S:42) in your ladder logic.

Use Passwords Carefully.

If you use one, don’t forget it . . . but if you do, your Rockwell rep can show you how to get around it.

Find Errors After A PLC Fault.

Open the “Processor Status” file in the “Project” tree and click on the “Errors” tab. Take note of the Error Description and click “Clear Major Error”. Find the logic in your code and correct it before you go back online.

Make Sure Your Program Is Programmed Properly For A System Power-Up.

There can be no machine motion until the operator initiates it.

Set Up A Printout.

Choose File > Report Options. This shows you everything you can print. If you are not careful,

though, you may get hundreds of pages, many of which you don’t need. Use the “Print Preview”

button to make sure you are getting only what you want.

Address ONS (One Shots) Individually.

Load And Save Your Workspace.

This is a nifty way for RSLogix to remember your window positions and the files that you would like to be opened the next time you run RSLogix.

Choose File > Load/Save Workspace to access this.

Symbols

This is a type of label that can be used as a substitute for an address. There are some

advantages in terms of exporting the database, but in my experience, they are not used much.

Use CTRL-G To Goto Places Real Fast.

CTRL-G brings up a dialog box. Enter in a rung number or text to go to the first occurrence of the search string.

When You Are Done, Store Your Program To The EEPROM In The PLC.

It is a good idea to save your ladder file to the EEPROM. The onboard battery will keep your program in the PLC’s RAM, but if the battery fails, the EEPROM will hold the program.

Don’t Lose All Your Rung Comments And Address Descriptors.

Your rung comments and address descriptors are not stored in the PLC when you download your program.

If you were to go online without choosing a database, upload the file to your computer and save it, there is a chance that you could overwrite the file that has all the rung comments and address descriptors.

Use Revision Notes

That way, you will know what you did the last time you were there.

Use Tools > Options… to switch on revision notes.

Use The Built-In Automatic Program Backup

Choose Tools > Options… and set your Project Files Search Path. Make sure AutoSave is enabled.

RSLogix will automatically save your file every few minutes (the default is 10 minutes).

Create An HMI In RSLogix.

RSLogix provides quick way to create an HMI (Human Machine Interface). It is not something you might want to use as a final solution for a factory floor, as anyone could get in and change your program, but it is pretty handy for start-up and troubleshooting.

Double-Click on “CGM 0” in the “Custom Graphical Monitors” section of the “Project” tree.

Click on a button at the top of the CGM screen to select it. In the screen area, click and drag a square to create the object. Click and drag an address from your ladder program and drop it on the object you just made. Double-click on the object to change parameters and you will end up with something like this.

When you are in Run Mode, click on the blue arrow to run the CGM.

Write Your Rung Comments In The Present Tense.

You can then cut and paste them into a document to make an operator’s manual.

Write Your Rung Comments In A Standalone Word Processor (such as Word) Spell check them, then cut and paste them into RSLogix.

Conclusion

I hope that you have found the information in this book useful. Some of the concepts we have covered may seem confusing at first, but with time and effort, you will be able to program a PLC to do whatever you want it to do.

I wish you the best of luck in your endeavors.

Supplementary recommendations that will help, available at engineer-and-technician.com.

Index

1746-IA16 120VAC Input Module, 27 1746-NI4 Analog 4 Channel Input Module,

27

Configuring Colors, Fonts and Address Display, 36

COUNTER, 13

Create An HMI In RSLogix, 128 Descriptors, 37

Digital Inputs, 28 Digital Outputs, 29

Disable A Rung With An AF, 125 Done bit (DN), 66, 69

Download, 9, 10, 101, 104 Downloading, 9

EEPROM, 127

Enable bit (EN), 66, 67

Expand Data Tables When You Are In Run Mode., 125

Fault The Processor, 125

Find Errors After A PLC Fault, 126 Force, 123, 124

normally open, 11, 14, 16, 24, 73, 109 One Shots, 127

Rung Comments, 85, 122, 125, 126, 127, 128

Running RSLogix, 31 Scan Time, 16

Search And Replace, 125 Set The Date And Time, 126 SLC 5/03, 27

SLC 500, 1, 6, 7, 11, 12, 30, 93

The Date Attribute Of The File Is Updated Every Time You Go Online Even If You Don’t Save The Program., 125

Ultrasonic Level Sensor, 19, 21, 22, 25, 27, 39, 51, 70

Untest Edits, 118, 123 upload, 104, 126, 127

Use The Built-In Automatic Program Backup, 128

Use The Data Table To Find Unused Bits As You Write Your Program, 124

THE FOLLOWING ARE TRADEMARKS OF ROCKWELL AUTOMATION, INC.

THE AUTHOR OR THE PUBLISHER OF THIS BOOK IS IN NO WAY AFFILIATED WITH ROCKWELL AUTOMATION, INC.

Disclaimer

THE AUTHOR INTENDS THIS DOCUMENT TO BE ADVISORY ONLY. ITS USE IN INDUSTRY OR TRADE IS STRICTLY VOLUNTARY.

THIS DOCUMENT IS PROVIDED BY THE VENDOR “AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A

PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE VENDOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Courtesy of Rockwell Automation, Inc.

Related documents