FAQ

What is Kmax?
Kmax is multiparameter, list-mode data acquisition and process control environment. Kmax can be used to configure and operate data acquisition and process control systems which use modular instrumentation. Kmax provides high-level features for data display and analysis. The Kmax environment can be configured to operate remote hardware via it’s powerful client/server features.

Will toolsheets created with earlier Kmax versions work with Kmax 11.4 or will they need to be converted in some way?
Kmax 11.4 can open most toolsheets created by earlier versions of Kmax. While older toolsheet will probably open they may not compile without some modification. Many of these modifications will be necessary as a result of the conversion from java Swing to JavaFX. NOTE: ins some cases the picture widgets may not read-in properly. One solution to the picture problem is to open the toolsheet with a compatible version of Kmax, remove the picture widget and resave the toolsheet. Now you should be able to open the toolsheet with Kmax 11.4.

I just upgraded my jdk to version 15 and now my toolsheets will not compile. Why does Kmax report an error: runtime msg> java.lang.UnsupportedClassVersionError?
This error usually occurs when an older java jre/jdk is used to run a version of Kmax compiled with a newer java version. Make use that Kmax is started with a jre/jdk that is at least as new as the JDK version identified in ReadMe-KmaxUser.pdf file provided with the Kmax version that you are using.

What are Kmax Tools?
A Kmax Tool is Kmax Toolsheet that has been packaged in a jar file with all the necessary Kmax modules and extension files that are required to run the toolsheet. A Kmax Tool can be distributed without the need for a Kmax license. The computer that will run the Tool must have a compatible version of java and JavaFX installed on the computer and the KMAX_STUFF, PATH_TO_FX, and JAVA_HOME environment variables must be properly set. Kmax (with a PUBLISH license) can be used to export a Toolsheet into the Kmax Tool format.

How do I test my Kmax driver in stand-alone mode?
First you must declare a main() method in the driver class implement the tests in the main method. The driver jar file can now be run from the command shell or Terminal app.

If your driver must connect to an external device start by making sure that the device is connected and turned on. Then follow these steps on the computer:

1- Open a command shell or terminal program.

2- Verify that the Java JDK is installed properly. Then verify the versions by:

>$ java -version

and

>$ javac -version

3- Change into the directory where the driver is located.

>$ cd path/to/Kmax_Stuff/Extensions/Windows-amd64

and

>$ pwd

4- Run the driver in stand-alone test mode and the main method will be executed.

>$ java -jar myDriver.jar

Note the test behavior and follow the test instructions. Note any messages reported during the tests.

When compiling, the toolsheet does not connect to the driver. How do I fix the problem?
1 – Make sure that the Kmax-Stuff folder has the proper extensions folder components.

2 – If the Kmax driver uses USB, make sure that the libusb system driver is properly installed.

3 – On Windows, make sure that winUSB has been properly installed.

4 – Make sure that the environment variables are properly defined.

5 – If problems persist, run the driver in stand-alone diagnostic mode.

How do I install the Windows winUSB generic driver for my VMUSB or CCUSB devices?
Download Zadig and use the app to install the winUSB driver for the device. (Depending on how accounts and privileges are configured on your computer, you may have to execute zadig as super user.)

Where does Kmax look to find Kmax device drivers?
Kmax device drivers are packaged as jar files and loaded by the toolsheet at compile-time. The default location is in the Kmax-Stuff/Extensions/{OS-ARCH} directory. For example, on the Mac Kmax will look in the Kmax-Stuff/Extensions/MacOS directory. If there is no native file associated with the jar driver, The file may also be placed in the Extensions folder for use with any OS. If there is a native part to the driver, it must be colocated with the driver’s jar file. If there is an Extensions directory colocated with the jar driver, the drivers in this directory overrides the drivers located in the Kmax-Stuff/Extensions directory. Directories are scanned in the following order: (1) {toolsheet_Dir}/Extensions; (2) {toolsheet-Dir}/Extensions/{OS-ARCH-Dir}; (3) {Kmax_Dir}/Extensions; (4) {Kmax_Dir}/Extensions/{OS-ARCH-Dir}.

What is required to run Kmax?
Kmax will run on Windows XP, Vista, Mac OS X 10.3 and Linux. A Java virtual machine is required, version 1.5 or above. A high-end computer platform is recommended.

What type of instrumentation does Kmax support?
Kmax supports most standard modular instrumentation, including CAMAC, VME, GPIB, RS232, PCI expansion cards etc. In fact, Kmax can control and interact with any hardware for which native or java drivers are available. Support for a particular module depends on the availability of a specific driver for that module or instrument interface. Kmax can communicate with embedded systems via the client/server architecture. A Kmax server process must be written for the target system.

What device interfaces are supported by Sparrow?
Currently, Kmax drivers are provided for:

SPARROW SCM-301, SCSI CAMAC Crate Controller (Mac OS X, Windows XP, Vista, and Linux) and Jorway 73A, SCSI CAMAC Crate Controller (Mac OS X, Windows XP, Vista, and Linux).

