Enclosed Software

The CD-ROM contains the Service USB driver for Macintosh OSX 10.3-10.8, Quicktime films of fischertechnik® models as well as extensive software for AppleScript, RealBasic, Xcode (C, C++, Cocoa, Java, AppleScript Studio), FileMaker, Director, Java with BlueJ, MaxMSP, Ragtime, Runtime Revolution, Scratch, 4th Dimension, Numbers, a TCP/IP Server, to use Service USB with or without Bonjour over a network and sample for pulse width modulation and RS232.

In addition there are original self-contained programs for various fischertechnik® construction kits as well as sample codes for cash drawer, receipt printer and LCD-display.

The installation program „SERVICE USB.pkg"

The installation program installs the driver, which consists of the following components.

/Library/Frameworks/Service USB Driver.framework
Contains Frameworks, which contains all control applications for Service USB.

/Library/ScriptingAdditions/SERVICE USB.osax
Contains the AppleScript support.

/Library/Receipts/SERVICE USB.pkg
Contains the installation program. The "Receipts" folder contains an overview of the enhancements that have already been installed on the computer.

/Library/StartupItems/SERVICE_USB_FirmwareLoader
Ensures that a background process (Daemon) begins, which loads the firmware into the interface if necessary.

/System/Library/Extensions/SERVICEUSBClassicSeize.kext
This kernel extension does not perform any program code. It simply consists of what is known as a "plist". This "plist" instructs the Classic Environment not to access the Service USB interface.

 

The „Runtime Revolution" folder

This contains the external, named "SUSBrevolution.bundle". You must set the path to this external in the stack inspector, before you can use it. After setting the path to the external, you must save the stack, close revolution and reopen it. In this folder there is also a demonstration program exclusively for the Service USB plus interface. All input and output functions and a stepper motor control sample are implemented.

A text file called „Revolution SERVICE USB commands" contains all Runtime Revolution command enhancements in their application syntax. The commands can be implemented in your own programs using copy and paste. The most current version and demo versions of Runtime Revolution can be found at http://www.runrev.com/

 

The „Fischertechnik" folder

A sample project which contains the source texts for RealBasic is available for each of the following construction kits: Industry Robots, Pneumatic Robots, Computing Starter Pack and the Cornelsen Experimenta construction kit.
The following models in particular are supported:

Industry Robots II
Welding robot one axis, welding robot two axes, 3-axes robot

Industry Robots
Swivel robot, welding robot, column-type robot, kink-arm robot

Pneumatic Robots
Pneumatic door, sorting machine, gripper, processing centre

Bionic Robots
4 walking robots with 6 und 4 legs

Computing Starter construction kit
motor control unit, hand dryer, traffic lights, sliding door, temperature control, stamping machine, car park barrier, welding robot

Cornelsen Experimenta
Key bank, traffic lights, motor winch, turtle, freight lift, machine tool, fan, washing machine, sorting system, automatic door, radar, robot arm, storage control, aerial rotor, teach-in-robot

Training Robot
This program is available to control the old fischertechnik® model "Training Robot."

 

The „RealBasic" folder

This contains a test program exclusively for the Service USB interface. All input and output functions and a small oscillograph program to record and display voltage changes over time are implemented. A text file called „RealBasic-ServiceUSB Commands" contains all RealBasic command enhancements in their application syntax. The commands can be implemented in your own programs using copy and paste. The most up-to-date version of Real Basic can be found on http://www.realbasic.com. For your own RealBasic programs you must copy the file „SERVICE USB Plugin" into the RealBasic plugin folder following RealBasic instructions..

 

The „4th Dimension" folder

This folder contains the plugin and a test program for the operation of Service USB under the "4th Dimension" database development environment. All input and output functions are implemented. The accompanying example is especially for long-term measurement of the measured values. The most current version and demo versions of 4th Dimension can be found at http://www.4d.com/

Supported are the versions 6.8, 2003, 2004, V11 and V13.

 

The „Director" Folder

This folder contains the Xtra and a test program for the operation of Service USB under the Adobe Director multimedia development environment. All input and output functions are implemented. The most current version and demo versions of Director can be found at http://www.adobe.com/products/director.

 

The „AppleScript" folder

The „Apple Script Examples" folder contains a list of all commands in their correct notation.

For the first attempts it is sufficient to reactivate single lines in the „Service USB all commands" file (removing the -- characters at the beginning of the line) in order to execute the commands. If there is just one Service USB connected, there are two short sample programs for value output and value input in the "Apple Script examples single" folder. Two examples for using several connected Service USBs can be found in the „Apple Script examples multiple" folder.

The „ascertain number" script gives the number and deviceID of all connected Service USBs and provides an example of automatic ascertainment. The „Device ID" script asks the user in a dialogue for the deviceID and then shows the Service USB's input values with this deviceID. If an invalid deviceID is quoted, the values read back will be 0.

The "Notification Sample" program serves as an example for the register SERVICE device notification command. It waits for the keystroke of In1 (bit 1) and then issues a system beep.

 

The „Filemaker" folder

The „FileMaker" folder contains examples for FileMaker Pro 7-10, which are based on AppleScript. „Service USB Filemaker single" contains simple examples for operating one Service USB. „Service USB Filemaker multiple" contains more complex examples, which are designed for using several Service USBs connected at the same time.

The most current version of FileMaker can be found at http://www.filemaker.com/

 

The „Ragtime" folder

The „RagTime" folder contains examples for Ragtime 5.6 - 6.5, which are based on AppleScript. "SERVICE USB Ragtime single" contains simple examples for operating one Service USB. "SERVICE USB Ragtime multiple" contains more complex examples, which are designed for the use of several Service USBs that are connected at once.

The most current version of Ragtime can be found at http://www.ragtime.de

 

