Docstoc

Instruction of setup interactive lab

Document Sample
Instruction of setup interactive lab Powered By Docstoc
					  Instruction of setting up online real-time educational
      interactive laboratory using UCIST shake table


       The University Consortium of Instructional Shake Tables (UCIST) was developed

in 1998 to enhance undergraduate and graduate education in earthquake engineering

through the incorporation of bench scale instructional shake table experiments into the

undergraduate curriculum. Through a recent partnership with the George E. Brown

Network for Earthquake Engineering Simulation (NEES, http://www.nees.org/), UCIST

is expanding the scope to include the use of virtual presence technologies within the

experiments developed. The system architecture for teleoperation and telepresence using

UCIST shake table is shown in Figure below.




                                   System Architecture


                                                                                     1
  In this configuration a Remote PC, any PC with internet access and with Java 1.5 or

higher installed, uses a teleoperation java applet as an NTCP Client. NTCP is the

NEESGrid Teleoperations Control Protocol where the NTCP Client is the front end client

that provides teleoperation commands. Telepresence is achieved through the Real-time

Data Viewer (RDV). The RDV is a NEES tool that allows for viewing of synchronized

streaming data and video.

  The Ring Buffered Network Bus (RBNB) program, running on a Data Turbine PC,

buffers and streams data and video to the RDV. The shake table PC has three main

functions: control of the UCIST shake table through the WinCon real-time software;

receiving NTCP commands, through the NTCP Server, for teleoperation; and streaming

data to RBNB, through the WebDaemon program, for teleparticipation. An Axis or

Panasonic network camera provides streaming video to the RBNB program.

  To develop this online real-time educational interactive lab using the UCIST shake

table, there are several steps needed to be done, which is listed below.

1. UCIST Shake table setup

2. The Ring Buffered Network Bus (RBNB) server

3. NEESGrid Teleoperations Control Protocol (NTCP) server

4. Camera (either Axis camera or Panasonic camera)

5. Open port 8090 for NTCP communication and port 3333 for data transmission.

6. Launch RBNB, NTCP, and RDV

7. Compile RDV


                                                                                    2
Please refer to shake table manual (Quanser Shake Table II CD\STII\Manual\Shake

Table II user Manual) and Appendix A: Shake Table Deployment Sites: Getting Started

for how to set up the shake table, basic operation, and modification/build the revised

model. The instruction of how to setup the RBNB and NTCP server is presented here.

Axis camera is used in the example below. If Panasonic camera is used, please refer to

Appendix B: Panasonic BL-C1A Web Camera Setup for how to set up the Panasonic

camera. After setting up the 1-4 components, two ports are required to open in order to

allow the NTCP command and the data transmission. Please contact the university IT

department for helps. If you need help to convince them to open these two ports, please

contact us. This instruction also provides how to launch the RBNB and NTCP and how to

compile the RDV.




                                                                                     3
Instruction of installing RBNB on Windows system


Some points needed to be specified in advance.

A. Installing RBNB and NTCP in different machines are highly recommended.

B. It is recommended the software to be installed to root C if it is not specified below.




The links to each part of installing RBNB instruction:




Installing Prerequisite Software

Setting Windows Environment Variables and Path

Installing RBNB




                                                                                            4
1. Installing Prerequisite Software




(a) Download and install the latest versions of Java JRE and Java JDK (JDK 6). (Link)




(b) Download and install the latest version of RBNB (V2.6B5). (Link)




(c) Download Apache Ant for Windows and install (V1.7.0RC1). (Link)

For example, to install Apache Ant V1.7.0RC1, what you need to do is extracting the

apache-ant-1.7.0RC1-bin.zip to whatever folder you want.




(d) Download and install the Tortoise SVN client (V1.4.1). (Link)




(e) Create a new directory (folder), where you will check out the NEESit data turbine

utilities through SVN (For example, I created a folder named 'neesit' in 'C:'). After that,

navigate to that directory in the Windows interface. Then right click (Fig 1) and select

'SVN Checkout'. Enter the following URL into the blank of 'URL of repository' (Fig 2).

[http://svn.nees.org/svn/telepresence/dataturbine]




                                                                                         5
Fig 1




Fig 2




        6
2. Setting Windows Environment Variables and Path

(a) Create a variable 'ANT_HOME' and add Apache Ant (bin folder) to the path.

(i) Create a variable:

Click 'Start -> Control Panel -> System' (Fig 3)




                                     Fig 3


Click 'Advanced' (Fig 4)




                                                                                7
                                            Fig 4


Click 'Environment Variables' (Fig 5)




                                            Fig 5


Click 'New' in 'System Variables' (Fig 6)




                                                    8
                                          Fig 6




Input 'ANT_HOME' into the blank of 'Variable name' to create a variable ANT_HOME.

Input the path of directory which you installed Apache Ant into the blank of 'Variable

value'. In our case, I typed 'c:\ant' into 'Variable value' (Fig 7). After inputting both

'Variable name and 'Variable value', click the 'ok' button to return to the Environment

Variables interface.




                                                                                       9
                                    Fig 7




(ii) Add a path:

Double click 'Path' in the 'System Variables' (Fig 8). (If there is no 'Path', you can create

one by following the step 6-(a) above).




                                                                                          10
                                   Fig 8


Add   '%ANT_HOME%/bin'        to   'Variable       value'   (Fig   9)   (Add   a   ';'   before

'%ANT_HOME%/bin' if there are other paths already existed).




                                           Fig 9



                                                                                            11
(b) Create a new variable 'JAVA_HOME' and add JAVA to the path.

Following step 2-(a)-(i) & (ii), add a variable 'JAVA_HOME', and input the directory

which you installed JDK into the blank of 'Variable value. In our case, I input

'C:\Program Files\Java\jdk1.6.0'.




(c) Create a new variable 'RBNB_HOME' and add RBNB to the path.

Following step 2-(a)-(i) & (ii), add a variable 'RBNB_HOME', and type the directory

which you installed RBNB into the blank of 'Variable value. In our case, I input

'C:\Program Files\RBNB\V2.6B5'.




                                                                                 12
3. Installing RBNB

(a) Open up a Windows Command Shell (Start -> Run -> cmd). Type 'ant -version' to

confirm ant is installed correctly. If you get an error about Java, make sure your Java

path is set correctly to point to your recently installed JDK. Please follow step 6 for how

to set the path. You can use 'echo %JAVA_HOME%' to see what is currently set. Run

'ant -version' again until you have resolved any error messages. (Fig 10)




                                            Fig 10


(b) In the Command Shell, navigate to the directory where you checked out the NEESit

data turbine utilities (In our case, it’s 'c:\neesit'. You can enter a directory by typing 'cd

directory name'. If you need to switch to another hard disk partition, for example d:\, you

need to type in ‘cd /d d:\’. ) (Fig 11). If a 'trunk' directory exists, enter into it. You




                                                                                           13
should see a 'build.xml' file. From this directory run 'ant'. Once successfully finished

you'll see a message at the bottom which states 'BUILD SUCCESSFUL'. (Fig 12)




                                         Fig 11




                                         Fig 12




                                                                                     14
(C) Create a variable 'CLASSPATH' using Environment Variables to include the .jar files

for commons-cli, log4j, rbnb, and turbine.




Following step 2-(a)-(i) & (ii), create a variable 'CLASSPATH' and then add the

directories, which the files 'commons-cli-1.0.jar, log4j-1.2.12.jar, rbnb.jar and

QTJava.zip' are located, to the 'Variable value' of 'CLASSPATH'.




In our case, I added 'C:\NEESit\trunk\lib\QTJava.zip; C:\NEEsit\trunk\lib\commons-cli-

1.0.jar;      C:\NEESit\trunk\lib\log4j-1.2.12.jar;      C:\RBNB\V2.6B5\bin\rbnb.jar;

C:\NEESit\trunk\build\lib\turbine-3.6.0.jar;' to the CLASSPATH (Fig 13).




                                             Fig 13




                                                                                    15
(d) From the Command Shell, run 'java org.nees.rbnb.AxisSource -h' (the '-h' is to show

help menu). If you get a usage menu back then your compilation and CLASSPATH

configuration were successful (Fig 14).




                                          Fig 14




                                                                                    16
Instruction of installing NTCP server on Windows system


Some points needed to be specified in advance.

A. Downloading and installing the same version of the software listed below is highly

   recommended.

B. It is recommended the software to be installed to root C if it is not specified below.

C. Save your current User Path and System Path to a text file before beginning. If after

   completion of this installation your table does not work, re-add everything from your

   old Path into the current Path (Go to “Setting Windows Environment Variables and

   Path” for instructions on how to view the User and System Paths).




The links to each part of installing NTCP instruction:




Installing Prerequisite Software

Setting Windows Environment Variables and Path

Installing NTCP

Testing NTCP

Configuring Matlab

Overall Testing




                                                                                            17
1. Installing Prerequisite Software

(a) Download and install Java 1.4.2_04. (Link)




Choose to download the SDK for J2SE v 1.4.2_04 labeled "32-bit/64-bit for

Windows/Linux/Solaris SPARC 32-bit for Solaris x86." (Fig 1)




                                           Fig 1




Accept the License Agreement and chose the "Windows Platform", "Windows Offline

Installation" link to download the software. (Fig 2)




                                                                                  18
                                             Fig 2




   Install the software by double clicking on the file "j2sdk-1_4_2_04-windows-i586-

p.exe". The file will be saved as an .exe file. Double click on the file "j2sdk-1_4_2_04-

windows-i586-p.exe" and the Windows InstallShield Wizzard will step you through the

installation. Install the software using all the default values as presented by the

InstallShied Wizzard. The software will be installed on your local hard drive under

"C:\j2sdk1.4.2_04."




                                                                                        19
(b) Download and install Apache Ant 1.6.2. (Link)




Choose to download the file "apache-ant-1.6.2-bin.tar.gz." (Fig 3)




                                            Fig 3




Use a tool like "Winzip" to unzip the file "apache-ant-1.6.2-bin.tar.tar" to a folder.

Recommend unzip the file to the root of C:\ (e.g. "C:\ant-1.6.2").




                                                                                         20
(c) Download and install Junit 3.8.1. (Link)

Use a tool like "Winzip" to unzip the file "junit3.8.1.zip " to a folder. Recommend unzip

the file to the root of C:\ (e.g. " C:\junit3.8.1").




                                               Fig 4




                                               Fig 5




                                                                                        21
Change directory to a folder where you unzipped the file (e.g. C:\junit3.8.1) via

command windows (Fig 4) or windows browser (Fig 5). Move the "junit.jar" file into the

"lib" folder under the folder where you installed the Apache Ant 1.6.2 (e.g. C:\ant-

1.6.2\lib) by typing "move junit.jar C:\ant-1.6.2\lib" (Fig 6) or by cut and paste in

windows browser. (Fig7)




                                        Fig 6




                                        Fig 7



                                                                                   22
(d) Download and install OGSA 3.2.1. (Link)

Use a tool like "Winzip" to unzip the file "ogsa-3.2.1.zip" to a folder. Recommend

unzipping the file to the root of C:\ (e.g. "C:\ogsa-3.2.1").




Create a folder named "endorsed" under C:\j2sdk1.4.2_04\jre\lib.




Copy C:\ogsa-3.2.1\lib\xalan.jar to C:\j2sdk1.4.2_04\jre\lib\endorsed\xalan.jar by typing

"copy C:\ogsa-3.2.1\lib\xalan.jar C:\j2sdk1.4.2_04\jre\lib\endorsed\xalan.jar" in the

command window or via the windows browser.

(Note: change the location of your saved folders; Java, Ogsa, etc.., according to your

actual situation).




(e) Download and install NTCP for Matlab. (Link)

Use a tool like "Winzip" to unzip the file " neesgrid-3.2-matlab.zip" to a folder.

Recommend unzipping the file to the root of C:\ (e.g. " C:\neesgrid-3.2-matlab").




                                                                                        23
2. Setting Windows Environment Variables and Path

There are seven variables and two paths needed to be set up here which include:




Variables:                                Path:

JAVA_HOME                                 %JAVA_HOME%\bin

OGSA_HOME                                 %ANT_HOME%\bin

ANT_HOME

GLOBUS_LOCATION

MATLAB_JAVA

NTCP_HOME

MATLAB_HOME

*See below for specific instructions about setting Environmental Variable.




(a) Set Windows system environment variable called JAVA_HOME to point to the

location of the root Java installation.

(b) Set Windows system environment variable called OGSA_HOME to point to the

location of the root GT3 OGSA installation.

(c) Set Windows system environment variable called ANT_HOME to point to the

location of the root Ant installation.

(d) Set Windows system environment variable called GLOBUS_LOCATION to point to

the location of the root GT3 OGSA installation.


                                                                                  24
(e) Set Windows system environment variable called MATLAB_JAVA to point to the

"jre" subdirectory of the root Java installation.

(f) Set Windows system environment variable called NTCP_HOME to the location of

NTCP for Matlab distribution installation.

(g) Set Windows system environment variable called MATLAB_HOME to the location

of MATLAB installation.

(h) Set Windows system environment variable called PATH to include

%JAVA_HOME%\bin

(i) Set Windows system environment variable called PATH to include

%ANT_HOME%\bin




The authors’ Variable Name and Variable Value
              Variable Name                             Variable Value

               ANT_HOME                               C:\apache-ant-1.6.2

               JAVA_HOME                               C:\j2sdk1.4.2_04

               NTCP_HOME                             C:\neesgrid-3.2-matlab

             MATLAB_JAVA                              C:\j2sdk1.4.2_04\jre

             MATLAB_HOME                                C:\MATLAB71

               OGSA_HOME                                 C:\ogsa-3.2.1

          GLOBUS_LOCATION                                C:\ogsa-3.2.1


Create a variable




                                                                                  25
As an example: to set the variable "JAVA_HOME" it is as follows:

Click 'Start -> Control Panel -> System (Fig 8)




                                          Fig 8


Click the 'Advanced' tab (Fig 9)




                                          Fig 9


Click 'Environment Variables' (Fig 10)


                                                                   26
                       Fig 10


Click 'New' (Fig 11)




                       Fig 11




                                27
To create a variable in JAVA_HOME, input 'JAVA_HOME' into the blank of 'Variable

name'. Input the path of directory which you installed Java 1.4.2_04 into the blank of

'Variable value'. In our case, I typed 'C:\j2sdk1.4.2_04' into 'Variable value' (Fig 12).

After inputting both 'Variable name and 'Variable value', click the 'ok' button to return to

the Environment Variables interface.




                                            Fig 12




Add a Path

As an example: to add the path pointing to "%JAVA_HOME%\bin" is as follows:

Double click 'Path' in the 'System Variables' (Fig 13). (If there is no 'Path', you can create

one by following the Fig 8-12 above).



                                                                                            28
                                      Fig 13


Add '%JAVA_HOME%/bin' to 'Variable value' (Fig 14) (Add a ';' before

'%JAVA_HOME%/bin' if there are other paths already existed).




                                      Fig 14


                                                                       29
3. Installing NTCP

(a) Open a command window (start->run->cmd->click ‘ok’).

(b) Change Directory to %OGSA_HOME%\etc by typing "cd %OGSA_HOME%\etc" in

the command window (Fig 15).




                                      Fig 15


(c) From the directory %OGSA_HOME%\etc in a command prompt window run the

command: "globus-devel-env" (Fig 16). This done by simply typing the command and

pressing enter.




                                      Fig 16


                                                                                   30
(d) Edit %NTCP_HOME%\plugins\matlab\build.properties to set ogsa.root to the

location of your ogsa installation (i.e. %OGSA_HOME%) by typing "edit

%NTCP_HOME%\plugins\matlab\build.properties" in the command window (Fig 17-

18).

Note: If system can not recognize "edit" as an internal function, please manually add the

path C:\windows\system32 into AUTOEXEC.BAT and restart the computer. Please

notice this is a hidden system file.




                                          Fig 17




                                          Fig 18




                                                                                       31
(e) Edit %NTCP_HOME%\server\build.properties to set ogsa.root to the location of your

ogsa installation (i.e. %OGSA_HOME%). (Fig 19)




                                        Fig 19




(f) Change Directory to %NTCP_HOME% by typing "cd %NTCP_HOME%" in the

command window. (Fig 20)




                                        Fig 20




                                                                                   32
(g) From the directory %NTCP_HOME% in a command prompt window run the

command: "install-ntcp".

If the output of this command results in "BUILD SUCCESFUL" then everything built

properly. (Fig 21)




                                       Fig 21




                                                                                   33
(h) Edit %NTCP_HOME%\server\ntcp-server-config.wsdd to set the proper NTCP

plugin type by typing "edit %NTCP_HOME%\server\ntcp-server-config.wsdd" in the

command window or opening and editing using Wordpad/Notepad. (Fig 22)




                                          Fig 22




The line that should be changed in the ntcp-server-config.wsdd file is




<parameter name="ntcpBackendFactory" value="

org.nees.ntcp.server.backend.test.AcceptanceTestControlFactory"/>




Should be changed to




<parameter name="ntcpBackendFactory"

value="org.nees.ntcp.plugins.matlab.core.MatlabPluginFactory"/>




                                                                                 34
                                    Fig 23




(i) Change Directory to %OGSA_HOME% by typing "cd %OGSA_HOME%" in the

command window.




(j) From the directory %OGSA_HOME% in a command prompt window run the

command: "ant -f %NTCP_HOME%\server\build.xml -Dogsa.root=%OGSA_HOME%

deployGar". (Fig 24)




                                                                        35
                                       Fig 24

If the output of this command results in "BUILD SUCCESFUL" then everything built

properly.

The results of this command is the creation of the 2 files in %OGSA_HOME%\lib:

ntcp-server.jar

ntcp-server.gar


                                                                                   36
4. Testing NTCP

(a) Open a command window (start->run->cmd->click “ok”).




(b) Change Directory to %OGSA_HOME% by typing "cd %OGSA_HOME%" in the

command window. (Fig 25)




                                      Fig 25




(c) From the directory %OGSA_HOME% in a command prompt window run the

command:




"ant -f %NTCP_HOME%\server\build.xml test -Dogsa.root=%OGSA_HOME%"




                                                                        37
If the output of this command results in "BUILD SUCCESFUL" then the server installed

on the Windows system is working properly. (Fig 26)




                                        Fig 26




                                                                                  38
5. Configuring Matlab



(a) Identify the location of following two files in the %MATLAB_HOME% directory:




startup.m

classpath.txt




You might look in the %MATLAB_HOME%\toolbox\local (e.g.

C:\MATLAB71\toolbox\local) for those files. The file "startup.m" may not exist. If it

does not exist you will need to create it under the same folder as classpath.txt. If your

installation of Matlab already has a startup.m file we recommend not using it but

creating a new one instead.




(b) Create the startup.m file to include the following entries:

addpath('%NTCP_HOME%\matlab\NTCPmplugin')

addpath('%NTCP_HOME%\matlab\NTCPclient')

addpath('%NTCP_HOME%\matlab\NTCPcommon')

addpath('%NTCP_HOME%\MOST')




(c) Edit the classpath.txt file to include the names of all the files in

%OGSA_HOME%\lib. One entry for each file;


                                                                                            39
For example, add following entries at the beginning of the classpath.txt:

C:\ogsa-3.2.1\lib\axis.jar

C:\ogsa-3.2.1\lib\cog-axis.jar

C:\ogsa-3.2.1\lib\cog-jglobus.jar

C:\ogsa-3.2.1\lib\cog-tomcat.jar

C:\ogsa-3.2.1\lib\commons-discovery.jar

C:\ogsa-3.2.1\lib\commons-logging.jar

C:\ogsa-3.2.1\lib\cryptix.jar

C:\ogsa-3.2.1\lib\cryptix32.jar

C:\ogsa-3.2.1\lib\cryptix-asn1.jar

C:\ogsa-3.2.1\lib\jaxrpc.jar

C:\ogsa-3.2.1\lib\jboss-j2ee.jar

C:\ogsa-3.2.1\lib\jce-jdk13-120.jar

C:\ogsa-3.2.1\lib\jgss.jar

C:\ogsa-3.2.1\lib\log4j-1.2.8.jar

C:\ogsa-3.2.1\lib\ntcp_plugin_matlab.jar

C:\ogsa-3.2.1\lib\ntcp-server.jar

C:\ogsa-3.2.1\lib\ntcp-server.gar

C:\ogsa-3.2.1\lib\ogsa.jar

C:\ogsa-3.2.1\lib\ogsa-samples.jar

C:\ogsa-3.2.1\lib\puretls.jar


                                                                            40
C:\ogsa-3.2.1\lib\saaj.jar

C:\ogsa-3.2.1\lib\servlet.jar

C:\ogsa-3.2.1\lib\wsdl4j.jar

C:\ogsa-3.2.1\lib\wsif.jar

C:\ogsa-3.2.1\lib\xalan.jar

C:\ogsa-3.2.1\lib\xercesImpl.jar

C:\ogsa-3.2.1\lib\xmlParserAPIs.jar

C:\ogsa-3.2.1\lib\xmlsec.jar




* Add entries for ALL the files found in %OGSA_HOME%\lib at the beginning of the

file. Some of the jar files installed from this distribution may have incompatible versions

in the Matlab directory, and the distribution installed ones should always take

precedence.




(c) Close all Matlab windows and exit Matlab so the changes will take affect next time.




                                                                                          41
6. Overall Testing



Note: Because it’s little bit complicated and hard to trouble shooting to use your

own NTCP and RBNB to test the new installed NTCP performance, this overall

testing required the use of the RBNB and NTCP server located at the University of

Connecticut. Please contact Zhaoshuo Jiang (Research Assistant) at UConn

(zhaoshuo.jiang@engr.uconn.edu) to make sure the RBNB and NTCP are ready

before you start the overall testing.




(a) Download the files needed to perform the test:

Go to the link: http://www.engr.uconn.edu/~zhj06002/UCIST/ (Fig 27), right click the

three files one by one (Fig 28) and save them to the local hard drive (Fig 29).




                                           Fig 27




                                                                                       42
Fig 28




Fig 29




         43
(b) Launch RDV (Link), which you can use to view the result of the test:

Note: The Java SDK is needed to run RDV.




Click "Launch RDV" button in the web page (Fig 30).




                                         Fig 30




                                                                           44
It will bring up windows as Fig 31 – Fig 33:




                                          Fig 31




                                          Fig 32




                                          Fig 33




Click "Run" button when you see the window as Fig 33, which will then bring up the

window as Fig 34:


                                                                                     45
                                          Fig 34


Click "File->Connect" which will bring up a "Connect to RBNB Server" window, type

"struct02.engr.uconn.edu" in the "Host:" and "3333" in the "Port:" (Fig 35).




                                          Fig 35


                                                                                    46
Then the RDV will connect to the RBNB server at UConn (Fig 36).




                                         Fig 36




Open the camera in CAST 209 at UConn by double clicking the "UConn-CAST209" in

the Channels window in the left side, and then double clicking "video.jpg" showed.




It will bring up a window showing the video recorded by the camera at UConn (Fig 37).




                                                                                     47
                                          Fig 37

Click "Real time" button in the upper left (the button will change to "Pause" after you

click it). Now what you can see from the video window is the real time image recorded

by the camera (Fig 38).




                                          Fig 38



                                                                                          48
(c) Run the test in Matlab:




Open Matlab, browser the folder where you save the three files you downloaded (Fig 39).




                                            Fig 39




Run "UCIST_ShakeTableControl_initalize.m" in the command window. If the NTCP

server is built successfully, Matlab will return:




"Created connections to the NTCP server" (Fig 40)




                                                                                    49
                                       Fig 40




Run "UCIST_ShakeTableControl.m", which will bring up a control panel (Fig 41).




                                       Fig 41




                                                                                 50
Choose "UConn" as the Shake Table Site, adjust the Frequency and Amplitude to be non-

zero, and then press the "start" button (Fig 42).




                                            Fig 42




If the command sent successfully, Matlab will return the following messages (Fig 43).

"Sending Ground Motion to Soil Site

- Logging is working

- Date: Mon Aug 06 15:02:25 EDT 2007

- Version: Apache-XML-Security-J 1.0.4

Successfully Sent Ground Motion to Soil Site (amp=0.3) freq=0.3)"

