Detailed instructions for using Working Model


Running the MAKEMUSC.WBS script

Create a blank document in Working Model by clicking selecting the File menu, then New. Then select the Script menu, then choose Run. A dialog box will pop-up, prompting you to select a script file to run. If you have saved the script into your working directory, the file MAKEMUSC.WBS should appear. If not, you will have to select the appropriate directory for the file. Click on the file, and click the Open button.

Loading the built-in Script Editor

The Script Editor can be accessed by loading Working Model 2D, and going to the Script menu, and selecting Editor. This should pop up a script editing window. From this window, select the File menu, followed by the Open option. Select the MAKEMUSC.WBS file.

You can use the editor like any normal text editor, to input and edit text. To save the changes you make after done using the editor, go to the File menu in the Script Editor window and choose Save.

Inserting an application control interface

Linking an external application to Working Model is done by selecting the Define menu, and selecting New Application Interface. This will create an icon that allows you to link Working Model input and output boxes to many different external applications. Simply double-click the external application icon, and enter the full pathname of the external application (e.g., C:\MATLAB\BIN\MATLAB.EXE) into the Application field and the word ENGINE into the Document field. This calls Matlab with each frame that passes in Working Model. In the Execute field, enter the command string for the function you wish to call from your external program. For example, the syntax for calling a Matlab function is given below:

[input1,input2,input3,...,inputx]=matlab_function_name(output1,output2,output3,...,outputx)

Each input and output is entered into the Variable field for Inputs and Outputs respectively. By clicking on the Connect button when the correct input in Working Model is selected, the value of that input will be determined by whatever value Matlab passes back to Working Model. Likewise, the outputs from Working Model will be passed to Matlab, and thus control the Matlab function.