Example in what programming language? That's an important piece of information that you haven't provided.

If you are using CVI or LabVIEW, you can get a driver for both of them from
http://www.ni.com/devzone/idnet/default.htm. If you are using something else, both the VISA and GPIB drivers include some examples. I would recomend VISA but that would be up to you. For the specific commands to send to the instrument and details on the responses, that is all in the programming manuals for them.