Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

convert commands in PuTTy to visa resources write read in Labview

I have an instrument (a complicated RF voltage source) that I currently able to control from PuTTy, which is rather a cumbersome interface. I want to control the instrument though LabVIEW. I have never used the VISA resources commands, I always used the LABVIEW provided VIs of the instrument I am interfacing which don't exist for this. Right now in PuTTy, to change say the frequency I enter: <freq 3, 150> followed by <latch 3> to set the frequency to 150 MHz. Can someone help me construct the equivalent LabVIEW code using the write and read in VISA. Also, to access the instrument through PuTTY I have to first enter the command: <soft on> to put it in software mode, can you also help me code this as well. I appreciate all the help.

0 Kudos
Message 1 of 4
(3,838 Views)

What type of bus are you communicating over?

 

The big thing is that you typically end a command with a termination character of some sort, typically a Line Feed.  So just make sure you add that to the end of your command strings.  Otherwise, it is mostly just setting up the bus.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(3,820 Views)

Thanks crossrulz. The instrument is very complex. It is connected to the PC through USB, in LabVIEW it shows as a serial device on NI MAX. The PC sees it as both a serial device and a mass storage device. In principal, the text commands should be the same in LabVIEW and I should be able to serially write and read to and from the device. I might be making a more basic mistake. The termination character is supposed to be enter (I basically hit enter after typing a text command in PuTTy). I am not including the termination character in the text string inputs to the VISA VI, I thought this is a default taken care off. I attached a snapshot of the block diagram. Please let me know if you find anything. 

Thanks again

 

0 Kudos
Message 3 of 4
(3,797 Views)

An Enter in Putty is a Carriage Return and a Line Feed.  So you need to concatenate an End Of Line character to the end of your commands.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(3,794 Views)