**4.2. MATLAB-labview software integration**

The developed algorithm with MATLAB scripts was integrated inside Labview for real-time embedded set-up as shown in Figure 5. Labview front-panel and block diagrams were developed with inbuilt Labview math Scripts to run the MATLAB algorithm for the analysis of multicomponent signals. The use of Labview allows for ease of programming, and realtime deployment using the Labview real-time module described in section 4.1. Also, it provides a user friendly software interface for real-time processing of the fluorescence signals.

As shown in Figure 5, the sampled data produced by the spectrofluorometer system are preprocessed by the NI-DAQ Cards. These signals are then read by the embedded real-time software, analyze the signals and display the results in a user friendly manner. The user is prompted to enter the number of samples to be analyzed from the front-panel using the developed SVD-ARMA algorithm.

**Figure 5.** Block Diagram of the real-time set-up

in the programme development as subsequently described.

**Figure 4.** NI sbRIO-9642 for real-time hardware target

**4.2. MATLAB-labview software integration** 

developed SVD-ARMA algorithm.

Figure 4.

signals.

The NI sbRIO-9642 is identical in architecture to CompactRIO system, only in a single circuit board. Single-Board RIO hardware features a real-time processor and programmable FPGA just as with CompactRIO, and has several inputs and outputs (I/O) modules as shown in

System development involves graphical programming with Labview on the host Window computer, which is then downloaded and run on real-time hardware target. Since the algorithm has been developed with MATLAB scripts, an integrated approach was adopted

The developed algorithm with MATLAB scripts was integrated inside Labview for real-time embedded set-up as shown in Figure 5. Labview front-panel and block diagrams were developed with inbuilt Labview math Scripts to run the MATLAB algorithm for the analysis of multicomponent signals. The use of Labview allows for ease of programming, and realtime deployment using the Labview real-time module described in section 4.1. Also, it provides a user friendly software interface for real-time processing of the fluorescence

As shown in Figure 5, the sampled data produced by the spectrofluorometer system are preprocessed by the NI-DAQ Cards. These signals are then read by the embedded real-time software, analyze the signals and display the results in a user friendly manner. The user is prompted to enter the number of samples to be analyzed from the front-panel using the Generally, the developed algorithm with MATLAB scripts was integrated inside Labview for real-time embedded set-up as follows:

i. Pre-simulation of the MATLAB algorithm inside embedded MATLAB Simulink block: this requires re-structuring of the codes to be compatible for embedded Simulink implementation, and hence deployment inside Labview MathScript. Figure 7 shows the MATLAB Simulink blocks configuration with embedded MATLAB function together with cross-section of the algorithm. The DATA with time vector is prepared inside the workspace and linked to the model input. Figure 10 (a-f) shows the simulation results with experimental data described in section 5.

**Figure 6.** Lab view Block Diagram

**Figure 7.** Embedded MATLAB set-up for algorithm simulation

ii. Labview programming: Development of Labview front-panel and block diagram is as shown in Figure 4. In the block diagram programming, the Labview MathScript node is employed to integrate the MATLAB codes in the overall Labview programme. The script (Figure 8) invokes the MATLAB software script server to execute scripts written in the MATLAB language syntax

**Figure 8.** NI Labview MATLAB script nodes

436 MATLAB – A Fundamental Tool for Scientific Computing and Engineering Applications – Volume 1

**Figure 6.** Lab view Block Diagram

**Figure 7.** Embedded MATLAB set-up for algorithm simulation

iii. The integrated software interface is evaluated with the real-time fluorescence data collected from a spectrofluorometer.
