Hi Richard, It took me a month with help from members to establish communication between my PC, an old GPIB card, and an old HP8591E spectrum analyzer.
Following is a brief description to control an instrument by using Visual Basic through a GPIB interface card (HP E2078A) and a GPIB cable. You have to have the following software installed: § Agilent IO Library Suite 14.2: some earlier versions may not work with your Window operating system. This software is free download from the Agilent web site, one download per an e-mail address. This software may contain an instrument driver you need. The step-by-step instruction can be found at <http://cp literature.agilent.com/litweb/pdf/E2094-90009.pdf> http://cp.literature.agilent.com/litweb/pdf/E2094-90009.pdf (Pages 71-96). For an old instrument that doesn't accept 488.2 commands, forget Step 5 starting Page 91. The "*IDN?" command cannot be recognized by an old instrument (HP 8591E). The HP 8591E only recognizes the original IEEE 488 commands. § Visual Basic software: I choose Visual Basic 6, as it is easier to start with. Many instrument manuals come with this version of examples, as of late 2006. I also downloaded the National Instrument driver, PCI-GPIB. I am not sure if this is necessary. The National Instrument communication software, Measurement and Automation Explorer, cannot communicate with an old instrument, such as an HP 8591E. An easy way to start Visual Basic 6 is to read the article, "Learn Visual Basic Version 6", found at <http://vis albasic.about.com/od/standalonevb6/l/bllvb_6a.htm> http://visualbasic.about.com/od/standalonevb6/l/bllvb_6a.htm. Agilent provides some sample codes to start with. Here are the steps to get the codes: Bring up the Agilent Connection Expert (from the IO icon) - click Help - choose Document - choose Agilent 488 Help You will find Sample Code under Contents tab. Use the ones with the original functions. Delete the "*IDN?" related codes if necessary. In addition, declarations files need to be added to avoid any compile errors. The instructions, titled " Building Your Agilent 488 Program", can be found at the same help screen as the Sample Code's. After there is no compile error, the program should be able to control an instrument (HP 8591E), at least to initialize it. This means the communication between the PC and an instrument (HP 8591E) works. I hope this helps. Regards, Grace On 8/2/07, Richard Georgerian <[email protected]> wrote: Greetings All, I know there are some good EMC programs that can control various EMC equipment like, LabView, but I would like to use VBA. Is there anyone who has had some recent experience in writing VBA code to talk to a spectrum analyzer? For example, if using an interface card by National, what are some of the protocols in VBA code would be needed to establish communication with the equipment. Any assistance or pointing me in the right direction would be most appreciated. Many thanks. Richard 2007 PSES Chair 2007 PSES Web site: <http://www.ewh.ieee.org/soc/pses/symposium/> http://www.ewh.ieee.org/soc/pses/symposium/ 2007 PSES Symposium date: 22-23 October 2007 ===== Richard Georgerian Compliance Engineer NewsFlex Ltd. "...turning the world one page at a time..." Web site: http://newsflex.net email: [email protected] ===== - This message is from the IEEE Product Safety Engineering Society emc-pstc discussion list. Website: http://www.ieee-pses.org/ To post a message to the list, send your e-mail to [email protected] Instructions: http://listserv.ieee.org/request/user-guide.html List rules: <http://www.ieee-pses.org/listrules.html> http://www.ieee-pses.org/listrules.html For help, send mail to the list administrators: Scott Douglas [email protected] Mike Cantwell [email protected] For policy questions, send mail to: Jim Bacher: [email protected] David Heald: [email protected] All emc-pstc postings are archived and searchable on the web at: http://www.ieeecommunities.org/emc-pstc - ---------------------------------------------------------------- This message is from the IEEE Product Safety Engineering Society emc-pstc discussion list. Website: http://www.ieee-pses.org/ To post a message to the list, send your e-mail to [email protected] Instructions: http://listserv.ieee.org/request/user-guide.html List rules: http://www.ieee-pses.org/listrules.html For help, send mail to the list administrators: Scott Douglas [email protected] Mike Cantwell [email protected] For policy questions, send mail to: Jim Bacher: [email protected] David Heald: [email protected] All emc-pstc postings are archived and searchable on the web at: http://www.ieeecommunities.org/emc-pstc ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________

