error of Nan

Hello, I'm trying to create a simple math problem in flash cs6.  That's what I have, but I get an error message 'not a number' nan in the total box.

I have 3 boxes of text with variables defined with the names of them and a box of dynamics with a like response variable name.  I also have a button which is label calculate which calculates the response after the 3 boxes have numbers in them which pushes the answer in the answer box.  This is what I have in the button

on (release) {}

answer = Number (firstnumber) + Number (secondnumber) / Number (thirdnumber) * 1.5;

}

I hope that makes sense, any help would be great.

Thank you

Some recommendations...

(1) do not use the variable property of the textfield object - it is not reliable.  Just refer to its text property by using the textfield instance name to acquire and assign the values.

(2) do not place the code 'on' objects - put it in the timeline panel instead where it is easier to find the code and the target objects.

btnName.onRelease = function() {}

Answer.Text = String (Number (secondnumber.text), (firstnumber.text) Number + Number (thirdnumber.text));

}

(3) make sure the textfields are single-line, multiline not.

Tags: Adobe Animate

Similar Questions

  • Unexplained error "NaN".

    Hello

    I was changing an existing script to customize for my application.  I'm running into an error that I do not understand:

    "Not enough parameters label were selected.

    See red text in the code below for in such cases.  Thanks for your help.

    ///////////////////////////////////////////////////////////////

    //

    Script of numbering batch (Actions) of the document (e.g., marking)

    by Thom Parker, WindJack Solutions, Inc.  October 2010

    www.windjack.com, www.pdfscripting.com

    Of Adobe Systems Inc., www.adobe.com

    //

    NOTE: This JavaScript code is designed only for use in a

    "" "" Action script (batch sequence). "" "  It will not work

    within a document/form field or script as a script folder level.

    //

    This script displays a popup menu dialog custom for each file operated by Action

    The user enters information on the way in which the numbers of the documents must be applied to the

    pages of a document, for example, position, content, etc..  As well as information on whether or not

    the script must save the file or extract the pages labelled in a separte document

    These parameters are maintained during any of the Acrobat Session.

    //

    A document number is included in the parameters. This number is incremented each time

    a file is operated.

    //

    The options are included to jump the document current and for the abandonment of the sequence of actions

    //

    Custom dialog box created with AcroDialogs of WindJack Solutions, Inc.

    //

    Version 1.4-7/1/16

    Amended by SCS

    Label width

    var nLabWidth = 2000;  //

    Line height

    var nLabLineHeight = 8; //

    If (typeof (global. (DocNumAction) == 'undefined')

    {

    Acrobat JavaScript dialog box

    Created by DialogDesigner of WindJack Solutions

    < CodeAbove >

    var oDocNumTypes = {}

    'Exposure': {Prefix: "[COMPANY NAME] \r\ [FEI #] \r\EXHIBIT \r\[DATE RANGE] [ACRONYM]", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    'Attachment': {Prefix: "[COMPANY NAME] \r\ [FEI #] \r\ATTACHMENT \r\[DATE RANGE] [ACRONYM]", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    "Memo": {Prefix: "[COMPANY NAME] \r\ [FEI #] \r\[INV/SUPV + MEMO DATE] \r\EXHIBIT [ACRONYM]", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    "Sample": {prefix: "[SAMPLE #] \r\[COLLECTION DATE] \r\doc #", UseDocNum:true, UsePgNum:true, PagePrefix: "-Page" ""},

    };

    function DoSetDocNumberFn (dialogue, oDlg)

    {

    var oRslt = dialog.store ();

    var strExample = oRslt ["LPfx"];

    If (oRslt ["so"])

    strExample += oRslt ["DNum"];

    If (oRslt ["PgNm"])

    {

    strExample += eval ("'" + oRslt ["PPfx"] + "" "") + (oDlg.nCurPage + 1) m:System.NET.SocketAddress.ToString ();

    If (oRslt ["PPsf"])

    strExample += 'of' + oDlg.nNumPages;

    }

    Dialog.Load({"ExMP":strExample});)

    DoSetFileName (dialog, oDlg);

    }

    function DoSetFileName (dialogue, oDlg)

    {

    var oRslt = dialog.store ();

    var strFileName As String = "";

    If (oRslt ["SPst"])

    {

    Add the prefix

    strFileName += oRslt ["SŠPR"];

    Add number

    If (oRslt ["DnPr"])

    {

    strFileName += oRslt ["DNum"];

    If (oRslt ["so"])

    strFileName += "_";

    }

    Add the file name

    "strFileName += oDlg.strFileName.replace(/\.pdf/," ");"

    Add number

    If (oRslt ["DnFx"])

    {

    strFileName += oRslt ["Dnum"];

    If (oRslt ["so"])

    strFileName;

    }

    strFileName += ".pdf";

    }

    Dialog.Load({"SvFl":strFileName});)

    }

    < / CodeAbove >

    overall. DocNumAction =

    {

    result: "Cancel."

    DoDialog: function() {return app.execDialog (this);};

    strHorzPos: "PosR."

    nMarginX: "0.5"

    strVertPos: 'PosT',

    nMarginY: "0.5"

    "strLTyp",:

    strBackgroundCol: ['Transparent'],

    "strExmp",:

    strLabelPrefix: '\r ',.

    bIncludeDocNum:true,

    strInitDocNum: "1."

    bIncludePageNum:true,

    "strPageNumPrefix",:

    bPageNumPostfix:true,

    strBoxStateSel: "Fltn."

    strPgRangeSel: "rAll,"

    "strStrtPg",:

    "strEndPg",:

    bSaveWPostFx:true,

    "strSavePrefix",:

    strDocNumInName: "None."

    "strSavePostfix",:

    "strSvFl",:

    {GetRadioSel:function(oRslts,aCtrls)}

    for (var strRtn = aCtrls [0]; aCtrls.length > 0; strRtn = aCtrls.pop ()) {}

    If (oRslts [strRtn] is true)

    Return strRtn;

    }

    Return ' ';

    },

    SetListSel:function(list,path) {return if(path.length == 0);

    eval ("list [------" "+ ((typeof path.join!]") = "function")? {("[(chemin: path.join("\"][\"")) + ' \ '] = 1")},

    {GetListSel:function(oLstRslts,path)}

    for {var (topic oLstRslts)

    If (((typeof oLstRslts[item]=="number") & & (oLstRslts [point] > 0)))

    || This. GetListSel (oLstRslts [item], path))

    {(point) path.push; return true ;}}

    }

    Returns false;

    },

    nCurPage:0,

    nNumPages:1,

    bHidden:true,

    SetDocNumber:DoSetDocNumberFn,

    SetFileName:DoSetFileName,

    strFileName: "Test.pdf"

    oDocNumParams:oDocNumTypes,

    initialize: function (dialog)

    {

    var listLTyp = new Object();

    This. SetListSel (listLTyp, this.strLTyp);

    var listBkgd =

    {

    "Transparent":-1,.

    'Yellow':-1.

    'Green':-1.

    'Blue':-1.

    'Grey':-1.

    };

    This. SetListSel (listBkgd, this.strBackgroundCol);

    var dlgInit =

    {

    'MrgH': this.nMarginX,

    'MrgV': this.nMarginY,

    'Bkgd': listBkgd,

    "DNum": this.strInitDocNum.

    "SPst": this.bSaveWPostFx.

    'Exmp': this.strExmp,

    'LPfx': this.strLabelPrefix,

    "So": this.bIncludeDocNum.

    "PgNm": this.bIncludePageNum.

    "PPfx": this.strPageNumPrefix.

    "PPsf": this.bPageNumPostfix.

    "tFPg": this.strStrtPg.

    "tTPg": this.strEndPg.

    'SŠPR': this.strSavePrefix,

    'Pressure': this.strSavePostfix,

    "SvFl": this.strSvFl.

    };

    dlgInit [this.strHorzPos] = true;

    dlgInit [this.strVertPos] = true;

    dlgInit [this.strBoxStateSel] = true;

    dlgInit [this.strPgRangeSel] = true;

    dlgInit [this.strDocNumInName] = true;

    Dialog.Load (dlgInit);

    () Dialog.Enable

    {

    'tTPg': false,

    'tFPg': false,

    'PPfx': false,

    'DNum': false,

    }

    );

    var typeInit = {};

    (XX in this.oDocNumParams)

    typeInit [xx] = - 1;

    If ((this.strStrtPg == «») | isNaN (this.strStrtPg) |) (((This.strStrtPg) Number > This.nNumPages))

    {

    If (this.bHidden)

    this.strStrtPg = "1";

    on the other

    this.strStrtPg = (this.nCurPage + 1) m:System.NET.SocketAddress.ToString ();

    }

    If ((this.strEndPg == "") |) isNaN (this.strEndPg) | (((This.strEndPg) Number > This.nNumPages))

    this.strEndPg = this.nNumPages.toString ();

    exInit var = {'LTyp': typeInit, "tFPg": this.strStrtPg, "tTPg":this.strEndPg, 'sOfN': ' of ('+ this.nNumPages +') ',}

    "MNLF": "current file:"+ this.strFileName;} '.

    If (this.bHidden & & this.strPgRangeSel == "rCur")

    {

    this.strPgRangeSel = 'rAll;

    exInit ['rCur'] = false;

    exInit [this.strPgRangeSel] = true;

    }

    Dialog.Load (exInit);

    exInit var = {"ExPg":this.strPgRangeSel == "rFro", "DNum":this.bIncludeDocNum, "PPfx":this.bIncludePageNum,}

    "PPsf":this.bIncludePageNum, "MrgH":this.strHorzPos! = "PosC", "MrgV":this.strVertPos! = "PosM,.

    ""SvPs":this.bSaveWPostFx," SvDn ":this.bSaveWPostFx.

    "tFPg":this.strPgRangeSel == 'rFro', ' tTPg":this.strPgRangeSel =="rFro"," rCur"{:! this.bHidden};

    Dialog.Enable (exInit);

    This. SetDocNumber (dialogue, this);

    },

    validate: function (dialog)

    {

    var oRslt = dialog.store ();

    If (oRslt ["so"] & & ((oRslt ["DNum"] == null) |)) (oRslt ["DNum'] == ' ') | isNaN (oRslt ["DNum"])))

    {

    App.Alert ('If selected, the initial value for Doc number must be filled with a valid integer");

    Returns false;

    }

    If ((/^\s*$/).test(oRslt["LPfx"]) & &! oRslt ['so'] & &! oRslt ["PgNm"])

    {

    App.Alert ("not enough label settings have been selected");

    Returns false;

    }

    If (oRslt ["rFro"])

    {

    If ((oRslt [«tFPg»] == «») | isNaN (oRslt ["tFPg"]) |) (oRslt ["tTPg'] == ' ') | isNaN (oRslt ["tTPg"]))

    {

    App.Alert ("If selected, the Page range values must be entered with valid integers");

    Returns false;

    }

    If ((oRslt ["tFPg"]) Number > Number (oRslt ["tTPg"]))

    {

    App.Alert ("" If selected, page number must be less than the number page "");

    Returns false;

    }

    If ((Number (oRslt ["tFPg"]) > this.nNumPages) |) (((ORslt ["tTPg"]) Number > This.nNumPages))

    {

    App.Alert ("" If selected, From and the page numbers must be less than the number of pages "");

    Returns false;

    }

    }

    Returns true;

    },

    commit: function (dialog)

    {

    var oRslt = dialog.store ();

    this.strHorzPos is this. GetRadioSel (oRslt, ["PosL", "PosC", "PosR"]);

    this.nMarginX = oRslt ["MrgH"];

    this.strVertPos is this. GetRadioSel (oRslt, ["PosT", "PosM", "PosB"]);

    this.nMarginY = oRslt ["MrgV"];

    path of var = new Array();

    this.strLTyp = (this. "GetListSel (oRslt ["LTyp"], path))? path.reverse ():" ";" "

    path of var = new Array();

    this.strBackgroundCol = (this. "GetListSel (oRslt ["Bkgd"], path))? path.reverse ():" ";" "

    this.strExmp = oRslt ['Exmp'];

    this.strLabelPrefix = oRslt ["LPfx"];

    this.bIncludeDocNum = oRslt ["so"];

    this.strInitDocNum = oRslt ["DNum"];

    this.bIncludePageNum = oRslt ["PgNm"];

    this.strPageNumPrefix = oRslt ["PPfx"];

    this.bPageNumPostfix = oRslt ["PPsf"];

    this.strBoxStateSel = "Fltn.

    this.strPgRangeSel is this. GetRadioSel (oRslt, ["rAll", "rCur", "rFro"]);

    this.strStrtPg = oRslt ["tFPg"];

    this.strEndPg = oRslt ["tTPg"];

    this.bSaveWPostFx = oRslt ["SPst"];

    this.strSavePrefix = oRslt ["SŠPR"];

    this.strDocNumInName is this. GetRadioSel (oRslt, ["None", "DnPr", "DnFx"]);

    this.strSavePostfix = oRslt ['pressure'];

    this.strSvFl = oRslt ["SvFl"];

    },

    "Abrt": function (dialog)

    {

    Dialog.end ("ABRT");

    },

    'Skip': function (dialog)

    {

    Dialog.end ("Skip");

    },

    'Pressure': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'DnFx': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'DnPr': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'None': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    'SŠPR': function (dialog)

    {

    This. SetFileName (dialog, this);

    },

    "SPst": function (dialog)

    {

    Good var = dialog.store (["SPst"]);

    Dialog.Enable ({"Pressure": good, "SvDn": good});

    This. SetFileName (dialog, this);

    },

    'tTPg': function (dialog)

    {

    var x;

    },

    'rFro': function (dialog)

    {

    Dialog.Enable ({tFPg:true, tTPg:true, "ExPg": true});

    },

    'rCur': function (dialog)

    {

    Dialog.Enable ({tFPg:false, tTPg:false, "ExPg": false});

    },

    "rAll": function (dialog)

    {

    Dialog.Enable ({tFPg:false, tTPg:false, "ExPg": false});

    },

    'PPsf': function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    'PPfx': function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    'PgNm': function (dialog)

    {

    Buffalo var = dialog.store (['PgNm']);

    Dialog.Enable({"PPfx":bIsOn,"PPsf":bIsOn});)

    This. SetDocNumber (dialog, this);

    },

    "DNum": function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    "So": function (dialog)

    {

    Dialog.Enable({"DNum":Dialog.) Store() ["so"]});

    This. SetDocNumber (dialog, this);

    },

    'LPfx': function (dialog)

    {

    This. SetDocNumber (dialog, this);

    },

    'LTyp': function (dialog)

    {

    var oRslt = dialog.store ();

    path of var = [];

    cSel var = ((this. GetListSel (oRslt ["LTyp"], path))? path.reverse ():"").toString();

    var oLabInfo = this.oDocNumParams [cSel];

    If (! oRslt ["DNum"] |) (oRslt ["DNum'] == ' ') | isNaN (oRslt ["DNum"]))

    Dialog.Load({"DNum":"1"});)

    If (oLabInfo)

    {

    Dialog.Load ({"LPfx": oLabInfo.Prefix, "So":oLabInfo.UseDocNum, "PgNm":oLabInfo.UsePgNum, "PPfx":oLabInfo.PagePrefix});})

    Dialog.Enable ({"DNum": oLabInfo.UseDocNum, "PPfx":oLabInfo.UsePgNum, "PPsf":oLabInfo.UsePgNum});})

    This. SetDocNumber (dialog, this);

    }

    },

    "PosB": function (dialog)

    {

    Dialog.Enable({"MrgV":true});)

    },

    "POS": function (dialog)

    {

    Dialog.Enable({"MrgV":false});)

    },

    'PosT': function (dialog)

    {

    Dialog.Enable({"MrgV":true});)

    },

    "PosR": function (dialog)

    {

    Dialog.Enable({"MrgH":true});)

    },

    "PosC": function (dialog)

    {

    Dialog.Enable({"MrgH":false});)

    },

    'PosL': function (dialog)

    {

    Dialog.Enable({"MrgH":true});)

    },

    Description:

    {

    name: 'batch labeling automatic Application. "

    elements:

    [

    {

    type: "display."

    elements:

    [

    {

    type: "display."

    alignment: "align_fill",.

    elements:

    [

    {

    type: "display."

    height: 14.

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "MNLF."

    name: ' Please enter information for application document numbering labels,:

    height: 14.

    Police: "palette."

    "BOLD": true,

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "Version 1.4-7/1/16 SCS/CA."

    height: 14.

    alignment: 'align_right ',.

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls2."

    name: "ENTER the INFORMATION LABEL."

    Police: "palette."

    "BOLD": true,

    elements:

    [

    {

    type: "display."

    align_children: "align_row."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta3."

    name: "1. Select the Type of Document:»

    },

    {

    type: "popup",

    item_id: "LTyp."

    nom_de_variable: "strLTyp."

    Width: 93

    height: 23,.

    char_width: 8.

    },

    {

    type: "gap."

    item_id: "gap2."

    char_width: 1,.

    char_height: 4,.

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "2 Select background,:

    },

    {

    type: "popup",

    item_id: 'Bkgd ',.

    nom_de_variable: "strBackgroundCol."

    Width: 86

    height: 23,.

    char_width: 8.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta5."

    name: ' 3 Add the front label information of selected document Type,:

    height: 15.

    },

    {

    type: 'edit_text. "

    item_id: "LPfx."

    nom_de_variable: "strLabelPrefix."

    Width: 200,

    height: 75,.

    Multiline: true,

    char_width: 8.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta6."

    name: ' 4. Enter departure Doc # (default 1): ",

    },

    {

    type: 'edit_text. "

    item_id: "DNum."

    nom_de_variable: "strInitDocNum."

    char_width: 3,.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_row."

    elements:

    [

    {

    type: 'check_box. "

    item_id: 'So,'

    name: "Include Doc # (default)."

    nom_de_variable: "bIncludeDocNum."

    alignment: "align_fill",.

    },

    {

    type: 'static_text. "

    item_id: "sta7."

    name: "Enter prefix (or default) Page,:

    },

    {

    type: 'edit_text. "

    item_id: "PPfx."

    nom_de_variable: "strPageNumPrefix."

    char_width: 8.

    },

    {

    type: 'check_box. "

    item_id: "PgNm."

    name: "Include Page # (default)."

    nom_de_variable: "bIncludePageNum."

    alignment: "align_fill",.

    },

    {

    type: 'check_box. "

    item_id: "PPsf."

    name: ' include \"of N\ 'pages ', '.

    nom_de_variable: "bPageNumPostfix."

    alignment: "align_fill",.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'static_text. "

    item_id: "sta8."

    name: "overview of the label,:

    Police: "palette."

    },

    {

    type: 'edit_text. "

    item_id: 'Exmp ';

    Width: 250,

    height: 75,.

    char_width: 8.

    Multiline: 'true ',.

    ReadOnly: "true."

    },

    ]

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls3."

    name: "SELECT the PAGE RANGE."

    Police: "palette."

    "BOLD": true,

    elements:

    [

    {

    type: "display."

    align_children: "align_row."

    elements:

    [

    {

    type: 'radio ',.

    item_id: "rAll,"

    group_id: "GRP1"

    name: "All."

    nom_de_variable: "strPgRangeSel."

    height: 20.

    },

    {

    type: 'radio ',.

    item_id: "direct."

    group_id: "GRP1"

    name: "current (applies only to the Open Document)."

    nom_de_variable: "strRange."

    height: 20.

    },

    {

    type: 'radio ',.

    item_id: "rFro."

    group_id: "GRP1"

    name: "to:",

    Width: 12,

    height: 24,.

    },

    {

    type: 'edit_text. "

    item_id: "tFPg."

    nom_de_variable: "strStrtPg."

    height: 24,.

    char_width: 6,.

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "to:",

    height: 24,.

    },

    {

    type: 'edit_text. "

    item_id: "tTPg."

    nom_de_variable: "strEndPg."

    height: 24,.

    char_width: 6,.

    },

    {

    type: 'static_text. "

    item_id: "sOfN."

    name: "of (N)."

    height: 24,.

    },

    ]

    },

    ]

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls1."

    name: POSITION "SELECT."

    Width: 188

    height: 80,.

    Police: "palette."

    "BOLD": true,

    char_width: 8.

    char_height: 8.

    elements:

    [

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'radio ',.

    item_id: "PosL."

    group_id: "PosH,"

    name: "Left",

    nom_de_variable: "strHorzPos."

    },

    {

    type: 'radio ',.

    item_id: "PosC".

    group_id: "PosH,"

    name: 'Center ',.

    },

    {

    type: 'radio ',.

    item_id: "PosR."

    group_id: "PosH,"

    name: "right."

    },

    {

    type: 'static_text. "

    item_id: "sta2."

    name: "margin (inches)": ","

    },

    {

    type: 'edit_text. "

    item_id: "MrgH."

    nom_de_variable: "nMarginX."

    char_width: 8.

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'radio ',.

    item_id: 'PosT',

    group_id: 'VPOS ',.

    name: 'Top',

    nom_de_variable: "strVertPos."

    },

    {

    type: 'radio ',.

    item_id: "POS."

    group_id: 'VPOS ',.

    name: "Middle",

    },

    {

    type: 'radio ',.

    item_id: "PosB"

    group_id: 'VPOS ',.

    name: "bottom."

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "room (inches):»

    },

    {

    type: 'edit_text. "

    item_id: "MrgV."

    nom_de_variable: "nMarginY."

    char_width: 8.

    },

    ]

    },

    ]

    },

    {

    type: "cluster."

    item_id: "cls1."

    name: 'SAVE OPTIONS ',.

    Police: "palette."

    "BOLD": true,

    alignment: "align_fill",.

    elements:

    [

    {

    type: "display."

    align_children: "align_top."

    elements:

    [

    {

    type: 'check_box. "

    item_id: "SPst"

    name: "save file."

    nom_de_variable: "bSaveWPostFx."

    },

    {

    type: 'static_text. "

    item_id: "sta9."

    name: "Enter Doc Type of recorded file name (optional):"

    },

    {

    type: 'edit_text. "

    item_id: "SŠPR."

    nom_de_variable: "strSavePrefix."

    Width: 73

    height: 23,.

    char_width: 8.

    alignment: "align_fill",.

    },

    {

    type: 'static_text. "

    item_id: "sta3."

    name: "Include Doc # in the name of the saved file (optional):"

    },

    {

    type: 'radio ',.

    item_id: "None."

    group_id: "SvDN."

    name: 'no ', he said.

    nom_de_variable: "strDocNumInName."

    },

    {

    type: 'radio ',.

    item_id: "DnPr."

    group_id: "SvDN."

    name: '' Yes. ''

    },

    ]

    },

    {

    type: "display."

    align_children: "align_top."

    alignment: "align_top."

    elements:

    [

    {

    type: "ok."

    ok_name: 'Apply Label and save',

    },

    {

    type: 'button ',.

    item_id: 'Skip,'

    name: 'Skip this Doc. "

    },

    {

    type: 'button ',.

    item_id: "Abrt"

    name: "Cancel."

    },

    {

    type: 'static_text. "

    item_id: "sta1."

    name: "" file name: ","

    alignment: 'align_right ',.

    },

    {

    type: 'edit_text. "

    item_id: "SvFl."

    Width: 295

    height: 23,.

    char_width: 8.

    ReadOnly: "true."

    },

    ]

    },

    ]

    },

    ]

    },

    ]

    }

    };

    overall. DoPlaceDocNumbers = app.trustedFunction (function (oOrigDoc)

    {

    app.beginPriv ();

    Setup from the parameters

    var oTrgDoc = oOrigDoc;

    var nPgStart, nPgEnd, nPgTrgStart;

    var cBkCol = ["t."];

    switch (global. DocNumAction.strBackgroundCol.toString ())

    {

    case 'Transparent ':

    cBkCol = ['t.'];

    break;

    case "yellow":

    cBkCol = ['RGB', 1, 1, 0];

    break;

    case "green":

    cBkCol = ['RGB', 0.1, 0];

    break;

    case "Blue":

    cBkCol = ["RGB", 0,0, 1];

    break;

    case "gray":

    cBkCol = ['RGB',.7,.7,.7];

    break;

    case "white":

    cBkCol = ['RGB', 1, 1, 1];

    break;

    }

    switch (global. DocNumAction.strPgRangeSel)

    {

    case 'rAll:

    nPgTrgStart is nPgStart = 0;.

    nPgEnd = oOrigDoc.numPages-1;

    break;

    case 'rCur ':

    nPgTrgStart = nPgEnd = nPgStart = oOrigDoc.hidden? 0:oOrigDoc.pageNum;

    break;

    case 'rFro ':

    nPgTrgStart = nPgStart = number (global. DocNumAction.strStrtPg)-1;

    If (nPgTrgStart > (oOrigDoc.numPages-1))

    nPgTrgStart = oOrigDoc.numPages-1;

    nPgEnd = number (global. DocNumAction.strEndPg)-1;

    If (nPgEnd > (oOrigDoc.numPages-1))

    nPgEnd = oOrigDoc.numPages-1;

    break;

    }

    Start marking loop

    var nNumPages is nPgEnd - nPgStart + 1;.

    var nCurPgNum = nPgStart;

    for (nPg var = 0; nPg < nNumPages; nPg ++ nCurPgNum ++, nPgTrgStart ++)

    {

    Create a text label

    var global = strExample. DocNumAction.strLabelPrefix;

    If (Global. DocNumAction.bIncludeDocNum)

    strExample += overall. DocNumAction.nCurrentDocNum;

    If (Global. DocNumAction.bIncludePageNum)

    {

    strExample += eval ("'" + global.) DocNumAction.strPageNumPrefix + "" "") + (nCurPgNum + 1) m:System.NET.SocketAddress.ToString ();

    If (Global. DocNumAction.bPageNumPostfix)

    strExample += 'of' + oOrigDoc.numPages;

    }

    Find the location on the Page

    Download the base params

    var rcPage = oOrigDoc.getPageBox ("Crop", nCurPgNum);

    var mxToDefaultCoords = (new Matrix2D()) .fromRotated (oOrigDoc, nCurPgNum);

    var nPgRot = oOrigDoc.getPageRotation (nCurPgNum);

    var rcRot = [];

    var nAlign;

    var nMargX = number (global. DocNumAction.nMarginX) * 72;

    switch (global. DocNumAction.strHorzPos)

    {

    case "PosL:

    strAlign = 'left '; Left-aligned text

    rcRot [0] = nMargX;

    rcRot [2] = nMargX + nLabWidth;

    break;

    case "PosC":

    strAlign = 'center '; Left-aligned text

    rcRot [0] = rcPage [2] / 2 - nLabWidth/2;

    rcRot [2] = rcPage [2] / 2 + nLabWidth/2;

    break;

    case "PosR":

    strAlign = 'right '; Left-aligned text

    rcRot [0] = rcPage [2] - nMargX - nLabWidth;

    rcRot [2] = rcPage [2] - nMargX;

    break;

    }

    Find the number of lines

    var nMargY = number (global. DocNumAction.nMarginY) * 72;

    var nLigne = 1;

    var oMtch = strExample.match(/(\n)/g);

    If (oMtch)

    nLigne += oMtch.length;

    var bxHght = nLigne * (nLabLineHeight + 1);

    switch (global. DocNumAction.strVertPos)

    {

    case 'PosT ':

    rcRot [1] = rcPage [1] - nMargY - bxHght;

    rcRot [3] = rcPage [1] - nMargY;

    break;

    case "POS":

    rcRot [1] = (rcPage [1] - bxHght) / 2;

    rcRot [3] = (rcPage [1] + bxHght) / 2;

    break;

    case "PosB":

    rcRot [1] = nMargY;

    rcRot [3] = nMargY + bxHght;

    break;

    }

    var rectAnnot = mxToDefaultCoords.transform (rcRot);

    Find an existing annot and remove if there is

    annot var = oTrgDoc.getAnnot (nPgTrgStart, "DocNumberLabel");

    If (Annot)

    Annot.Destroy ();

    Create annotation

    strExample = strExample.replace(/\r\n/g,"\r");

    oTrgDoc.addAnnot ({type: "FreeText", page: nPgTrgStart, rect:rectAnnot,})

    Rotate: nPgRot, width: 0, fillColor:cBkCol,

    readOnly: overall. DocNumAction.strBoxStateSel == "Lckd."

    richContents: [{textColor: ["RGB", 0,0, 0], textSize:nLabLineHeight,}]

    [{alignment: strAlign, text: strExample}].

    name: "DocNumberLabel."

    });

    }

    If selected then flatten

    If (Global. DocNumAction.strBoxStateSel is "Fltn")

    oTrgDoc.flattenPages ();

    Save file

    If (Global. DocNumAction.bSaveWPostFx)

    {

    var cSavePath = oOrigDoc.path.replace(/\/[^\/]+$/,"/"); "

    var cDocPrefix;

    cDocPrefix = global. DocNumAction.strLabelPrefix;

    Document prefix number

    cSavePath += overall. DocNumAction.strSavePrefix;

    If (Global. DocNumAction.strDocNumInName is "DnPr")

    {

    If (Global. DocNumAction.bIncludeDocNum)

    cSavePath += overall. DocNumAction.nCurrentDocNum += "_";

    }

    "cSavePath += oOrigDoc.documentFileName.replace(/\.pdf/," ");"

    Number of document as prostfix

    If (Global. DocNumAction.strDocNumInName is 'DnFx')

    {

    If (Global. DocNumAction.bIncludeDocNum)

    cSavePath += overall. DocNumAction.nCurrentDocNum;

    }

    cSavePath += ".pdf";

    oTrgDoc.saveAs (cSavePath);

    }

    app.endPriv ();

    });

    }

    var DoNumActionDlg = app.trustedFunction (function)

    {

    app.beginPriv ();

    return app.execDialog (global. DocNumAction);

    app.endPriv ();

    });

    Setup

    var oDoc = event.target;

    If (odoc.xfa)

    {

    If (3 == app.alert (oDoc.documentFileName + ": is a form of LiveCycle, which may not be labeled\n\n you want to continue processing the files?")) (Pressing No. will stop the processing of the file) ", 1, 2))

    Event.RC = false;

    }

    on the other

    {

    overall. DocNumAction.bHidden = oDoc.hidden;

    if(!odoc.) Hidden)

    overall. DocNumAction.nCurPage = oDoc.pageNum;

    on the other

    overall. DocNumAction.nCurPage = 0;

    overall. DocNumAction.nNumPages = oDoc.numPages;

    overall. DocNumAction.strFileName = oDoc.documentFileName;

    cRtn var = DoNumActionDlg();

    If ("ok" is cRtn)

    {

    Configure the Initial of Doc number

    If (Global. DocNumAction.bIncludePageNum)

    overall. DocNumAction.nCurrentDocNum = number (global. DocNumAction.strInitDocNum);

    Console.println ("Do" + oDoc.documentFileName);

    overall. DoPlaceDocNumbers (oDoc);

    Increment if applicable Doc number

    If (Global. DocNumAction.bIncludeDocNum)

    {

    overall. DocNumAction.nCurrentDocNum ++;

    overall. DocNumAction.strInitDocNum = global. DocNumAction.nCurrentDocNum.toString ();

    }

    }

    ElseIf ("Abrt" == cRtn)

    Event.RC = false;

    }

    I suppose it comes from the exchange of shares on AcrobatUsers.com. Are you the error with the unmodified script as well? If this isn't the case, what you changed in the code (and for what purpose)?

    Your subject line refers to an error of NaN - how - what is factor in this problem?

    A 'NaN' error is thrown when occurs a condition 'Not a number', which may for example be that you are trying to perform an operation which cannot be done with a number on a chain, or if you try to divide by zero.

  • More strange error NaN never

    OK, Ive got this piece of script that gives me an error of NaN.

    Now the strange thing is, when I got the same code with objects of different libraries, it worked fine:

    Error of NaN give the code:

    for (var teller1 = 0; teller1 < 5; teller1 ++) {}
    var dna_mc:dna = new dna();
    dna_mc.x = Math.Random () * 600 + 150;
    dna_mc.y = Math.Random () * 400 + 150;
    dna_mc.snelheidx = Number (Math.random () * 5 + 4);
    dna_mc.snelheidy = Number (Math.random () * 5 + 4);
    dna_mc.geklikt = Number (0);
    dna_mc.score = Number (20);
    dna_mc.addEventListener (Event.ENTER_FRAME, moving);
    dna_mc.addEventListener (MouseEvent.MOUSE_DOWN, zakklik);
    addChild (dna_mc);
    }
    for (var teller2 = 0; teller2 < 20; teller2 ++) {}
    var chelex_mc:chelex = new chelex();
    chelex_mc.x = Math.Random () * 600 + 150;
    chelex_mc.y = Math.Random () * 400 + 150;
    chelex_mc.snelheidx = Number (Math.random () * 15 + 4);
    chelex_mc.snelheidy = Number (Math.random () * 15 + 4);
    chelex_mc.geklikt = Number (0);
    chelex_mc.score = Number(-10);
    chelex_mc.addEventListener (Event.ENTER_FRAME, moving);
    chelex_mc.addEventListener (MouseEvent.MOUSE_DOWN, zakklik);
    addChild (chelex_mc);
    }

    var score: Number = 0;

    function zakklik (evt:MouseEvent) {}
    evt. Target.snelheidy = 2;
    evt. Target.snelheidx = 0;
    evt. Target.geklikt = 1;
    score += evt.target.score;
    evt. Target.Stop ();
    evt. Target.Alpha =. 5;
    Plop.Play ();
    }

    function moving (evt:Event) {}
    evt. Target.rotation += evt.target.snelheidx;
    If {(evt.target.geklikt == 0)
    evt. Target.x += evt.target.snelheidx;
    evt. Target.y += evt.target.snelheidy;
    If (evt.target.y > 649 | < 120 evt.target.y) {}
    evt. Target.snelheidy * =-1;
    }
    If (evt.target.x < 100 | evt.target.x > 800) {}
    evt. Target.snelheidx * =-1;
    }
    }
    If {(evt.target.geklikt == 1)
    If {(evt.target.y < 649)
    evt. Target.y += evt.target.snelheidy;
    }
    }
    If (score < 0) {score = 0};
    scoretext. Text = "DNA:" + score;
    }

    Code works correctly:

    for (var teller1 = 0; teller1 < 10; teller1 ++) {}
    var bol1_mc:bol1 = new bol1();
    bol1_mc.x = Math.Random () * 550;
    bol1_mc.y = Math.Random () * 400;
    bol1_mc.snelheidx = Number (Math.random () * 15 + 5);
    bol1_mc.snelheidy = Number (Math.random () * 5 + 5);
    bol1_mc.geklikt = Number (0);
    bol1_mc.score = Number(-1);
    bol1_mc.addEventListener (Event.ENTER_FRAME, moving);
    bol1_mc.addEventListener (MouseEvent.MOUSE_DOWN, zakklik);
    addChild (bol1_mc);
    }
    for (var teller2 = 0; teller2 < 10; teller2 ++) {}
    var bol2_mc:bol2 = new bol2();
    bol2_mc.x = Math.Random () * 550;
    bol2_mc.y = Math.Random () * 400;
    bol2_mc.snelheidx = Number (Math.random () * 5 + 5);
    bol2_mc.snelheidy = Number (Math.random () * 15 + 5);
    bol2_mc.geklikt = Number (0);
    bol2_mc.score = Number (1);
    bol2_mc.addEventListener (Event.ENTER_FRAME, moving);
    bol2_mc.addEventListener (MouseEvent.MOUSE_DOWN, zakklik);
    addChild (bol2_mc);
    }

    var geklikt = 0;
    var score: Number = 0;

    function zakklik (evt:MouseEvent) {}
    evt. Target.snelheidy = 2;


    evt. Target.snelheidx = 0;
    evt. Target.geklikt = 1;
    score += evt.target.score;
    }

    function moving (evt:Event) {}
    If {(evt.target.geklikt == 0)
    evt. Target.x += evt.target.snelheidx;
    If {(evt.target.x > 549)
    evt. Target.snelheidx * =-1;
    }
    If (evt.target.x < 1) {}
    evt. Target.snelheidx * =-1;
    }
    evt. Target.y += evt.target.snelheidy;
    If {(evt.target.y > 399)
    evt. Target.snelheidy * =-1;
    }
    If (evt.target.y < 1) {}
    evt. Target.snelheidy * =-1;
    }
    }
    If {(evt.target.geklikt == 1)
    If {(evt.target.y < 399)
    evt. Target.y += evt.target.snelheidy;
    }
    }
    scoretext. Text = "Note:" + score;
    / * If (evt.target.hitTestObject (blok1)) {}
    evt. Target.snelheidx * =-1;
    }**/
    }

    You see the difference? I can't :/

    Use currentTarget instead of the target.

  • Need help with "NaN" (or perhaps with "if" and "else")

    I am putting together an office space calculator. I have several text fields that will be added to give an answer "completely."

    I don't want users to have to enter text in all areas. For example, a section of the calculator will calculate "coffee" space.

    If there is no 'coffee zone' in their office, this text entry is useless and needs no input.

    However, I noticed that the empty text fields return a NaN value in my Total field. Of course, it won't.

    I worked on a script as such to correct this:

    if(Coffee>0) {}

    Café = coffee * 150;

    }

    else {}

    coffee = 0;

    }

    This works to get the empty field to '0' = so there is no error 'Nan '.

    However, I have a different statement that needs more of an "If". For example:

    If (numbertwenty < = 1) {}

    numbertwenty = numbertwenty * 100;

    lunchtwenty = numbertwenty / 100;

    }

    If (numbertwenty > = 2) {}

    numbertwenty = numbertwenty * 25 + 75;

    lunchtwenty = (numbertwenty-75) / 25;

    }

    else {}

    numbertwenty = 0;

    lunchtwenty = 0;

    }

    Here is exactly what I need. If the user leaves the field blank, I need to be calculated automatically by '0' so that the user does not receive an error code "NaN".

    If the user enters a value of '0', I need the field text equal to '0 '.

    If the user enters a value '1', I need the field text to multiply by "100".

    If the user enters a number greater than 1, I need the field text to equal '100' add an additional "75" in total for each integer it goes upward.

    (Example - if the user enters '2', the total calculation is 125.) (100 for the first number (1) and 25 for the second number (2))

    I hope that all makes sense.

    I appreciate any assistance. Thank you very much.

    a non-html/non-multiline textfield empty has a text property of the «»  to change this string to zero for textfield tf, use:

    {if (TF. (Text=="")}

    TF. Text = 0;

    }

    but the best would be to check all the invalid entries using:

    {if (IsNaN (TF. Text))}

    TF. Text = 0;

    }

  • VBAI 2010 Fatal Error (NaN to the number)

    I get a fatal error (banner image see attached) that I've never seen before in VBAI 2010: NaN A value at a stage of Calculator gets interpreted as a large negative number (-2.14E + 9) in a region of interest later stage creation, which in turn causes the subsequent automatic contour trigger the fatal event.

    The cause, in this case, is a missing measure (an occurrence common for this and other similar calculator steps in this routine), the coordinate x of an endpoint of edge in the previous step, where I subtracted a 2, that is, I'm trying to set a limit KING 2 pixels away from the previous edge found.  In general, when I have a missing measure in this situation, the KING subsquent ends at the origin of the image (0,0), but VBAI not fall down.

    I fully undestand why VBAI crashes with an edge KING listed so far has "Left Field", but I am at a loss to explain why a NaN output get caclulator is interpreted as - 2.14E + 9.  Glancing through the routine in Setup mode and changes the step create region of interest, a message indicates that a "missing measurement is replaced by a constant" or something to that effect and the constant turns out to be - 2.14E + 9, so I guess that this process happens in the background when it is in mode of inspection.  What I don't understand is why my routine never threw this error before when the measure was absent, but since this morning, it throws the error every time!

    I have a temporary work-around (verification of the NaN in the step of the calculator and strength to zero if necessary), but I have a lot of similar sequences to fix and want to make sure that I understand why this fatal error is suddenly appeared.

    Any ideas appreciated,

    Eric

    It's fixed in VBAI 2011 and newer. He will plant is no longer with the VDM dll updated and VBAI, if a previous measure used by the step of ROI is NaN, KING step will treat it as a missing measure and return on investment stage will fail. NaN is cast to many is because NaN is valid for values to double, and the KING coordinates are integers, so when convert us internally the NaN in full, it is interpreted as a large number. Not sure why it would just start happening today though.

    Hope this helps,

    Brad

  • FFT returns NaN, no error

    I am trying to trace the FFT of a certain number of waveforms, but I find that for some outputs simply return an array of "NaN" instead of the scale, with no indicated error. Looking at the data I see no significant difference that could cause this. anyone can shed light on the problem?

    I watched the formula apparently used by the FFT vi in aid detailed and created my own version, and he experiences the same problem with the same sets of data. Fathom what happens, it seems to descend to labview randomly taking one of my input data values and its reading like "NaN" - a bad size and TFF any fate of NaN. Why is reading that entry as NaN but is a mystery, and yet he does it regularly because the same plots always failed.

    I have attached the relevant vi to look, any help would be appreciated.

    You were asked to see if the data included NaN and you do not. The last element of the third data series is NaN. I haven't checked the other tables because it is something you need to do.

  • Quiz results slide - NaN errors in published Captivate 8 content

    Hello

    I worked on a number of modules with different content in each, which have a short quiz at the end. All except a beautiful work and the quiz results slide displayed correctly the 'score' and 'max' accordingly.

    However, I have a module with an erroneous result reported "0" out of "NaN" and I don't know why it appeared suddenly?

    I have been a model for these modules (even if it is true that it has been outsourced - they should always use the same model)

    I don't see any obvious difference in the parameters or results between this slide and the other modules - so I'm stuck!

    I was wondering if something had gone wrong with the slide therefore results as a test, I copied all the slides except the quiz in a separate model that has worked very well, and then updated the quiz and slides re-edited, still had the same error. This leads me to suspect the content slides are part of the problem. There are some real questions in the content slides / false, which are defined as a "pre-test" type - could these affect something?

    I am using Captivate 8.0.3.290 and I checked the result published scorm cloud and our Moodle LMS - same erroneous result.

    I hope someone can help?

    Thank you

    Jon

    It is difficult to know what is the problem with this model. I highly doubt that the presence of pre-test slides is the cause. It is perfectly possible to have a pre-test and a Final Quiz in a project. To exclude this possibility: try to create a small project with a test question and a real Question slide, using this same model.  Follow the system variable. What is the result?

    You know if this model was created initially to CP8 or is this a version update of a model?

    I never delete the review area, although it is used in two circumstances:

    1. For the message of pass/fail on the Score slide
    2. When a question has been ignored (I always feel that issues are considered to be ignored).
  • 6225 NaN errors

    I read straight tensions on an acquisition of data in a table.  It worked perfectly for about 18 months and now I'm getting a row of NaN in my table.  There is no software change that would cause this issue and there is no mathematical functions.

    I thought about it.  Thank you!

  • Loader: Nan.jpg + SecurityError: Error #2000: no security context is active.

    Hello.

    By using the code below, I get the 2035 error, informing me that my jpg is not a number.

    Same code with the ioErrorHandler bits comments, outputs SecurityError: Error #2000: no security context is active.

    Same code without the NombrAl and with the right way to the jpgs in the string, works fine (charges 16.jpg), as such - var req:URLRequest = new URLRequest("..) (' / images/16.jpg ");

    Any ideas?

    import flash.display. *;

    import flash.net.URLRequest;

    import flash.display.Loader;

    import flash.events. *;

    import flash.utils.setTimeout;

    var req:URLRequest = new URLRequest("..) /images/"+randomNumber+".jpg");

    var loader: Loader = new Loader();

    var randomNumber:Number = Math.ceil (Math.random () * 16);

    function imageLoaded(event:Event):void

    {

    addChild (loader);

    }

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    Loader.Load (req);

    loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);

    function ioErrorHandler(e:IOErrorEvent):void {}

    trace (e.Text);

    }

    use:

    import flash.display. *;

    import flash.net.URLRequest;

    import flash.display.Loader;

    import flash.events. *;

    import flash.utils.setTimeout;

    var randomNumber:Number = Math.ceil (Math.random () * 16);

    var req:URLRequest = new URLRequest("..) /images/"+randomNumber+".jpg");

    var loader: Loader = new Loader();

    function imageLoaded(event:Event):void

    {

    addChild (loader);

    }

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    Loader.Load (req);

    loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, ioErrorHandler);

    function ioErrorHandler(e:IOErrorEvent):void {}

    trace (e.Text);

    }

  • Remove NaN error message

    Is there a way to get acrobat to NOT display the "NaN" in a field?  I just it empty if the formula has a problem.

    Yes, you will need a script. You get that is because you are attempting to division by zero when the field is empty, which gives a result which is not a number. Therefore, test the denominator. The custom calculation script may look like:

    (function () {
    
        // Get the field values, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        if (v1 !== 0) {
            event.value = 100 * (v1 - v2) / v1;
        } else {
            event.value = "";
        }
    
    })();
    
  • Satellite Pro L500 - F3 - F200 - 0002 ERROR at STARTUP

    Hello

    Last night I went to reformat my laptop, to halfway through I thought no I won't do this more then I clicked Cancel. Now whenever I try to turn on my laptop, it just gives me the ERROR saying F3-F200-0002 and won't start. I tried pressing F8 at startup, but there is no option for recovery or repair in the menu mode just safe mode debugging etc.

    I was looking at forums and discovered I should press 0 constantly while the laptop boot and it will bring up recovery Wizard. Anyway, when I do this it says HARD drive recovery mode, then said Windows is loading files, then it goes to a page saying ERROR F3-FF00-0006.

    I was told to download this file (http://209.167.114.38/support/techsupport/tsbs/all/-TSB001522.htm) but I don't know how to run it on my laptop which is broken (I'm on my computer of nans for the moment). I tried to put it on a USB key and mortising the USB in, but it won't work.

    I need urgent assistance that I use my laptop for my work (I work from home, using laptop computer). We have a lot to say if you could help me fix it at home, I have no money at the moment to be able to get a recovery disk or send the computer for professionals to fix store.

    P.S. I'm on Windows7 and my laptop is a Toshiba Satellite Pro L500.

    As I know the installation of recovery should not be interrupted. If you do you not have access to the wizard of recovery more. Now, all you can do is install image recovery using recovery DVDs.

    If you have created a? Otherwise you can order under https://backupmedia.toshiba.eu/landing.aspx

    Otherwise that you can try to install the version of the OS if you have the original installation disc for Microsoft.
    You know, now the situation is quite complicated.

    By the way: in another ad with the description of the similar problem some people wrote that this error message can be caused by damaged HARD drive. I can't confirm this, but anything is possible.

  • Database schema error - 2147467259

    Hello community,

    Using 32-bit Teststand 2014.

    When executing my movie file, a digital step in my sequence failed.

    After the failure of step, accordingly, my sequence stops the test and run cleaning.

    I'm then prompted with the error message, see image attached, when Teststand save my data in the database.

    I opened my database SQL and noticed that all the previous steps "Spent" have been registered in the database fine but the step failed has never been registered.

    My scheme is configured to record the steps Passed and Failed.

    I solved my problem.

    I had the STEP_RESULT measured value starting from the game as a float of patterns of treatment results, but the step which has not led to a NAN value.

    I changed the value to a string in order to manage the numbers and strings.

  • Why does the period display NaN? What does it mean "NaN"?

    I have a vi that is supposed to measure values of period 3 and 2 tension using DAQmx.  The vi is attached.

    When I run the vi, I get no error, but one of the counters display NaN instead of a period (in seconds) value.  Why would this counter not appearing?  See the .jpg image of the screenshot, which shows the lights on the front panel, after execution and stop the vi.  Note that the period 2 shows "NaN" but, period 1 and 3 show a real value.  "NaN" only displays in "period 2" executing too. ' " "Period 2" never displays a numeric value.  Moreover, as "NaN" actually mean?

    Appreciate your thoughts.

    Thank you

    Dave

    (using 3 counters in the cDAQ-9174 and the module OR 9401 plugged into the chassis cDAQ; periods are measured from the encoders)

    NaN means not 'a number '.

    In your code, Mean.vi will return NaN (with the error-20003) if the input array is empty.

    What happens if you connect the signal of the 1 meter or 3 to counter 2? If NaN disappears, then there is a problem with the signal currently connected to the meter 2.

    1. Your current code, using usrs to (unitialized shift registers), will produce NaN when running for the first time.

    2. The size of the usrs to will increment at each iteration.

    3. If your VI is used as a Subvi, the means will be bad for the first 15 iterations since they will be calculated with the values of the usrs to--> previous lengths.

    You must use PtByPt.vi means that will calculate the average of the X last values without above mentioned problems.

  • NaN/PathRefnum? function unnecessary production responds to path, Refnum

    I found similar topics, but not quite the same thing, AFAICT.

    I'm just trying to see if an INI file exists, so I created the following excerpt:

    I also created a small file, put in my C:\ directory, which I have attached here.

    When I run the program of LV with C:\test.ini, my indicators come out as NaN/Path? : false, NaN/Refnum? : true

    I tried to interpret as (1) a path valid (this file exists) and (2) a refnum does not exist (even if the refnum came from a sub - VI provided by LV).

    I then replaced by control (find file) C:\test.in (sliced final 'i') and the two indicators gave me the same results. That really impressed my first interpretation, and I can't come up with anything else that makes sense.

    Thus, for paths and refnums, what happens here, if anything?

    I saw that the second test threw an error of the Sub - VI 'Open Data of Config', so I can use it for my test, but I would like to know if the NaN... function is actually good for something other than numbers. If this isn't the case, IMHO LV should change its designation on the pallet.

    Cameron

    That you use in a puzzling oddity of LabVIEW refnums. To check if a configuration file refnum is valid, you must not use "a given Config Refnum.vi" in the range of screw Configuration file. The ' NaN/path/Refnum?' function works only for refnum types that are built-in LabVIEW, such as queues, TCP sockets and file references. The screw configuration file are built in LabVIEW, LabVIEW rather than integrated and refnums they use are not 'real' refnums in terms of LabVIEW, they are just data wrapped as reference datalog (something for the creation of unique types of pseudo-refnum). You will see several other pallets which also includes their own functions in order to check whether a refnum is valid, such as pallets of semaphores and appointment management.

  • Non-linear curve Fit error 20068?

    Trying to do a simple 3-exponential decay curve nonlinear.  I have a copy of this work in the other screws, but it doesn't seem to work in this VI.  I use "Scalablemultiexponentialdecay" of Altenbach as a VI/template model.  Data that I'm trying to adapt are a series simple decomposition RC, yes I realize that should not have 3 exponential components, it's just the model data.  I am able to adapt with the Fit exponential function built in to the Math palette, but which only works if the input bounds parameter is wired and with rational constraints.  However, I get an error on the adjustment of the non-linear curve that I understand not (photo attached) indicating that an INF or NaN is done in the settings.  I don't see where this is going...

    Any questions or help is appreciated.

    I thought so, only 0 s for the 2nd two exponentials.  But, if I replace all the guess seededes with the same as the simple exponential Installer, it converges without error.   I guess I didn't know it was that sensitive.  Thank you.

Maybe you are looking for