Note: amp=0.3 and freq=0.3 will change according to the Frequency and Amplitude you

adjust in the control panel.




                                                                                        51
                                          Fig 43




(d) View the test result:

If you can view the shake table at UConn moving through RDV after you press the "start"

button in the control panel, the NTCP server is installed successfully and running

properly in your site.




If you want to know more about the details in setting up the NTCP server, you can

find the original instruction of setting up the NTCP server written by NEES here.



                                                                                     52
Instruction of how to launch RBNB, NTCP, and RDV


This instruction is about how to launch RBNB, NTCP and RDV after successfully

installed them.




The links to each part of launching RBNB and NTCP:




How to launch RBNB

How to Stream the video from the camera to RBNB

How to launch NTCP

How to launch RDV for teleoperation and teleparticipation




                                                                          53
1. How to launch RBNB




(a) Double click the RBNB icon on the desktop. This starts the Tomcat Webserver

(which has as one of its functions the RBNB server). (Fig. 1)




                                            Fig. 1




(b) Access the Tomcat Webserver from a web browser by typing in the URL:

‘http://localhost’ or ‘http://127.0.0.1/’, which will bring up the following screen (Fig. 2).




                                            Fig. 2




                                                                                            54
(c) Click on the “rbnbServer” link (the first bullet under “Server”). This will bring up the

