LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I use scp with LabVIEW or TestStand?

I have a python script that uses os.system to execute an scp command. When I run the python script it works correctly, but when I call the script in teststand, nothing happens at the scp line.

 

Same thing happens with system exec in labview. I execute the scp command in the shell and it works. I use the exact same command with the system exec vi and nothing happens.

 

Can anyone help? I'm using windows 10, labview 2020, teststand 2019

0 Kudos
Message 1 of 3
(1,161 Views)

What code are you using to do this?

 

Are you wiring in 'scp blah1 blah2' as a string into the system exec VI?

 

Often, instead of doing that you need to wire in 'cmd "scp blah1 blah2" ' instead. 

 

If you were doing that, or if you try it and it still doesn't work, use 'cmd /k' instead and it should leave the window open so you can see any error message.  It could be you're trying to run without admin permissions, or from the wrong folder.

 

You might also want to try toggling the "wait until completion" optional input.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YGivCAG&l=en-US for more info.

0 Kudos
Message 2 of 3
(1,124 Views)

I was previously wiring with cmd. cmd /k is causing the terminal to flash but it does not stay long enough to read. 

 

I guess the more important explanation is that I have a python script with two lines:

 

1    take image

2    scp blah1 blah2

 

When I run the script manually it takes the image (1) and correctly moves it (2). When I run the python script from teststand, it takes the image, but doesn't do anything on the scp line. I have tried multiple ways around this, but when using labview or teststand, the scp command never works. I guess I'm wondering if labview allows scp commands or if there's something I need to change in its setup?

0 Kudos
Message 3 of 3
(1,103 Views)