06-18-2018 09:48 AM
I'm debugging a program that outputs a voltage to an Agilent 3633A power supply. The program will run fine, then the next run it'll report "-410,"Query INTERRUPTED"", then run fine again the next time. I've tried *RST, *CLS, and even manually turning off and on the power supply between each run of the program to try clearing the query, but the problem still persists. I've been looking through the discussion boards all week but can't find anybody with the same problem or a solution. Does anybody know what might be causing this problem?
I've attached screenshots of the program.
I'm very new to LabVIEW and would appreciate any help, thank you!
06-18-2018 10:16 AM
Why are you placing the instrument into local mode in your code? Try removing that statement and check on your results. Also, check to make sure that you are using the latest driver for that instrument. Older drivers did not always close.
06-18-2018 12:47 PM
I made sure that the drivers were up to date and removed the SYST:LOC part. I'm still getting the same behavior, however. Also now the output isn't being turned off, the power supply is staying at 0.0 V and 10.30 A after the program finishes running.
06-18-2018 01:00 PM
It sounds as if it is sending commands without waiting to verify that they have been received. Especially prior to the close statement. You may need to add:
;*OPC?
to every command and follow those with a Read of 50 characters. It should only respond with a "1" when working properly.
06-18-2018 02:50 PM
This just goes to show how new I am to LabVIEW. I tried following the same structure as the examples provided by NI but can't get anything to display on the output panel.
06-18-2018 02:57 PM
Make the last write before the read:
OUTP:STAT OFF
SYST:LOC;*OPC?
Some instruments prefer to have a newline ("\n") character at the end of a write. The instrument will interpret the semicolon (";") above as a new command delimiter similar to the newline.
06-18-2018 03:06 PM
I still can't seem to get it to write anything out to the output panel. I've already tried looking up more about the VISA Read function, but the NI page for it is a bit confusing to me. What inputs are supposed to go into the VISA Read function to get it to display the string on the front panel?
06-18-2018 03:18 PM
Let's start with something simple. Using the attached Simple VISA interface, send
*IDN?
What was the response? You should be able to run this over and over again without any issue (Not using the continuous loop).
06-19-2018 07:04 AM
It very hard to debug a PICTURE. Next time please attach the actual VI instead. I'm not sure this will solve your ERROR -410, but...
First step is to make sure your communications are working correctly. Follow all minions suggestions (including using a termination character "\n"). Most HP/Agilent/Keysight instruments need the \n.
From what I can see in your picture, you are trying to set the Voltage step to a negative number when "i" is odd (i.e., -1^i), and then stepping "UP" by that negative amount to decrease the voltage. In my experience, the step size is always positive. Then you can then either step UP or step DOWN to increase or decrease the voltage level.
Next thing is I recommend NOT to use SYST:RWL. That locks ALL keys including the "Local" key. If you really need to disable the front panel, then use SYST:REM. At least you will have a way to recover local control of the power supply if something (bad) happens.
Your VI is a little convoluted, but it looks like you are just repetitively toggling the voltage between MAX Voltage and ZERO volts. Why not just explicitly set the voltage?
Or alternatively, you could toggle the OUTP:STAT OFF then ON.
06-19-2018 09:50 AM
Thanks for the examples, Jamiva, that's a lot cleaner. I'm not getting the -410 error anymore, but the output will turn off at particular step counts. For example, when Number of Steps = 10, the output will turn off when i = 5. Or when Number of Steps = 20, the output will turn off when i = 4, 9, and 18. IVe been checking the conditional statements from the floor operation but everything seems to be correct, so I'm not sure what's wrong. Also, the error light turns on the power supply display screen even though no error is popping up on LabVIEW when I put an "error out" at the every end of the program. Do you know of any explanation as to why?