09-12-2017 01:50 PM
Python is certainly an option, but although I did work with Python in the past it certainly is not my first choice when I have to tackle something. Not because it is bad or anything but because integrating ANY hardware access library is generally a lot more work there than in LabVIEW. I understand that for someone who uses LabVIEW maybe twice a year that balance might look slightly different, but if I need to use DAQ, Vision or instrument control, that comes right out of the box with LabVIEW, but with Python, Lua, Visual Basic, .Net and many more I have to tinker with various things first for all of them. If you only have to deal with standard communication protocols and not with specific hardware interfaces, LabVIEW doesn't have as many advantages anymore and in some parts even lacks comparative functionality to some of them. Then familiarity with the tool at hand can really get the dominating factor and if you are a Python crack, it's natural to look there. But if you use Python equally infrequently I still doubt you would be more productive in it.
01-18-2018 10:26 AM - edited 01-18-2018 10:27 AM
A solution (did some googling for other languages using plink): re-directing standard input from somewhere else and the issue seems to be resolved with system exec.
For example instead of:
"plink.exe" -ssh user@host -pw "" <command>
which will give an error, use:
echo <command> | plink.exe -ssh user@host -pw ""
or
cmd /c echo | "plink.exe" -ssh user@host -pw "" <command>
For those curious about input/output redirection for windows command line: https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr...
02-06-2018 10:11 AM
A few minor improvements. First, the working directory only applies after plink is called, so better to keep it the local directory. LabVIEW seems to find PLink in Programs without specifying the path. Second, there is the option to authenticate with a private key using the -I option (that's lowercase i). This VI searches for a putty key (.ppk) in the VI's directory and uses the first one it finds:
I use this to shut down my Raspberry Pi when exiting my data collection VI. I modify my sudoers file as explained here and pass the command "sudo poweroff".
02-08-2018 12:19 AM
02-08-2018 06:53 AM
Sorry, don't have 2014 installed anymore. You can't implement it from the diagram?
Additional note - it seems to find Plink.exe installed from the new (0.70) PuTTY installer, but not 0.6x. Passing the full path to Plink should work in that case.