You should definitely be using either SPCSampleStatistics from the SPC Toolkit or StdDev from the Advanced Analysis Library.
I'm not sure what you mean when you say that you cannot use SPCSampleStatistics because of the extra parameters you do not need "breaks" your program, but what might be possible is that you did not declare any variables for skewness or kurtosis to pass into the function by reference, which would cause a compilation error. Even if you don't need these values it will not hurt for you to just declare the variables and pass their addresses to the function. If you call this function properly as I am describing then you should not see any problems.
Also I am not sure what you mean when you say that the StdDev function is not successful. This function
works almost identically to SPCSampleStatistics in terms of creating variables and passing their addresses to the function. Again, just make sure that you are calling the function properly.
As a last resort solution, you should be also able to create a function on your own that calculates the standard deviation with just simple mathematical operators, albeit that this can get quite complex if you expect to handle all situations properly. This is why we created the two functions mentioned above, because we have already done this for you.
Again, just make sure that you are properly calling the functions and passing in all of the parameters correctly by reference or by value and you should be alright.
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask