VISIR INSTALLATION & START-UP GUIDE V.1

43
1 TIN2 virtu March 2011 This w 2008-06083-C ual laboratori work has bee C01/TSI “s-La es” n sponsored bs – Open s VISI INST GUI Electrical a Spanish Un Authors: by the Span services integ IR TALL IDE V and Compute niversity for D Mohamed T Sergio Mar Charo Gil Pablo Losa Alberto PeElio Sancri Gabriel Día Juan Peire Manuel Ca nish Science gration for d LATIO V.1 er Engineering Distance Educ Tawfik rtín ada squera stobal az stro and Innovat distributed, r ON & g Department cation-UNED ion Ministry reusable and & STA t through the secure rem ART-U e project ote and UP

Transcript of VISIR INSTALLATION & START-UP GUIDE V.1

Page 1: VISIR INSTALLATION & START-UP GUIDE V.1

1

TIN2virtu

March 2011

This w2008-06083-Cual laboratori

work has beeC01/TSI “s-La

es”

n sponsoredbs – Open s

VISIINSTGUIElectrical aSpanish Un

Authors:

by the Spanservices integ

IR TALL

IDE Vand Computeniversity for D

Mohamed T Sergio Mar Charo Gil Pablo Losa Alberto Pes Elio Sancri Gabriel Día Juan Peire Manuel Ca

nish Science gration for d

LATIOV.1

er EngineeringDistance Educ

Tawfik rtín

ada squera stobal az

stro

and Innovatdistributed, r

ON &

g Departmentcation-UNED

ion Ministry reusable and

& STA

t

through the secure rem

ART-U

e project ote and

UP

Page 2: VISIR INSTALLATION & START-UP GUIDE V.1

Summary In December 2010, the Electrical and Computer Engineering Department of Spanish University for Distance Education (UNED) [1] installed a Virtual Instrument Systems in Reality (VISIR) [2]. VISIR is a remote laboratory for undergraduate electric and electronic circuits practice. It allows a student to wire a real circuit remotely and get results from real instruments on their PC screen. The purpose of UNED is to apply it, the second semester of this academic year 2010-2011, on the practice of the undergraduate engineering grades. On the other hand, to work on its development and integration with other outstanding learning technologies and research areas in which the department is currently researching to improve and enrich distance education. For instance, learning management system (LMS), fingerprints, mobiles, remote laboratories, web services, etc. UNED aims to be an active member in the VISIR community by sharing its lab resources and experiments with the rest of the community to enhance the experimentation skills in the electric and electronic engineering fields. Furthermore, it aims to bring out satisfactory results with respect to the practice as well as the research areas directed to the enhancement of the distance education quality level. This work reflects the acquired experience during the set up and the installation process of VISIR at UNED. The guide contains all the stages of the installation and the necessary configurations required for the VISIR start-up, correct usage and administration. This work aims to be a reference for any university interested in setting up a VISIR and to be a one more contribution from UNED to its community.

Page 3: VISIR INSTALLATION & START-UP GUIDE V.1

Table of Contents 1. INTRODUCTION ..................................................................................................................................... 6

2. HARDWARE DESCRIPTION ................................................................................................................. 7 2.1. PXI-Platform ........................................................................................................................................................................................ 8 2.2. Relay Switching Matrix .................................................................................................................................................................. 9

2.2.1. Component List ........................................................................................................................ 14

2.2.2. Max lists ................................................................................................................................... 17

3. SOFTWARE DESCRIPTION AND OPERATION CYCLE ................................................................. 18 3.1. Web Interface .................................................................................................................................................................................. 19 3.2. Experiment Client .......................................................................................................................................................................... 19 3.3. Measurement Server .................................................................................................................................................................... 22 3.4. Equipment Server .......................................................................................................................................................................... 23

4. INSTALLATION .................................................................................................................................... 26 4.1. LabVIEW ............................................................................................................................................................................................ 28 4.2. NI Device Drivers ........................................................................................................................................................................... 28 4.3. Relay Switching Matrix Driver ................................................................................................................................................. 29 4.4. Component List ............................................................................................................................................................................... 29 4.5. Equipment Server Software ...................................................................................................................................................... 30 4.6. Measurement Server .................................................................................................................................................................... 31 4.7. Web Server ....................................................................................................................................................................................... 33

4.7.1. Text_WIKI Package ................................................................................................................. 33

4.7.2. Smarty ....................................................................................................................................... 34 4.8. Web Interface .................................................................................................................................................................................. 34

4.8.1. Database .................................................................................................................................... 35

4.8.2. HTTPS ...................................................................................................................................... 35

4.8.3. Config.php ................................................................................................................................ 38 4.9. Experiment Client .......................................................................................................................................................................... 40

4.9.1. Config.xml ................................................................................................................................ 40

4.9.2. Library.xml ............................................................................................................................... 40 4.10. Getting Started ................................................................................................................................................................................ 41

5. CONCLUSION AND FUTURE WORK ................................................................................................ 42

REFERENCES ............................................................................................................................................... 43

Page 4: VISIR INSTALLATION & START-UP GUIDE V.1

[3]

Glossary API Application Programming Interface DPST Double pole, single throw GND Ground GPIB General Purpose Interface Bus HTML Hypertext Markup Language I2C Inter-Integrated Circuit IC socket Integrated circuit socket IEEE Institute of Electrical and Electronics Engineers IP Internet Protocol IVI Interchangeable Virtual Instruments LabVIEW Laboratory Virtual Instrumentation Engineering Workbench LMS Learning management system LXI LAN Extensions for Instrumentation NI National Instruments PXI PCI Extensions for Instrumentation SOAP Simple Object Access Protocol SSL Secure Socket Layer TCP Transmission Control Protocol TLS Transport Layer Security USB Universal Serial Bus VISA Virtual Instrument Software Architecture VISIR Virtual Instrument Systems In Reality

Page 5: VISIR INSTALLATION & START-UP GUIDE V.1

[4]

Figure Index Figure 1. Common traditional instruments in an undergraduate ............................................................... 7 Figure 2. Relay switching matrix ................................................................................................................. 9 Figure 3. Component Board ...................................................................................................................... 10 Figure 4. Two leads components connected to DPST relays .................................................................... 10 Figure 5. Internal connection of a resistance connected to relay one and to the nodes (B, C) ................ 11 Figure 6. Internal connection of instruments with the nodes of the matrix ............................................... 12 Figure 7. A graph with 5 nodes and 10 branches ...................................................................................... 13 Figure 8. A circuit of 5 nodes and 3 components ...................................................................................... 13 Figure 9. Numbering single and dual pole relays on the component board ............................................. 14 Figure 10. Components installed in the component board ........................................................................ 15 Figure 11. Internal connection of the 6V power source using shortcut wires ........................................... 15 Figure 12. Internal connection of the 6V power source using single pole relays ..................................... 16 Figure 13. Operational amplifier connection ............................................................................................ 16 Figure 14. Component list ......................................................................................................................... 17 Figure 15. A max list for an operational amplifier circuit ........................................................................ 17 Figure 16. An overview about how VISIR works ....................................................................................... 18 Figure 17. VISIR web interface ................................................................................................................. 19 Figure 18. Client selects available modules .............................................................................................. 20 Figure 19. Virtual workbench of VISIR ..................................................................................................... 20 Figure 20. Pull-down component list menu ............................................................................................... 21 Figure 21. Measurement server running ................................................................................................... 22 Figure 22. Equipment server software running ......................................................................................... 23 Figure 23. The role of IVI in the frontal panel and the platform selection ............................................... 24 Figure 24. Overall operation process of VISIR ......................................................................................... 25 Figure 25. VISIR connected at UNED ....................................................................................................... 26 Figure 26. Connection of the DMM and the oscilloscope ......................................................................... 27 Figure 27. Connection of the DC power supply and the function generator ............................................ 27 Figure 28. Instruments defined in the Measurement & Automation Explorer .......................................... 28 Figure 29. Relay switching matrix defined in the Measurement & Automation Explorer ........................ 29 Figure 30. EquipmentServer.ini file .......................................................................................................... 30 Figure 31. Create wiki page ...................................................................................................................... 41

Page 6: VISIR INSTALLATION & START-UP GUIDE V.1

[5]

Table Index

Table 1. The role of each component of the NI PXI-platform……………………………………………………………..…....8

Table 2. Board label and I2C address scheme……………………………….…….…………………………………………………13

Table 3. The VISIR oscilloscope capabilities.………………………..………………………………………….……………………24

Page 7: VISIR INSTALLATION & START-UP GUIDE V.1

[6]

1. INTRODUCTION The Signal Processing Department (ASB) at Bleking Institute of Technology (BTH) in Sweden together

with National Instruments in USA (as a supplier of instruments) and Axiom EduTECH in Sweden (as a supplier of education, technical software, and engineering services for noise and vibration analysis) have launched the Virtual Instrument Systems in Reality (VISIR) Project in the end of 2006. It is an open source remote laboratory project, financially supported by BTH and the Swedish Governmental Agency for Innovation Systems (VINNOVA).

In December 2010, the Electric and Computer Engineering Department of UNED installed a VISIR with

the aid and guidance of the project founder Ingvar Gustavsson, together with the two engineers, Johan Zackrisson and Kristian Nilsson, from Bleking Institute of Technology (BTH). This guide is an installation reference from the Department. It includes the gained experience during the installation. The guide consists of four main chapters. The first chapter (Hardware Description) describes the VISIR hardware components types, models and their suitable connection. The second chapter (Software Description and Operation Cycle) explains the VISIR operation cycle and the software role of each part during the operation and its source building. The third chapter (Installation) shows the VISIR installation step by step process at UNED and all the configurations needed to get it to run. The Fourth and the last chapter (Conclusion and Future works) discusses the main parts on which a future work could be realized , on the one hand, for the VISIR development and integration, and on the other hand to Develop the available remote lab technology and enhance distance education.

Most of the compiled information in this guide is retrieved from documents released by the project

founders through the project webpages [2] [3], all these documents are freely accessible. This guide provides complementary information to that is found in the project web pages. Accordingly, before installing a VISIR, the resources of the project web pages should be considered first.

Page 8: VISIR INSTALLATION & START-UP GUIDE V.1

T

electbrea

InsuchIEEErelayinstrreal goin

1

2

3

2. HARD

The commontronic circui

adboard and

n VISIR, theh as PXI (PCE-488or GPIy switching rument cardselectronic c

ng to be desc

1. PXI (PCI ecan select tPCI-based tsystem inter

2. LXI is the remote, distcommunica

3. GPIB or IEthe late 196

DWARE

n traditionaits, Figure an oscillosco

ese instrumeCI eXtensionIB (General matrix is c

s to the compcircuit remotcribed, illustr

Xtensions for Inthe modules (instechnology and roperability. power of Etherntributed, time-aw

ations standard inEE-488 is a sho0s, and is still in

DESCRIP

al instrumen1, are: a poope.

Figure 1. Co engineerin

ents are replans for Instrum

Purpose Intonnected toponents insttely thanks trating the fun

nstrumentation) struments) from an industry stan

net and the Weware. LXI is then the history of tort-range digital n use for that pur

PTION

nts in an uower supply

mmon traditiong laboratory f

aced with anmentation) 1

terface Bus) the PXI eqtalled inside to this matrinction of eac

is a rugged PC-a large number

ndard governed b

b applied to Tee current and futthe test industry communicationsrpose. It was cre

[7]

undergraduaty, a function

nal instrumentfor electric and

n equipment [4], LXI (LA3 [6]. The c

quipment plathe matrix.

ix. In this pch of them.

-based platform r of vendors andby the PXI Syst

est & Measuremture standard forand products fros bus specificatioeated as HP-IB (H

te engineerin generator,

ts in an undergd electronic cir

platform, wAN eXtensiourrent VISIRatform. TheBy this wayart, all the V

for measuremed easily integrattems Alliance (P

ment offering your Test & Measurom leading test aon. It was createHewlett-Packard

ing laborato, a digital m

graduate rcuits

which is suiteons for InstruR is based o matrix con

y, it possible VISIR hardw

ent and automatite them into a siPXISA) to ensur

u new possibilitrement. It's seenand measuremened for use with ad Interface Bus).

ory for elecmulti-meter

ed for remotumentation)

on PXI. In adnnects the di

to design anware compon

ion systems. Wiingle PXI systemre standards com

ties in test systen the fastest ramnt companies. automated test e.

ctric and (DMM);

te control 2 [5] and ddition, a igital pxi nd wire a nents are

ith PXI, you m. PXI uses

mpliance and

ems – local, mp-up of any

equipment in

Page 9: VISIR INSTALLATION & START-UP GUIDE V.1

T

cardeverthe r

Fun

Minst

UN

1

2.1. PXI

The PXI platds are suitedry componenrole of each

nction: It issystecardsPXI-

Model talled at NED:

• NI

1. National Insoftware proI²C, and oth

I-Platform

tform consisd. All the plnt, there are component a

NI PXI-Ch

s the backboneem in which s (NI PXI-modcontroller are pl

I PXI-Chassis (N

nstruments is a loducts include L

her industrial aut

m

sts of instrumlatform coma various m

and its avail

Table 1. Th

hassis

e of the PXI all instrument

dules) and NI lugged into.

NI PXI-1031).

leader companyLabVIEW, LabWtomation standar

ment modulemponents aremodels depenable model a

he role of each

N

Or NI PXI-Ithat substitutplugged into tcards can be athe demands.

• NI PXI-DC

• NI PXI-Dig

• NI PXI-Fun

• NI PXI-Osc

y for production Windows/CVI, Trds.

[8]

e cards, a coe manufacturnding on itsat UNED

component of

NI PXI-Mod

nstruments, Thte the instrumthe NI PXI-Chaadded and remov

C Power Supply (

gital Multi-meter

nction Generator

cilloscope (NI PX

of automated tTestStand, etc. T

ontroller carred by Nati technical c

f the NI PXI-pla

dules

e modules cardments. They arassis. All of thesved depending o

(NI PXI-4110).

r (NI PXI -4072)

r (NI PXI-5412).

XI-5114).

test equipment aTheir hardware p

rd and a chaonal Instrumharacteristic

atform

NI-P

ds re se on

It is an eplugged intcomes withan integrateEthernet, serial, USBAll these dinstalled. Hneed for ancould be rep

).

.

• NI-PXI C

and virtual instrproducts include

assis in whicments (NI) 1

cs. Table 1 i

PXI Control

embedded PC, to the NI PXI-

h standard featured CPU, hard drvideo, keyboa

B, Microsoft windevice drivers aHence, it elimn external PC. Hplaced with a PC

Controller (NI PX

rumentation softVXI, VMEbus,

ch all the 1 [7]. For illustrates

ller

which is Chassis. It res such as rive, RAM, ard/mouse, ndows etc. are already

minates the However, it C.

XI-8105).

tware. Their PXI, GPIB,

Page 10: VISIR INSTALLATION & START-UP GUIDE V.1

It

It is and Boarcable

R

sockand 16×1ampbecathe s

1

2.2. Rel

t is a stack odesigned forcomponent rd) correspoes or cords,

Relay switchkets for comptwo 20-pin 10 relays aslifier, occup

ause it shouldswitching ma

1. PC/104 is a

lay Switch

of PCI/1041 r low frequeboards. Eac

onds to its NFigure 2.

hing matrix ponents withIC sockets f

s maximum.py more relayd be easy to atrix from no

common intern

hing Matri

sized boardsency analog ech instrumenNI PXI-Devi

