From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Executable to return string with NULL (\00) values

Hi,

I need to call CLI from TS. The response is a string containing NULL (\00) characters. TS cuts the response where the NULL is. In general, TS does not allow you to have NULL in the string, so how to deal with this limitation?

 

If I call CLI from LV I have "AAAA\00BBBB".

If I call CLI from TS I have "AAAA".

 

How can I configure Call Executable step to return a complete response?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 1 of 4
(721 Views)

Hi bienieck

 

Check this out.

 

Regards

 

Steve

0 Kudos
Message 2 of 4
(710 Views)

I know I can change that normally but how can I apply this to Call Executable step to read std out?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 3 of 4
(693 Views)

The only solution for Call Executable I found is to save stdout to a temp file and then use mscorlib to read it and replace NULL with space in the process (see below).

TS vs NULL.png

This way I don't need to create extra code for code modules.

 

Another option without extra code modules is to use .NET System.Diagnostics.Process.Start() (attachment). But in this case, we will get rid of Call Executable.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 4 of 4
(688 Views)