05-22-2019 08:50 AM
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
06-19-2019 02:10 AM
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
06-19-2019 02:26 AM
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."
06-19-2019 03:31 AM
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.
06-19-2019 10:04 AM - edited 06-19-2019 10:06 AM
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.