following screen (Fig. 3).




                                            Fig. 3


(d) Click on “start Server” button. This will start the RBNB server (Figure 4).




                                            Fig. 4




                                                                                          55
2. How to stream the video from the camera to the RBNB

(a) Open a Windows Command Window (Start – Run, then type ‘cmd’ in the dialog box

and click ‘OK’) (Fig 5) and change directory to the RBNB folder.




                                         Fig 5



(b) From the Command Shell, type in the command:

java org.nees.rbnb.AxisSource -A XXX.XX.XXX.XXX -S ####

java org.nees.rbnb.PanaSource -A XXX.XX.XXX.XXX -S ####




The first command is for the user who is using an Axis network camera. The second

command is for user who is using a Panasonic network camera. So, you may need to type




                                                                                  56
in one of them. XXX.XX.XXX.XXX is the IP address of your camera. #### is the name

you prefer the camera to appear in the RDV channel.




For example, “java org.nees.rbnb.AxisSource –A 137.99.7.162 –S UConnCamera”

command is used at UConn (Fig 6).




                                         Fig 6




                                                                              57
3. How to launch NTCP




Note: Before you launch NTCP, please make sure you have modified the UCIST_test.m

and UCISTeventloop.m which will be needed in this instruction for your site.




(a) Start the Quanser NEES Daemon by double clicking on “wwdaemon” (this SHOULD

HAVE come installed on your PC from Quanser) (Fig 7).




                                           Fig 7




