Previous topic

RadioControl_Group

Next topic

rand

This Page

Rainflow_BatchΒΆ

Executes a rainflow counting function. The results are displayed in a template.

hPage = Rainflow_Batch(obj)

Return Value

hPage is the page handle. In case of an error hPage is 0.

Parameters

obj

obj is an object with the following elements:

Element Descriptiion Values
obj.rmXY data matrix with two colums [x,y]
obj.ssTemplate Template name GetRootDirectory() + “addin\rs_rainflow\rainflow1.ipw”;
obj.ssUseThreshold Use threshold “0” oder “1”;
obj.ssThreshold Threshold value “0.0”;
obj.ssCols Number of columns of the rainflow matrix “20”;
obj.ssRows Number of rows of the rainflow matrix “20”;
obj.ssSaveData Save the rainflow data “0” or “1”;
obj.ssAddZeros Add zero at the beginning and end “0” or “1”;
obj.ssUseNormalize Normalize data “0” or “1”;
obj.ssNormalizeValue Normalize value e.g. “100”;
obj.ssCombineCycles Combine half cycles “0” or “1”;
def Rainflow_Test()
{
    obj = obj_create();
    x = [1:1000]'; // column vector
    y = rand(1000, 1) // column vector
    obj.rmXY = [x,y];
    obj.ssTemplate = GetRootDirectory() + "addin\rs_rainflow\rainflow1.ipw";
    obj.ssUseThreshold = "0";
    obj.ssThreshold = "0.0";
    obj.ssCols = "20";
    obj.ssRows = "20";
    obj.ssSaveData = "0";
    obj.ssAddZeros = "1";
    obj.ssUseNormalize = "1";
    obj.ssNormalizeValue = "100";
    obj.ssCombineCycles = "1";
    hDoc = Rainflow_Batch(obj);
    if (hDoc != 0) {
        ssPNGSave = GetUserDirectory() + "rain";
        hvPage = DocGetAllPages(hDoc)
        nPage = len(hvPage);
        for (i in 1:nPage) {
            ssFilename = sprintf("%s-%d.png", ssPNGSave, i);
            PageSaveAsBitmapEx(hvPage[i], ssFilename, "PNG", 300);
        }
        DocDestroy(hDoc); // close document
    }
    return TRUE;
}

Comment

The rainflow addin must be loaded.

History

Version Description
5.10.1 New.

id-1184723