NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

local variable string format

I am trying to send a string command to a vi.  The command is of the format:

prog_mac <mac address>   (example: prog_mac 001122334455)

The <mac address> is stored as a local string variable (e.g. Locals.MacAddress)

I can not get the string formatting correct.  I have tried several variations.  Right now I have the following (that doesn't fully work):

"prog_mac %s\n", Locals.MacAddress

This only sends out the mac address and not prog_mac.  I know this should be a simple one.  Thanks.


0 Kudos
Message 1 of 3
(2,984 Views)
Try this...
 
"prog_mac " + Locals.MacAddress + "\n"
0 Kudos
Message 2 of 3
(2,983 Views)
That did it!  Thanks!
0 Kudos
Message 3 of 3
(2,977 Views)