(b) Connect the Quanser NEES Daemon to your RBNB server by going to “File –

Configure” and putting in your desired “Application Name” (e.g. ‘UConnWebDaemon’)

and the “Server Address” (IP address) of your RBNB PC. The Source cache size can be

chosen as 10000 or so, it will determine the length of data user can export from RDV.

The rest of the parameters can remain at the defaults (Fig 8 – Fig 9).




                                                                                  58
Fig 8




Fig 9


        59
(c) Open a Windows command shell, change directory to %OGSA_HOME%. At that

directory run the command: “ant startContainer –Dservice.port=8090” (Fig 10).




                                        Fig 10


(d) Open two Matlab windows, change the directory to where the “UCIST_test.m” and

“UCISTeventloop.m” are located (Fig 11).




                                        Fig 11




(e) Run “UCIST_test.m” and “UCISTeventloop.m” approximately the same time.




                                                                                60
As shown in Fig 12, the correct feedback for the window which “UCIST_test.m” is run

should be:




Sending test NTCP command

-Logging is working

-Date: XXXXXXX

-Version: XXXXXXX

Successful NTCP




The correct feedback for the window which “UCISTeventloop.m” is run should be:

Waiting for hascommand() to return true




                                          Fig 12




                                                                                 61
Now the UCIST server is ready for accepting remote RDV commands




If in any case, the message “Waiting for hascommand() to return true” didn’t show up in

the Matlab command window. Try the following:

(i) Move the shake table to its home position manually.

(ii) Close all the opened models and Matlab, then reopen Matlab and run

“UCISTevenloop.m” & “UCIST_test.m” again.

(iii) Restart the computer, check the RBNB to make sure it is working properly and then

follow steps (a)-(f) again.




                                                                                    62
4. How to launch RDV for teleoperation and teleparticipation




Some points needed to be specified in advance.

A. Before continue this part, camera, NTCP and RBNB server are assumed to be

   installed properly and launched already.

B. The IP addresses and ports of the RBNB and NTCP server are needed in the

   following instruction.




(a) Download the RDV file needed to perform the test:

Go to the link: http://www.engr.uconn.edu/~zhj06002/UCIST/ (Fig 13), right click the

“RDV-SI.jar” or “RDV-BES.jar” file (Fig 14) and save it to the local hard drive (Fig 15).




Note:

If SI unit are used (e.g. meter) for the shake table, please download “RDV-SI.jar”.

If BES units are used (e.g. in) for the shake table, please download “RDV-BES.jar”.




                                                                                       63
Fig 13




Fig 14




         64
                                        Fig 15




(b) Launch RDV:

Double clicking the downloaded file (Java 1.5 or higher is needed), which will bring up

