Client Server Architecture based Embedded Data Acquisition ... · Client Server Architecture based...

1
Client Server Architecture base Client Server Architecture base Jigneshkumar J. Patel * , Rachan Institute for Plasm INTRODU INTRODU The data acquisition system is designed on embedded PC104 platform Single Board Computer (SBC) with ru MSPS Analog to Digital Converters with on board FIFO memory for each channel. The digital control and P MSPS Analog to Digital Converters with on board FIFO memory for each channel. The digital control and P on Complex Programmable Logic Device (CPLD). The system has provision of software, manual as well as isolated remote trigger option. The Client Server acquisition for basic plasma physics experiments. The software application has features of remote settings acquisition for basic plasma physics experiments. The software application has features of remote settings hardware platform can be configured to be used in different way according to the physics experiment requirem detailed hardware and software design, development and testing results are discussed in the paper. Block Diagram System Diagram Block Diagram IA ADC Driver AD8041 FIFO IDT7208 CH 1 System Diagram Ethernet Optical IA AD524 AD8041 & ADC AD9220 IDT7208 & Digital Drivers Ext TRG and CLK CH 2 Client Application on Desktop Machine Local Area Network (LAN) Optical Isolation PC104 Bus Interface CPLD XC95108 CH 3 Ethernet Single Board Computer PCM3353F Network Interface CH 4 CH 5 Server Application Mixed Signal Acquisition Hardware Block Diagram of Embedded DAQ System (5 Channels) Embedded Data Acquisition System on PC104 PCM3353F CH 5 Basic System Block Diagram Signal Conditioning Electronics Embedded Data Acquisition System on PC104 Process (clk2) Process ( trig VHDL Program Logic All embedded control logic of hardware is implemented If (clk2’ event and clk2 = ‘1’) then count := count + 1 ; end process Y N If ( trigger ’ and trigger then If ( trigger_a then Y N All embedded control logic of hardware is implemented in CPLD using VHDL. The main implemented components are as mentioned below PC104 address and data decoder. ADC clock logic and FIFO write and read logic. If count = count_var then count := “00000” ; Y N then start_wr_tr Y N ADC clock logic and FIFO write and read logic. Clock divider and sampling rate selection logic. Mode selection and flag status monitoring logic. Clock Divider Logic count := “00000” ; clock <= not clock ; end process If ( ffa = ‘0’ start_wr_tr Y N --For clock divider process(clk2) variable count : std_logic_vector (6 downto 0) := "0000000"; --To start and stop the ADC clock in trigger mode process(trigger,ffa) begin Auto Mode Wri end proce := "0000000"; begin if(clk2'event and clk2 = '1')then count := count + 1; if count = count_var then count := "0000000"; clock <= not clock; begin if (trigger 'event and trigger = '0')then if(trigger_act = '0')then start_wr_tr <= '0'; end if; end if; if (ffa = '0')then Software Development clock <= not clock; end if; end if; end process; if (ffa = '0')then start_wr_tr <= '1'; end if; end process; VHDL Code Software Development The software development is divided in main tw which are exchanged between server and client PC104 Address decoding The Server application runs on the embed hardware platform and it mainly controls Server Application PC104 Address Decoding 0x306,0x308,0x30A, 0x30C, 0x30E 16 bit read cycle for each channel data read out (Read) 0x301 FIFO Reset (write) hardware parameters of the module. Server application generates the con commands and reads the status of hardware through PC104 bus. 0x301 FIFO Reset (write) 0x302 FIFO Clock Enable (write) 0x303 Trigger Status (Read) 0x304 Trigger Mode (write) 0x305 Clock variable (write) hardware through PC104 bus. The connections details and the comma received from the client application displayed in the text boxes in the se application GUI. Software Architecture 0x305 Clock variable (write) 0x309 Half Flag Status (Read) application GUI. The client server architecture is the most suitable for this type of application, as it requires minimum Software Architecture this type of application, as it requires minimum installations at client side and uses local area network for data exchange. The software development is done in National Instrument’s LabWindows/CVI, which is ANSI C based development environment on windows platform which also provides good support for graphical user interface (GUI) development. interface (GUI) development. The LabWindows/CVI TCP Support Library provides easy-to-use callback functions to create TCP server and client applications. The Callback functions provide the mechanism for The Callback functions provide the mechanism for receiving notification of connection initiation, connection termination, and data availability. GUI of Server Application Embedded Hardware System Server RegisterTCPServerEx Client ConnectToTCPServerEx TCP Server Callback TCP_CONNECT: /*client is connecting*/ TCP Client Callback TCP_DATAREADY TCP TCP_DATAREADY: ServerTCP Read TCP_DISCONNECT: /*client disconnected*/ ClientTCP Read TCP_DISCONNECT: /*server disconnected*/ ServerTCPWrite ClientTCPWrite UnregisterTCPServerEx DisconnectFromTCPServer LabWindows/CVI TCP Support functions PCaPAC2012 , Dec 04-07, 2012 ed Embedded Data Acquisition System on PC104 ed Embedded Data Acquisition System on PC104 na Rajpal, Praveena Kumari, P.K. Chattopadhyay and R. Jha ma Research, Gandhinagar, Gujarat, India *[email protected] UCTION UCTION unning Windows XP Embedded operating system. This is a multi channel system which consists of 12 Bit, 10 PC104 bus interface logic are implemented using Very High Speed Hardware Description Language (VHDL) PC104 bus interface logic are implemented using Very High Speed Hardware Description Language (VHDL) based application is developed using National Instrument CVI for remote continuous and single shot data of sampling rate, selection of operation mode, data analysis using plot and zoom features. The embedded of sampling rate, selection of operation mode, data analysis using plot and zoom features. The embedded ment by different top level software architecture. The system is tested for different physics experiments. The Basic Hardware Features Embedded hardware platform with on board analog, digital, processing and communication blocks. Consists five channels of high speed pipeline ADC channels with precision instrumentation amplifier Basic Hardware Features Consists five channels of high speed pipeline ADC channels with precision instrumentation amplifier and high speed ADC driver. Precision Instrumentation Amplifier AD524 with 25MHz GBP. 160 MHz, Rail to Rail Amplifier AD8041 as a ADC Driver. Single ended and differential input signal option. Single ended and differential input signal option. 12 Bit, 10 MSPS pipeline ADC AD9220AR. On board 64 KB FIFO (First In First Out) memory for each channel System timing, control logic and PC104 bus interface are implemented in CPLD using VHDL. CPLD interfaced with on board single board computer (SBC) by PC104 bus. Two mode of operations (1) Single Shot (2) Continuous SBC runs on Windows XP Embedded operating system installed on CF (Compact Flash) card with Ethernet and USB Connectivity. Ethernet and USB Connectivity. External optically isolated trigger and clock option. Designed and assembled in industry standard 6U, 16T enclosure. gger , ffa) Process (ffa) Process (p306r_a) Process (p301w) ’ event r = ‘0’) act =‘0’ ) Y N If ( ffa = ‘0’) then start_rd <= ‘0’ ; Y N If ( p306r_a = ‘0’) then Y N encha <= ‘0’ ; rda <= ‘1’ ; If ( p301w = ‘0’ ) then Y N r <= ‘0’ ; Y N If ( trigger_act = ‘0’ ) then Y start_rd <= ‘1’ ; end process encha <= ‘0’ ; rda <= ‘0’ ; rda <= ‘1’ ; encha <= ‘1’ ; Channel Read Logic If pc104data = “00010001” then N Y reset <= ‘0’ ; If pc104data = “00010010” then N reset <= ‘1’ ; Y ’ ) then r <= ‘1’ ; Y end process Flag Monitor and Read Logic Channel Read Logic end process N Reset Logic te Logic ess VHDL Program Logic Flow Charts wo parts server application and client application. The custom protocol is designed using the data packets, application to establish the operation, control and status monitoring of the embedded hardware. dded s the The client application runs on any networked computer and it remotely controls the embedded data acquisition system. Client Application ntrol the It supports plotting of all channels and some basic data analysis utilities like zoom, restore and plotting from files. The selected data acquisition parameters are embedded in the data packets with the starting string number 91followed by the data parameter, which are sent to server application. ands are erver number 91followed by the data parameter, which are sent to server application. After completion of the data acquisition, the client application receives the data of each channel which is stored in the file based database for particular defined shot number. The TCP connection details, the proper file reception and the acquired data are shown in GUI. GUI of Client Application Embedded DAQ System Institute for plasma research, Gandhinagar, India-382428

