10-11-2021 03:21 PM
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
10-11-2021 07:13 PM
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.
10-12-2021 08:22 AM
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?