ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
05-08-2008 09:00 PM
05-08-2008 09:55 PM
What is the content of the file? Is each element of the array a command or do you need to format the data you are reading? Provide an example of the data and details on what exactly has to be written to the device you are trying to write the data to.
p.s. Your image shows you reading an .xls file. You cannot read a native Excel file with the Read From Spreadsheet function. Read From Spreadsheet means to read delimited text files. You can easily export a native Excel file with tabs or commas as delimitors.
05-08-2008 10:07 PM
05-08-2008 10:21 PM - edited 05-08-2008 10:21 PM
A couple of nested for loops is all that you would need. Note that I have not included any error checking. You could use the conditional terminal that 8.5 has with a for loop to stop in case of error.
05-08-2008 10:40 PM
05-08-2008
10:46 PM
- last edited on
08-19-2024
11:32 AM
by
Content Cleaner
05-08-2008 11:05 PM
05-08-2008 11:11 PM - edited 05-08-2008 11:11 PM
I still don't know what you did with the VISA Write.
Your code is not to read what was just written.
Assuming that you are doing some sort of loopback test, do something like what is shown below.
05-08-2008 11:18 PM
i am not doing a loopback test, assuming i am using Computer A, i am actually receiving data from a spreadsheet file on Computer B via RS-232. Means to say, Computer B is using VISA WRITE, Computer A is using VISA READ to receive the data, and store it into a spreadsheet on C:\Received.txt... I am actually modifying the Advanced Read and Write.vi found in the example code to get this function, as this is a basic requirement of my project, but i am really lost on how to do that... sorry for the ton of questions.
05-08-2008 11:39 PM - edited 05-08-2008 11:44 PM
Okay, I think I understand now. Instead of sending out each element in each row with separate writes, concantanate each into a single string (i.e. x=n,y=n2) and use a single write for each row. On the receive side, the read would be in a while loop and your would parse a read into a 1D array.
Note: If you are still experimenting because you have no idea of the actual instrument you will be using, be aware that you will probably have to rewrite most of this code.