07-14-2009 04:00 PM - edited 07-14-2009 04:02 PM
Hi,
I am trying to convert my labwindows C program over to Labview. This is a VISA GPIB application. I have seen how you can send multiple
commands in Labview by sending the commands separated by semicolons. However with my instrument. I need to write one command
then immediately read the command. and report the results to a text window for user visual verification.
In C is sent around 47 or so commands to the instrument just to be sure all of these parameters have the correct configuation. I did this with a
Array of strings with each element a string command. then simply used a for loop in C to send to visa ViPrintf function. Always one write and one read followed by displaying the command string and the response to the instrument.
I would like to do the same thing in Labview.
Thank You for your help,
Gary
07-14-2009 04:17 PM
OK. So what's your question? LabVIEW has VISA functions as well. VISA Write and VISA Read. LabVIEW has loops. LabVIEW has arrays. Thus, you can create an array the same way you did in LabWindows, and drive a loop with that array, and send a write followed a read.
Perhaps you can clarify what you're asking for.
Have you looked at/gone through the tutorials? To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.
07-14-2009 04:46 PM
Hi,
Thank you for the information. I need to learn how to create the array of strings to feed the ViPrintf function.
I have been looking through a lot of information. Have not found a example of how to do this.
Thank You,
Gary
07-14-2009 04:50 PM
07-14-2009 04:55 PM
I hope you figuratively mean ViPrintf.
Your VI should look something like the code below.
07-14-2009 04:57 PM
Hi,
I will try that. I need just a static array that can hold around 50 strings. Then increment through to send strings out.
I am still a novice with labview.
Thank You,
Gary
07-15-2009 12:57 PM
Between you and me gary, 18000 post ago, Dennis was a novice too!
Good luck, post back if you need any more help.
07-15-2009 01:34 PM