Applies to Software
Applies to Version
|8.0 and Higher|
Applies to System/Module
A statement of the problem scenario encountered by the user.
Using the UseSMCLogger.dll, a user can write message to the Wonderware SMC Log Viewer from a variety of external applications. The solution below was written using Microsoft Visual Studio .Net 2010 with C Sharp. However, any other .Net programming language could have been used just as easily. This tech note is intended to be used as a guide for writing to the SMC Log Viewer and is not intended to be a technical document explaining the features or functionality of the UseSMCLogger dll.
UseSMCLogger.dll can be downloaded from the location below:
From the Microsoft Visual Studio development environment choose Project \ Add Reference
Browse to and select the UseSMCLogger.dll file linked to from this tech note.
I have created the simple form below to show the desired functionality of the available methods.
After double clicking on a button in the development environment, I can have it write an informational message into the SMC Logger by using the available method ArchestrA.Diagnostics.UseSMCLogger.LogInfo().
In the example below, txtLogger is the name of the text box I will be using to hold the log information that I wish to write to the logger as an informational message:
Use the same steps listed in step 4 to include the functionality for the warning and error buttons. The methods that can be called for warnings and errors are listed below:
After completing all of this, your form should look similar to the one below:
The next step is to execute the program and test the functionality of the buttons. The example below shows the Form created to write to the logger. At this point you should be able to type in the message that you wish to write and click the appropriate button.
Check the log viewer to make sure all of the functions work as desired. Informational messages will show up in white. Warning messages will show up in yellow and Error messages will show up in red as displayed in the picture below: