NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the maximal string length?

Hello,

i created a Dotnet-Function thet returns the length of a given string.

The sequence is like:

string MyString = ““

loop

MyString = MyString + “A“

DLL_CalculateStringLength(string MyString, out int length)

end loop

 

Teststand2017 created an exeption at ~450.000 chars. (out of memory execption)

 

What is the maximum size for a string parameter? (using a Dotnet function)? Is this documented somewhere?

I only found information for labview but not for Teststand.

 

Thanks

0 Kudos
Message 1 of 5
(4,292 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.

 

Best wishes

--------------------------------------------------------------------------------------------------------
Work with NI Hard- and Software for about 15 years now.

Certified LabVIEW Developer & TestStand Developer/Architect

--------------------------------------------------------------------------------------------------------

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 2 of 5
(4,216 Views)

What happens if i create a labview Teststep an pass a string that is bigger than aloud for Labview?

Why does Labview has a limitation an teststand not?

"The maximum length that a string can be in LabVIEW, is up to 232 - 1 characters. This means that your string can have up to 4,294,967,295 characters."

0 Kudos
Message 3 of 5
(4,212 Views)

LabVIEW is a Software Development Software were you can create your Gode in the language G.

TestStand is more of a frontend for the TestStand Engine. So if you use more characters the TestStand Engine spans these automatically internally.

 

If you pass a sting that is longer than LabVIEW can handle you will get an error.

It is a extremely rare case to have more than 4,294,967,295 characters needed in a string.

 

--------------------------------------------------------------------------------------------------------
Work with NI Hard- and Software for about 15 years now.

Certified LabVIEW Developer & TestStand Developer/Architect

--------------------------------------------------------------------------------------------------------

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 4 of 5
(4,206 Views)

You are testing the maximum size for .NET strings in that test case, not for TestStand. TestStand does not have a hardcoded maximum size, but is limited only by available memory. .NET has a 2GB memory block size limitation by default, but there are settings to override that (you have to be using 64-bit though for it to matter). See the following: https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/gcallowverylarg...

 

Edit: To clarify, I see now that you mean that the string assignment is in TestStand and then there is a call to .NET. The .NET limit will still apply in this case because TestStand must first convert the TestStand string into a .NET string to pass it into a .NET method.

0 Kudos
Message 5 of 5
(4,195 Views)