Dealer API Suite



Copyright(C) 1998 SoftPLC Corporation, ALL RIGHTS RESERVED.

Java is a trade mark of Sun Microsystems, Inc.

May 15, 1998

This document describes the new Dealer API's for using JavaTM and JavaBeansTM on SoftPLC. The Dealer API is a group of API's addressing these general areas:

Serial Port Services.

Class ComPort is provided with methods which allow buffered control over RS-232/422/485 serial communications ports. These services allow developers to create serial communications protocol handlers, for such devices as plantwide smart messaging displays, dumb terminals, modems, barcode readers, plantwide pagers, and other kinds of serial devices.

System Services.

Services are provided which give access to live data found in SoftPLC's datatable. The SoftPLC datatable is a ram resident realtime database that contains current live data values that are representative of process control signals or contain calculated values. There are methods to write blocks, read blocks, and to do bit fiddling on individual or groups of bits within a word. A system class, SPLC, is provided which has methods for changing the operating mode of SoftPLC, putting inputs, getting outputs, and parsing addresses. A DataTable class is provided which has the methods for accessing SoftPLC's datatable.

Event Queues.

These objects provide a FIFO like functionality for arbitrary control events. The queues are used to pass messages from one Thread to another, such as from a Ladder Thread to a Java Thread, or vice versa.

Ladder Server.

Ladder Logic can call Java methods as a subroutine.


A Weblet is an instance of an HTTP web server. Each instance will use an assigned ethernet interface and TCP/IP port, as well as its own document root. Javasoft's Servlet specification is supported, including HttpSession's, and hot loading of modified Servlet code. Servlets are placed into *.JAR files and may be downloaded to SoftPLC while it is running using the FTP protocol. (Each SoftPLC has a built-in FTP server.)

Servlets may call the methods in class DataTable using the local DataTable instance SPLC.dt while processing HTTP requests as a means of creating "on the fly" HTTP pages, containing live process data.

The default Servlet, class FileServlet, merely retrieves static pages, binary files, and Applets like a normal web server.


Applets may be referenced as normal in an HTM file and retrieved out of the SoftPLC flash disk for execution in any Java compatible browser, on any Java compatible platform.

SoftPLC Corp. supplies some client side "pure Java" code which can be used to make high speed data aquisition calls back to the originating SoftPLC. Simple MMI applications can be developed in this fashion.


SoftPLC version 2.x is a multitasking realtime operating system that includes Ladder Logic program execution and datatable management. The SoftPLC datatable consists of arrays of values of either 16 bit signed integers or 32 bit floats. For the most part, any datatable section is an array of either all 16 bit signed integers or 32 bit floats. There may be up to 1000 datatable sections in each SoftPLC, and each section may contain up to 1000 elements. The 16 bit integer values are hereafter referred to as short words, and the 32 bit floating point values are referred to as float words.

SoftPLC may optionally come with a Java compatible module that is capable of running Java bytecode. This module is referred to as the JVM (Java Virtual Machine).

The Java bytecode is developed by the applications programmer in a manor very similar to how one develops Java "Applications" or Java "Applets". The actual packaging of the Java bytecode supported by SoftPLC is in the form of JAR files. A JAR file is essentially a ZIP file with a different file extension and an optional embedded manifest file.

The original point of entry into Java is via an interface called Modlet. The Java programmer implements one or more Modlets. Many Modlets are supported concurrently. For simplicity, there is a Modlet implementation that runs a simple Java Application. This makes it possible to run multiple normal Java Applications concurrently on the same SoftPLC.

Dealer API Documentation