windows similar to Fig 16 – Fig 18.




                                        Fig 16


                                                                                    65
                                       Fig 17




                                       Fig 18




Click “Run” button when you see the windows as Fig 18, which will then bring up the

windows as Fig 19.



                                                                                66
                                       Fig 19




(c) Connect to the RBNB server:

Click “FileConnect” which will bring up a “Connect to RBNB Server” window (Fig

21).

Input the IP address and port of your RBNB server in the “Host:” and “Port:” (e.g.

UConn uses “struct02.engr.uconn.edu” as “Host name” and “3333” as port shown in Fig

21).



                                                                                67
                                        Fig 21




(d) Open a video panel:

Double clicking the available video in the “Channels” windows, which will bring up the

video. For example, Fig 22 is the screen shot after double clicking the “CAST209.jpg”

under “UConn_Cam” when using the RDV connected to UConn’s RBNB server.




                                                                                   68
                                         Fig 22




(e) Open a data panel:

Double clicking the available data channels in the “Channels” windows, which will bring

up the data. For example, Fig 23 is the screen shot after double clicking the channel “0”

under “UConn WebDaemon/x” when using the RDV connected to UConn’s RBNB

server.



                                                                                      69
                                            Fig 23




(f) Open the teleoperation control panel:

Click “WindowAdd Teleoperations Control Panel” (Fig 24), which will bring up a

