NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

length (size) of string property

I have a sequence that consists of different DLL calls. each call will return a result struct which includes also a string. I have defined a string object as file global in which i would like to store all the result strings I receive via the DLL calls. I do that by
using a sequence callback after each DLL call which executes the statement
FileGlobals.ExpString += Parameters.Step.MyResult.MyString;
That works fine maybe twice but then I get an Out Of Memory error - why is that? Is the TestStand string property limited in size and if so what is the limit?
The following string is the content of FileGlobals.ExpString (there're HTML tags included which unfortunately are displayed here)
"CAN-Operationen:

  • BR1_Lampe_ASR gleich 1...O.K.


  • BR1_Lampe_ABS gleich 1...O.K.


  • BR1_Lampe_BK gleich 0...O.K.


  • BR3_Rad_kmh_VR gleich 32742...O.K.


  • Diagnose:

    erwartete Fehler:

  • Drehzahlf�hler vorne rechts: elektr. Fehler im Stromkreis (0x011D - 0x6C) gefunden...O.K.

  • ausgeschlossene Fehler:

  • Drehzahlf�hler vorne links: elektr. Fehler im Stromkreis (0x011B - 0x6C) nicht gefunden...O.K.

  • Drehzahlf�hler hinten links: elektr. Fehler im Stromkreis (0x0122 - 0x6C) nicht gefunden...O.K.

  • Drehzahlf�hler hinten rechts: elektr. Fehler im Stromkreis (0x011F - 0x6C) nicht gefunden...O.K.

  • ebenfalls gefunden:

    (0x08B7 - 0x6C)
    "

    now I want to add the following:

    "Diagnose:

    erwartete Fehler:

  • Drehzahlf�hler vorne rechts: elektr. Fehler im Stromkreis (0x011D - 0x2C) gefunden...O.K.

  • ausgeschlossene Fehler:

  • Drehzahlf�hler vorne links: elektr. Fehler im Stromkreis (0x011B - 0x2C) nicht gefunden...O.K.

  • Drehzahlf�hler hinten links: elektr. Fehler im Stromkreis (0x0122 - 0x2C) nicht gefunden...O.K.

  • Drehzahlf�hler hinten rechts: elektr. Fehler im Stromkreis (0x011F - 0x2C) nicht gefunden...O.K.

  • ebenfalls gefunden:

    (0x08B7 - 0x6C)
    "

    if i do that i get the out of memory error!
    I use TS2.0.1/W2K SP3
    0 Kudos
    Message 1 of 3
    (4,605 Views)
    Hi,

    There is no size limitation to a string variable in TestStand. The ultimate size of the string should depend on the amount of memory in your system. I would try skipping the steps inside of you callback (i.e. the one that does the assignment to the file global) and then run your sequence. Does the error still happen? After the second time, what is the size of the string that you have? If you look at the report generator it creates a string that contains the whole HTML report (i.e. very large). Try tracking the memory usage using the Task Manager in Windows and see what the SeqEdit.exe process does.

    Bob
    0 Kudos
    Message 2 of 3
    (4,605 Views)
    Thank you Bob for your answer. I found the cause for the error. The DLL call was buggy. I'm just one stupid kid! 😉
    0 Kudos
    Message 3 of 3
    (4,605 Views)