From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-10-2014 10:03 AM
Hello all,
I have a VI that works perfectly fine when run independently of anything else, but when called from another VI (which I rather need to do) it chokes, and I get a VISA command error (as in, it returns an error saying there's a problem with the command sent to the program). To be perfectly clear, it's getting the _exact_ same input manually and via the super-VI.
I'm a little confused both as to how this is possible and what to do about it. I've tried clearing the VISA buffers in question before calling this VI, to no avail, and am not sure I can close and reopen without causing other problems. Does anyone have any ideas?
07-10-2014 10:08 AM
Let's see some code. Otherwise it is a complete shot in the dark.
07-10-2014 10:10 AM
Gladly. Should I attach the code as files, or should I screenshot?
07-10-2014 10:12 AM
We recommend posting the VIs. If you have more than one (sounds like you should) then zip up the files and post the zip file.
07-10-2014 10:13 AM
If its simple inline snippets. these let everyone see what you've got and we can dig into the code with a few drags n drops. otherwise attach .vi's or a zip of the whole project.
07-10-2014 10:19 AM
This has some irrelevant files buried further in the .zip. The two most relevant are in the first level (e.g. immediately on unzipping)-- I can run 'setpoint' on its own, but if I try to run 'readout_combined', setpoint is where it breaks.
07-10-2014 10:47 AM - edited 07-10-2014 10:48 AM
I have no Idea why you would send a selected device clear. This would be a problem the Lakshore resets when you raise DC1
07-10-2014 11:01 AM - edited 07-10-2014 11:03 AM
I'm sorry, I don't understand what you mean. What's DC1?
EDIT: Based on your suggestion, I deleted the clear block (which made sense as I chased down an earlier error), and suddenly it works perfectly. Still don't understand why though.
07-10-2014 11:12 AM
For GPIB devices CLR send s "Selected Device Clear" Which, in this case, is also a reset command for the device (you can tell from the utility device reset)
DC1 is one of the handshake lines on the GPIB bus it is not too surprising that it is involved with Device Clear commands.
07-10-2014 11:40 AM
I did not know that. No wonder it was causing problems!
Thank you!