TRACE is a tool embedded in MasterTool IEC XE capable of monitoring variables, displaying them as valueXtime, like an oscilloscope. In this tutorial, we will use the BLINK block to generate a periodic pulse and monitor it using TRACE.
After creating a standard project in MasterTool IEC XE, the first step is to import the Util library. Go to Library Manager and click on Add Library. Find the Util library and import it.
The Blink function generates a square wave whose time at low level (0) and high level (1) can be changed by the TIMELOW and TIMEHIGH variables, making it very useful for PWM generation.
Add the Util.Blink block and configure its parameters.
Add the trace by right-clicking on Application and going to "Add Object->Trace..."
Click on "Configuration" and configure the trace as follows:
Click on "Add Variable" and add the output variable from Blink.
Download the application to the CPU. With the application in RUN mode, right-click on Trace and click on "Download Trace" to start monitoring the variable.
With this, you should start to see the output variable from the Blink we created being shown in the Trace.
VIDEO
Comments
0 comments
Please sign in to leave a comment.