can hold uph two leads (for complex . Two leadsys, Figure 3.swap comp

on-qualified

ational embedde

ix

s [8] which electric and

nt board (DMice in the N

Figure 2. Re

p to 16 com(Each socketcircuit conn component. Putting the

ponents and rd persons.

ed computer stan

[9]

act as a circelectronic ci

MM, OscilloNI PXI-Chas

elay switching

mponent bot is connectenections. Thts occupy on switching mrewire branc

ndard controlled

cuit-wiring roircuit experi

oscope, Powessis and con

matrix

ards. Each ed to a doublhus, relay swne relay wh

matrix into aches. Howev

by the PC/104 C

obot. It is miments and cer source an

nnected to it

component le-pole singl

witching matrhile more lea closed casever, it is very

Consortium.

manufacturedconsists of innd function g

using eithe

board comple-throw relarix can contads compon

e is not recomy important t

d in BTH. nstrument generator

er coaxial

prises 10 ay DPST) tain up to nents e.g. mmended to protect

Page 11: VISIR INSTALLATION & START-UP GUIDE V.1

A

expeFigu

According toectancy is 3ure 4 shows t

o the data s3×108 operattwo leads co

sheet, the mtions (appro

omponents co

Figure 4. T

Figure 3.

maximum caroximately twonnected to

Two leads comp

[10]

Component Bo

rry current wo operationDPST relay

ponents conne

oard

of the relayns per secons inside the m

ected to DPST r

y is 2 A annd continuomatrix.

relays

nd the minimusly for fiv

mum life ve years).

Page 12: VISIR INSTALLATION & START-UP GUIDE V.1

Inbetwboarcontfigur

F

can commatrThe the Dnot lconnrespefirst not s

n relay switween the boards to connetains the nodre 3.

Figure 5 explbe connecte

mponent boarrix. The groufunction gen

DMM channlisted in the nected internectively, thegroup (by a

supported in

tching matriard componeect them togdes A-I and

lains the inteed only to trd. Figure 6und terminalnerator outp

nels are dynacomponent nally to the en dependinga shortcut win the current

Figure 5. Int

ix, each boaents and the bgether, creatid 0 (GND).

ernal connecthe nodes of6 shows the ls of the func

put can be coamically conlist design. Tnode 0 (GN

g on the comire as seen insoftware ver

ternal connecti

ard has a ceboard. Howeing a node bWhile the s

ction of a comf the first gr

internal coction generaonnected to nnnected to anThe Power s

GND) and thmponent listn figure 3 orrsion.

ion of a resista

[11]

ertain numbever, there abus. These nsecond conta

mponent inroup depend

onnection ofator and the onode A only

ny node depesource connehe nodes of t design (seer by two rela

ance connected

er of relaysare common nodes are diains the nod

the componding on the f the instrumoscilloscopey. While the ending on thectors (0, COthe second

e componenay switches i

d to relay one a

s controllingnodes propa

ivided into des X1-X6 a

nent breadboacomponent

ments with te are hardwir

oscilloscopehe user circuiOM, +6V, +

group (COnt list), they in series) as

and to the node

g the intercoagating withtwo groups,and COM as

ard. The coms distributiothe nodes inred to node 0e channels ait design and20V, -20V, A

OM, X1, X2, are connectthe second g

es (B, C)

onnection hin all the , the first s seen in

mponents on on the nside the 0 (GND). as well as d they are AUX) are

X3, X4) ted to the group are

Page 13: VISIR INSTALLATION & START-UP GUIDE V.1

Fig

gure 6. Internall connection of

[12]

f instruments wwith the nodes oof the matrix

Page 14: VISIR INSTALLATION & START-UP GUIDE V.1

Twe cfor ua 5 n

F

a res

In

contaddrUNE

The complexcan obtain Nundergraduatnode circuit.

For instance, sistance (R3)

• The DR1+RThe shof thebe con

• The fuwe sh

n the matrixtroller (PIC1ress, which wED with its e

xity of the mN. (N-1)/2 brte Engineeri

if we conne) to the node

DMM channR2. To measuhortcut is a s

e matrix of finnected auto

function genehould have a

, a matrix C16F767) on ewill be needequivalent I2

BoCoCoEtOsDMEtSo

matrix dependranches. Howing practice.

Figur

ect a resistanes (D, E) as s

nels are dynure R2+R3 (single wire t

figure 3. If thomatically to

erator is conshortcut bet

Figur

Controller (PIeach board vded later for2C address.

Tab

oard Type omponent bomponent bc. scilloscope bMM board c. ource board

ds on the nuwever, the cFigure 7 sho

re 7. A graph w

nce (R1) to thshown in fig

namic but th(nodes B, E)that connectshe user conno combine th

nnected onlytween the no

re 8. A circuit o

IC18F4550)via a bus [8],r writing the

ble 2. Board lab

oard 1oard 2board

[13]

umber of nocurrent matriows the num

with 5 nodes an

he nodes (A, gure 8, we wo

he nodes ar), we have tos two nodes nects R2 andhe two nodes

y to the nodeode A and th

of 5 nodes and

) hosted on t, so that, eac

e component

bel and I2C add

Board Labe12161724

des it have ix which hav

mber of branc

nd 10 branches

B), a resistaould have to

re not, so wo make a shoand occupie

d R3 in series, the user do

es (A, 0), soe other node

d 3 components

the source bch board hast list file. Ta

ddress scheme

el I2C AddCOMP 1COMP 2OSC 16DMM 17SRC 24

e.g. from a ve 10 nodesches (10) co

s

ance (R2) to o consider so

we can measortcut betwees one relay es, the internoesn’t have t

o to connect e.

s

oard commu a label, whi

able 2 shows

dress 127

matrix with s (A-I, 0) is sould be obtai

the nodes (Bome facts suc

sure R1, R2,een the nodeas seen in th

nal shortcut rto draw it.

it to any oth

unicates withich correspos each board

N nodes sufficient ined from

B, C) and ch as:

, R3 and es (C, D). he relay 3 relay will

her node,

h a board onds to an d label at

Page 15: VISIR INSTALLATION & START-UP GUIDE V.1

Tknowgive

1

2.2.1. Com

The componewn to the son to list instr

Beforrelays9. Threplac

The t

<Com

For ithe fo

-

-

-

If a crelayactivgoing

1. The DMM a

mponent Lis

ent list descroftware. Theruments and

re listing a cos in the compe 10 dual pce four of the

Figu

two leads co

mponent typ

nstance, theollowing:

R_2_1 Iconnected SHORTCUnodes (H, C_2_4 Aconnected

component dy connectionating rely 1 g to be conne

and oscilloscope

st

ribes all theere is only od component

omponent wponent boardole relays aem with 8 si

ure 9. Number

mponents (R

pe>_<board

component

IH 10K :to the nodes

UT_2_3 HGG) in the boAB 10n:to the nodes

demands mons by the sig

on board 1ected betwee

e connections are

installed coone componets in the com

we have to cod that can be

are numberedingle pole re

ring single and

R, C, SHORT

d label>_<re

s installed in

: representss (I, H) in thG: represent

oard 2. : represents s (A, B) in th

ore than one gn “:”. For and rely 10en node E an

e fixed and are n

[14]

omponents aent list per s

mponent list f

onsider a vere replaced bd 1, 2,3,5,7,lays, they w

d dual pole rela

TCUT, L, etc

elay numbe

n the compo

s a resistor he board 2. s a shortcut

a capacitorhe board 2. relay to be cexample, “0 on board nd F.

not listed in the c

and instrumeswitching mfile.

ry important by eight sing,8,9,10,11 a

will be numbe

ays on the comp

c.) are listed

er> <Node

onent board

of 10K ohm

installed on

r of 10n far

connected to“R_1_1:8_108 a resistor

component list.

ents1 in the mmatrix. Next,

remark. Thegle pole relaynd 13 respeered (1-14) r

ponent board

as the follow

e1>< Node2

of figure 10

ms installed

n the relay 3

rad installed

o the circuit,0 E F 1

with the va

matrix to masome guide

ere are four ys as shown ectively. Whrespectively.

wing:

2> <etc.> <

0 will be des

on the rel

and connect

d on the rela

, we separate10k” meansalue of 10k o

ake them elines are

dual pole in figure

hile if we .

<Value>

cribed as

ay 1 and

ted to the

ay 4 and

e the two s that, by ohms are

Page 16: VISIR INSTALLATION & START-UP GUIDE V.1

1

The fuboard board

The nversio(6V, +througbe con

1. The describ

function gened (board labed, it can be lisnodes of theon of the sof+25V, -25V agh the relaysnnected to th Shortcut w

COM is haof the 6V“VDC+6V_

Figu

bed matrix is the

Figure 10

erator is conel = 24) andsted as “VFG

e second groftware and mand COM) as (3, 4, 5 adhe nodes of twires connecardwired to V DC pow

V_24_3 A”.

ure 11. Internal

one connected a

0. Components

nnected to thd its groundGENA_24_5oup (X 1-X6must not be are connecte

d 2) on the sothe first groucting the (Xthe node 0).

wer source

l connection of

at UNED.

[15]

installed in the

he node “A” d is hardwire

A 0”1. 6) and the nused in the

ed internally ource board up (A-I) by eX1-X3) node. For examplwhich will

f the 6V power

e component b

internally thed to “0” th

