LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automate CLI commands from a Linux Environment using RS232 Serail Port with the use of Basic Write and Read VISA functions.

Hello Ealmeida,

 

The tests are all failing at the moment because you are comparing all the outputs to “abc”. I would recommend processing the string in the Labview and passing a pass or fail out to TestStand. The string comparison and processing would be much easier to do in the Labview environment than passing it back into TestStand.

 

Eric

 

Eric Liauw
Senior AE Specialist - Automated Test | CLD | CTA
National Instruments
0 Kudos
Message 11 of 13
(638 Views)

Hi Eric. I am not sure on how I would do any compare for a substring within an output string, from a VI prespective.

 

With that said, I am trying to use the "String Value Test" within TestStand to go ahead and read the output, then search the output from a string.

 

Example.

 

1) Write command = ping -c  10 169.254.100.3

2) Output =

ping -c 10 169.254.100.3\r PING 169.254.100.3 (169.254.100.3) 56(84) bytes of data.\r 64 bytes from 169.254.100.3: icmp_seq=1 ttl=30 time=36.1 ms\r 64 bytes from 169.254.100.3: icmp_seq=2 ttl=30 time=32.0 ms\r 64 bytes from 169.254.100.3: icmp_seq=3 ttl=30 time=32.0 ms\r 64 bytes from 169.254.100.3: icmp_seq=4 ttl=30 time=27.9 ms\r 64 bytes from 169.254.100.3: icmp_seq=5 ttl=30 time=60.0 ms\r 64 bytes from 169.254.100.3: icmp_seq=6 ttl=30 time=56.6 ms\r 64 bytes from 169.254.100.3: icmp_seq=7 ttl=30 time=52.0 ms\r 64 bytes from 169.254.100.3: icmp_seq=8 ttl=30 time=48.0 ms\r 64 bytes from 169.254.100.3: icmp_seq=9 ttl=30 time=32.0 ms\r 64 bytes from 169.254.100.3: icmp_seq=10 ttl=30 time=60.0 ms\r \r --- 169.254.100.3 ping statistics ---\r 10 packets transmitted, 10 received, 0% packet loss, time 9036ms\r rtt min/avg/max/mdev = 27.958/43.700/60.049/12.257 ms\r [root@XN1003-03EF28 ~]#

3) Now I want to search that output to make sure I get: 10 packets transmitted, 10 received, 0% packet loss

 

The String Value Test in TestStand is designed to do this but I cannot get it to work. I set the Limits and Data Source to the appropriate values and it fails every time.

 

Is TestStand and Labview the correct tools to do this basic function or is TCL/TK the best thing for this?

 

I would assume NI toolset to be the best but after waisting all this time and money on seats, I am second guessing at this time.

 

If you have any guidance here, please let me know and thanks so much for your help in advance.

 

ealmeida

0 Kudos
Message 12 of 13
(623 Views)

Have you taken either a TestStand or LabVIEW class? The string value test is NOT designed to search for a substring within another string. Where did you get the impression that it does? It is an EQUAL comparison and you obviously do not have equal strings. You would need to use the TestStand Find() function or as mentioned, a function in LabVIEW (i.e. Match Pattern).

0 Kudos
Message 13 of 13
(618 Views)