II.  Introduction to Graphic Modeller

To go to one of the following subsections, click on it:  
 The ACSL Viewer contains a complete help file and additional tutorial information is available at the ACSL homepage, http:///www.mga.com.   In this section, some of the basics of using the ACSL Viewer are provided so the reader can use the models which are included with this paper.  It should be noted that the models can be run, constants can be changed, and variables can be plotted; however, the model cannot be changed or recompiled without the full version of ACSL and Graphic Modeller.  The Graphic Modeller can be installed by running "setup.exe" from the directory "disk1."

A.  Opening Graphic Modeller
The program is launched by choosing the program icon from the Windows '95 start menu.  Fig. GM-1 shows the workspace in Graphic Modeller, although when first launched the area below the icon bar will be a blank .  The column of boxes on the left of the workspace (labelled *.rac) are Graphic Modeller racks, which contain predefined ACSL powerblocks (hereafter referred to as blocks).  These can be opened from the File, Open menu and left in a minimized state as shown for ready access when developing a program.  Fig. GM-2 shows portions of several of the standard ACSL racks.  Each block in a rack contains ACSL code to accomplish the desired function.

The large window to the right of the racks (inducmot.gm) is the workspace for developing a model, in this case the induction motor.  When developing a simulation, blocks can be dragged from the racks into the model workspace and then wired together.  Alternatively, custom blocks can be written using ACSL code.  The source, induction motor, and load torque blocks shown are custom blocks, while the strip plot blocks are from the scopes rack.

The menu structure at the top is similar to many Windows programs.  File, Open is used to open the model that the user wishes to work on.  One quirk of the current version of Graphic Modeller is that the directory where the model is stored must contain no more than eight characters.  Once the model is open, studies can be run.  The icon bar below the menu contains standard windows icons, as well as some special purpose icons to run ACSL.  These are described in subsequent sections.

 

Fig. GM-1:  Graphic Modeller workspace
 
 
Fig. GM-2:  Some standard Graphic Modeller racks
 

B.  Obtaining Information About a Block 
Right clicking on a block in the simulation, as shown in Fig. GM-3, yields a context-sensitive menu that provides access to a variety of information about the block.  The first three items in the menu are useful in the reader version and are described below.  The last three menu items are only of use when building a model.

 

Fig. GM-3:  Menu obtained by right clicking on a block
 

Fig. GM-4 shows the Block Details dialog box that is obtained from the menu shown above in Fig. GM-3.  This box contains the name of the block, which can be assigned by the author of the simulation.  The center text block allows placement of text in the center of the block.  The bitmap buttons, next to the name blank, allow a custom bitmap to be assigned to the ACSL block.  Thus the motor drawing and the three-phase source drawing were drawn in a drawing package, saved as "bmp" files and then assigned to the ACSL block.

The Program Section determines which section of the ACSL file,  the code will be placed in.  In particular, ACSL programs are structured in several sections, depending on whether the code is run continuously at each timestep or at discrete intervals.  ACSL provides several options for discrete-event based system simulation.  Those interested in these options are referred to the ACSL help files.  The bottom portion of the Block Details contains space to document the block, including author information and instructions for use of the block.  As shown, the motor block is a complex block, meaning it contains another level of simulation.  Double-clicking on a complex block reveals the next level of the simulation.  Double clicking on regular Graphic Modeller blocks reveals the ACSL code contained in the block.
 
 

Fig. GM-4:  Block details for a Graphic Modeller block
 

C.  Viewing and Changing Constants
The second choice in the context-sensitive menu for the block, is the Constants information.  This dialog box, shown in Fig. GM-5 allows access to all of the constants in a block.  Note that complex blocks must be opened to the next level to obtain access to the individual blocks.  The ACSL code associated with a block contains a value when the constant is defined.  The dialog box allows that value to be changed either temporarily or permanently, although only temporary changes can be made with the Viewer version.  This results in the potential for three different values for a constant:  the value contained in the underlying ACSL code, the permanent value associated with the model, and the temporary value assigned at runtime.  The reason for this is that the same code can be used for more than one block in a model, particularly when standard blocks are dragged into the model.  Thus the value for the model could be different than that in the code.  Temporary values allow the changing of the constant while the model is being run.  For example the motor could be started with zero load torque, and then the load could be increased to observe the change in speed.  In this case, P (the number of poles) has been set to 4 in all three places.

Another method to quickly observe the constants block by block is to click the constants button in the toolbar.  The constants button is the last one on the right with a large C in the button, as shown in Fig. GM-1.  After clicking the constants button, the cursor can be placed on any block (compound blocks must be opened to their next level) and a pop-up will appear showing the constants.  This technique allows very rapid determination of which parameter values are being used.  Fig. GM-6 shows the constants for the induction motor block.

Fig. GM-5:  Constants information for a Graphic Modeller block
Fig. GM-6:  Constant display using the toolbar icon and cursor
 

D.  Port Assignments
As shown in Fig. GM-6, the blocks in the model are wired together, with the wires running from an output port of one block to the input port of another block.  For the model to work, variables from the ACSL code must be assigned to the port.  This is accomplished through the Port Info dialog box shown in Fig. GM-7.  Ports can be given a name and any number of variables can be assigned to the port, but of course the same number of variables must be defined on each end of the wire and in the same order.  Readers using the models provided with this paper may wish to look at the port assignments for each block to understand the structure of the models.
 
 

Fig. GM-7:  Port information for a Graphic Modeller block
 