node COM acomponent to the nodes(board labe

either one of es to the nodle, figure 11l be describ

r source using s

board

hrough the rhrough the re

are not supplist. The pows (X1, X2, Xl= 24)1. The

f the followides of the f explains thbed in the

shortcut wires

relay 1 on thelay 5 on th

ported in thwer supply t

X3 and 0) rese power supping two wayfirst group (e internal co

componen

he source he source

e current terminals pectively ply could s: (the node onnection nt list as

Page 17: VISIR INSTALLATION & START-UP GUIDE V.1

For copin ICand 5“OP_4

Single poconnectionas “VDC+6

Figure

omponents wC sockets. Fo5 are not con4_10:4_11:4

le relays onn of the 6V 6V_24_3:10_

e 12. Internal c

with more thor example, nnected, thi

4_13 NC B D

Fig

n componenDC power s

0_5 A”.

connection of t

han two leadthe operatio

is operationaD G NC C F N

gure 13. Opera

[16]

nt board. Fosource, whic

the 6V power s

ds, more relaonal amplifieal amplifier

NC uA741”

tional amplifie

or example,ch will be de

ource using sin

ays are useder shown in f

will be des

er connection

figure 12 eescribed in t

ngle pole relay

and they arfigure 13 hascribed in th

explains thethe compone

ys

re mounted oas 8 connectohe compone

e internal ent board

on the 20 ors. Pin 1 nt list as

Page 18: VISIR INSTALLATION & START-UP GUIDE V.1

F

T

fromEachlisted

Tincluand

Figure 14 sho

2.2.2. Max

The max listsm being activh list lists a nd sources or

<Com

The serial nuude the DMMdo not affect

ows how a si

x lists

s are lists thvated. It is onumber of sor component

mponent typ

umber is a seM set as voltt the circuit

imple compo

at describe aonly possiblources and cs if appropri

pe>_<Serial

elected valuetage meter aso much. Fi

Figure 15

onent list cou

Figure 1

all safe circule to activatcomponents iate relay sw

l number>

e to name thand the oscilligure 15 sho

5. A max list fo

[17]

uld look like

14. Component

uits that coue circuits thand it descri

witches are cl

<Node1><

he instrumenloscope in th

ows the max

r an operation

e.

t list

uld be createhat are safe ibes also howlosed The m

< Node2><e

nts and the che max lists blist of an op

nal amplifier ci

ed and preveaccording tow they can bax list forma

etc.> <Va

components.because they

perational am

rcuit

ent hazardouo a defined be connectedat is:

alue>

. There is noy are high im

mplifier circu

us circuits max list.

d to other

o need to mpedance uit.

Page 19: VISIR INSTALLATION & START-UP GUIDE V.1

V

PublallowsoftwVISIrega

T

and relaycircuconnreceiinterhavePC (

S

mech

3. SOFT

VISIR is an lic License [w other univware source IR operation

ardless to its

To get an ovea breadboar

ys to determuit. If you senected, you wives the comrprets them te an interior (through USB

oftware funchanism proc

TWARE D

open source[10]. Thus, Bversities andbuildings, pn mechanismversion as it

erview of hord with all thmine which end commanwill managemmands sento a physicalconnection bB) as shown

ctionality ancess starting

DESCRIP

e project, wBTH has assd organizatipackets and im and the t could be up

ow VISIR whe required crelay should

nds to the PXe to see the nt to the relal wiring as shbetween com

n in figure 16

Figur

nd its source from the cli

PTION AN

which offers igned a webons to studyinformation software fu

pdated frequ

works, imagicomponents d be connecXI instrumenresults on yays as well hown in figu

mponents, no6.

re 16. An overv

building areent login till

[18]

ND OPER

a software bpage [3] fory its sourceare available

unctionality uently.

ne that you connected t

cted and whnts terminalsour PC. Theas the ones

ure 16. In viodes and ins

view about how

e going to bel receiving th

RATION

distribution r its softwaree and coopere in this weband of eac

have a PC cthrough relayhich shoulds to determine relay switcs sent to theew of that, t

struments. It

w VISIR works

e discussed ahe results ba

CYCLE

released une developmerate in its dbpage. This ch part and

controlling yys. If you senot, you w

ne to which ching matrixe PXI instruthe relay swireceives the

s

according toack on the cli

nder a GNUent and instadevelopmentchapter descits source

your PXI insend comman

will build thenode they s

x acts as a rouments termiitching matrie commands

o the whole oient screen.

U General allation to t. All the cribes the

building

struments nds to the e desired should be obot who inals and ix should from the

operation

Page 20: VISIR INSTALLATION & START-UP GUIDE V.1

It

againauthcookto be

It

labopageregafrontperfoavail

3.1. We

t is the webpnst MySQL

hentication pkie with the e recalled by

3.2. Exp

t is a packagratory work

e as an embardless to its t panel dep

formance of lable module

• Tradit

• Defau

• Digita

• Funct

• Oscill

• DC Po

eb Interfac

page of VISand installe

rocedures ovclient charac

y the measur

periment C

ge integratekbench (withbedded obje model or m

picting one-the real instes are:

tional breadb

ult PXI-instru

al Multi-Met

tion generato

loscope (Agi

ower Supply

ce

IR through wed in the wver HTTPS cteristics (sturement serve

Client

d in the VIh all its instrct. Client is

manufacturer-instrument trument is eq

board.

uments inter

ter (Fluke 23

or (HP 33120

ilent 54622A

y (E3631A).

which user cwebserver as

protocol. Wudent, teach

er for authent

Figure 17.

SIR webpagruments, coms free to chor as shown imodel to c

qual or bette

rfaces of Nat

3).

0A).

A).

[19]

can access tssigned for

When a clienther, priority, tication purp

VISIR web inte

ge and creatmponents anoose the insin figure 18control a der than the p

tional Instru

to the experiVISIR. It ht logs in, it IP address.

pose, Figure

erface

ted by Adobnd breadboastrument mo. By this wa

different insperformance

uments.

iment client,handles all tgenerates anetc.) and sto17.

be Flash. It ard simulatedodule with way, it is postrument mo

e of the depi

, it is writtenthe client lon experimenores it in the

represents td) through awhich he issible to use

odel as longicted instrum

n in PHP og-in and nt session

database

the entire an HTML s familiar

a virtual g as the

ment. The

Page 21: VISIR INSTALLATION & START-UP GUIDE V.1

H

startinstrwhertimedocu

However, othts to wire thruments as ifre all the in

e spent in desumentations

Av

her modules e circuit witf he was loc

nstruments tesigning the care availabl

vailable mod

Fig

could be buth the mouscated inside erminals andcircuit, the ce at the proj

F

dules

gure 18. Client

uilt with Ade and with ta real labor

d componenclient is occuect website

Figure 19. Virt

Selected

[20]

t selects availa

dobe Flash. Athe availableratory. Figurnt list are avupying his ow[2].

tual workbench

d modules

able modules

After choosie componenre 19 shows ailable to dewn PC not th

h of VISIR

ing the prefents in that se

the virtual wesign the dehe real instru

erred modulession, and aworkbench oesired circuituments. Use

les, client adjust his of VISIR t. All the er manual

Page 22: VISIR INSTALLATION & START-UP GUIDE V.1

Wavaillocatwebp

W

(expprotorequinstrexpe <fun <fg <fg <fg <fg <fg <fg <fg <fg <fg <fg</fu

When the cllable compoted in the sapage source

When the clperiment clieocol. The ex

uests to transruments adjueriment protonctiongeneratg_waveform g_amplidute g_frequency g_offset valug_startphaseg_triggermodg_triggersoug_burstcountg_dutycycle vg_userdefinenctiongener

ient clicks onents is shoame location

(to be discu

lient gets hient) starts txperiment prsport the requstment and ocol request tor> value="sine"value="1000value="1000e="0.0" /> e value="0.0"de value="corce value="imt value="0" /value="0.5" /edwave lengtator>.

on the comown. This mof the “brea

ussed later in

Fig

is circuit reato call the “rotocol is an

quest data toconfiguratiosent by a 54

" /> 0.0" /> 0.0" /> /> ontinous" /> mmediate" //> /> th="20" enco

mponents butmenu can be adboard.swfn the installat

gure 20. Pull-d

ady and clic“measuremen XML baseo the measuron and the c411 function

/> oding="BASE

[21]

tton as showconfigured

f” file, in thetion chapter)

down compone

cks on the ent server”d protocol, wrement serveircuit design

n generator c

E64">ABCD12

wn in figurand modifie

e experiment).

ent list menu

(perform ex(see the newhich use eer. The expen through ancould look lik

234ABCD12

re 20, a puled through tt client packa

xperiment) bext section) either XML Seriment proton XML messake:

34ABCD</fg

ll-down menthe “library.age within th

button, the cthrough ex

Socket APIocol transmiage. For exa

g_userdefined

nu of all xml” file

he VISIR

client PC xperiment or HTTP its all the ample, an

dwave>

Page 23: VISIR INSTALLATION & START-UP GUIDE V.1

Wthe “(webfuncposscreat

It

the mconnexce

T

Web service“measuremeb server) coctions each sible to selecte new modu

3.3. Me

t is a softwarmeasuremennect and disceed 64 KB in

The role of th

1) Authcook

2) ValidbefoThe circu

3) Timesecothem

4) ContGPIB“equgatewequip

s prescribe Xent server”. ould run oninstrument

ct an instrumules of instru

asuremen

re program wnt requests frconnect are rn size. Figure

he measurem

hentication: kie, generatedation: It acre sending imax lists ar

uit componene-sharing: Ind is the ma

m sequentialltrol: After vB module

uipment servway and copment

XML based mTCP/IP on p

n a separatetype can p

ment simulatuments that d

nt Server

written for Mrom the exprequired for e 21 shows a

F

ment server c

At each reqed by the webcts as a virtuit to be execre created bnts and instrt can handle

aximum timely with regarvalidating anor sending

ver” (see theould serve

messages coport 2324 d

e machine. Terform, indted module ido not exist

Microsoft Wperiment clie

every requea running me

Figure 21. Mea

can be define

quest, it verib server agai

ual instructorcuted on theby the adminruments. Thie requests froe for each rerd to prioritynd queuing th

them seque next sectiomore than

[22]

onveyed by Idoes the conThe XML bependent ofindependentin the curren

Windows in Cent, each reqest made to teasurement

asurement serv

ed in four ma

fies that the inst the datar; it comparee real instrumnistrator (teais lets him toom 16 simulequest) by quy, reservationhe requests,

uentially oven). In the seone equipm

Internet protnnection currbased protocf hardware ly on the mant set.

C++ using Mquest is sent the server. Tserver on a M

er running

ain steps.

client is a vabase. es the receivments, to avacher) to deo be the onlyltaneous clieueuing all simn, etc. it starts to h

er TCP/IPecond case tment server.

ocols such arently. Henccol describemanufactureanufacturer,

Microsoft Visin a separat

The requests/Microsoft wi

valid user by

ved circuit davoid any damefine the pery responsibleents with lessmultaneous r

handle themthrough the

the measurem As it com

as SOAP to bce, Experimees what setter, that’s walso it is po

sual C++. Itte TCP sessi/responses shindows syste

y validating t

ata with the mage to instrmitted value for any dams than a secorequests and

m either direce port 500ment server

mmunicates

be sent to ent client tings and

why, it is ossible to