remote control panel allowing you to control the shake table (Fig 25).




                                                                            70
Fig 24




Fig 25


         71
(g) Input the IP address of your NTCP server:

Input the IP address of your NTCP server into “shake table (IP:Port #)” on the

teleoperations control panel (e.g. “137.99.7.165:8090” at UConn as shown in Fig 26).




                                         Fig 26




                                                                                       72
(h) Send the NTCP command:

Adjust the preferred frequency and amplitude, then hit “Start” button (Fig 27), the NTCP

command will be sent to the NTCP server. After a few seconds, the shake table should be

running at the specific frequency and amplitude set in the teleoperations control panel.

The data and video will be shown on the video and data panel respectively (make sure the

“Real time” is pressed, then the “Real time” button will become “Pause”).




                                         Fig 27




                                                                                     73
A command received notice will be shown in the Matlab window in the NTCP server

(Fig 28).




                                         Fig 28




Note: If the camera goes black when the data is available, please synchronize the

time for the camera, the NTCP and the RBNB server, respectively. For more details

on synchronization, please visit here.




                                                                              74
Instruction of how to compile RDV


Some points needed to be specified in advance.

A. This instruction requires some knowledge of computer programming/compiling.

B. This instruction assumed you already have a compiled control panel and the source

    code for RDV.

C. This instruction assumed that you have apache ant installed as well as keystore and

    jarsigner command capabilities.




1. If your control panel is a .jar file (see sample-teleopr.zip):

        a. Copy and paste it into %RDV_HOME%\lib\

        b. Skip to step 3

2. Else if your control panel is a .java file(s):

        a. Copy and paste the folder structure for your panel into %RDV_HOME%\src\

        b. Continue to step 3

3. Open %RDV_HOME%\config\extensions.xml with a text editor of your choice

4. Add a new extension object with the “id” value being the main class of your control

    panel and “name” being any identifier you want to call your panel

5. Save and close this file

6. open up a command prompt

7. change the directory to %RDV_HOME% using the cd command


                                                                                   75
8. type “ant jar”

9. Assuming this build does not have any errors it will complete by saying “Build

   Succesful”

10. now change your directory in the command prompt to %RDV_HOME%\build\lib\

11. if you do not already have a keystore create one by using the keytool command (e.g.

   “keytool -genkey -alias signRDV -keystore rdvstore -keypass rdvucist -dname

   "cn=ucist" -storepass abccba”)

12. using the jarsigner command, sign your jarfile (e.g. “jarsigner -keystore rdvstore -

   storepass abccba RDV.jar signRDV” and then the password is “rdvucist”)

13. create a .rdv configuration file – it may be simplest to create this by:

       a. open RDV.jar

       b. open the windows and channels you wish the user to have

       c. choose File->Save Setup

14. create a .jnlp file to launch your new RDV.jar and place these on a website for easy

   access by others (a sample of this can be found in sample-jnlp.zip)




                                                                                     76
Appendix A:
Shake Table Deployment Sites: Getting Started


CRITICAL: Please notice this instruction is only limited to Quanser Shake Table II Rev 4 (the most

current revision). Please do not run any of the attached examples if you are having a different

version of shake table since it can cause unstable movement or damage. You may consider contacting

Quanser about the upgrading if necessary.



It is highly recommended that you go over the Quanser User manual that is on your hard drive thoroughly

(Quanser Shake Table II CD\STII\Manual\Shake Table II user Manual) to gain experience with the basic

operation of the shake table. Several of the most relevant sections are pointed out to help you make a quick

and easier initial movement. Please turn to the corresponding manual instructions in case of any

discrepancy or ambiguity.



Step I. Connect all hardware and get ready to run the shake table.
Please read the User Manual section 4.2.2-4.2.3 (Hardware setup and wiring procedure). After hardware

setup, go through the ST II test procedure in the Quanser User Manual section 5.3 (cited above).



Step II. Run experiment from WINCON built-in project.
Please read the User Manual Section 5.2.1-5.2.3 (Initialize UPM), calibrate shake table and run sine wave

excitation. Although it is nice to see the shake table moving now, it is worth to invest a little bit more time

in exploring the shake table. Later on you may want to run it automatically according to your instruction.



Step III. Rebuild Simulink model. Run experiment from MATLAB script.
After you confirm that everything is working properly in step 2, the next steps are to learn to build and

download the Simulink model and then run the experiment from the MATLAB prompt. Please read the




                                                                                                             77
User Manual Section 6.4.1 (Set parameters for sensors, amplifiers, and controllers) before building any of

the supplied Simulink models.

1.   It is strongly recommended that you make a backup of the original files for running the shake table that

     came on the PC, especially those in the tow folders ‘Quanser Shake Table II CD\STII\Lab

     Files\**\mdl’ and ‘Quanser Shake Table II CD\STII\Lab Files\**\wcp’ (The ** may actually be ‘q4’

     or ‘q8’ depending on the type of data-acquisition board being used). Copy all files under these two

     folders into one common folder, e.g. ‘C:\STIIREV4ScriptRUN’.

2.   Open MATLAB, set ‘C:\STIIREV4ScriptRUN’ as current working directory. Run the MATLAB code

     ‘setup.m’ to define all of the simulation parameters in the MATLAB workspace as is instructed in User

     Manual section 6.4.1. Because execution of external mode requires the build directory to be present, it

     is necessary to now rebuild the Simulink models using the following steps.

3.   Open ‘q_boot_upm_**.mdl’ and save it as another model name, e.g. ‘Script_boot_upm_**.mdl’. Build

     the model from drop down menu WinCon--> Build. After that you will see a new set of files related to

     this     model.      ‘Script_boot_upm_**.mdl’,         ‘Script_boot_upm_**.wcl’and          a      folder

     ‘Script_boot_upm_**_wc_rtw’.

4.   Type ‘wc_start(‘Script_boot_upm_**’)’ in the MATLAB command window to initialize the UPM.

5.   After initialization, type in ‘wc_stop(‘Script_boot_upm_**’)’ to stop the process.

6.   Following the same procedure, proceed to rebuild the calibration model and name it as

     ‘Script_cal_**.mdl’. Then calibrate the shake table by typing in ‘wc_start(‘Script_cal_**’)’ afterwards

     stop it by typing in ‘wc_stop(‘Script_cal_q4’)’.

7.   Define two variables to represent the amplitude and frequency of the input sinusoid command. Here I

     choose ‘amp = 0.01’ and ’freq = 0.5’. Define the values of these two variables in the MATLAB

     workspace by typing ‘amp = 0.01; freq = 0.5;’.

8.   Rename and build the model ‘Script_sine_**.mdl’. It is necessary to adjust the Simulink model so that

     we are able to read the two variables defined in step 7 and recognize them as the command signal. To

     do this, first double click on the ‘Smooth Sine Setpoint’ block in the top-left corner, then double click

     ‘Smooth Sine Wave’ block which will bring you to the parameters setting. Redefine the ‘Amplitude’




                                                                                                           78
     using    the   text   ‘evalin(‘caller’,’amp’)’   and   redefine   the   ‘Frequency’   using   the   text

     ‘evalin(‘caller’,’freq’)’.

9.   After making these adjustments, save the model and type ‘wc_start(‘Script_sine_**’)’ at the

     MATLAB prompt to run the experiment.



You are now able to run the sine excitation experiment through MATLAB prompt, it makes one possible to

write a script to run the shake table automatically at any amplitude and frequency combination. You can

also set another variable e.g. ‘duration’ to control the duration time of an experiment.



Two of my MATLAB script files are attached with the name of ‘STIIRev4SineRUN.m’ and

‘q_gain_rev4.m’ which allows you to run the shake table automatically. You need to copy both files to the

current directory (In my example it is ‘C:\STIIREV4ScriptRUN’) and run ‘STIIRev4SineRUN.m’.

(‘q_gain_rev4.m’ basically comes from ‘setup.m’ we have talked about in sub-step 2. The only

modification is that we have removed the codes which ask for the ‘additional load weight’ with the

assumption that it is ‘0’ to guarantee the experiment will not be interrupted.)




                                                                                                         79
Appendix B:
Panasonic BL-C1A Web Camera Setup (With Application to RBNB data turbine)

1.   Follow the manual to set up camera locally. Write down the IP address and port number as well as
     administrator name and password.


2.   Verify that you have successfully set up the camera by viewing the video in your web browser. To
     connect, simply type the assigned IP-address into navigation bar.


3.   Go to the SetupAccountAdministrator. Choose the option of ‘Permit access from guest users’ and
     save. You want to leave this camera to open access in order for streamed data to go into RBNB server.


4.   Manually copy all files from the ‘panasource.zip’ you can download in googlegroup site into the data
     check out directory under ‘trunk\src\org\nees\rbnb’. (See step 1 - (e) of ‘Instruction of installing RBNB
     on Windows system part’)


5.   Build (Rebuild) the RBNB server with the PanaSource codes included. (See step 3 - (b) of ‘Instruction
     of installing RBNB on Windows system part’) If the system tells ‘BUILD FAILED unable to delete
     file xx\trunk\build\lib\turbine-3.7.0.jar’. You need to navigate to the directory and manually delete that
     file then try to build it again until it is successful. Note here the abbreviate symbol ‘xx’ is your data
     check out directory.


6.   Start the RBNB server by opening up command prompt (Start -> Run -> cmd). Substitute Axis camera
     for Panasonic camera by typing                                 ‘java    org.nees.rbnb.PanaSource      –A
     xxx.xxx.xxx.xxx -S xxx’ (Here xxx stands for some general string, after –A it should be the IP address
     you assigned to the camera during local setup. And string after –S should be the name you want to give
     to the camera video window when it shows up in RDV. See ‘Instruction of installing RBNB on
     Windows system.doc’ for more information.)




                                                                                                            80

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:5
posted:2/11/2012
language:English
pages:80