Design and Implementation of a LabVIEW based Computer Control for - - PowerPoint PPT Presentation

design and implementation of a labview based computer
SMART_READER_LITE
LIVE PREVIEW

Design and Implementation of a LabVIEW based Computer Control for - - PowerPoint PPT Presentation

Design and Implementation of a LabVIEW based Computer Control for EPR Instrumentation Diploma Thesis Defense Matthias Kolja Miehl October 22, 2010 at 2:30 pm Milwaukee, Wisconsin, USA Medical College of Wisconsin MACC Fund Research Center


slide-1
SLIDE 1

Design and Implementation of a LabVIEW based Computer Control for EPR Instrumentation

Diploma Thesis Defense Matthias Kolja Miehl October 22, 2010 at 2:30 pm

Milwaukee, Wisconsin, USA Medical College of Wisconsin MACC Fund Research Center Room L3075

slide-2
SLIDE 2

LabVIEW based Computer Control

◮ Control and acquisition framework ◮ Easily change hardware ◮ All experiments in one application

2 / 72

slide-3
SLIDE 3

LabVIEW based Computer Control

◮ Control and acquisition framework ◮ Easily change hardware ◮ All experiments in one application

Figure: L-Band spectrometer at MCW’s Biophysics Research Department

3 / 72

slide-4
SLIDE 4

Contents

1

Introduction

2

Concept

3

Implementation

4

Test

5

Summary and Vision

slide-5
SLIDE 5

Contents

1

Introduction

2

Concept

3

Implementation

4

Test

5

Summary and Vision

slide-6
SLIDE 6

LabVIEW based Computer Control Introduction Motivation

Need MCW Research:

◮ New experiments ◮ Different spectrometers ◮ Changing Hardware

6 / 72

slide-7
SLIDE 7

LabVIEW based Computer Control Introduction Motivation

Need MCW Research:

◮ New experiments ◮ Different spectrometers ◮ Changing Hardware

Situation Use of separate programs for

◮ each experiment, ◮ each spectrometer, and ◮ were rewritten for new instruments.

7 / 72

slide-8
SLIDE 8

LabVIEW based Computer Control Introduction Motivation

Need MCW Research:

◮ New experiments ◮ Different spectrometers ◮ Changing Hardware

Situation Use of separate programs for

◮ each experiment, ◮ each spectrometer, and ◮ were rewritten for new instruments.

Problem

◮ Labor and time intensive tasks ◮ Reduction of actual research time

8 / 72

slide-9
SLIDE 9

LabVIEW based Computer Control Introduction Motivation

Motivation Increase the actual research time by reducing redundancy.

◮ Experiment implementation ◮ Changing hardware

9 / 72

slide-10
SLIDE 10

LabVIEW based Computer Control Introduction Motivation

Motivation Increase the actual research time by reducing redundancy.

◮ Experiment implementation ◮ Changing hardware

Goal Versatile framework:

◮ All experiments ◮ Every spectrometer

10 / 72

slide-11
SLIDE 11

LabVIEW based Computer Control Introduction Related Work

Existing Approaches

◮ WinEPR ◮ EWWin ◮ SpecMan4EPR

11 / 72

slide-12
SLIDE 12

LabVIEW based Computer Control Introduction Related Work

Existing Approaches

◮ WinEPR ◮ EWWin ◮ SpecMan4EPR

MCW’s Requirements

◮ Exchange of instruments ◮ Storing experiment settings ◮ Easy extension by customer

12 / 72

slide-13
SLIDE 13

Contents

1

Introduction

2

Concept

3

Implementation

4

Test

5

Summary and Vision

slide-14
SLIDE 14

LabVIEW based Computer Control Concept Key Requirements

Key Requirements

◮ All experiments in one application ◮ Instruments easily exchangeable ◮ Maintainability and extendability ◮ 32 and 64-bit driver support

14 / 72

slide-15
SLIDE 15

LabVIEW based Computer Control Concept Overall Structure

Core of Main Appl. Instrument Driver Instrument ... ... 64-bit 64 or 32-bit Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware

Figure: Overall application structure (concept)

15 / 72

slide-16
SLIDE 16

Contents

1

Introduction

2

Concept

3

Implementation

4

Test

5

Summary and Vision

slide-17
SLIDE 17

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Core of Main Appl. Instrument Driver Instrument Client Tab Controls Multiple-Loop

  • Appl. Framework