t receives ion, thus, hould not em.

the client

max lists truments.

ues of the mage. ond (1/16 d perform

ctly using 1 to the acts as a with the

Page 24: VISIR INSTALLATION & START-UP GUIDE V.1

It

instrplatfsoftwinsta

T

serveinstrrepre

M

equiregaunivworkdefincapa

A

capathe cmethin ta

3.4. Equ

t is a stand-rument hardform, the relware installealled in the L

The equipmener in separatruments. Aftesented in fo

Most of undpment (osc

ardless of thversities woukbenches anned by the Iabilities of th

Accordingly, abilities are tclass. For exhods are defable 3.

uipment S

-alone equipdware togethlay switchin

ed in it. The LabVIEW are

nt server recte TCP sesster that, the orm of measu

ergraduate ecilloscopes, heir model uld like to und different gIVI Foundathe lab hardw

it should bthe functionsxample, for afined as exte

Server

pment controher with theng matrix anserver softwe IVI (Interch

Figu

ceives a validions over TCresults retururements on

electronic laFunction gand manuf

use another grid nodes (tion [11] to

ware.

be possible s of an instruan oscillosconsion capab

oller, handlie relay swit

nd the PC thware is writte

hangeable V

ure 22. Equipm

dated sequenTCP/IP throurn back to thn the virtual i

aboratories ogenerators, facturer typplatform (L

(different unbe used to

to create a ument class ope the base bilities. The f

[23]

ing low-levetching matr

hat handles ten in LabVIEVirtual Instru

ment server soft

ntial experimugh the port he client screinstruments.

of all the unmulti-meterse. The curr

LXI, GPIB, niversities), Vdescribe the

standardizethat are comcapabilities

functions su

el instrumenrix. It is divthe communEW, Figure 2uments) com

ftware running

ment protoco5001 and exeen with the.

niversities as, DC powrent VISIR etc.). To enVISIR recome base class

ed approachmmon to mos mean edge upported by t

nt interfacesvided into tnication amo22. And all th

mpliant [11].

ol requests frxecutes it the same sequ

around the wwer supplies

supports Pnable interchmmends funcapabilities

h, which is st of the instriggering o

the VISIR o

s and hostinthree parts, ong them wihe instrumen

rom the meahrough the cence. The re

world have s, and breaPXI, howevhangeability nctions and as and class e

easy to adotruments ava

only. Other tscilloscope

ng all the the PXI

ith server nt drivers

surement connected esults are

common adboards) er, other between

attributes extension

opt. Base ailable in triggering are listed

Page 25: VISIR INSTALLATION & START-UP GUIDE V.1

T

(Virtbe thfront

A

oper

The goal of thtual Instrumhose definedtal panel and

After undersration proces

I

he IVI Founment System d by the IVI d the platform

tanding the ss as shown

Grou

IviSco

IviScopeW

IviScopeTr

IviScope

Tab

dation is to Architecturestandard. Fim.

Figure 23. The

software fin figure 24.

up Name

opeBase

WaveformM

igger Modi

Auto- Setu

ble 3. The VISI

support 95 pe) standard igure 23 exp

role of IVI in th

function of .

Base specicapabtriggeeas

Extencalcurise tifier

Extenmodisubsytriggep

Extenconfi

[24]

IR oscilloscope

percent of th[12] is accep

plains the fle

e frontal panel a

each part s

DCapabiliification. Tbility to acqering. nsion: IviSulate wavefotime or freqnsion: IviSify the beystem in ther. nsion: IviSguration ab

e capabilities

he instrumenpted too but

exibility (pro

and the platform

sequentially,

Descriptionities of This groupquire wavefcope with orm measuruency. cope with ehavior of he absence cope with bility. nts in a partict the instrumovided by IV

m selection

, we can su

n the IviSp includes forms using the abilitrements, suthe abilitthe triggof an expethe automcular class. T

ment functionVI) of selecti

ummarize th

Scope the edge ty to uch as ty to gering ected matic The VISA ns should ion of the

he whole

Page 26: VISIR INSTALLATION & START-UP GUIDE V.1

Figuure 24. Overall

[25]

l operation proocess of VISIR

Page 27: VISIR INSTALLATION & START-UP GUIDE V.1

B

prevrunntheseeachinstaplatf(12 Vconnsyste

T

PXI-start

4. INSTA

Before startinvious chapterning on a sepe servers are

h other throuallation. All form. The coV) dc powernected to theem of the co

To understan-Instrumentsted. Coming

ALLATIO

ng with ther, the web separate compe running onugh TCP porthe matrix components ar source and e controller. ontroller.

nd the instrums and the viup next, the

ON

e installationerver, the me

puter and then the same mrts. The hard

cards should are distributeto the contrFigure 25 s

ment connecirtual board

e step by step

n, an overvieasurement ey can commmachine (NIdware compbe connecteed on the cooller through

show the VI

Figure 25. VIS

ctions, figured. After checp installation

[26]

iew on the server and th

municate witI PXI-Controponents shoued properly tomponent boh a USB cabSIR connect

SIR connected

e 26 and 27cking all thn process.

connection he equipmenth each otheroller), howe

uld be conneto their correoard. The m

ble. A PC scrtion at UNE

at UNED

explain the he connectio

is given. Ant server sofr by TCP pover, they sti

ected properlesponding in

matrix is connreen, a keybo

ED. Windows

internal conons, software

As mentioneftware, each orts. At UNEill communicly before sta

nstruments innected to anoard and a ms XP is the o

nnection bete installation

ed in the could be

ED all of cate with arting the n the PXI n external mouse are operating

tween the n can be

Page 28: VISIR INSTALLATION & START-UP GUIDE V.1

Figu

Figure 26

ure 27. Connec

6. Connection o

ction of the DC

[27]

of the DMM an

C power supply

nd the oscillosc

y and the functi

cope

ion generator

Page 29: VISIR INSTALLATION & START-UP GUIDE V.1

L

the mswitcpurc

A

in thplatflatesfuncAug

T

Instrmenshow

1

4.1. Lab

LabVIEW is machine thaching matri

chased from N

4.2. NI D

All the NI PXhe PXI chaform. The Nst NI device ction files (.vgust 2010 [14

To check therumentsM

nu beside thewn in figure

1. The “.vi” fifolders, both

bVIEW

the platformat runs the ex version 4National Ins

Device Dr

XI-Instrumessis and de

NI device drivdriver versi

vi files)1 nee4] is the vers

e installed Measurement

e PXI chass28.

Figu

les for each insth folders are fou

m with whichquipment se

4.1 is compstruments [1

rivers

nts (DMM, scribed in tvers comes wion from theeded to run sion currentl

devices in & Automati

sis, all the i

ure 28. Instrum

trument are requund within the La

h the equipmerver softwaatible with 3]. LabVIEW

Oscilloscopthe equipmewith the Labe National in

the equipmy at UNED.

the LabVIEion Explorerinstalled ins

ents defined in

uested to executeabVIEW installa

[28]

ment server sare. The equi

LabVIEW vW 2010 is th

pe, DC Poweent server sbVIEW licennstruments w

ment server s

EW platformr. In Devicestruments wi

n the Measurem

e the equipment ation folder.

software is dipment servversion 8.6 e version ins

er Supply anoftware mu

nse, howeverwebpage to msoftware. Ni

m, go to stars and Interfaill appear w

ment & Automa

server. They are

developed. Iter software or higher.

stalled curre

nd Function ust be definer it is recommmake sure thi device driv

rt menu Pfaces, if you with their rel

ation Explorer

e found inside th

t must be insthat includeLabVIEW l

ently at UNE

Generator) ed in the Lmended to ihat it containvers version

Programsclick the drolated slot nu

he “inst.lib” and

stalled on es a relay license is

ED.

mounted LabVIEW nstall the ns all the

n released

National op-Down umber as

d the “vi.lib”

Page 30: VISIR INSTALLATION & START-UP GUIDE V.1

A

It is wind

T

Prrelay

T

comthe “

4.3. Rel

After connecta “.inf file”

dows XP and

To check throgramsNy switching m

4.4. Com

The componemponents inst

“Hardware D

lay Switch

ting the rela” that comed another for

he installedNational Instmatrix shoul

Figure 29.

mponent L

ent list file (talled in the Description”

hing Matri

ay switching es with the mr windows 7.

d relay swtrumentsMld be defined

. Relay switchi

List

(componentscomponent bchapter), so

ix Driver

matrix to thmatrix to id

witching maMeasurementd as shown i

ing matrix defin

s.list) is locaboards of the

o that, to be d

[29]

he controller dentify it in

atrix in thet & Automatin figure 29.

ned in the Mea

ated inside the matrix shodefined.

or the PC, Wthe LabVIE

e LabVIEWtion Explore

asurement & A

he equipmenould be listed

Windows asEW platform

W platform, er. In Device

utomation Exp

nt server sofd in it (as exp

sks for the drm. There is a

go to staes and Interf

plorer

ftware folderplained prev

river file. a file for

art menu faces, the

r. All the viously in

Page 31: VISIR INSTALLATION & START-UP GUIDE V.1

It

instrsoftwFuncrede“Equ

T

31, instrinstrcom

4.5. Equ

t is the softruments andware is writtction Genersigned depeuipmentServ

To configurelocated insi

rument addrrument. Othe

mponent types

uipment S

tware writtend the relay ten with theator and Osending on tver.vi” inside

e the equipmde the softw

ress and theer configurats, etc.

Server Soft

n in LabVIEswitching m

e assumptionscilloscope) the available the server s

ment server sware folder.e slot relatedtions could b

ftware

EW. Before matrix is con that all the

and relay sle instrumensoftware fold

software, op. Before exed to each, sbe done (if r

Figure 30. Eq

[30]

executing torrectly define mentioned switching mnts. The seder (see figu

pen the confecuting the so that, the required) suc

quipmentServe

the server yned in the NI PXI-inst

matrix are inrver can be

ure 22).

figuration filserver softwserver can

ch as, Log fi

er.ini file

you must maLabVIEW ptruments (Dnstalled. Othe started by

le “Equipmeware you ha

recognize tile location,

ake sure thaplatform. Th

DMM, Powerherwise it shy executing

entServer.iniave to confithe locationcommunicat

at all the he server r Supply, hould be the file

i”, figure figure the n of each tion port,

Page 32: VISIR INSTALLATION & START-UP GUIDE V.1

[31]

4.6. Measurement Server It is a server software written in C++ by Microsoft Visual C++. Since, it is built with Microsoft

compiler, therefore, the Microsoft runtime libraries (Microsoft Visual C++ Redistributable Package) should be installed before running it. The server can be started by executing the file “measureserver_win.exe” inside the server software folder (see figure 21).

There are few configurations should be done before starting the measurement server:

1) The max list files “.max” are considered the programing language of the measurement server. It acts as a virtual instructor. They should be written (as explained previously in the “Hardware Description” chapter) and inserted in the folder “/config/maxlists” which is located inside the measurement server software folder.

2) After writing all the max list needed, they should be put down in the “maxlists.conf” file which is located inside the “/conf/” folder.

3) The configuration file “measureserver.conf” contains all the necessary configurations for the server operation. It have to be created by copying all the contents inside the “measureserver.conf.dist” file into a simple text file and then change the extension into “.conf”. The “.dist” file is located in the “/conf/” folder. Likewise, the new created “measureserver.conf” file should be located in the same folder.