Transcript of Client Server Architecture based Embedded Data Acquisition ... · Client Server Architecture based...

Page 1: Client Server Architecture based Embedded Data Acquisition ... · Client Server Architecture based Embedded Data Acquisition System on PC104 Jigneshkumar J. Patel *, Rachana Institute

Client Server Architecture based Embedded Data Acquisition System on PC104Client Server Architecture based Embedded Data Acquisition System on PC104Jigneshkumar J. Patel*, Rachana

Institute for Plasma Research,

INTRODUCTIONINTRODUCTION

The data acquisition systemis designed on embedded PC104 platformSingle Board Computer (SBC) withrunningMSPSAnalogto Digital Converterswith on boardFIFO memoryfor eachchannel. Thedigital controlandPCMSPSAnalogto Digital Converterswith on boardFIFO memoryfor eachchannel. Thedigital controlandPCon Complex Programmable Logic Device (CPLD).The systemhas provision of software, manual as well as isolated remote trigger option. TheClient Serveracquisitionfor basicplasmaphysicsexperiments. The softwareapplicationhasfeaturesof remotesettingsacquisitionfor basicplasmaphysicsexperiments. The softwareapplicationhasfeaturesof remotesettingshardware platformcan be configured to be used in different way according to the physics experimentrequirementdetailed hardware and software design, development and testing results are discussed in the paper.

