LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Command PUTTY without user intervention

Solved!
Go to solution

Hello playerm1,

 

I use another account because I can post only two messages by day with a new account.

 

I forget to tell you at first , sorry for that, I want to use the COM 3. For that I changed the default setting of PUTTY.

 

I will use my code Labview on the same computer than I use PUTTY so do I need the part about Password and the username ?

 

I thank you for your fast answer and for the weblink

Have a good day.

 

Vincent

0 Kudos
Message 11 of 20
(5,235 Views)

@vincentREY4 wrote:

Use PUTTY is a must in my project.

The code is for an amplifier specially made for us and the engineer who made it told us to use PUTTY.

 

Thank for your subjection.


Another option. 

Fire the engineer.  He hasn't learned anything new since the 1960's 

 

Its serial communication danm it!


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 20
(5,220 Views)

@JÞB wrote:

@billko wrote:

@JÞB wrote:

Use a VISA Resource.  There is nothing PUTTY can do that VISA can't 


I'm curious.  How would you do SSH on VISA?


Directed specific to SSH Maybe wrong.

Putty doesn't afaik

A tcp/ip raw socket can I thought


I'm not sure if you are saying that Putty doesn't support SSH but this is the first line of the help file:

"PuTTY is a free (MIT-licensed) Windows Telnet and SSH client."

 

A number of the NI provided guides to interact with an NI Linux RT-Target many times specify to first enable SSH on the target and then recommend using Putty to connect.  I'm sure there are multiple options but Putty and CLI PLink are definitely viable paths.

0 Kudos
Message 13 of 20
(5,206 Views)

@vincentrey5 wrote:

I will use my code Labview on the same computer than I use PUTTY so do I need the part about Password and the username ?


No, probably not, that command was specific to SSH.  You need to determine the equivalent serial command with  your specific settings (COM3, baud, data bits, stop bit, parity, flow control).

 

Or, if it really is just normal UART serial comms, just use the LabVIEW VISA serial API like JÞB mentioned.

Data Communication >> Protocols >> Serial

0 Kudos
Message 14 of 20
(5,204 Views)

Hello playerm1,

 

Thanks again for your answer.

I have already determined my specific settings and I set the default setting of PUTTY at them.

 

Thanks that, I can open PUTTY with the setting than I need from the window command, cmd.

The problem is about using PUTTY and tap a command, like O2E for example, into it.

I need to do it without tap directly the command in PUTTY but using a LabVIEW code.

 

I see the link, then you send me before, but I don't see the solution of my problem into it.

Do you have any idea or link to help me solve my problem, i am stuck.

 

I am also working the solution using UART serial comms, thank for the subjection JÞB.

 

Thanks for ready my question and sorry for my English mistake.

Hope you will have a good weekend.

Vincent

0 Kudos
Message 15 of 20
(5,170 Views)

The link is to the user manual for PLink, the command line interface for Putty.  This is probably the most reliable way to pass commands to and receive results from Putty.

 

If you insist on using the actual Putty command window and programmatically typing in commands there, search around for simulating keyboard inputs with LabVIEW.

0 Kudos
Message 16 of 20
(5,162 Views)

For the last message, I mixed plink and putty, sorry.

I finally find a way which might work :

 - At first I create a file with the instruction writing into it.

 - Then I use "cmd /c C:\plink -m name_of_the_file" on a command window.

 

I add a picture of my code.

Capture.PNG

I got an error in the String 2 :

'C:\plink' is not recognized as an internal control or external, an executable program or command file.

I check, I download PUTTY in the C so i don't realy understand why it doesn't work.

In fact I don't see plink anywhere in my file explorer, but I see in another forum than it is normal.

 

Thank again for your help.

Vincent

0 Kudos
Message 17 of 20
(5,155 Views)
Solution
Accepted by topic author vincentREY4

Don't use plink. Just look at the examples for the VISA serial communications and communicate directly with the device using the VISA VIs. You will only need a few VIs. Your code will look something like this:

 

Basic serial.PNG



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 18 of 20
(5,147 Views)

@vincentREY4 wrote:

For the last message, I mixed plink and putty, sorry.

I finally find a way which might work :

 - At first I create a file with the instruction writing into it.

 - Then I use "cmd /c C:\plink -m name_of_the_file" on a command window.

 

I add a picture of my code.

Capture.PNG

I got an error in the String 2 :

'C:\plink' is not recognized as an internal control or external, an executable program or command file.

I check, I download PUTTY in the C so i don't realy understand why it doesn't work.

In fact I don't see plink anywhere in my file explorer, but I see in another forum than it is normal.

 

Thank again for your help.

Vincent


Man, there are so many things I think you aren't understanding.  For instance, plink.exe doesn't reside in your root directory - but I do believe it is in your PATH environment variable, so just plink -m... but this whole thing doesn't make sense.

 

How about, let's start from square one.  Tell us exactly how the engineer told you to do it from a putty session.  And I mean everything right from opening the session itself.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 19 of 20
(5,091 Views)

Hi,

 

Your solution work. I thought I had to use PUTTY but no at final.

Thanks for your help everyone.

 

Vincent.

Message 20 of 20
(4,993 Views)