E.  Plotting and Displaying Variables
Right-clicking on a wire in the simulation also yields a context sensitve menu, as shown in Fig. GM-8.  The first item in the menu is just a house-keeping function to straighten the wire so it looks neater.  The second item on the menu is very useful, however.  By left-clicking on "Include Wire in Plot," one can easily plot that variable after a simulation run.  Current icr from the motor to the strip plot in Fig. GM-8 has already been selected for plotting as indicated by the small plot symbol.  When the user wishes to plot the variable, there are two ways to do so.  One is by choosing "Plot Variables" from the menu shown in Fig. GM-9, the other is by clicking the plot icon (the sine wave) from the toolbar, which is shown in Fig. GM-1.

After the simulation has been started, placing  the cursor on a wire displays the values of the variables associated with the wire  in a pop-up box, as shown in Fig. GM-8.  In this particular case, the screen capture was done after the command to load ACSL was given, but before the start command; i.e., at t=0.  Thus the display shows the initial value for the variable, which ACSL assigns as 5.5555e+33.

The third option in the wire menu is to include the wire in the display.  Clicking this option allows the user to display the values in the ACSL window by choosing "Display Variables" from the simulate menu, as shown in Fig. GM-9 or by choosing the display icon (the magnifying glass) from the toolbar.  Additional plotting information
 
 
 

Fig. GM-8:  Menu obtained by right clicking on a wire
 

F.  Starting and Running the Simulation
To run the simulation, Graphic Modeller makes a DDE connection to ACSL.  This is initiated either by the menu or by clicking the start icon.  Fig. GM-9 shows the Simulate menu.  Choosing "Start ACSL" would launch the ACSL program, as would clicking the icon containing the green flag in the toolbar (shown in Fig. GM-1).  Fig. GM-10 shows the interface box between ACSL and Graphic Modeller that is obtained by choosing "ACSL Command" from the Simulate menu.  The interface box allows the user to send commands to ACSL for execution.

When ACSL starts running, it looks for a command file, *.cmd, where * is the same name as the Graphic Modeller file.  Command files are an easy way to store sets of instructions for repeated use.  If there is a command file, ACSL automatically runs the commands therein, unless they are defined as a procedure.  Procedures are similar to macros in other languages.  By entering the name of the procedure in the ACSL Command box (Fig. GM-10), the commands in the procedure are automatically run.  The names of the procedures that are available can be displayed by choosing "Run Scenario" from the Simulate menu.  Each of the simulations with this paper have a command file containing several procedures.  The command file is a simple text file and new procedures can be defined by the reader and saved in the command file.
 
 

Fig. GM-9:  Menu used to communicate between ACSL and Graphic Modeller
 

The interface box between ACSL and Graphic Modeller, shown in Fig. GM-10, consists of several sections, which will be briefly described.  The first scrolling window contains ACSL commands that are available.  Double-clicking a command enters it into the command line box below the scrolling boxes.  The next two boxes contain the variables and constants in the simulation.  These require some additional explanation.

Because blocks in Graphic Modeller (GM) can be duplicated and reused, it is necessary to distinguish between the variables in each block.  GM does this by placing the name of each block before the variable name, down to whatever level of the simulation the variable resides.  Again, since blocks can be reused and have the same name, it is necessary to have further identification.  GM places an underscore and number (e.g., _1) after the block name.  For example, in this simulation the induction motor block in Fig. GM-1 is called "motor" and is a compound block.  Thus motor_1 is prepended to each variable and constant, but since it is a compound block the name of the block at the next level is also prepended.  Thus the variables shown in the figure have names of the form motor_1induc_1variablename.  An exception, however, occurs when a variable is designated as "global".  In that case the variable name does not get pre-pended with the block names and can be plotted directly.  In this paper, the simulation of the PWM inverter contains examples of global variables.
 
The final scrolling box shows system variables.  Three of them are of immediate interest.  The style of plots are determined by the calplt (Calcomp plot) and strplt (Strip plot) variables.  If calplt is true and strplt is false, all plotted variables are placed on a 5 division by 5 division box.  If the variables are reversed (strplt=.t. and calplt=.f.), then each variable is plotted separately on a 2 division (y-axis) by 5 division box.

The other variable of interest is nrwitg (norewind tape).  The constant called timelimit determines how long the simulation runs.  When the start command is given, the simulation stops at timelimit.  If desired, timelimit can be increased and a continue command issued to continue it to the new value of timelimit.   If nrwitg is true, ACSL retains the previous run information when the simulation is continued or restarted.   Thus if one wanted to change the load torque and plot the stator current before and after the change, the simulation would be stopped, the load torque increased, the simulation would then be continued with nrwitg=.t., and finally the current would be plotted.

G.  Some Additional Plotting Information
When plot commands are sent with the plot icon or the strip plot boxes, ACSL will automatically scale the axes.  In the event the user wishes to change the scales, that can easily be done with switches on the plot command.  The user would double click the plot command in the dialog box and then the variable to be plotted yielding as an example:

            plot motor_1induc_1iqsr

where iqsr is the rotor quadrature axis current referred to the stationary reference frame.  To change the time scale (perhaps to blow up the graph), one would use "xlo" and "xhi" switches, while to change the y-axis scale, one uses the "lo" and "hi" variables.  Suppose the simulation had run from zero to one second, but it was desired to view the portion from 0.8 to 0.9 seconds.  Further suppose, ACSL had scaled the y-axis from -50 to +50 amps, but the current actually ranged from -37 to +37.  We could observe the desired time period and change the y-axis to plus and minus 40 with the following command:

            plot motor_1induc_1iqsr/xlo=0.8/xhi=0.9/lo=-40.0/hi=40.0
 
 

Fig. GM-10:  Dialog box used to send commands to ACSL from Graphic Modeller
 

RETURN TO MAIN INDEX

NEXT SECTION