Event Structure STM Server as EXE Module Hardware ... ... 64-bit EXE 64 or 32-bit EXE Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware Implementation Concept GPIB, LXI, ...

Figure: Overall application structure (implementation)

17 / 72

slide-18
SLIDE 18

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Core of Main Appl. Instrument Driver Instrument Client Tab Controls Multiple-Loop

  • Appl. Framework

Event Structure STM Server as EXE Module Hardware ... ... 64-bit EXE 64 or 32-bit EXE Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware Implementation Concept GPIB, LXI, ...

Figure: Overall application structure (implementation)

18 / 72

slide-19
SLIDE 19

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Figure: Tab control structure of the application

19 / 72

slide-20
SLIDE 20

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Figure: Tab control structure as the operator sees it

20 / 72

slide-21
SLIDE 21

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Core of Main Appl. Instrument Driver Instrument Client Tab Controls Multiple-Loop

  • Appl. Framework

Event Structure STM Server as EXE Module Hardware ... ... 64-bit EXE 64 or 32-bit EXE Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware Implementation Concept GPIB, LXI, ...

Figure: Overall application structure (implementation)

21 / 72

slide-22
SLIDE 22

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Figure: Main program event handler loop

22 / 72

slide-23
SLIDE 23

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Core of Main Appl. Instrument Driver Instrument Client Tab Controls Multiple-Loop

  • Appl. Framework

Event Structure STM Server as EXE Module Hardware ... ... 64-bit EXE 64 or 32-bit EXE Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware Implementation Concept GPIB, LXI, ...

Figure: Overall application structure (implementation)

23 / 72

slide-24
SLIDE 24

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Figure: Implementation of the main program’s parallel loop structure

24 / 72

slide-25
SLIDE 25

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Core of Main Appl. Instrument Driver Instrument Client Tab Controls Multiple-Loop

  • Appl. Framework

Event Structure STM Server as EXE Module Hardware ... ... 64-bit EXE 64 or 32-bit EXE Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware Implementation Concept GPIB, LXI, ...

Figure: Overall application structure (implementation)

25 / 72

slide-26
SLIDE 26

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Core of Main Appl. Instrument Driver Instrument Client Tab Controls Multiple-Loop

  • Appl. Framework

Event Structure STM Server as EXE Module Hardware ... ... 64-bit EXE 64 or 32-bit EXE Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware Implementation Concept GPIB, LXI, ...

Figure: Overall application structure (implementation)

26 / 72

slide-27
SLIDE 27

LabVIEW based Computer Control Implementation Overall Structure and Used Technologies

Core of Main Appl. Instrument Driver Instrument Client Tab Controls Multiple-Loop

  • Appl. Framework

Event Structure STM Server as EXE Module Hardware ... ... 64-bit EXE 64 or 32-bit EXE Exp. GUI ... Controls and Indicators Logic Internal Data Flow Inter-Process Communication Bus Hardware Abstraction Hardware Implementation Concept GPIB, LXI, ...

Figure: Overall application structure (implementation)

27 / 72

slide-28
SLIDE 28

LabVIEW based Computer Control Implementation Driver Management

Startup of Drivers Communication Main Appl. Driver 1 Driver 2 Driver 2

starts

text_based_variable.ini

Write port for each driver Read port from respective section

Main Appl. Driver 1 Driver 2 Driver 2

STM Port x Port y Port z x, y, z z y x

28 / 72

slide-29
SLIDE 29

LabVIEW based Computer Control Implementation STM

Advantages:

◮ Command-based

29 / 72

slide-30
SLIDE 30

LabVIEW based Computer Control Implementation STM

Advantages:

◮ Command-based ◮ Hides transport layer details

30 / 72

slide-31
SLIDE 31

LabVIEW based Computer Control Implementation STM

Advantages:

◮ Command-based ◮ Hides transport layer details ◮ Minimizes network traffic

31 / 72

slide-32
SLIDE 32

LabVIEW based Computer Control Implementation STM

Advantages:

◮ Command-based ◮ Hides transport layer details ◮ Minimizes network traffic ◮ Small overhead

32 / 72

slide-33
SLIDE 33

LabVIEW based Computer Control Implementation STM

Advantages:

◮ Command-based ◮ Hides transport layer details ◮ Minimizes network traffic ◮ Small overhead ◮ High throughput

33 / 72

slide-34
SLIDE 34

LabVIEW based Computer Control Implementation STM

Variant Data

34 / 72

slide-35
SLIDE 35

LabVIEW based Computer Control Implementation STM

Variant Data

Figure: Code of modified STM write function block

35 / 72

slide-36
SLIDE 36

LabVIEW based Computer Control Implementation STM

Variant Data

Figure: Code of modified STM write function block Figure: Code of modified STM read function block

36 / 72

slide-37
SLIDE 37

LabVIEW based Computer Control Implementation STM

Variant Data

Figure: Modified STM function blocks for writing and reading

37 / 72

slide-38
SLIDE 38

LabVIEW based Computer Control Implementation STM

Command-Based Communication Framework

Client/Main Appl. Server/Driver

Data Receiver Command/ Parameter Sender

Network Communication

Commands + Parameters Data + Status Information Command Parser Medium Priority Tasks High Priority Task

Figure: STM’s command-based communication framework

38 / 72

slide-39
SLIDE 39

LabVIEW based Computer Control Implementation Main Program and Driver Structure

STM

Main Program Medium Priority (Transmitter) Command Parser Medium Priority (Processor) High Priority Event Handler Transmitter Receiver Main Driver

STM STM D a t a Q u e u e M e d i u m P r i

  • r

i t y Q u e u e H i g h P r i

  • r

i t y Q u e u e STM STM M a i n Q u e u e

Figure: Parallel loop structure of main program and drivers

39 / 72

slide-40
SLIDE 40

LabVIEW based Computer Control Implementation Main Program and Driver Structure

Figure: Actual loop structure of driver

40 / 72

slide-41
SLIDE 41

LabVIEW based Computer Control Implementation Resulting Information Flow

STM Command GUI in Main Appl. Driver Instrument Instrument Bus

  • Event structure
  • Queue
  • Main loop
  • Transmitter loop
  • Command Parser
  • Queue
  • Medium Priority (Processor) loop
  • LabVIEW driver function block

STM Bus Command STM Parameter

Figure: Resulting information flow on instrument control change

41 / 72

slide-42
SLIDE 42

LabVIEW based Computer Control Implementation Usages

Goal: Relation between drivers and instruments

42 / 72

slide-43
SLIDE 43

LabVIEW based Computer Control Implementation Usages

Goal: Relation between drivers and instruments

Figure: Instrument control clusters on instrument panel

43 / 72

slide-44
SLIDE 44

LabVIEW based Computer Control Implementation Usages

usage instrument 1

selects uses

driver 1 instrument 2 driver 2 instrument 3 driver 2

  • r
  • r

Figure: Usage concept

44 / 72

slide-45
SLIDE 45

LabVIEW based Computer Control Implementation Usages

L-Band.CW sim.ini ; assignment of instrument to usage ; --------------------------------- ; usage = instrument name [config] stepper motor = "DS345(1)" signal = "DS345(2)" adc = "NI PCI-6024E"

45 / 72

slide-46
SLIDE 46

LabVIEW based Computer Control Implementation Usages

L-Band.CW sim.ini ; EXE names ; --------- ; instrument name = driver name [driver] DS345(1) = "srds345" DS345(2) = "srds345" N8241A = "n8241a" N8241A Option 330 = "n8241a" NI PCI-6024E = "ni pci-6024e"

46 / 72

slide-47
SLIDE 47

LabVIEW based Computer Control Implementation Usages

L-Band.CW sim.ini ; instrument resource names ; ------------------------- ; instrument name = resource name [resource] DS345(1) = "17" DS345(2) = "18" N8241A = "TCPIP0::169.254.1.20::inst0::instr" N8241A Option 330 = "TCPIP0::169.254.1.22::inst0::instr" NI PCI-6024E = "Dev1"

47 / 72

slide-48
SLIDE 48

LabVIEW based Computer Control Implementation Usages

L-Band.CW sim.ini ; default parameters ; ------------------ ; parameter_DataType = value [signal] frequency_Digital = 1.000000 amplitude_Digital = 3.000000 phase_Digital = 0.000000

  • ffset_Digital = 0.000000

amplitude unit_Ring = 1.000000 waveform_Ring = 1.000000 write wfm file_Path = "/C/temp/waveform.txt" [...]

