CoreMotion™ Scope
CoreMotion Scope is a graphical oscilloscope that allows tracing of any
information that is defined as a shared memory variable. Scope is used to view,
analyze and measure data as a function of time. Using Scope, you can define
multiple groups of traces which you can either view in real-time, or which you
can record and analyze at your leisure. You can record up to 24 hours of data
and recorded data can be exported to other tools such as an Excel spreadsheet.
By setting up a trigger condition, Scope can be used unattended to capture
critical conditions that occur infrequently. Triggers can be set up to either
trigger every time the condition occurs or only trigger on the first occurrence.
Typical uses of Scope include:
-
Analyzing axis servo performance by plotting commanded vs. actual position,
following error, commanded velocity, etc.
Create timing charts to verify application logic and analyze real-time
performance. For example, does the motion of one axis start at the right time
or position from the finish of another axis move? Are Outputs set at the right
position relative to a path? etc.
Look at the real-time performance of the controller. How much jitter is
there in the motion calculations? How much time are they taking?
Starting Scope
Scope is started by selecting Start | Programs | Code6 | CoreMotion | Scope from the start menu. When Scope starts, it automatically loads the configuration (definitions of trace groups, etc.) that was present when the Scope last exited. The first time Scope runs after installation, a default configuration is loaded. The following figure points out a few key controls.
Quick-Start Overview
The following table list common tasks that are performed by Scope. On the
left is a list of tasks, and on the right is a brief set of instructions for
performing that task. Where appropriate, the task provides a link to more
detailed instructions.
| Task |
Quick-Start Instructions |
| Add a group |
Right click anywhere in the trace list slide tray window. Select
Add Group from the popup menu, then enter the new traces name.
|
| Add a trace |
Select the tab corresponding to the group that will hold the new
trace. Now right click anywhere in the trace list window. Select Add
Trace, a small dialog box will appear. Click the Browse button to
locate the data variable you want to trace. |
| Scale a trace |
Option 1 - Double click on the trace you want to scale, a
small dialog box will appear. Enter the minimum and maximum scale
values. Option 2 - Select the trace you want to scale by left clicking on the trace. Use the size and position controls on the bottom, left side of the main window to adjust the scale. |
| Auto scale a trace |
Select the trace you want to scale by left clicking on the trace.
Now right click and select Auto Scale from the popup menu. The trace
will be scaled such that all of the data from the recent history of that trace
will be centered in 80% of the screen. |
| Locking one trace's scale to another |
It is often helpful to have the scale of several traces be set to
the same value (e.g. commanded and actual position). Locking is a convenient
way to do this. Select one of the traces and adjust its scale until you are
happy with it. Now simply control click on the rest of the traces you want to
have the same scale. |
| Change time scale |
The time scale is changed with the controls on the bottom, right
side of the main menu. The time scale is the time between grid lines in the
horizontal direction, thus the total time displayed is 10 times the time scale.
The time scale can be adjusted from 5 seconds to 1 millisecond. |
| Measuring traces |
There are several measuring tools provided. Grid - The grid divides the screen into 10 equal divisions in both the horizontal and vertical directions. The horizontal direction is always time with one grid space representing the current time scale displayed at the bottom, right of the screen. This is the same for all traces. The vertical direction scale is trace dependent. For example, if a group contained 2 traces, one being the last scan time with a scale from 0 to 1 millisecond, and the second being axis position with a scale from -50 to 50 mm, then each grid space would represent 100 microseconds for the scan time trace and 10 mm for the axis trace. If the bottom slide tray is extended, you can easily see the scale for each trace. Mouse Drag - If you click and hold the left mouse button down, and then drag the mouse while keeping the mouse button pressed, a box will be drawn. The box will start where the mouse was when the button was first pressed, and ending at the current mouse position. This box can be used as a ruler. The length of the box in time is displayed below the box. If no trace is selected, then the height is not displayed. However, if a trace is selected, the height of the box is displayed in the units of the selected trace. This option is on by default, but can be turned off by right clicking in the main display and selecting Measurement Mode in the popup menu. Mouse Measurement - There is a second method provided for measuring with the mouse. Using this method, the current mouse vertical (Y) position is continuously displayed scaled to the currently selected trace. This method is very useful for measuring the peaks and valleys of a trace. This option is off by default, but can be turned on by clicking on the Option button on the right side of the main window, and then clicking Use Mouse Measurement. Note: Whenever a trace is selected, the scale for that trace is displayed in large letters along with the current time scale just below the grid. |
| Setup a trigger |
Often, the data you want to capture occurs infrequently or is
difficult to spot and analyze in a moving trace. For these cases, set up a
trigger to capture and display data only when the situation you are trying to
monitor occurs. Simple trigger conditions can be setup directly with the scope,
Triggers that require more complex logic an be setup with the Configuration Tool
by designing a custom observer. The observer's state variable is then added to
the group you want to observe and used to configure a simple trigger in the
scope. A simple trigger condition is defined as a variable's value going above or below a specified trigger level. Data gathering is started when the condition first transitions to true. It will not trigger again until the condition transitions back to false and then true again. To set up a trigger, first select the variable you want to use for the trigger in the bottom slide tray. Next expand the right slide tray. Slope determines if the trigger occurs when the value goes above or below the trigger value. The trigger value is set in the bottom of the window. The last step is to arm the trigger. This is done by selecting the Update Option. Free Run is the default, meaning no trigger is armed. There are two trigger modes. On Trigger will trigger continuously whenever the trigger condition is met. Single Shot will only trigger once, and then must be re-armed by clicking on Arm button. Once the trigger is armed, the display will clear until the trigger condition is met. After the trigger occurs, the screen will display the triggered data until another trigger occurs or the Scope is returned to Free Run. |
| Gathering data before the trigger |
Sometimes, you are more interested in traces in the time just
before the trigger condition is met than after. For example, the trigger may be
catching an abnormal condition and you want to determine what caused the
condition. An alternative to setting the trigger value in the trigger dialog is to grab the large red "T" icon on the display and move it with the mouse. as you move the T up and down, you will change the trigger value. As you move the T left and right, you will set how much time before the trigger occurs will be displayed vs. how much time after. For example, if you move the T to the far right side of the display, you will only see the data for the time immediately prior to the trigger. |
| Collecting traces (recording) |
If you want to save trace data, or if you want to capture data
for a long period of time, click on the "Collection" button at the bottom of the
main window. From the popup dialog box you can specify the amount of data you
want to collect in terms of time (up to 24 hours), and whether or not to start
recording immediately or to wait for a trigger condition. |
| Exporting traces |
Recorded data can be saved to file in a comma separated value
(CSV) format. do this by clicking on the Option button and then clicking
on the Export Collection Data button. |
| Printing traces |
You can print the data displayed on the screen by right clicking
anywhere on the border of the main window to bring up the main menu and
selecting Print. |
| Using persistence (comparing traces) |
Sometimes it is useful to compare multiple trace waveforms in
order to understand the repeatability of a system. This can be done by using
the persistence feature. Normally, new traces completely overwrite old traces.
Persistence allows new traces to overlay old traces so that they can be
compared. This feature works only in trigger mode, which is necessary to line
up the traces on an event. Up to five traces can be overlayed, and one of the
traces can be selected as a reference (never over written). This is set up from
the trigger slide tray, but only after one of the two trigger modes has been
activated. |
| Making Scope "Stay on Top" |
If you want the scope to stay on top of all other windows, click
on the Option button and then click on the Window Always On Top
checkbox. |
| Using multiple configurations |
When you exit the scope, all trace groups, traces and trace
options are automatically saved in a scope configuration file. When you start
the scope, this data is automatically reloaded, so most users do not need to
worry about scope configuration files. However, if you work in a multiple user
environment, each engineer may want to have a different scope configuration.
To save your configuration to a unique file, right click anywhere on the border of the main window to bring up, the main menu and select Save As. When you restart the scope, the last configuration will be reloaded, if you want to load another one, select Load or Recent Files from the main menu. |
| Change gathering frequency |
Normally data is gathered every servo tick, to gather data less
frequently, click on the Option button and change the Data Collection
Frequency. |
| Change trace properties |
To change a trace's properties, double click on the trace to
bring up the trace properties dialog. From the dialog you can change the
variable that is being gathered, change the trace color or line thickness,
change the scale, and enable/disable displaying the trace. |
| Tracing application specific data |
When you setup CoreMotion's shared memory with the Configuration
Tool, you can reserve integer and floating point data storage for application
use. By mapping key application data into this space, you can use the Scope to
trace the data as a function of time. |