07-05-2017 01:47 PM
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.
07-05-2017 02:33 PM
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.
07-05-2017 06:43 PM
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
07-05-2017 06:58 PM
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.