Sample Code Library Help

About

The goal of this site is to give users a place to share their best Integrated Architecture applications, including logic, HMI and drive applications.

For Those Downloading Code

When downloading code from the Rockwell Automation Sample Code website, please keep the following in mind

    • See the "Search Tips" link for help in searching the site.

    • If you have questions or need assistance with a search, you can contact us at RASampleCode@ra.rockwell.com

  • Click on "Information & Description" for more details about the sample code.

  • If a code is designated "RA Preferred code", it has been tested with RA products and is supported by RA Technical Support. Contact RA Technical Support or the Technical Support Knowledgebase for details. For other sample codes, the Rockwell Automation Forum is an available resource accessible from the Tech Support web page.

  • Feel free to rate or review on the sample code using the "Submit" link.

For Those Posting Code

When posting code to the Rockwell Automation Sample Code website, please keep the following in mind

  • The section of code that you post must be "complete". It must be a working unit. Do not post snippets so small that they are not useful without contacting you directly. For example, a section of code that shows how to convert a decimal number to IEEE binary floating point would be acceptable. Another example is an RSLogix 5000 UDT for a PowerFlex drive on DeviceNet.

  • All files should be placed into one file in a "Zip" file format.

  • In the description field post the software versions/firmware versions for all the applicable components. This is a big help to users.

  • In the description field, if you wish, you may post contact information, such as name, company name, email or phone number.

  • This web site is not intended to replace Technical Support, product fixes or product workarounds. Rockwell Automation has support sites specifically for that purpose. This site is intended to allow you to share sections of code that you think other users might find helpful. No profanity, degrading remarks, etc.

  • Do not use RSLogix 5000´s Routine Source Protection in the code you are posting. The user of the code needs to be able to see it and modify it.

  • This web site allows you to share your best work with others in the automation community worldwide.

  • After you submit code, it will not appear on the site for few days while it is given a brief review by the site manager. The code is not checked for accuracy or completeness, but it will be checked for profanity, etc.

If you have an existing Sample code you would like to update, you can send it to RASampleCode@ra.rockwell.com.

The zipped file that you submit should include all pertinent files:
RSLogix 5000
RSView Studio
Drive Executive
RSNetWorx
RSSql
Any other pertinent file required for the application

Search Tips

This information covers the most common search issues. For information not detailed here, please feel free to email us.

 

Phrase search ("")

By putting double quotes around a set of words, you are telling our search to consider the exact words in that exact order without any change. Our search already uses the order and the fact that the words are together as a very strong signal and will stray from it only for a good reason, so quotes are usually unnecessary. By insisting on phrase search you might be missing good results accidentally. For example, a search for ["ENI Utility"] (with quotes) will miss the pages that refer to [ENI Configuration Utility].

Words you want to exclude (-)

Attaching a minus sign immediately before a word indicates that you do not want pages that contain this word to appear in your results. The minus sign should appear immediately before the word and should be preceded with a space. For example, in the query [Kinetix Safe-Off], the minus sign is used as a hypen and will not be interpreted as an exclusion symbol; whereas the query [Kinetix Safe-Off -software] will search for the words 'Kinetix Safe-Off' but exclude references to software. You can exclude as many words as you want by using the - sign in front of all of them, for example [Kinetix -software -manual -nema].

Fill in the blanks (*)

The asterisk (*), or wildcard, is a little-known feature that can be very powerful. If you include * within a query, it tells our search to try to treat the star as a placeholder for any unknown term(s) and then find the best matches. Note that the * operator works only on whole words, not parts of words.

Search exactly as is (+)

Our search employs synonyms automatically, so that it finds pages that mention, for example, PV600 for the query [PanelView 600] (with a space). But sometimes our search helps out a little too much and gives you a synonym when you don't really want it. By attaching a + immediately before a word (remember, don't add a space after the +), you are telling our search to match that word precisely as you typed it. Putting double quotes around the word will do the same thing.

The OR operator

Our search's default behavior is to consider all the words in a search. If you want to specifically allow either one of several words, you can use the OR operator. For example, [Company News 2008 OR 2009] will give you results about either one of these years, whereas [Company News 2008 2009] (without the OR) will show pages that include both years on the same page. The symbol | can be substituted for OR. (The AND operator, by the way, is the default, so it is not needed.)

Punctuation That Is Not Ignored

The hyphen (-)

The hyphen - is sometimes used as a signal that the two words around it are very strongly connected. (Unless there is no space after the - and a space before it, in which case it is a negative sign. (See "Words you want to exclude (-)".)

The underscore symbol (_)

The underscore symbol _ is not ignored when it connects two words, e.g. [quick_sort].

 

Review Guidlines

When Rating Sample Code

 

Do

  • Stay on topic. Please post only messages that are relevant to the sample code selected

  • Be nice. Please refrain from posting both inappropriate language and content. Personal attacks and insults are never appropriate.

  • Use a descriptive title for your posts. This will help subsequent visitors to identify your topic. Vague subjects are often passed over by experienced users, as they provide no indication as to what your topic may be.

Don't

  • Don't double-post. If you've already rated the sample code, please dont repeat your post in order to get more attention- this just makes the list of ratings longer, and harder for users to deciper.

  • Dont quote previous ratings. Only quote when absolutely necessary. Readers can easily view previous messages when needed.

  • No advertising or solicitation is permitted.

  • Dont get too personal. Remember, all messages are public and will be viewed by many others. Your post is indexed by search engines and posting personal information such as email addresses and/or contact information may result in unwanted contact and/or email, so be selective.

 

Rockwell Automation reserves the right to delete messages that do not follow these guidelines.