4) In the “measureserver.conf” file, it is very important to determine through which port the server is going to communicate with HTTP server, usually the TCP/IP port 80 is reserved for the “wampserver” (discussed later), so we have to choose another port (for example, the port 81).

5) In the “measureserver.conf” file, check “BypassAuth 1”, it checks if the user comes from the web interface or not.

6) To see a detailed screen while the server is running, so that it could be easier to detect any error, in the “measureserver.conf” file, check “LogLevel 5”.

The “measureserver.conf” file is configured at UNED as the following: ………………………………………………………………………………………………………………………………. Port 2324 HTTPPort 81 #MaxClients 16 #MaxSessions 50 # Config file base directory #ConfBaseDir conf/ # Component type definitions #CompTypes component.types # Max list configuration file, should contain a list of maxlists to load #MaxListConfig maxlists.conf # If the circuits should be saved, set the directory path #SaveCircuits savedcircuits/

Page 33: VISIR INSTALLATION & START-UP GUIDE V.1

[32]

# If left empty, a default "allow all" flash policy is used PolicyFile flashpolicy.xml # Disabled all authentication, usable when testing without authentication backend BypassAuth 1 # Keep alive sessions are needed when using http AllowKeepAlive 1 # Module names should be separated by , and no space # Only one authentication module (like dbmysql) is allowed # Example LoadModules mod1,mod2,mod3 Enable logging Log 1 # Logs directory must exist for the logging to work) #LogDir logs # 1-5, 5 being the most verbose LogLevel 5 ### Equipment server module configuration UseEQ 1 #EQ.Host 127.0.0.1 #EQ.Port 5001 #EQ.RetryCount 4 #EQ.RetryTimeout 10 ### Database module configuration # DBEnabled 1 DB.Host localhost # DB.Port 3306 # DB.User <user> # DB.Password <password> # DB.Database <database> # DB.Database <database> ### GPIBcontrol module #Signal analyser adress GPIB.SignalAnalyser 0:9:0 # New line required at end of file

…………………………………………………………………………………………………………………………..

To set the database authentication module (it verifies that the user comes from web interface), you have to copy the file”libmySQL.dll” from the wampserver folder to the directory”conf/” in the measurement server software folder. Then set the (BypassAuth 0) and add the line “LoadModules eqcom, dbmysql”. As shown in the following code:

LoadModules eqcom, dbmysql DB.Host localhost DB.Port 3306 DB.User root DB.Password <password> DB.Database electronics

Page 34: VISIR INSTALLATION & START-UP GUIDE V.1

T

UNEwith

T

serveWamconfport

F

Itinsta

12

34

5

4.7. We

To install theED of each ph the actual p

1) Apach

2) PHP2[

3) MySQ

4) Text_

5) Smart

The “WampSer, the MyS

mpserver 2.0figurations, s3306 and da

• php5-

• php5-p

• php5-

• php5-

4.7.1. Tex

First you hav

t will ask yoall the Text_

1. Apache HT2. PHP is a w

HTML. 3. MySQL dat4. Transforms

sub-classes.5. Smarty is a

eb Server

e web server package are project web p

he HTTP ser

[16]

QL Database

_WIKI Packa

ty5[19]

Server 2.0” SQL databas0 installed onserver port iatabase user

-mysql

-pcre

-session

-sockets

t_WIKI Pa

ve to install th

Open the “ Go to the d Type the c

ou some queWIKI packag

Open the “ Go to the d Type the c

TP Server is an widely-used gene

tabase is the worWiki and BBC

. template engine

the followinshown betwpage source:

rver1[15]

e3[17]

age4[18]

package forse and the Pn the hard dris 80, serveris root@loc

ckage

he pear insta

“Command Pdirectory: “Ccommand: “p

estions to coge:

“Command Pdirectory: “Ccommand: “p

open-source HTeral-purpose scri

rld's most populaCode markup into

e for PHP, facilit

ng software ween bracket:

(versi

(vers

(versi

(versi

(vers

r windows PHP packagrive C: in thr address is

calhost. The

aller to insta

Prompt” C:\wamp\binphp -d phar.

ontinue then

Prompt” C:\wamp\binpear install

TTP server for mipting language

ar open source do XHTML, LaT

tating the separa

[33]

packages ws, since, oth

ion 2.2.11)

ion 5.3.0)

ion 5.1.36)

ion 1.2.1)

sion 2.6.26)

includes theges. In the ge folder “C:localhost, sfollowing P

all the Text_

n\php\php5.3require_has

n the pear in

n\php\php5.3Text_Wiki”

modern operatingthat is especiall

database becauseTeX or plain tex

ation of presentat

will be neededer versions c

e mentionedguide, it wil/wamp/”.Alsserver remot

PHP modules

WIKI packag

3.0” (where sh=0 PEAR/

nstaller will

3.0” and press en

g systems includily suited for We

e of its high perfoxt markup. This

tion (HTML/CS

d, the currencaused some

d versions oll be assumeso, it will bete address iss should be a

ge:

the file pear/go-pear.pha

l be installed

nter

ing UNIX, Micreb development

formance, high reis the base engi

S) from applicat

nt installed ve compatibil

of the Apached that you e assumed ths 127.0.0.1, activated:

r.go.bat exisar” and pres

d. After that

osoft Windows, t and can be em

eliability and easine for all of the

tion logic.

version at ity errors

he HTTP have the

he default database

sts) s enter

t, start to

etc. mbedded into

se of use. e Text_Wiki

Page 35: VISIR INSTALLATION & START-UP GUIDE V.1

[34]

4.7.2. Smarty Extract the smarty package in the folder: “C:\wamp\Smarty” Open to edit the file “php.ini”, which is located in the folder

“C:\wamp\bin\apache\Apache2.2.11\bin” Under “Paths and Directories” type this line:

“ include_path = "C:\wamp\bin\php\php5.3.0\PEAR;C:\wamp\Smarty\libs" ”

To check that Smarty has been installed correctly:

Open to edit the file “index.php”, which is located in the folder “C:\wamp\www” Create the two folders: “C:\wamp\www\smarty\configs” and “C:\wamp\www\smarty\templates” Create the file “index.tpl” inside the folder “C:\wamp\www\smarty\templates” Open to edit the file “index.tpl” and add the following code:

<html> <body> Hello, {$name}! </body> </html>

At the end of the file code add the following code: <?php // load Smarty library require ('Smarty.class.php'); $smarty = new Smarty; $smarty->template_dir = 'C:\wamp\www\smarty\templates'; $smarty->config_dir = 'C:\wamp\www\smarty\configs'; $smarty->cache_dir = 'C:\wamp\Smarty\cache'; $smarty->compile_dir = 'C:\wamp\Smarty\templates_c'; $smarty->assign ('name','World!'); $smarty->display ('index.tpl'); ?> Start the WampServer and go to the WampServer homepage by typing: http://localhost/ or

