05-20-2014 04:02 PM - edited 05-20-2014 04:08 PM
I have a VI which uses a while loop containing a GPIB Write -> GPIB Read chain to read a value from a SR 630 Thermocouple reader.
Periodically, the VI will 'split'a value (so, for example, if the Thermocouple is reading 296.7 K, the VI will read 2 K, then on the next iteration through the loop, it will read 96.7 K, then 296.7 K. This happens regularly but randomly in the program). At first I thought it was a timing issue, so I adjusted the GPIB timeout value (down and up to ~10 s) and this did not resolve the issue. This also coincides with a delay in the loop's iteration which *appears* to be related to the GPIB Read Timeout setting (eg, if I set timeout for 10 000 ms the delay will be longer, if I set it for 50 ms it will be shorter) - which suggests that the problem is happening in the GPIB Read operation.
The problem originally presented as an "Error Code 6" (which prompted the timing changes). I wired the GPIB read/write errors to an error box, and that kept the VI from locking up with the error code - but now I get this strange 'split' value.
This was all precipitated by adding a "Delay" to the while loop (this befuddled me because originally the loop was iterating in ~16 ms, the delay slowed it down to 1000 ms...and yet somehow now the combination of the GPIB controller and the SR630 can't keep up with the workload?
Any help would be greatly appreciated, as I'm not at my wits end.
(For background, I am Level -1 in terms of Labview and general programming experience...I'm sure I'm violating all kinds of best practices with this VI; please forgive me and I appreciate any pointers not related to the problem - but mainly I'd just like to get my instruments working).
05-20-2014 04:10 PM
05-20-2014 04:18 PM - edited 05-20-2014 04:18 PM
@Dennis_Knutson wrote:
Why don't you go to the Help menu and select Find Instrument Drivers. Search for 630 and install the project style driver. Post back of this existing and debugged code exhibits the same problem.
I searched for a driver for this instrument before I started this project, and was unable to find one. The manufacturer does provide an example VI for how to read/write values from the instrument, which I am using in my VI.
05-20-2014 04:26 PM
05-20-2014 04:33 PM
@Dennis_Knutson wrote:
The driver is found by the exact process I mentioned.
http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=0150AFD753643985E0440003BA7CCD...
given since you were apparently doing some strange search.
Yes, Dennis, thank you! Joke's on me, apparently I was doing some strange search!