DALI JAVA Bean with Ergo Tech

Introduction

Ergo Tech VIB with DALI JAVA Documentation

Diamond Systems Corp. has provided DALI JAVA with Ergo Tech VIB for JAVA programmers interested in developing professional graphic applications in little time. Ergo Tech VIB is a third party software that provides customizable, scalable, and professional JAVA graphic beans. The software includes an IDE (VIBLaces), graphic libraries, and other device support.

VIBLaces is an IDE that provides easy deployment and development support for graphics and applications. To develop applications in VIBLaces, simply click-and-drop icons into the development window and link them. Developers can have a working application in hours instead of days or weeks.

This document includes the following sections:

However, it is not meant to replace any documentation provided by Ergo Tech VIB and VIBLaces. This document also does not replace any JAVADoc or API documentation provided by Diamond Systems Corp. Instead it is meant to compliment those documentations and serve as a quick startup guide.

Installing Java

VIBLaces and DALI Java requires Java run-time and compiler to run. Ergo Tech provides the necessary Java runtime. Please refer to the documentations provided by Ergo Tech

Installing DALI JAVA, Ergo Tech VIB, and Ergo Tech VIBLaces

Ergo Tech VIB

Please find the Ergo Tech VIB installation executable. Run the executable and follow the instructions given. Please prepare your license key before hand for input.

Ergo Tech VIBLaces

This will be installed along with Ergo Tech VIB

DALI JAVA

DALI JAVA and DALI JAVA Beans for Ergo Tech VIBLaces come in two Jar files, dali_java.jar and dali_vib.jar, and a stencils_diagrm_DALI.ini file. dali_JAVA.jar contains DALI JAVA API and all JAVA Classes necessary for developing DALI JAVA Applications. dali_vib.jar contains JAVA Beans necessary for easy VIBLaces access to DALI JAVA Functions and API.

To install DALI JAVA with Ergo Tech VIBLaces please do the following:
Go to the directory where Ergo Tech VIB is installed. For Windows developers this will most likely be C:\ErgoTech.
Go to the VIBLaces directory, which for windows users will most likely be C:\ErgoTech\VIBLaces.
In the VIBLaces directory users will need to find two directories, stencils and jar. Please copy and paste the stencils_diagram_DALI.ini file into the stencils directory. Then please copy and paste dali_java.jar and dali_vib.jar into the jar directory.

Apache Axis

To use DALI JAVA developers must also download Apache Axis. Please refer to the DALI JAVA Client Tutorial on how to download Apache Axis
Developers can download Apache Axis Go into the directory of Apache Axis. Go into the "lib" directory. Copy all jar files except axis-ant.jar into the same directory as the above for dali_vib.jar and dali_java.jar (for Windows developers this would be C:\ErgoTech\VIBLaces\jar)

Installation complete!

API Documentation and JAVADoc

Other than the DALI JAVA API doc there are also two JAVADocs provided, one for DALI JAVA and one for DALI JAVA Bean for VIBLaces.

Usage of DALI JAVA Beans for VIBLaces Quick Guide

The following is a quick guide to using VIBLaces with DALI JAVA. This is not a comprehensive guide on how to use DALI JAVA or how to use VIBLaces. Developers should read the DALI JAVA Specification Documentation and Ergo Tech VIBLaces Documentation.

There are two main components to an application designed in VIBLaces, front-end graphics and back-end "data sources". The front-end graphics is the user interface or HMI graphics of a stand-alone application or applet. It is responsible for the look and feel of the application, the interaction with target users and displays data acquired from the DALI Server. The back-end "data source" is responsible for behind-the-scenes grunt work and is in charge of communicating with DALI Server.

The function of VIBLaces is to provide easy-to-use, click-and-drop style design method for developers. In the case of using VIBLaces with DALI JAVA developers simply select the graphic or DALI Function icon wanted, then "drop" them by clicking in the working window area. Developers can also change the properties of these icons such as shape and color for graphics, channel and polarity for DALI icons. Change of properties can be easily done through a Properties window where developers can modify and select the properties desired. To view the Properties window developers can go to the top menu, select Window then select Property Inspector.

After installation of dali_java.jar and dali_vib.jar developers can start using DALI JAVA with VIBLaces. First start the VIBLaces program. VIBLaces will start in the Design window as shown below