http://127.0.0.1/. At the end of the page, you should see this message: “Hello, world!!”

4.8. Web Interface The VISIR web Interface package is written in PHP and hosted by the Apache HTTP server. The

package folder is called “trunk”, it should be placed in the folder “C:\wamp\www”. After that, some configurations should be done to start up the site. Next, these configurations are going to be discussed.

Page 36: VISIR INSTALLATION & START-UP GUIDE V.1

[35]

4.8.1. Database To create a database for the web interface page follow the following steps:

Go to the link http://localhost/phpmyadmin/ . Go to “Run SQL query/queries” Type the SQL command: “create database electronics” and click on “Go”. Now a database called

electronics are created for the web interface page. Create the database contents by opening the link

http://localhost/trunk/sites/electronics/dbscripts/create_database.php

To create a database administrator:

Copy the file “C:\wamp\www\trunk\sites\electronics\dbscripts\create_admin.php” to the folder “C:\wamp\bin\php\php5.3.0”

Open the file “C: \wamp\bin\php\php5.3.0\create_admin.php” Change the code line 3:

“require_once "../config.php";” To: “require_once "C:/wamp/www/trunk/sites/electronics/config.php";”

Open the Command Prompt Go to the folder “C:\wamp\bin\php\php5.3.0” Type: “php create_admin.php [email protected] password” and press enter.(put your own

administrator email and password) If any error appears because of the location of the file “Smarty.class.php”: copy this file from the

folder “C:\wamp\Smarty\libs” into the included folder path that is shown in the error so that, the compiler could find it.

To check that the administrator account is created correctly:

Go to the link http://localhost/phpmyadmin/ Open the database “electronics” The created administrator account should be created in the table “anv”

4.8.2. HTTPS The VISIR web page requires Hypertext Transfer Protocol Secure (HTTPS). Therefore, the SSL/TLS

protocol should be installed to allow HTTPS connection. To allow HTTPS, follow the following steps.

Add an environment variable “OPENSSL_CONF” - Go to: Control Panel > System > Advanced > Environment Variables - Add a new system variable, name: “OPENSSL_CONF”, Value:”

C:\wamp\bin\apache\apache2.2.11\conf\openssl.cnf” - Log out and then log in - Go to the Command Prompt - Type: “set | more” and press Enter

Page 37: VISIR INSTALLATION & START-UP GUIDE V.1

[36]

- Make sure that the variable “OPENSSL_CONF= C:\wamp\bin\apache\apache2.2.11\conf\openssl.cnf” exists among the listed variables

Generate key - Open the “Command Prompt” - Go to the directory “C:\wamp\bin\apache\Apache2.2.11\bin” - Type the command: “openssl req -new > webserver.csr”, and press Enter - The command runs and prompts you to enter a PEM pass phrase and verify it. Write

down the phrase because you will need it later. It will then ask you to enter information that will be incorporated into your certificate request. When the command finishes, it has created several files, including “privkey.pem”, in “C:\wamp\bin\apache\apache2.2.11\bin”.

Write RSA key - Open the “Command Prompt” - Type the command: “openssl rsa -in privkey.pem -out webserver.key” - You will be prompted for the pass phrase from the previous step. Then, the RSA key is

written and the file “webserver.key” is now available in the folder. Convert into signed certificate

- Open the “Command Prompt” - Type the command: “openssl x509 -in webserver.csr -out webserver.cert -req -signkey

webserver.key -days 365” - A certificate is created which will expire after one year.

Store certificate files - Create the folder “C:\wamp\OpenSSL” with the following subfolders: “certs”, “crl”,

“newcerts”, “private” - Copy the files (“webserver.cert”, “webserver.csr”, “webserver.key”) from the folder

“C:\wamp\bin\apache\Apache2.2.11\bin” to the folder “C:\wamp\OpenSSL\certs” - Copy the files (“.rnd”, “privkey.pem”) from the folder

“C:\wamp\bin\apache\Apache2.2.11\bin” to the folder “C:\wamp\OpenSSL\private” Create error log files

- Create the two text files (“ssl_ErrorLog.txt“, “ssl_TransferLog.txt“) in the folder “C:/wamp/logs”

Modify “httpd-ssl” - Go to the folder “C:\wamp\bin\apache\Apache2.2.11\conf\extra” - Make a backup copy of the file “httpd-ssl.conf” and rename it to “httpd-ssl.conf.old” - Open to edit the file “httpd-ssl.conf”

1. DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

2. <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin"> 3. Edit the following lines: SSLSessionCache "shmcb:C:/Program Files/Apache

Software Foundation/Apache2.2/logs/ssl_scache(512000)". 4. ServerAdmin me@localhost. 5. ErrorLog "C:/Program Files/Apache Software

Foundation/Apache2.2/logs/error.log". 6. TransferLog "C:/Program Files/Apache Software

Foundation/Apache2.2/logs/access.log".

Page 38: VISIR INSTALLATION & START-UP GUIDE V.1

[37]

7. SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.crt".

8. SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.key".

9. #SSLCARevocationPath "C:/Program Files/Apache Software Foundation/Apache2.2/conf/ssl.crl".

10. CustomLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/ssl_request.log" \"%t %h %{SSL_PROTOCOL}x%{SSL_CIPHER}x \"%r\" %b".

- Replace the above lines with the following lines respectively: 1. DocumentRoot "C:/wamp/www" 2. <Directory "C:/wamp/www/"> 3. SSLSessionCache "shmcb:C:/wamp/logs" 4. ServerAdmin Admin-email 5. ErrorLog "C:/wamp/logs/ssl_ ErrorLog.txt" 6. TransferLog "C:/wamp/logs/ssl_TransferLog.txt" 7. SSLCertificateFile "C:/wamp/OpenSSL/certs/webserver.cert" 8. SSLCertificateKeyFile "C:/wamp/OpenSSL/certs/webserver.key" 9. SSLCARevocationPath "C:/wamp/OpenSSL/crl" 10. CustomLog "C:/wamp/logs/ssl_request.log" \

"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" Modify the base directory

- Open to edit the file “C:\wamp\bin\apache\Apache2.2.11\conf\openssl.cnf” - Change the line “dir= ./demoCA ” with “dir = C:/wamp/OpenSSL”

Modify “httdp.conf” - Make a backup copy of the file “C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf” - Open to edit the file “C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf” - Activate the following modules by removing the comment sign “#”:

1. LoadModule rewrite_module modules/mod_rewrite.so 2. LoadModule ssl_module modules/mod_ssl.so

- Under the following comment lines: # Secure (SSL/TLS) connections #Include conf/extra/httpd-ssl.conf

Add the following code line: “Include conf/extra/httpd-ssl.conf” Test https

- Open “command Prompt” - Type the command “httpd –t” - You should see syntax is OK. If not, then you may have miss some of the steps above

Check the port 443 is opened - Restart the Apache server - Open “command Prompt” - Type the command: “netstat -an | more” - If the port is not open, then you may have missed some of the steps above.

Page 39: VISIR INSTALLATION & START-UP GUIDE V.1

[38]

4.8.3. Config.php The file “config.php” of the web interface package should be modified so that, the web site could be

adapted to our machine. It is very important to modify the file correctly to start the web page without any errors. First, the file should be created by copying the code inside the file “C:\wamp\www\trunk\sites\electronics\config.php.dist” and past it in a new created PHP file “C:\wamp\www\trunk\sites\electronics\config.php”. The file code to be modified is shown.

1 <?php 2 $openlabs_dir = "/usr/home/zeta/dav/openlabsweb/trunk"; 3 $distpath = $openlabs_dir . "/common/inc"; 4 $incpath = ini_get("include_path"); 5 ini_set("include_path", $incpath.":".$distpath); 6 // database settings 7 $site_db_hostname = "localhost"; 8 $site_db_user = "electronics"; 9 $site_db_password = "X"; 10 $site_db_db = "electronics"; 11 $src_dir = $openlabs_dir . "/sites/electronics"; 12 $log_dir = $src_dir . "/logs"; 13 $site_admin = "[email protected]"; 14 $site_mailfrom = "[email protected]"; 15 $site_name = "electro_lab"; 16 $site_root = ""; // url prefix if the site isn't located at the root 17 // smarty settings 18 $smarty_template_dir = $src_dir."/templates"; 19 $smarty_compile_dir = "/path/to/webcache/electronics"; 20 $smarty_shared_templates = $openlabs_dir . "/common/templates"; 21 require_once "openlabs.smarty_helper.inc"; // initialises smarty 22 // page constants 23 $site_index = "index.php"; 24 $admin_index = "admin.php"; 25 $teacher_index = "teacher.php"; 26 $instructor_index = "instr.php"; 27 $student_index = "student.php"; 28 $smarty->assign("site_url", "http://dev.openlabs.bth.se"); 29 $smarty->assign("site_root", $site_root); 30 $smarty->assign("site_index", $site_root."/".$site_index); 31 $smarty->assign("admin_index", $site_root."/".$admin_index); 32 $smarty->assign("teacher_index", $site_root."/".$teacher_index); 33 $smarty->assign("student_index", $site_root."/".$student_index);