48 / 72

slide-49
SLIDE 49

LabVIEW based Computer Control Implementation Usages

usage instrument 1

selects uses

driver 1 instrument 2 driver 2 instrument 3 driver 2

  • r
  • r

Figure: Usage concept

signal DS345

selects uses

sdrs345 N8241A n8241a N8241A, 330 n8241a

  • r
  • r

Figure: Usage implementation

49 / 72

slide-50
SLIDE 50

LabVIEW based Computer Control Implementation Hardware Abstraction

Goal: Select different instruments for a usage

Main Appl. Driver Instrument standardized STM commands instrument specific bus commands

Figure: Driver as hardware abstraction layer

50 / 72

slide-51
SLIDE 51

LabVIEW based Computer Control Implementation Hardware Abstraction

Figure: Driver’s command parser loop

51 / 72

slide-52
SLIDE 52

LabVIEW based Computer Control Implementation Hardware Abstraction

Figure: Driver’s high priority loop

52 / 72

slide-53
SLIDE 53

LabVIEW based Computer Control Implementation Implemented Experiment

Figure: CW experiment GUI Collection page

53 / 72

slide-54
SLIDE 54

LabVIEW based Computer Control Implementation Implemented Experiment

Figure: CW experiment GUI Parameters page

54 / 72

slide-55
SLIDE 55

LabVIEW based Computer Control Implementation Implemented Experiment

Figure: CW experiment GUI Patrick page

55 / 72

slide-56
SLIDE 56

LabVIEW based Computer Control Implementation Implemented Experiment

Figure: CW experiment GUI Varian page

56 / 72

slide-57
SLIDE 57

LabVIEW based Computer Control Implementation Implemented Experiment

Figure: CW experiment GUI Instrument panel

57 / 72

slide-58
SLIDE 58

Contents

1

Introduction

2

Concept

3

Implementation

4

Test

5

Summary and Vision

slide-59
SLIDE 59

LabVIEW based Computer Control Test Measurement Setup

Measurement Setup Sample : Spin label Microwave frequency : 1.908 GHz (L-Band) Microwave input power : 120 µW Center field : 675 G Sweep : 105 G, i.e. 622.5 G .. 727.5 G Number of averages : 5 Acquisition time : ≈ 5:30 min

59 / 72

slide-60
SLIDE 60

LabVIEW based Computer Control Test Results

Figure: Collection page after 2nd collection

60 / 72

slide-61
SLIDE 61

LabVIEW based Computer Control Test Results

Figure: Collection page after 3rd collection

61 / 72

slide-62
SLIDE 62

LabVIEW based Computer Control Test Results

Figure: Collection page after 4th collection

62 / 72

slide-63
SLIDE 63

LabVIEW based Computer Control Test Results

Figure: Collection page after 5th collection

63 / 72

slide-64
SLIDE 64

LabVIEW based Computer Control Test Results

Figure: Plot of full data.xls

64 / 72

slide-65
SLIDE 65

Contents

1

Introduction

2

Concept

3

Implementation

4

Test

5

Summary and Vision

slide-66
SLIDE 66

LabVIEW based Computer Control Summary and Vision 66 / 72

slide-67
SLIDE 67

LabVIEW based Computer Control Summary and Vision

Key Features

◮ Can run on all spectrometers ◮ Can implement all experiments ◮ Faster experiment implementation ◮ Improved modularity and flexibility ◮ 32 and 64-bit driver capability ◮ Multi-core processors and multi-threading capable

67 / 72

slide-68
SLIDE 68

LabVIEW based Computer Control Summary and Vision

Issues

◮ Improve thread allocation ◮ Decrease time it takes to display acquired data ◮ Emphasize the common basis of experiments

68 / 72

slide-69
SLIDE 69

LabVIEW based Computer Control Summary and Vision

Discoveries

◮ Shared variables work unreliable for some applications ◮ Module based concept for large projects ◮ STM with case structure to avoid polling for new messages

69 / 72

slide-70
SLIDE 70

LabVIEW based Computer Control Summary and Vision

Future Improvements

◮ Adaptive Signal Averaging Technique ◮ Technical Data Management Streaming (TDMS) ◮ Implement more drivers

70 / 72

slide-71
SLIDE 71

Any Questions?

slide-72
SLIDE 72

Many thanks for your attention!