Other drivers can be special ordered from Sparrow Corp.

Can I get a demonstration version of Kmax?
Yes. Go the Downloads page on the Sparrow web site and follow the instructions for downloading and installing Kmax. The default license is a demonstration license. You may also request an full evaluation license by contacting Sparrow Corp.

Do I need a separate license to run the Kmax client-server configuration?
You can run the Kmax server process in the demonstration mode (with a demonstration license) so you will not need a second full license to utilize the client-server features of Kmax. A source code example for a stand-alone Kmax server is also provided for custom or embedded applications.

How do I determine the Machine ID for my computer?
Open the “About Kmax…” item in the “Help” menu , then click on the License tab. The machine ID is displayed with the other licensing information. Note that the ID may be different for different users on the same machine. If you move Kmax to another computer, you will need a new license password. Contact Sparrow Corp. for additional information.

Do I need a module description resource (MDR) for every instrument or module that I want to use?
You must have the MDR and the associated driver for any module that interfaces directly with the computer. MDRs for slave modules (e.g., CAMAC, VME, PXI, etc.) that only communicate with a controller module via the instrument bus do not require an MDR. If no MDR is available for the module that you want to use, just leave the slot blank and enter the CAM (common addressing model) address by hand. MDRs are just text files and are generally easy to write. Associated drivers must often be native code modules. The MDR is used to locate, load and initialize the low-level driver for the module.

How do I install the Windows winUSB generic driver for my VMUSB or CCUSB devices?
Download Zadig and use the app to install the winUSB driver for the device. (Depending on how accounts and privileges are configured on your computer, you may have to execute zadig as super user.)

Where does Kmax look to find Kmax device drivers?
Kmax device drivers are packaged as jar files and loaded by the toolsheet at compile-time. The default location is in the Kmax-Stuff/Extensions/{OS-ARCH} directory. For example, on the Mac Kmax will look in the Kmax-Stuff/Extensions/MacOS directory. If there is no native file associated with the jar driver, The file may also be placed in the Extensions folder for use with any OS. If there is a native part to the driver, it must be colocated with the driver’s jar file. If there is an Extensions directory colocated with the jar driver, the drivers in this directory overrides the drivers located in the Kmax-Stuff/Extensions directory. Directories are scanned in the following order: (1) {toolsheet_Dir}/Extensions; (2) {toolsheet-Dir}/Extensions/{OS-ARCH-Dir}; (3) {Kmax_Dir}/Extensions; (4) {Kmax_Dir}/Extensions/{OS-ARCH-Dir}.

How do I adjust the memory used for the Kmax application?
Kmax runs in the Java virtual machine. The VM is usualy responsible for assigning the initial memory partition and expanding the partition if Kmax needs more memory. If you are running Kmax from the command line, or from a batch (.bat) or shell (.sh) file, you can specify the initial memory or maximum memory using the java command -mx, -Xms and -Xmx option switches. See the documentation for the Java VM for more information. (Type “java -help” or “java -X” on the command line for an explanation.)

I just upgraded my java jdk and now my toolsheet will not compile. Kmax reports an error: runtime msg> java.lang.UnsupportedClass?
This error usually results when the JDK you have used to compile the toolsheet is a newer version than the default JRE on your computer.
For example: the Java 6 JRE cannot run programs
compiled with Java 7′s compiler.
Check the default JRE by typing in a command tool:
>> java -version.
Check the default JAVAC compiler by typing:
>> javac -version

I get error messages when I try to run Kmax for the first time or when I try to compile a toolsheet. What is wrong with my system?

The most probable causes are that the SDK is not properly installed, the path variable does not contain the directory where the javac command resides, or you may not have read/write permissions for some directory or file.
Try logging in as root (on linux) or as administrator (on Windows). If this solves the problem, then you need additional permissions. Check that the path variable is properly modified to include the /bin directory where the javac executable is located.
If you see a message similiar to the one below:
msg> Compiling Runtime….
msg> javac failed with an Exception:
CreateProcess: javac -verbose -classpath C:\Kmax_9\ADC1054647171796;C:\Kmax_9\Extensions\Classes\; C:\Kmax_9\Extensions\Classes\;C:\KMAX_9~1\Kmax.jar; C:\Kmax_9\ADC1054647171796\Runtime.java error=2
msg> Error while compiling the Runtime class…

It is an indication that the Kmax process cannot find the javac tool specified in the “Toolsheet Properties” dialog under the “Compiler” tab.

Will toolsheets created in Kmax 7x work on Kmax 9x or will they need to be converted?
The main difference is that Kmax 8.x moved all toolsheets from CSL to Java in the editor pane. Normally 7.x and 8.x toolsheets will open in
Kmax 9.x, but CSL scripts will no longer compile. The CSL scripts
will have to be rewritten in java. Java is much richer and more
flexible as a toolsheet programming language. There are lots of
examples to help in the transition and of course we are here to help.