FlexLogger

cancel
Showing results for 
Search instead for 
Did you mean: 

Standard deviation calc with flexlogger plugin

Solved!
Go to solution

Similar to 'RMS' and 'Mean' formula channels, I'm trying to create one that shows the standard deviation of a mapped channel.

 

Some success, I can create a plugin for one but ideally I want to be able to have, say, 5 channels each one mapped to an input.  The 'Process.vi' is successfully retrieving an array of 1 channel but if I create more than one in the 'Initialise' vi I can't get any output from any channels.

 

Working plugin attached, grateful to anyone who can help me do this for more than one channel, otherwise I would have to create an instance of the plugin for each channel I want to show the SD of.

 

The dynamic channel example in the manual is kind of complex for me.  I'm happy to hard code an array of, say 10 channels, and pause the ones I don't map.

 

Or if the solution I've got is the most sensible to use, just creating a new instance per channel tell me.

 

thanks

0 Kudos
Message 1 of 6
(214 Views)

Here's an updated Plugin based on the "Dynamic Channel Number" described in the FlexLogger Plugin Development Kit Manual.

 

Hope this helps,

Brad

0 Kudos
Message 2 of 6
(190 Views)

Thanks Brad, this solution works OK for one channel but if I increment the channel count an error appears which unfortunately I can't see in Flexlogger.  This is similar behaviour to my own attempts.

0 Kudos
Message 3 of 6
(177 Views)

It works for me. I am using FlexLogger 2021 R1 (release Dec 2020). I attached a video of how I am using it, so let me know if you are doing something differently. I also modified the Process VI as shown below:

Brad_0-1613598620316.png

I was getting timestamp errors when I was trying to use the t0 from the waveform, so see if this helps.

0 Kudos
Message 4 of 6
(172 Views)
Solution
Accepted by topic author staylor77

Thanks for this - I've persevered and get the same as you.  Pausing and unpausing a channel made a difference.  The calculated output is sampled at a lower rate so I'll have to deal with this to stretch it back, but I can take it from here.  Will also have to better understand the setting of the window over which the SD is presented - seems to be input channel rate / 10 for now.

0 Kudos
Message 5 of 6
(166 Views)

Try calling "FlexLogger\SDK\PluginSDK.lvlibp\PEFClasses\SDK\Plugin\Set Plugin Timing.vi" in the Initialize.vi and set the timing to On Data Ready, or Periodic to better control when the Process.vi is called.

0 Kudos
Message 6 of 6
(126 Views)