Output (LogWin)
You can use the Output window to view debugging messages generated during project runtime. The window displays OPC, DDE, and TCP/IP transactions, module activation, trace tags, and so on.
- XRef tab: Use the Cross Reference tool to get a tag, and to find every place in the project where the tag is being used. Results appear on this tab, providing path and filename, column, row in the spreadsheet. So, if something changes in the tag, and produces unexpected or unsuccessful results, you can locate all instances of the tag for debugging purposes.
Note: The XRef tab does not work for functions, only tags, but it does allow you to look for array indices.
- Hide Docked Window button (): Click to open or close the window.
Alternatively, to hide the window, you can deselect (uncheck) the Output Window option on the View tab of the ribbon.
- Contract/Expand button (): Click to contract and expand the Output window.
- Scroll Bars: Click and drag to view areas of the Output window that are obscured from view because of the window size or the length of your data.
The Output window is dockable, which means you can move it to another location in the development environment. Click on the title bar and drag the window to a new location. Release the mouse button to attach or dock the window to its new location.
Configuring the Log to Show Additional Information
By default, the log shows only debugging and error messages — that is, messages indicating that your project is not running properly. If the log showed all messages generated by IWS, it would quickly overflow with information, making it unusable.
- Right-click anywhere in the Output window, and then click Settings on the shortcut menu. The Log Settings dialog is displayed.
- In the Log Options tab of the dialog, select the specific types of messages that you want the log to show.
Figure 2. Log Settings — Options Tab
Option Description Field Read Commands and Field Write Commands Show any read and/or write commands that are sent to connected devices. Protocol Analyzer Show messages generated by configured device drivers. OPC DA 2.05 Show messages generated by the OPC DA 2.05 Client Runtime task. OPC XML/DA Show messages generated by the OPC XML/DA Client Runtime task. OPC UA Show messages generated by the OPC UA Client Runtime task. OPC .NET Show messages generated by the OPC .Net Client Runtime task. Logon/Logout Display a message whenever a user logs on or logs out. (For more information, see Security.) Trace Messages Show messages generated by the Trace() function. This function is used to generate customized messages from within your project. Database Messages Show messages generated by the ODBC and ADO.NET database interfaces. Recipe/Report Show messages generated by the Recipe and Report tasks. Display Open/Close Display detailed information whenever a screen is opened or closed: - Disk Load Time: Time to load the screen file from the disk into memory.
- Open Time: Time to open the screen, including initializing tags used in the screen and running any “OnOpen” scripts or functions.
- Total Load Time: Total time to load the screen (includes Disk Load Time and Open Time above).
- First Draw Time: Time to first drawing of screen objects.
- First OnWhile Time: Time to first running of any “OnWhile” scripts or functions.
- Total Open Time: Total time to open the screen (includes First Draw Time and First OnWhile Time above).
- Close Time: Time to close the screen, including finalizing tags used in the screen and running any “OnClose” scripts or functions.
- Total Close Time: Total time to close the screen, including the time to close the screen file on the disk.
This information can be used to analyze runtime performance on low-end target systems. If a particular step of opening or closing takes an unusually long time, then it can be identified and redesigned.
TCP/IP Messages Show messages generated by TCP/IP communications. DDE Messages Show messages generated by DDE communications. Insert date/time Timestamp each message. - If you selected OPC XML/DA, OPC UA, OPC .NET, you must specify exactly which messages are displayed in the Output window. To do this:
- Click the browse button to the right of the option. An additional Log Settings dialog is displayed.
Figure 3. OPC UA Log Settings dialog
Each task has its own settings, but the descriptions of the settings are the same for all three tasks.
- Select the type(s) of messages to display.
Option Description Connection Enable trace messages on changes in connection status between the OPC Client (i.e., your project) and the OPC Server. Examples of messages: OPC UA: Connection established with server “Connection1”
OPC UA: Error to connect to server “Connection2” – Time out waiting for server response
Subscription Enable trace messages on subscriptions to server items, such as the creation of new subscriptions and changes in data type. Examples of messages: OPC UA: Group 1 => Subscription created
Read Enable trace messages on read operations. Examples of messages: OPC UA: Read Group 1 Started – OK
OPC UA: Read Group 1 Completed – OK
OPC UA: Read Group 25 Started – Error, asynchronous reading pending for the current group
Write Enable trace messages on write operations. Examples of messages: OPC UA: Write Group 1 Started [Line 1 = 10.25, Line 42 = 20.45] – Status OK
OPC UA: Write Group 1 Completed [All Items] – Status OK
- In the Verbosity list, select the level of verbosity.
Option Description Error Critical issues that have caused the communication to fail. These issues must be resolved before you can resume communication. Warning Non-critical issues that may cause the communication to fail under other conditions. These issues should be resolved as soon as possible. Includes Error above.
Information All trace messages on the communication. This is the default. Please note that this can be extrememly verbose, depending on which type(s) of messages you have selected to display and how many item subscriptions you have created. Includes Error and Warning above.
- Click OK to close the dialog.
- Click the browse button to the right of the option. An additional Log Settings dialog is displayed.
- In the Log Tags tab of the dialog, click Add to browse for project tags.
Figure 4. Log Settings — Tags Tab
The Output window will display a message whenever the value of a selected tag changes.
- Click OK to save your settings and close the Log Settings dialog.