In the Design window developers can design the graphic front end of the application, be it applet or stand alone application. An example would be for a developer to click on the "meter" icon on the top then click anywhere in the window. The "meter" graphic will appear in the window as shown below

Click on the graphic in the Design window to select it and view its properties in the Properties windows. Properties of this graphic can be changed by modifying the Properties window.

After the front-end graphics is designed, developers must design the back-end that links each graphic to a "data source". A data source provides the interface and connection to the DALI Server and is responsible for providing data displayed by the graphics. To design the back-end, click on the top right "Diagram" icon. This will bring up a new window for back-end design. Click on the tab on the top that says "DALI". This should bring you to data sources that are for DALI as shown below

Please click on D01. This data source is called ADSample. It will connect to the DALI Server and request an A/D Sample, then return the data as integer. Please click anywhere inside the Diagram window and the ADSample data source will be dropped

Go to the Properties window and set the DALI Server URL, channel, etc. The next step is to link the front-end with the back-end.

To link the front-end with the back end, please go back to the Design window. Developers can do this by clicking on the top rightmost Design icon. Once at the Design window developers must select the graphic they want to link in the back-end. In this case it is the "meter" graphic. After clicking on the graphic in the window hit ctrl-D. This will pop up the "meter" icon in the Diagram window named meter. In the Diagram window developers should now see the following

Now developers can link these two together by selecting the "Connect Mode" icon on the top third icon from the right in the Diagram window. Click on the ADSample icon in the Diagram window and while holding down the left mouse button, drag the mouse to the meter icon. Let go of the mouse button. This will connect the two icons like the following

The meter should now display A/D Samples!

DALI JAVA Bean for VIBLaces Identification

Each DALI JAVA bean for VIBLaces has been assigned an identification number. The following is a listing:


D00 Ping

D01 A/D Sample

D02 A/D SampleMulti

D03 A/D Scan

D04 A/D ScanMulti

D05 D/A Convert

D06 D/A ConvertScan

D07 D/A ReadBack

D08 DIO InputByte

D09 DIO OutputByte

D10 DIO InputBit

D11 DIO OutputBit

D12 DIO ReadBack Byte

D13 DIO ReadBack Bit

D14 Error Message Printout

Deploying your finished Applets

To convert your finished VIBLaces window into applets developers will have to use Code Wizard. For reference on how to use Code Wizard, please consult the manual provided by Ergo Tech.

Quick Guide

To use Code Wizard please go to the Design window's menu bar. There under the "Tools" option select "Code Wizard". See

Please select the option that suites your need. In this case the option selected is "Applet (PLC-Host)"

Then click next and type in the name of the applet class and select the directory to have the applet be generated. Click finish. In this case the applet is call "sample" and saved in the "applets" directory. After this the applet will be generated in (Ergo Tech root directory)\VIBLaces\applets.

In the directory of the generated applet there will be two files, "sample.html" and VIBRuntime.jar. Edit the "sample.html" file. The original code should look like the following:


<HTML>

<HEAD>

<TITLE>Virtual Instrumentation Beans</TITLE>

</HEAD>

<BODY>

<APPLET CODE="sample.class" Archive="VIBRuntime.jar" Codebase="./" WIDTH=592
HEIGHT=296>

<PARAM NAME=ergovu.port VALUE=7116>

<PARAM NAME=servlet.port VALUE=7116>

</APPLET>

</BODY>

</HTML>

For the "Archive" tag developers will need to modify it to the following

Original:
Archive="VIBRuntime.jar"

Modified:
Archive="VIBRuntime.jar, axis.jar, jaxrpc.jar, commons-logging.jar, commons-discovery.jar, saaj.jar, wsdl4j.jar, log4j-1.2.4.jar"

This includes all Axis jar files in the archive. Now copy all Apache Axis jar files from (Axis root directory)\lib into the current directory, in this case "applets".

Applet is ready to run!

Obtaining Certificates and Applet Signing

For information on how to obtain certificates and signing Applets, please refer to the DALI Java Client section

NOTE: Developers MUST sign all .jar files that are part of the <Archive> tag of the HTML for the applet to run. This would include all the .jar files that is provided by Apache Axis in addition to all the JAR files the developer has created