C Visual Studio help

I have been trying to start writing a program to Automate 2 6631B PS's and a 34970A. But I cannot find any code samples to get me started. If anyone has something could you please help me out. Otherwise I would like to know a few simple things that might help me.

-what includes/references do I need-syntax for sending commands/queries-listing of all commands/queries

I have only been able to find examples for VB, I just need an example C# program so I can have a shell to build on. I have seen the user guides with the command listings but I do not know how to use them practically when coding.

The Agilent IO Libraries has some built in C# examples that you can use. There is one for the 34401A voltmeter that should contain the shell that you need. The only thing you would need to do is swap all of the DMM commands for the power supply commands. You can find the examples by going to Start -> Agilent IO Libraries Suite -> Programming Samples -> C# examples.

Can you tell me what you want to do with the power supply? The programming guide located at http://cp.literature.agilent.com/litweb/pdf/5962-8198.pdf has some example programs that you can use to pull the instrument commands out of. If you let me know what you want to do I can put you on the right path also.

I am trying to run a test setup up which will have 2 6631B's hooked up and I will need to simply set the voltages and currents, and read them back periodically. For now I am just trying to connect to and control a single supply and then using multiples should not be an issue.

I did find an example after my second posting for a 3458A, which I was trying to adapt the connection code for starters, but I am getting a timeout. The agilent connection manager says I'm hooked up fine.

DCSupply.IO = (IMessage)mgr.Open(addr, AccessMode.NO_LOCK, 2000, OptionString);<--- this is the line with issues but its a straight copy/paste from the example. Any thoughts?

SS of the manager attached in case it is helpful.

Attachments

To further update, I figured out that my problem is not in fact with connecting but in reading information back. That is when I get the issues. I have used the interface to communicate that is built into the connection manager and it works. I did some searching in this forum and found something mentioning that my terminator might be wrong but changing it from 13 (carriage return) to 10 (line feed) made no difference.

If this sparks anyones mind I would appreciate input otherwise I'll just keep banging away at it.