How to Use the Find/ Replace and Go To Functions (GS 3.8)

To use Find/ Replace or Go To:

·Select the Edit>Find, Edit>Replace, or Edit>GoTo menu command

·Press CTRL+F for Find, CTRL+H for Replace, or CTRL+G for Go To

How to Use:

Find

Replace

Where They Can Be Used

Find, Replace, and Go To can be used in the Program Editor window, and in Local Variable Tables, Symbol Tables, Status Charts, the Cross Reference tab, and the Data Block.

How They Work

·The Find function allows you to locate a specified string, such as an operand, network title, or instruction mnemonic. (Find does not search network comments, only network titles. Find does not search the network symbol information tables that are available in LAD and FBD.)

·The Replace function allows you to replace the specified string. (Replace does not operate for instruction mnemonics.)

·The Go To function allows you to move quickly to another location by specifying the number of the network or row to which you wish to navigate.

The Find Function

Back to Top

1.To search, type a string in the "Find What" field.

2.To move to the next occurrence of the search string, click on the "Find Next" button.
Note: Under some circumstances, the Find Next command may appear to search program code in an irregular order; actually, this order simply reflects the way that operands are stored in the code. Also, if you create a program in STL that contains networks that are illegal in LAD or FBD, the Find Next command does not operate on those networks when the program is viewed in the LAD or FBD editor.

To define your search further, you must click on the "More" button, which allows you to customize the search as described below:

·You can choose a direction for the search by using the "Search" list box.

·You can search only for strings that have the same uppercase/lowercase value as the string that you typed in "Find What" by selecting the "Match Case" check box.

·You can eliminate strings that contain your search phrase as a fragmentary part of a larger word by selecting the "Whole Word" check box.

·You can search through all POUs (OB1, all subroutines and interrupt routines) or all instances of a Local Variable Table, Symbol Table, or Status Chart, by selecting the appropriate "Span" check box.

·You can specify a range of lines to search. If you have selected a range of networks in the program editor, they appear as the default range in the Find dialog box; you can also type in the network or row numbers for the beginning and end of the search.

·You can specify whether or not to search network titles and/or program code by selecting the appropriate check boxes.

The Replace Function

Back to Top

1.Type the string that you are searching for in the "Find What" field.

2.Type the string that you want to use as the replacement for the search string in the "Replace With" field.

3.To find an occurrence of the search string, click on the "Find Next" button.
Note: Under some circumstances, the "Find Next" command may appear to search program code in an irregular order; actually, this order simply reflects the way that operands are stored in the code. Also, if you create a program in STL that contains networks that are illegal in LAD or FBD, the Find Next command does not operate on those networks when the program is viewed in the LAD or FBD editor.

4.If you want to replace the string, click on "Replace". If you have defined your search carefully, and there is no risk that strings could be modified erroneously, you can click on "Replace All" to replace all instances of the string without examining them individually.

To define your search further, you must click on the "More" button, which allows you to customize the search as described below:

·You can choose a direction for the search by using the "Search" list box.

·You can search only for strings that have the same uppercase/lowercase value as the string that you typed in "Find What" by selecting the "Match Case" check box.

·You can eliminate strings that contain your search phrase as a fragmentary part of a larger word by selecting the "Whole Word" check box.

·You can search through all POUs (OB1, all subroutines and interrupt routines) or all instances of a Local Variable Table, Symbol Table, or Status Chart, by selecting the appropriate "Span" check box.

·You can specify a range of lines to search. If you have selected a range of networks in the program editor, they appear as the default range in the Find dialog box; you can also type in the network or row numbers for the beginning and end of the search.

·You can specify whether or not to search network titles and/or program code by selecting the appropriate check boxes.