05-22-2009 09:56 AM
You VI was written in 6.1. Unfortunatetly I don't have 6.1. I have 6i (i.e. 6.0) and 7.0. When I ran your code under 7.0 it correctly acquired the values from the cells. It also appears that you are using an older version of Office since you are using the "Value" property node. I believe Office 2000 was the last version that used that, and subsequent versions used "Value2". Regardless, I cannot replicate your problem, so I can't say what's wrong.
P.S.
06-30-2009 01:53 AM
Thanks Smercurio...
I was able to get it working!
If it's not too much to ask, I'd like to move onto the next phase. The entire project is based upon a communication using GPIB with a HP8648A signal generator. If you look to my first post, the overall specs are listed. I have an updated file including both the excel data extraction as well as the GPIB; partially setup. It's just a matter of linking them in a way so as to fulfill the steps needed.
You'll notice that I have two inputs associated with the Format Into String function. How does the string distinguish between the two data inputs?
Much obliged...
06-30-2009 09:41 AM
You need to drive a for-loop (not a while loop) from the data that you read from Excel. I'm assuming that column 1 is your frequency and column 2 is your power.
What else do you need to do after setting the frequency and power? Are you taking any readings, or is this just for show?
Aside: I don't understand why you're using an Excel file. A tab-delimited text file would be much easier to deal with.
06-30-2009 08:25 PM
Yes, you are correct in assuming that column 1 is the frequency but column 2 is an antenna factor that I haven't filled in properly as of yet to be in dBm. The readings are to be done on a spectrum analyser so LabVIEW is not needed for that stage unless I develop it further in the future. I have done what you suggested in using a for-loop with n = 93 but am having an issue at the output side of the for-loop. For instance, the error output won't connect as it says the source and sink are different because of a 1D array of cluster of 3 elements at the source and a cluster of 3 elements at the sink (see figure). The same is said about the VISA resource name. Do I need some form of conversion link? Do these need to remain inside the for-loop?
Also, I have saved the file as a tab-delimited. Would the next step involve the use of read-from-spreadsheet-file.vi or is there a more suitable method?
07-01-2009 12:34 AM
After hours spent on this today, I finally put together a solution. There's always room for improvement so are there any better ways of producing the same outcome? How do I produce a folder icon to open the file instead of manually typing in the file location each time it runs? Also, the cluster conversion at the outputs... is there a way around this? The array extracts the values from the file properly but it seems quite cumbersome; is there a more efficient way of doing this?
Thanks
07-01-2009 10:15 AM
No, that's not right at all. The intention of using the for-loop was so that you don't have to hard-wire the iteration count - you simply use auto-indexing. You should be using a shift register to pass the error around the loop. If you need to have a VISA resource indicator then you just need to wire that to the control directly. You can also use a shift register for the VISA resource if you wish. (You can wire it directly through without a shift register by disabling auto-indexing at the output, but you must be aware that if the loop does not run then the output will be empty.)
How do I produce a folder icon to open the file instead of manually typing in the file location each time it runs?
Right-click on the control and select Visible Items->Browse Button.
Please see attached.
07-02-2009 08:14 PM
Thanks,
I modified my input file to cycle through, using 1MHz steps which accounts for approximately 1000 rows. The duration of this test was 2:03 mins. Is there a way to increase the speed of the for loop's operation?
07-02-2009 08:21 PM
The only way you can speed up the For loop is to pull everything out but the VISA Write.
Do your array manipulation and format into string outside the loop to create a 1-D array of strings which you then pass into the loop through auto-indexing. I don't know if this would actually speed things up very much.
07-02-2009 11:24 PM
I discovered that it was the equipment that was limited in receiving SCPI commands. I further altered my design whereupon I have established a continuous loop that restarts the process once it is complete. Please let me know if there can be any improvements or if I have missed out something vital.
Thanks again
07-02-2009 11:49 PM