CX-Programmer User Manual (986752), страница 10
Текст из файла (страница 10)
The 'Attached comment' is always shown first (i.e.highest priority), followed by the 'Symbol Comment' and then the descriptions.MagnificationThe magnification level (i.e. zoom) of the Diagram and Mnemonics view can be adjusted to display moreor less information as required. If the diagram is zoomed out then the font becomes smaller and morediagram elements can be seen.Revision 2.0Page 45CHAPTER 3 – Project ReferenceOMRONUse the following procedure to set magnification levels.1, 2, 3…1.Open the Diagram Workspace.2.Select the Zoom In button or the Zoom Out button from the toolbar to change theDiagram Workspace.Finding and ReplacingCX-Programmer provides facilities for finding references to particular text, and replacing text with othertext.It is possible to find and replace text from various places: the project workspace, diagram workspace(ladder or mnemonic views), and a symbol table.When using the Find and Replace feature from the project workspace, the operation searches the chosenobject, including any objects within it.
For example, when finding text from a program within the projectworkspace, the local symbol table for that program is also searched. When beginning a search from theproject object itself, everything within the project is searched.It is also possible to limit the search to a single program window or symbol table by beginning the searchwhen the relevant ladder or symbol table window is active.FindThe Find dialogue allows various types of search to be carried out inside a window or from the projectworkspace.Use the following procedure to execute a find.1, 2, 3…Page 461.Select an object in the project workspace to begin the search.2.Select the Find button from the toolbar or select the Find option from the Editmenu.3.Select the required Look At entry from the drop down menu.
This allows a choiceto be made of the type of item being searched/replaced. The choices are as follows:Revision 2.0OMRONCHAPTER 3 – Project ReferenceProgram Comments - searches for comments within a program. This includes thecomment made against a rung, or its set of annotations (comments made againsta particular element in the program, or comments from comment boxes in projectfiles from previous versions of CX-Programmer).Symbol Comments - searches for comments of program symbols (local andglobal).Symbol Names - searches for names of program symbols (local and global).Addresses - searches for addresses within program operands and symbols.
Thiswill not find values set into operands (such as ‘&’ or ‘#’ operands), but will findTIM/CNT numbers (by setting a T/C address).Values - searches for numeric values within program operands and NUMBER datatype symbols. This also finds timer/counter numbers in TIM/CNT instructions.Mnemonics - searches through a program by examining the entire statement listline of each step. Using this, it is possible to search for a combination of aparticular instruction and operand together.
It is possible to change the instruction.4.Enter the text or item to be found in the Find What field.5.Click Find Next to begin the search. The result of the search is displayed in theoutput window. Select Cancel to abort the operation.6.Click Find Report instead to produce a report of all occurrences of the search.Once this report is generated, shown on the ‘Find Report’ tab of the outputwindow, it is possible to move to a particular occurrence by double-clicking thereport line.Using Search and ReplaceScope of the searchThe search takes place within programs and symbol tables, depending upon the currently selected itemon the Project Workspace or the currently selected window. For a Project Workspace item, the searchwill take place in objects within it.
If the project itself is selected, then all programs and symbol tablesare searched for all PLCs. If a program or symbol table window is currently selected, then only thewindow is searched, starting from the cursor position.Revision 2.0Page 47CHAPTER 3 – Project ReferenceOMRONFinding and Replacing TextThis applies to the 'Look At' choices of 'Mnemonics', 'Symbol Names', 'Symbol Comments' and 'ProgramComments'.1.Select the Replace button from the toolbar to open the Replace dialogue.2.In the Look At Field select the area to be searched. Select either 'Mnemonics','Symbol Names', 'Symbol Comments' or 'Program Comments'.3.In the Find what field, enter the text to be searched for.4.In the Replacement field, enter the replacement text.5.Click Find Next the find the next assurance of the match, Replace to replace amatch or Replace All to replace all matches.Normally, a match will only be found if text within the item matches exactly what is being searched for.Note, however, a 'wildcard' can be used of '*' to search for partial matches.
The '*' wildcard indicatesthat any following characters are to be ignored in a single word when searching for a match. Note thatthe wildcard operates on each word separately.e.g. to search for mnemonic lines for the ‘MOV(0221)’ instruction where the second operand is D1, thefollowing search can be made – “MOV* * D1”.Note: A wildcard can also be used in the replacement text. This will have the effect of using the textwhich the corresponding wildcard in the find string became.
e.g. Using a ‘Find what’ of ‘ab*’ and areplace of ‘tr*’ will change ‘about’ into ‘trout’ and ‘abort’ into ‘trort’.In addition, it is possible to search for 'Whole Word Only' - a match will only be found if an entire wordmatches the text typed. If this option is not selected, then a match will be found if a word contains thetext typed, and any text may be in front or behind the 'Find What' text in the same word.For this search a match will normally be found regardless of case. If an exact match is required, selectthe 'Match case' option.Page 48Revision 2.0OMRONCHAPTER 3 – Project ReferenceFinding and Replacing AddressesThis search and replace operates the same as for the Text but applies only to the 'Look At' choice of'Addresses'.Type in the address or addresses which are to be found in the 'Find What' field.
A range of addressesmay be input by using a dash ('-' or minus) between two addresses. e.g. 'A100-A200' will find addresses'A100' 'A110' and 'A200'.When a CHANNEL address has been entered, a choice of 'Include BOOLs' is available. If this ischecked, then bit addresses within the channel will also be matched. e.g. If a 'find' of A100 is input, and'Include BOOLs' is selected, then addresses 'A100', 'A100.00' and 'A100.15' will be matched.Moving Addresses: It is possible to move a range of addresses. To do this, enter a range in the 'FindWhat' field, and enter a new start address for the start of the range in the 'Replace' field.
Note that a dashmust be included at the end of the 'Replace' field, indicating that a new range is given. e.g. 'Find What'of 'A100-A200' and 'Replace With' of 'B100-' will move the range of addresses 'A100-A200' inclusiveto a new start address of 'B100'. 'A100' will move to 'B100', and 'A101' will move to 'B101' etc.
If the'Include BOOLs' option is selected, then bit addresses will be moved along with channel addresses (e.g.'A100.0' will move to 'B100.0' etc), otherwise bit addresses will not be affected.Finding and Replacing NumbersThis search and replace operates the same as for Text but applies only to the 'Look At' choice of'Numbers'.When operating on numbers, it is necessary to choose whether floating point or integer numbers are tobe manipulated. Numbers used in program operands are either floating point or integer type.
e.g.Numbers used in TIM/CNT instructions to indicate the timer/counter are integers. Any operand valuestarting '+', '-' or containing a decimal point is a floating point value. A value beginning in ‘#’ is ahexadecimal integer value.Note:BCD operands are shown in the programming windows with a ‘#’ on the front, but aredecimal values. When searching for a value in the find dialogue, a ‘#’ prefix meanshexadecimal. Therefore, a find of ‘#10’ will actually match a BCD operand of ‘#16’.A replacement of ‘#10’ will actually show as ‘#16’ back in the program display for aBCD operand.It is possible to move a range of integers to a new starting point, using the same method as 'MovingAddresses'.Changing TIM/CNT OperandsIt is possible to change the first operand of a TIM/CNT instruction easily, at the same time as changingthe address used for its status bit.