Biomedical Workbench in LabVIEW Biomedical Toolkit contains many applications for logging, analyzing biosignals. You could easily finish basic biomedical applications without any LabVIEW programming. However, how can you do when you would like to change the processing part of some apps? This article would be of help to you.
Biosignal Logger allows you to generate a virtual channel using a customized VI when logging. HRV Analyzer also allows you to add a customized VI for analysis. This article is to introduce how to add a customized VI for the two applications.
The VI you added to the Biosignal Logger or HRV Analyzer must have the same connect pane with the corresponding template VIs. The template VIs are in National Instruments\Biomedical Toolkit\Workbench\data. “biosig_log_process_template.vi” is for Biosignal Logger, and “HRV Analyzer Template.vi” is for HRV Analyzer. It is recommended that you copy the template VI to another folder and edit it.
For “biosig_log_process_template.vi”, signal in is the input data vector, with each element as the current value for a channel. The array size of signal in equals the number of channels. signal out is the current value of the virtual channel after processing, which is a scalar. You should add your processing VIs in the blue box of the block diagram. If your algorithm needs some initialization work, you should do it in the “True” case of the case structure controlled by initialize?(F).
The following block diagram is an example for creating a virtual channel by adding the RMS values of two input channels. The current values for two channels are firstly indexed from the input data vector. Then the RMS values are calculated by Biosignal RMS VI. The results are then added and output.
For “HRV Analyzer Template.vi”, RR interval and Detrended RR interval are the original and detrended value of current RR intervals. Your processing VIs should be in the “False” case of the case structure.
If your processing codes include non-basic LabVIEW VIs, such as VIs from Biomedical Toolkit or other toolkits, or any other customized subVIs, you need to build a source distribution to add the customized VI to Biosignal Logger or HRV Analyzer.
In the previous example for Biosignal Logger, Biosignal RMS VI in Biomedical Toolkit is used to calculate the RMS value. Thus, we need to build a source distribution by following steps:
For Biosignal Logger, complete the following steps to add a customized VI:
For HRV Analyzer, complete the following steps to add a customized VI: