06-22-2011 12:11 PM
Hi,
I am new to LabVIEW.
For my internship I have to control equipment over GPIB and take some measurements.
I am using the GPIB Write VI which takes a string for its Data input.
The command I want to send is of the form: " Apply 5, 1 "
I was thinking of concatenating a string ("Apply_"), an integer ("5"), a coma and space (",_") and the last integer ("1"), so that I can increment the integers in a loop if needed.
However, the Concatenate String VI does not accept integer inputs.
Also, I feel that I am going the hard way about this (I was thinking of appending the integers as strings, but then I won't be able to increment them at each iteration).
Can someone help me?
Thank you very much,
Nicolas
Solved! Go to Solution.
06-22-2011 12:36 PM
06-22-2011 01:50 PM
Have you first used the Instrument Driver Network to see if there is an existing driver? You should also look there to see what an instrument driver is and how to write one. Also, use the VISA functions instead of the low level GPIB.
06-22-2011 03:26 PM
Thank you Ben64.
@ Dennis Knutson:
Yes, I installed the instrument driver. The problem is not communication with the instrument. I can send it commands and it works fine. I was asking more about the actual LabVIEW program and how to deal with the different functions/modules.
As for the VISA functions, do you have an example in mind or a tutorial you would recommend?
I'm currently using GPIB Write and Read. I'm still a beginner, so I don't know the advantages/drawbacks of each option. If you don't mind elaborating...
Thank you for your help!
06-22-2011 04:56 PM
If you have the driver, you probably don't have any need to create your own string concant or Format Into String.
You don't mention the instrument but most drivers come with example. Open Help>Find Examples. Go to Hardware Input and Output>Instrument Drivers>LabVIEW Plug and Play.
Also, make sure your context help is turned on. You will see a brief description of each function when you move your mouse over it's icon and the same is true as you move the mouse over the controls/indicators on the front panel of each function.
I don't have a link to a VISA tutorial. Perhaps something here. VISA was probably used to write the instrument driver. It abstracts the actual hardware used. So, a VISA driver can be used with little or no change with a GPIB, Serial, USB, Ethernet, etc connection. It makes the code portable.
06-22-2011 06:00 PM
Interesting. I will look into that.
Thank you for taking the time to help a beginner, I deeply appreciate it!