07-16-2015 09:54 AM
Hello,
One thing that has always bugged me is "what should I do for proper equipment intialization?" When I write a program, the program itself does not know the status of the equipment I'm controlling. For example, the testset may have just been turn on, it may have been running all day, or it may have a hanged GPIB bus. The issue I'm trying to figure out is, how do I properly initialiize the equipment to remove all errors. I currently do the following:
Clear
loop on SYST:ERR? until no errors are present on the testset.
*RST
*CLS
(Also, overide any defaults that are necessary depending on the testset)
I'm not sure if this is all that is necessary or not, but I was hoping someone could help confirm.
Thanks!
07-17-2015 11:01 AM
Hi,
I don't see any problems with the current way you initialize things. Some people make sure to clear errors at the end of their programs, but what you do would be the best way to make sure you don't get any once starting up.
If you're using LabVIEW we also have the GPIB Initialization Function that can help out with all of the initizialization efforts. http://zone.ni.com/reference/en-XX/help/371361J-01/lvinstio/gpib_initialization/ We should also have similar functions in CVI or Measurement Studio.
07-17-2015 11:13 AM
I just realized that the *CLS will clear the errors so there is no need for the syst:err? loop. I'm using C#, but I am using the VISA drivers. I used to use LabVIEW so I just used the initialize function, but since i don't have LabVIEW installed anymore, i couldn't find documentation on what it does. Thanks for the reply.
07-17-2015 12:12 PM
What you're doing looks fine.
You can iterate through the loop if you want to capture/present the errors, otherwise just *CLS and *RST will get things done.
Then set your specific test parameters after that.