34 $smarty->assign("experiment_index", $site_root."/experiment.php"); 35 // number of seconds for a non-reserved experiment 36 $g_immediate_experiment_time = 60 * 60; // 1h 37 $g_allow_http_proxy = false; 38 $g_proxy_measurement_server = "localhost"; 39 $g_proxy_measurement_port = 2324; 40 // wiki settings 41 $wiki_index = $site_root . "/index.php"; 42 $wiki_edit = $site_root . "/index.php?sel=wiki_edit"; 43 $wiki_upload_dir = "/usr/home/zeta/dav/openlabsweb/trunk/sites/electronics/public/wiki_upload"; 44 $wiki_upload_root = $site_root . "/wiki_upload"; 45 // meta settings 46 $description = "A meta page description"; 47 $keywords = "keywords, separated, by, comma"; 48 //$smarty->assign("page_description", $description); 49 //$smarty->assign("page_keywords", $keywords); 50 // ldap example configuration 51 /* 52 require_once "openlabs.auth.inc"; 53 LDAPAuth::AddLDAPLookup("ldap.someplace", "OU=Staff,O=XXX", "mail=%s"); 54 LDAPAuth::AddLDAPLookup("ldap.someplace", "OU=Staff,O=XXX", "uid=%s"); 55 LDAPAuth::AddLDAPLookup("ldap.someplace", "OU=People,O=XXX", "mail=%s"); 56 */ 57 // function returns maximal number of seats/simultanious sessions 58 function GetMaxSessions() { return 16; } 59 // use db based sessions 60 require_once "openlabs.session_db.inc"; 61 ?> Regarding to all the assumptions made in this guide, we would only have to change the following code

lines. 2 $openlabs_dir = "c:/wamp/www/trunk"; 5 ini_set("include_path", $incpath.";".$distpath); 12 $log_dir = $src_dir . "/logs"; // the logs file should be created manually in the folder “C:\wamp\www\trunk\sites\electronics” 13 $site_admin = "[email protected]"; // the administrator email 14 $site_mailfrom = "[email protected]";// the administrator email 16 $site_root = "/trunk/sites/electronics/public"; 19 $smarty_compile_dir = "C:/wamp/Smarty/templates_c"; 28 $smarty->assign("site_url", "http://62.204.201.71/trunk/sites/electronics/public");// 62.204.201.71 Is the IP of the hosting server machine 43 $wiki_upload_dir = "c:/wamp/www/trunk/sites/electronics/public/wiki_upload";

Page 40: VISIR INSTALLATION & START-UP GUIDE V.1

[40]

4.9. Experiment Client The experiment client is a software package written in Adobe Flash. The package should be extracted to

the folder “C:\wamp\www\trunk\sites\electronics\public”.

4.9.1. Config.xml The file “C:\wamp\www\trunk\sites\electronics\public\flash\config.xml” should be configured to the

current running machine as shown: <configuration> <hostname>62.204.201.71</hostname> <port>2324</port> <http>1</http>#http set to one means that the client uses http as default <httpurl>http://62.204.201.71:81/measureserver</httpurl> <teacher>1</teacher> #if you set it at 0, the component button will not be shown to the students #<ignorecookie>1</ignorecookie> #<allow_continuous>1</ allow_continuous > #<proxyurl>http://localhost/proxy.php</ proxyurl >…not adjusted </configuration>

4.9.2. Library.xml the file “C:\wamp\www\trunk\sites\electronics\public\flash\breadboard\library.xml” describes all the

available components for the user, it should be modified with regard to the available components on the breadboard. For instance, to add a resistor of 4 K ohm, insert the code:

<component type="R" value="4.0k" pins="2"> <rotations> <rotation ox="-27" oy ="-7" image="r_4k.png" rot="0"> <pins><pin x="-26" y="0" /><pin x="26" y="0" /></pins> </rotation> <rotation ox="-8" oy ="-26" image="r_4k.png" rot="90"> <pins><pin x="0" y="-26" /><pin x="0" y="26" /></pins> </rotation> </rotations> </component>

And the image “r_4K.png” should be inserted in the folder “C:\wamp\www\trunk\sites\electronics\public\flash\breadboard\images”

Page 41: VISIR INSTALLATION & START-UP GUIDE V.1

B

servehttp:pass

S h h h h F

“C:\

4.10. Get

Before startiner are ://localhost/tword. After

tart designin

ttp://localho

ttp://localho

ttp://localho

ttp://localho

Finally, you swamp\www

tting Start

ng the page, all runn

trunk/sites/ellogging in,

ng your own

ost/trunk/site

ost/trunk/site

ost/trunk/site

ost/trunk/site

should edit t\trunk\sites\e

ted

you have toning. Finalectronics/puit will ask yo

n page using

s/electronics

s/electronics

s/electronics

s/electronics

he code of thelectronics\t

o make sureally you ublic/ and ou to create

Figure 3

the wiki form

s/public/inde

s/public/inde

s/public/inde

s/public/inde

he file templates\me

[41]

e that the equcan st

log in witha wiki page

1. Create wiki

matting [19]

ex.php?page

ex.php?page

ex.php?page

ex.php?page

enubar.xml”

uipment servtart the h the admias shown in

page

] and by ente

e=StartPage

e=AboutPage

e=DemoPage

e=FaqPage#

” to include t

ver, measurepage th

nistrator acn the figure 3

ering a link f

e

e

the created p

ement serverhrough th

ccount usern32.

for each pag

pages in the m

r and web he link name and

ge such as:

menu bar.

Page 42: VISIR INSTALLATION & START-UP GUIDE V.1

[42]

5. CONCLUSION AND FUTURE WORK The VISIR software is an open source to catalyze developers to study it and expand its application range.

In this way, many efforts could be done to modify the software structure as well as the hardware design to implement it in more complex applications. From the possible works, the experiment protocol could be expanded to include new types and modules of instruments, the structure of the relay switching matrix could be developed to include more component range, instruments, and more complex circuits, etc. Moreover, the VISIR integration with other learning technologies could lead to creation of a rich remote laboratory platform; it could be integrated with a learning management system (LMS) or with other remote lab technologies such as iLAB [4]

Another important objective of the VISIR project is to create a lab community consisting of all the

participant universities and organizations. Consequently, it would be possible to create a grid laboratory where the nodes are online lab workbenches distributed among those universities. This would allow sharing lab recourses and sharing online workbenches. At the same time, it would allow the project development. The International Association of Online Engineering (IAOE) has organized a Special Interest Group for VISIR (SIG VISIR) [16] to be the first approach towards the community concept.

Page 43: VISIR INSTALLATION & START-UP GUIDE V.1

[43]

REFERENCES [1] Electrical and Computer Engineering Department of Spanish University for Distance Education (UNED). Retrieved, January 30, 2011 from http://www.ieec.uned.es/ . [2] VISIR webpage at Bleking Institute of technology. Retrieved, January 30, 2011 from http://www.bth.se/tek/asb.nsf/0/cccfd186b0e24c0dc125722200271db8?OpenDocument. [3] VISIR - Software Development and Installation webpage. Retrieved, January 30, 2011 from http://svn.openlabs.bth.se/trac. [4] PCI eXtensions for Instrumentation (PXI). Retrieved, January 30, 2011 from http://www.pxisa.org/. [5] LXI Consortium. Retrieved, January 30, 2011 from http://www.lxistandard.org/. [6] History of GPIB. Retrieved, January 30, 2011 from http://zone.ni.com/devzone/cda/tut/p/id/3419. [7] National Instruments – Test and Measurements. Retrieved, January 30, 2011 from http://www.ni.com/. [8] PC/104 Consortium. Retrieved, January 30, 2011 from http://www.pc104.org/. [9] I2C-Bus: What’s that?. Retrieved, January 30, 2011 from http://www.i2c-bus.org/. [10] Licenses – GNU project – Free software. Retrieved, January 30, 2011 from http://www.gnu.org/licenses/. [11] IVI Foundation. Retrieved, January 30, 2011 from http://www.ivifoundation.org/. [12] VISA Specifications. Retrieved, January 3, 2011 from http://www.ivifoundation.org/specifications/default.aspx. [13] NI LabVIEW – Improving the productivity of Engineers and Scientists. Retrieved, January 30, 2011 from www.ni.com/labview/. [14] NI Device Drivers released August 2010. Retrieved, January 30, 2011 from http://joule.ni.com/nidu/cds/view/p/id/2064/lang/en. [15] The Apache HTTP Server Project. Retrieved, January 30, 2011 from http://httpd.apache.org/. [16] Hypertext Preprocessor. Retrieved, January 30, 2011 from http://www.php.net/. [17] MySQL: The world most popular database. Retrieved, January 30, 2011 from http://www.mysql.com/. [18] PHP Template Engine- Smarty. Retrieved, January 30, 2011 from http://www.smarty.net/. [19] Wikiformating. Retrieved, January 30, 2011 from http://svn.openlabs.bth.se/trac/openlabsweb/wiki/WikiFormatting