Block DiagramSystem Diagram Block Diagram

IA

ADC Driver

AD8041

FIFO

IDT7208

CH 1

System Diagram

Ethernet

Optical

IA

AD524

AD8041

&

ADC AD9220

IDT7208

&

Digital Drivers Ext TRG and

CLK

CH 2

Client Application on Desktop Machine

Local Area Network (LAN)

Optical

Isolation

PC104 Bus Interface

CPLD XC95108

CH 3

Ethernet

Single Board Computer

PCM3353F

Network

Interface

CH 4

CH 5

Server Application

Mixed SignalAcquisition Hardware

Block Diagram of Embedded DAQ System (5 Channels)

Embedded Data Acquisition System on PC104

PCM3353FCH 5

Basic System Block Diagram

Signal ConditioningElectronics

Embedded Data Acquisition System on

PC104

Process (clk2) Process ( trigger ,

VHDL Program Logic

All embedded control logic of hardware is implemented If (clk2’ event and

clk2 = ‘1’) then

count := count + 1 ;end process

Y

N If ( trigger ’ event and trigger = ‘0’)

then

If ( trigger_actthen

Y

NAll embedded control logic of hardware is implemented in CPLD using VHDL. The main implemented components are as mentioned below � PC104 address and data decoder.� ADC clock logic and FIFO write and read logic.

If count = count_var then

count := “00000” ;

Y

N

then

start_wr_tr

Y

N

� ADC clock logic and FIFO write and read logic. � Clock divider and sampling rate selection logic.� Mode selection and flag status monitoring logic.

Clock Divider Logic

count := “00000” ; clock <= not clock ;

end process

If ( ffa = ‘0’ ) then

start_wr_tr

Y

N

--For clock dividerprocess(clk2)variable count : std_logic_vector (6 downto 0) := "0000000";

--To start and stop the ADC clock in trigger modeprocess(trigger,ffa)begin

Auto Mode Write Logic

end process

:= "0000000";begin

if(clk2'event and clk2 = '1')thencount := count + 1;if count = count_var then

count := "0000000";clock <= not clock;

beginif (trigger 'event and trigger = '0')then

if(trigger_act = '0')thenstart_wr_tr <= '0';

end if;end if;if (ffa = '0')then Software Developmentclock <= not clock;

end if;end if;

end process;

if (ffa = '0')thenstart_wr_tr <= '1';

end if;end process;

VHDL Code

Software Development

The software development is divided in main two parts server application and client application. The custom protocol is desigwhich are exchanged between server and client application to establish the operation, control and status monitoring of the em

PC104 Address decoding

VHDL Code

� The Server application runs on theembeddedhardware platformand it mainly controls

Server Application

PC104 Address Decoding

0x306,0x308,0x30A,0x30C, 0x30E

16 bit read cycle for each channel data read out (Read)

0x301 FIFO Reset (write)

hardware parameters of the module.� Server application generates thecontrol

commands and reads the status ofhardwarethroughPC104bus.0x301 FIFO Reset (write)

0x302 FIFO Clock Enable (write)

0x303 Trigger Status (Read)

0x304 Trigger Mode (write)

0x305 Clock variable (write)

hardwarethroughPC104bus.� The connections details and thecommands

received from the client applicationdisplayed in the text boxes in theserverapplicationGUI.

Software Architecture

0x305 Clock variable (write)

0x309 Half Flag Status (Read)applicationGUI.

� The client server architecture is the most suitable forthis type of application, as it requires minimum

Software Architecture

this type of application, as it requires minimuminstallations at client side and uses local area networkfor data exchange.

� The software development is done in National� The software development is done in NationalInstrument’s LabWindows/CVI, which is ANSI Cbased development environment on windows platformwhich also provides good support for graphical userinterface(GUI) development.interface(GUI) development.

� The LabWindows/CVI TCP Support Library provideseasy-to-use callback functions to create TCP serverand client applications.

� The Callback functions provide the mechanismfor� The Callback functions provide the mechanismforreceiving notification of connection initiation,connection termination, and data availability. GUI of Server Application

Embedded Hardware SystemServer

RegisterTCPServerEx

Client

ConnectToTCPServerEx

TCP Server Callback

TCP_CONNECT:

/*client is connecting*/

TCP Client Callback

TCP_DATAREADY

TCP

/*client is connecting*/

TCP_DATAREADY:

ServerTCP Read

TCP_DISCONNECT:

/*client disconnected*/

TCP_DATAREADY

ClientTCP Read

TCP_DISCONNECT:

/*server disconnected*/

ServerTCPWrite ClientTCPWrite

UnregisterTCPServerEx DisconnectFromTCPServer

LabWindows/CVI TCP Support functions

PCaPAC2012 , Dec 04-07, 2012

Client Server Architecture based Embedded Data Acquisition System on PC104Client Server Architecture based Embedded Data Acquisition System on PC104Rachana Rajpal, Praveena Kumari, P.K. Chattopadhyay and R. Jha

Institute for Plasma Research, Gandhinagar, Gujarat, India*[email protected]

INTRODUCTIONINTRODUCTION

runningWindows XP Embedded operating system. This is a multi channel systemwhich consists of 12 Bit, 10PC104businterfacelogic areimplementedusingVery High SpeedHardwareDescriptionLanguage(VHDL)PC104businterfacelogic areimplementedusingVery High SpeedHardwareDescriptionLanguage(VHDL)

based application is developed using National Instrument CVI for remote continuous and single shot dataof samplingrate,selectionof operationmode,dataanalysisusingplot andzoomfeatures. The embeddedof samplingrate,selectionof operationmode,dataanalysisusingplot andzoomfeatures. The embedded

requirementby different top level software architecture. The systemis tested for different physics experiments. The

Basic Hardware Features

� Embedded hardware platform with on board analog, digital, processing and communication blocks.� Consists five channels of high speed pipeline ADC channels with precision instrumentation amplifier

Basic Hardware Features

� Consists five channels of high speed pipeline ADC channels with precision instrumentation amplifier and high speed ADC driver.

� Precision Instrumentation Amplifier AD524 with 25MHz GBP.� 160 MHz, Rail to Rail Amplifier AD8041 as a ADC Driver.� Single ended and differential input signal option.� Single ended and differential input signal option.� 12 Bit, 10 MSPS pipeline ADC AD9220AR.� On board 64 KB FIFO (First In First Out) memory for each channel� System timing, control logic and PC104 bus interface are implemented in CPLD using VHDL.� System timing, control logic and PC104 bus interface are implemented in CPLD using VHDL.� CPLD interfaced with on board single board computer (SBC) by PC104 bus.� Two mode of operations (1) Single Shot (2) Continuous� SBC runs on Windows XP Embedded operating system installed on CF (Compact Flash) card with

Ethernet and USB Connectivity.Ethernet and USB Connectivity.� External optically isolated trigger and clock option.� Designed and assembled in industry standard 6U, 16T enclosure.

Process ( trigger , ffa) Process (ffa)Process (p306r_a) Process (p301w)

If ( trigger ’ event and trigger = ‘0’)

trigger_act =‘0’ )

Y

N

If ( ffa = ‘0’) then

start_rd <= ‘0’ ;

Y

NIf ( p306r_a = ‘0’) then

Y

N

encha <= ‘0’ ;rda <= ‘1’ ;

If ( p301w = ‘0’ ) then

Y

N

start_wr_tr <= ‘0’ ;

Y

NIf ( trigger_act = ‘0’ )

then

Y

start_rd <= ‘1’ ;

end process

encha <= ‘0’ ;rda <= ‘0’ ;

rda <= ‘1’ ;encha <= ‘1’ ;

Channel Read Logic

If pc104data = “00010001” then NY

reset <= ‘0’ ;If pc104data =

“00010010” then

N

reset <= ‘1’ ;Y

= ‘0’ ) then

start_wr_tr <= ‘1’ ;

Y

end process

Flag Monitor and Read Logic

Channel Read Logic

end process

N

Reset Logic

Auto Mode Write Logic

end process

VHDL Program Logic Flow Charts

The software development is divided in main two parts server application and client application. The custom protocol is designed using the data packets, which are exchanged between server and client application to establish the operation, control and status monitoring of the embedded hardware.

embeddedcontrols the

� The client application runs on any networked computer and it remotely controls the embeddeddataacquisitionsystem.

Client Application

controlthe

dataacquisitionsystem.� It supports plotting of all channels and some basic data analysis utilitieslike zoom, restore and

plotting fromfiles.� The selected data acquisition parameters are embedded in the data packets with the starting string

number‘91’ followedby thedataparameter,whicharesentto serverapplication.commands

areserver

number‘91’ followedby thedataparameter,whicharesentto serverapplication.� After completion of the data acquisition, the client application receivesthe data of each channel

which is stored in the file based database for particular defined shot number.� The TCP connection details, the proper file reception and the acquired data are shown in GUI.

GUI of Client Application

Embedded DAQ System

Institute for plasma research, Gandhinagar, India-382428