The „Xcode" folder

This folder contains various examples in Xcode, which -with the exception of AppleScript Studio - use the framework. It is possible to enhance a personal program with the framework independently. So far this has been tested with:

  • Carbon Application
  • Cocoa Application
  • C++ Tool
  • Standard Tool

When a new project is created, the framework must be integrated into Xcode using the "Add to Project..." menu command. The framework is located in the path
/Library/Frameworks/Service USB Driver.framework

Then the header File must be added to the project, using the „Add Files..." menu item. The header File can be found in the path
/Library/Frameworks/Service USB Driver.framework/Headers/ServiceUSBToolbox.h

Once the program has been equipped with
#include "ServiceUSBToolbox.h"
all commands are available.

AppleScriptStudio accesses AppleScript OSAX. It is not therefore necessary to integrate the framework.

 

 

The „UNIX" folder

This folder contains a Command Line Tool in the source text as well as the compiled version in the subfolder /build. The tool can be run in the terminal with ./SERVICE_USB_TOOL. It is possible to display the syntax within this tool using -help The tool can also receive commands directly from the command line.
Example: ./SERVICE_USB_TOOL -c set_output -v 85

 

The „RS232 Terminal" folder

This folder contains a small Cocoa-example called "SUSBTerminal".

Service USB Terminal

Test program for the RS232 interface

 

The program allows characters to be sent and received via the RS232 interface. In the upper section of the window, the bytes sent are shown in green and the bytes received are shown in yellow.

Every character is displayed with its hexadecimal value and (where the characters are in the visible ASCII range) as a character as well. The program has three available spaces for typing in characters via the keyboard: the large window in the upper part and both individual lines in the lower part. After one click into the upper part, every keystroke is put out directly via the RS232. If the output values are not accessible via the keyboard, these can be put in after toggling to the HEX mode.

As an example, the letter "A" is to be put out. While in ASCII mode an "A" is simply typed on the keyboard, in HEX mode "41" has to be entered to type the same character. Short strings of characters can be put in into both lines below, which are then sent with the touch of a button. According to the set mode, these characters are interpreted either as HEX or ASCII data.

This program should help with the initial use of a serial device. If the program is only working very slugglishly (pauses for approx. 1 second after each keystroke) this means the handshake line is not available. In this case, connect the HSKi and HSKo Pins of the serial connector, or check the function of the serial device.


The „AppleScriptStudio_Cocoa" folder

This folder contains a mixed AppleScript/Cocoa Application with graphical user interface. It has the same functionality than the RealBasic test program. All input and output functions and a small oscilloscope program which records and displays voltage changes over time are implemented.

 

The „Pulse width" folder

This folder contains a program to modulate the eight lower outputs with pulse width modulation. Both modes are implemented so that outputs can be used with a different pulse width per output or the same pulse width per output. All variations and combinations of pulse width and frequency can be selected additionally.

 

The „Java" folder

This folder contains samples and libraries for Java. There are samples for Xcode and BlueJ which are using the JNIWrapper.

BlueJ is available at no charge at http://www.bluej.org

 

The „Testprograms" folder

The "Testprograms" folder contains applications for your first steps. It contains examples for all commands and permits a quick function test of all inputs and outputs. It is a selection of Xcode and RealBasic Programs to control the following:

 

  • Stepper Motors
  • Pulse width modulation
  • RS232 interface
  • Record and display voltage changes over time (oscilloscope)
  • Set, reset and poll all inputs and outputs

 

 

The „MaxMSP" folder

The external, a sample and a help file for the graphical programming environment Max/MSP from Cycling '74 can be found here. All instructions as well as samples for controlling stepper motors, pulse width modulation, setting digital outputs and getting values from digital and analog inputs are implemented. The most current version of MAX/MSP can be found here:
http://www.cycling74.com/products/max5

 

The „teach robot" folder

This folder contains a sample program for teach-robot from microelectronic Kalms. It is a robot with 5 axes which needs 2 Service USB for operating. This program is for the original teach robot. There is a successor model available at http://www.teach-robot.nl which is currently not tested with this sample program.

 

The „Step motor" folder

This folder contains sample programs for stepper motors, each of them written in RealBasic- Cocoa-, Adobe Director and MaxMSP.

 

The „Numbers" folder

This folder contains an AppleScript and a Numbers document. It is a sample to read analog values into a Numbers spreadsheet and visualise them in a graph.

 

The „TCP/IP" folder

Contains programs to use the Service USB instructions over a TCP-IP Network. At the start of „ SUSBServer" you can set up a port number. Without indicating a port number, the program chooses a free port and the service an be reached with the Bonjour-Name _ServiceUSB._tcp.

The program „SUSBClient" can find the Service USB over a network either by his Bonjour name or with a fixed port number.

If you use telnet as client, the usage of a fixed port number is suggested.
Example:
First start the server in Terminal with port number
./SUSBServer 4711

After starting, the Service USB is available from another computer via TCP/IP .
telnet 192.168.1.4 4711

Type help to show all instructions in their correct syntax.
To set digital output 7 to logical 1 use this instruction:
set_output_bit 1 7

Every instruction returns a value. Instructions for setting the outputs returns a 0 after this action is done without an error on the remote interface. An error number in the range of 13000 or a syntax error is shown in case of any malfunction. Instructions for fetching input values return the input value and not any error number.
Use <Return> to repeat the last instruction.

 

The „POS" folder

Here are sample programs in FileMaker and 4th Dimension to serve the cash-drawer, receipt printer and LCD-customer display, which are versions of the Service USB especially made for point of sales.

 

The „Scratch" folder

Contains a glue-program and a scratch-sample for using the Service USB via the „Remote Sensor Connection"
Scratch is available free of charge at http://scratch.mit.edu/