Documentation:Tutorial:UsingScope - MdsWiki
Navigation
Personal tools

From MdsWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 07:15, 21 July 2015 (edit)
Manduchi (Talk | contribs)

← Previous diff
Revision as of 07:16, 21 July 2015 (edit)
Manduchi (Talk | contribs)

Next diff →
Line 10: Line 10:
<font face="Arial">This interface is provided by the '''jScope''' tool, a Java application for graphical waveform display. In general, jScope allows the definition of a number of panels, and associated with each panel with one or more MDSPlus expressions (usually signal references), returning an array of numbers, which are then plotted in the panel.</font><br /> <font face="Arial">This interface is provided by the '''jScope''' tool, a Java application for graphical waveform display. In general, jScope allows the definition of a number of panels, and associated with each panel with one or more MDSPlus expressions (usually signal references), returning an array of numbers, which are then plotted in the panel.</font><br />
-In order to start learning how using jScope, let's start from the running example of the first tutorial application presented in the first section of this tutorial[Documentation:Tutorial:QuickOverview%20&open=38101832318169843162415089&page=Documentation%2FThe+MDSplus+tutorial%2F+A+Quick+Tour+over+MDSplus+Basic+Concepts title]+In order to start learning how using jScope, let's start from the running example of the first tutorial application presented in the first section of this tutorial [http://www.mdsplus.org/index.php?title=Documentation:Tutorial:QuickOverview%20&open=38101832318169843162415089&page=Documentation%2FThe+MDSplus+tutorial%2F+A+Quick+Tour+over+MDSplus+Basic+Concepts title]

Revision as of 07:16, 21 July 2015

jScope is a MDSplus tool providing a sophisticated graphical interface to acquired waveforms.
We know now that a MDSplus tree can contain several kinds of data, among which arrays and signals. If we use jTraverser to look at the content of a node containing an acquired signal, we would see something like the following:

SignalText.jpg (28188 byte)

a very looooong expression (note the scroll bar). In fact acquired signals are usually made of thousands of points, and looking at the textual format of the corresponding expression is useless. Much better an interface like the following:

jScope1.jpg (57036 byte)

showing the same (evaluated) expression of the previous example.

This interface is provided by the jScope tool, a Java application for graphical waveform display. In general, jScope allows the definition of a number of panels, and associated with each panel with one or more MDSPlus expressions (usually signal references), returning an array of numbers, which are then plotted in the panel.
In order to start learning how using jScope, let's start from the running example of the first tutorial application presented in the first section of this tutorial title



We shall describe here very briefly the features of jScope concentrating more on the way jScope connects to a data source. Basically, jScope connects a panel to a set of signals by means of the Setup Data Dialog, activated by selecting the pop-up option Setup data source... getting the following dialog:

SetupData.jpg (53119 byte)

The setup data dialog has several fields, mostly optionals. The field Y is mandatory and defines the expression to be evaluated. In the above example, as in most cases, the expression is a reference (a tag name here) to a node of a MDSplus tree. If the X field is not specified, jScope defines as the X axis either the sequence of integer numbers, in the case the evaluation of the Y expression returns an array, or the time values of the specified signal in the case the evaluation of the Y expression returns a signal (i.e. the MDSplus data type specifying both an Y and a X axis).

In the above example, two other fields have been filled: the experiment, i.e. the name of the MDSPlus tree containing the data to be displayed, and the shot number.
You will note also that a checkbox is associated with every field. When selected, the checkbox indicates that the value of the corresponding field is retrieved from the global settings. The global settings form is activated via the Customize->Global Settings... option. In particular, it is convenient to let the default setting of the shot number, and then to type the actual shot number (which is often changed) in the bottom Shot: label of jScope.

So far we have seen how to connect a jScope panel to one (or more) signals stored in a MDSplus tree. This is however not enough for a complete specification of the signal. In fact we need to define also where is the MDSplus tree. The location of the MDSplus tree is specified by defining an appropriate Data Server using the Network->Servers pulldown menu.
We shall see in the following sections how MDSplus data are exported. We anticipate here that MDSplus data hosted on a system can be exported by running an application called mdsip. This application exports the content of the local trees over TCP/IP top any connected client running jScope. When data is accessed locally, and no mdsip server is active, jScope reads local data using the local MDSplus data access routines. In this case it is necessary to define the Local Data Server. As in this case jScope links directly to the MDSplus libraries, you need to have MDSplus installed on your machine, and an appropriate definition of the environment variable PATH (for windows) or LD_LIBRARY_PATH (for Unix), defining the directory containing the MDSplus libraries (usually \Program Files\mdsplus if you installed MDSplus on windows, or /usr/local/mdsplus/lib on Unix).

When data is accessed on a remote node, there is no need of installing the MDSPlus libraries on the machine running jScope (which is this case is a pure Java application), as jScope handles directly in Java the communication protocol.
To connect jScope on a MDSplus tree on another machine the following steps are required:

  1. Start a mdsip server on the machine hosting the MDSplus tree. Let's assume that you are using the default port 8000.
  2. Edit a new Data Server to be added in the Server list of jScope, through option Network->Edit server list...
  3. The following for is activated:
    EditServer.jpg (28336 byte)

Fill fields Server label: with a name of your choice, Server argument: with the IP address and port of the machine running the mdsip server, separated by a colon, and select MdsDataProvider as Server class. Once you have pressed the Add button, your data server is added to the server list of jScope, and once you have selected the newly created server in the servers list, jScope is connected to your data source via the mdsip server (the currently selected data server is displayed in the bottom right label of jScope).

You may wonder whether it is necessary to repeat all those steps each time jScope is started again. The answer is no, of course, and there are two ways for storing this information:

  1. Once you have defined your data server, and connected each panel to one (or more signals), you may save the current configuration in a configuration file using the Customize->Save Current setting as... option. When a jScope is started, you can retrieve the saved configuration by means of the Customize->Use saved settings from... option.
  2. You can permanently add your data server to the server list of jScope (as well as change this list) by editing the properties file used by jScope. You can edit this file directly within jScope by selecting the File->properties... option. You add the above definition of your data serer by writing the following lines (where n is the index position of your server in the server list):
jScope.data_server_<n>.name = My server
jScope.data_server_<n>.argument = 130.237.47.75:8000
jScope.data_server_<n>.class = MdsDataProvider

To learn more on jScope

You can find a complete description by selecting the Help->About jScope menu option, or through this link)