From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-03-2018 12:15 AM
Hi
I built 8 channel real time EMG data acquisition hardware connecting to LabVIEW interface, in real time filtering low pass and high pass point by point work properly but band stop doesn't work even for 1 channel, i change band stop to dfd iir comb filter it work great for 1 to maybe 3 channel but when i apply it to 8 channel real time acquisition get very slow! i think this block most modify for 8 channel but i don't know how, i attached my block for every 8 channel:
01-03-2018 01:15 AM
01-03-2018 01:39 AM
Thanks for reply
I attached basic vi , this vi acquisition get 8 channel data with 1000 sample per second but when i apply notch filter it doesn't work and vi become very slow.
01-03-2018 02:22 AM
Hi saleh,
would you mind to clean up your VI first?
There are some "interesting" things in your VI, like:
- why do you write a value to a chart, just to write a different value to the same chart using a local variable after that?
- why do you write all those "zero" values to your charts when the channel is switched off?
- why are there controls without labels?
- are you sure about your conversion from (array of) U8 to U32 values after the VISARead operation?
- what is the sampling frequency? Is it really 1000Hz as you have set for your filters?
- why don't you minimize usage of case structures per channel? Why do you need 8 (?) case structures per channel?
Why don't you use arrays instead of copying the very same code again and again?
01-03-2018 02:48 AM
1-Because of hardware restriction i can send 500 time buffer to labview in 1 second,so i send 2 sample per 2 millisecond, finally i concatenating 2 sample together(it isn't serial protocol)
2-I have no idea when user off channel, is write zero to chart make problem? or I can do something else?
3-Witch controls do you mean?
4-Yes it is true, i clean some other calculation for security but it is real 24bit adc and work fine.
5-Sampling is exactly 1000 Hz , it work fine for low and high pass filter
6-How can i minimize case structure?
I have another problem that when i set sampling to 250Hz it work great in my pc and other weak pc ,but when i set sampling to 500 or 1000 it get slow in weaker pc.
01-03-2018 02:56 AM
Hi saleh,
1. "500 time buffer in 1 second" suggests just 500Hz sample rate…
2. You could prohibit any plotting at all when the channel is off. You could even prohibit any data processing (aka filtering) when the channel is off…
3. Several boolean buttons have no label!
4. When you use a 24bit ADC you should multiply with 65536 and 256 (instead of 65535 and 255)…
5. See point 1.
6. By grouping them better…
I have another problem that when i set sampling to 250Hz it work great in my pc and other weak pc ,but when i set sampling to 500 or 1000 it get slow in weaker pc.
Well, you have two simple choices:
- limit the processing needs of your algorithm
- only use "better" computers able to run your algorithm
01-03-2018 03:44 AM
01-03-2018 11:21 AM
I would either clean up the string parsing or replace it (see image)
01-05-2018 05:32 AM
Hi GredW
Thanks for your reply and i modify my code but the notch problem still remain, lowpass and highpass filter work properly but notch filter doesn't work, also i am sure sampling is 1000Hz
01-05-2018 06:04 AM