LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure SR630 drivers to scan multiple channels and export all data into Excel

Hi, I am new to Labview programming. I am trying to program a SR630 16 Channel Thermocouple Reader to scan multiple channels and output the data into Excel. The driver I downloaded from NI contains a SR630 Example-Scan.VI that scans only one channel and outputs one line of result. How do I modify the drivers to scan multiple channels and export all the data to Excel?

Meanwhile, I bypassed the SR630 buffer download by inserting a While loop with a Stop button and a 30 second timer delay, which encloses five Read Channel Measure.VIs, one for each channel I want to measure over time. The values were feed into an array and transferred to Excel using Write to Spreadsheet Fi
le.VI. This works except the programs seems to drop the GPIB address after the 7th or 8th interation (35-40 data points collected)and I obtain an error code: -1073807339. What does this error code mean? The scanning rate was only every 30 seconds, quite slow. I also have frequent problems terminating the GPIB address from the last run even when I run SR630 Close.VI separately.

I am runing on a Dell Latitude CPt laptop, 600 Mhz Cpu, and a newly purchased PCMCIA-GPIB card from National Instruments.

Any suggestions on how to solve these problems would be greatly appreciated. I need to solve it by next Tuesday because I need it for my business trip. Thank you very much. David Ching"
0 Kudos
Message 1 of 4
(3,301 Views)
Hi David,
Thanks for using the discussion forum.

The library you have is a gpib driver library. Don't let the word driver scare you, this driver just sends strings to your gpib device. There are no dlls to hide the strings being sent. This means you will be able to look at the code and modify it to send any string you like. This brings us back to the device.

The best place to see what your gpib device will do and the commands it needs is the manual. There you will learn the commands needed to get the best performance. Hopefully there is a command to read all the channels at once rather than reading each channel one at a time. Once you know the command, it is a simple matter to alter one of the VIs in the driver (be sure to copy the VI and alter
the copy) to send the commands you want. You can test the series of commands to send with LabVIEW shipping examples. Launch LabVIEW 6.1 >> help >> find examples >> hardware input and output >> GPIB >> LabVIEW<->GPIB.

Once you can sucessufully colect the data, we can focus on getting the data to Excel. Again there is a shipping example that does this. Launch LabVIEW 6.1 >> help >> find examples >> communicating with external applications >> activeX >> excel >> write table to xl.vi. Take code from the example for use in your program.
For help with error codes, launch LabVIEW >> help >> explain error. In your case, meaning of the error makes so sense. This means that an error occurred but the code does not help us find the fix.
The best place to get started with the project is the manual but you might consider posting to the GPIB forum to see if anyone there has expertise with you device.

Jeremy Braden
National Instruments
0 Kudos
Message 2 of 4
(3,301 Views)
Jeremy,

Thank you for your response. It is reassuring to know that what I want to accomplish with this project is achievable. I just needed someone to point me in the right direction.

The examples you pointed out already show me ways that I can improve my existing program. I have the SR630 manual and have the command codes that I will try to further customize the read channel measurement.vi and the read data buffer.vi. I hope by incorporating better error handling sub-vi(s), as some examples show, that I can eliminate the GPIB address problem during data collecting.

I have not taken any course on LabView yet and so I am still learning by reading the user and measurement manuals. I will continue to work on this project until the program works r
eliably and solicit help from the GPIB forum if I get stuck, as you suggested.

Best regards,
David Ching
0 Kudos
Message 3 of 4
(3,302 Views)
I am glad to have helped.

I feel that I should also mention the advanced search page we have for our web site. Goto www.ni.com >> support >> advanced search (it is at the bottom--click on the words). This lauches a new page that comprehensivly searched NI's resources. What makes this page really great is that under option 2 you can limit your searches to resources of interest. I have the page bookmarked.

Jeremy Braden
National Instruments
0 Kudos
Message 4 of 4
(3,301 Views)