by Dave Sopchak
Scope II, as a pure Java application, is perfectly capable of being run on a Macintosh computer running OS X. However, Scope II sometimes relies on being launched from a command line using some special arguments in order to access some of its features. It also uses an open-source library called RXTXcomm to access the serial port. Because of this, one must be prepared to handle Scope II in slightly different ways than a typical Macintosh application, and in slightly different ways than Mel's instructions specify for other platforms. Note: These instructions are for a Mac running OS X 10.3.x (Panther) and Java 1.4.2, but should also work under OS X 10.2.x (Jaguar) running earlier versions of Java (1.x)
Getting Started-
Most Macs that run OS X do not have serial ports. If this describes your setup, you must first purchase a USB to serial adapter, such as those sold by Keyspan, and install the drivers for the adapter. This is a fairly simple process. If you have one already, with a suitable serial cable, great!
Next, install the RXTXcomm Java serial libraries. You can download the OS X Installer package here. For the curious, this package installs two libraries in the /Library/Java/Extensions folder on your computer: RXTXcomm.jar and librxtxSerial.jnilib.
Once that's done, you're ready for:
The Easy Way, for Beginners
Unzip the Scope II Mac.zip file and place the "scope" Java application into a folder with all the other support files. Double clicking the scope app's icon should launch Scope II. If the necessary support files are not found by scope, it will automatically create essential support files in the folder it resides.
A Word about Serial Ports:
Scope II requires the full path name of serial ports to be specified for it to operate properly. The default serial port can be specified in the scope.cfg file, or accessed by one of the popup menus in the Controller pane of Scope II. Mac OS X lists its available serial ports, along with a lot of other stuff, in the /dev folder, which can be accessed by launching the Terminal application, usually located in the /Applications/Utilities folder. After it launches, type in the window:
cd /dev
hit the return key
and then
ls
and hit the return key
you will get a bunch of strange names. Scroll up and down the window and look for one that looks like the name of your serial port:
Typically, a Keyspan USB-serial adapter will have a name such as
tty.USA19813P1.1
There will also be names starting with "cu.", such as
cu.USA19813P1.1
DON'T use the names starting with "cu." in the scope.cfg file or choose this option from the popup menu. Scope II won't open up the serial port if you do.
If you want to enter the name of your serial port into the scope.cfg file, you must put in the whole path name, so it should look something like
/dev/tty.USA19813P1.1
Since USB is a dynamic, hub based system, you will probably get a different name for your USB-serial adapter if plug it into a different port between uses. This is normal, but it might confuse you if you aren't aware of it!
More Information and Control with Scope II
If you would like to see and do more, "behind the scenes" information when running Scope II, you can launch it from Apple's Terminal application. There are a couple of ways of doing this:
1. Launching Terminal and Scope II from the Finder:
Control-click on the scope app's icon. This will bring up a contextual menu. Choose "Show Package Contents". Go into Contents>MacOS. There you will find a dark grey icon labeled "scope". Double-clicking on this will launch the Terminal app and through it, Scope II. The Terminal will then show all the command-line information being generated as Scope II executes.
2. Launch Terminal, then launch Scope II from Terminal:
Launch the Terminal app, then move to the folder that the scope app is in by typing, at the prompt, for example:
Locate the folder where the scope app is in the Finder, and drag and drop the "scope" icon onto the Terminal window after first typing "cd " (without the quotes, but with that space after the cd) in the terminal window. Then hit the return key.The prompt should now change to reflect that you are in the scope.app folder:
[dave's computer]:~/Desktop/scopeII/scope.app] dave%
dig down a little more by typing
cd Contents/MacOS
and hit the return key again
again, the prompt will change to reflect that you've changed folders:
[dave's computer:scope.app/Contents/MacOS] dave%
Alternately, you can move to the folder that the scope app is in the old fashioned way, by typing the path name at the prompt:
[dave's computer:~] dave% cd ~/Desktop/scopeII/scope.app/Contents/MacOS
Once you're in the right folder in the Terminal, type in
./scope
and Scope II should launch!
Having access to the command line allows you to launch Scope II with various arguments, as mentioned in the manual, so typing
./scope -h
would show the command line options available
typing
./scope -sim
would run ScopeII in JRKerr servo motor controller simulator mode