04-28-2017 08:08 AM
@Snoot wrote:
I can find the instrument in NI MAX. When I click Communicate with Instrument, I can send queries and commands that it responds to in the correct way. However, LabView keeps giving me the error.
RavensFan probably replied to the wrong thread...
I think I did. Now I just need to find what thread I thought I was replying to.
Sorry about the confusion.
04-28-2017 08:34 AM
Sorry but I don't know how to check that... I'm not even sure if it actually is a serial connection, the VISA name is GPIB0::12::INSTR rather than COM[number].
04-28-2017 08:40 AM
If it is listed as
GPIB0::12::INSTR
then it is an instrument that is being controlled via its GPIB port. Could you post your vi? Also, what is the command/query that you want and how are you sending that to the instrument?
04-28-2017 09:31 AM
These are the main VI and some of the relevant subVIs. I want to control a LakeShore Model 340 and read out the temperature. I didn't include the subVIs for setting the parameters because they are only executed when you click the respective buttons. What should be mentioned is that it's originally based on the VIs you can download for the Model 350, but with some changes I got it to work with the 340. As I said, it worked fine until today.
04-28-2017 09:59 AM - edited 04-28-2017 10:00 AM
Ok, here are my observations:
04-28-2017 10:13 AM
Oh yes, I replaced the Stop button with a True constant just to prevent the error from repeating indefinitely while testing. But the fact that the initialization occurs before the loop and the close happens within it didn't cause any problems before. The error occurs immediately at the initialization step, at VISA Open. I can see that failure to close might lead to problems when opening again, but would that sill hold when I restart LabView or even reboot the computer?
05-01-2017 03:29 AM
I checked it again in the debug mode and it turns out that Initialize.vi specifically passes "no error" into VISA Open, but it immediately returns the error. So the problem must be caused in VISA Open itself. I found the suggestion that there might be a problem with NI-VISA, and according to NI MAX, NI-VISA 16.0 is installed while I'm running LabView 2015 (no idea if that matters though). I tried installing NI-VISA 15.0.1, but that doesn't seem to work while 16.0 is installed. However, I can't find out how to uninstall 16.0...
05-01-2017 07:07 AM
Turned out that simply repairing all the software did the trick...