AnsweredAssumed Answered

vrf Where to start?

Question asked by VRFuser on Jan 6, 2006
> The programs that I am trying to make
> would control various equipment over a
> GPIB and store the data in an Excel.

Well assuming you already have a design and a plan, install your gpib card,
IO libraries and any drivers you'll use. Hook up your instrumentation and
use the Instrument Manager's "Find Instruments" button to verify it all
works.

Using VEE is pretty much a breeze. Pick an object from a menu, drop it on
the workspace and wire it up. If you choose to use a "driver" scenario with
your instruments then instrument transactions are as easy as picking them
from a menu and filling in the details. If you choose to use Direct IO
transactions, you should be familiar with the instrument's SCPI support.

A "driver" scenario is not what you would think of in terms of an audio
driver or video driver, but rather a "virtual instrument" (sort of). Years
ago there were panel drivers that really were virtual instruments. Then
there were Plug & Play drivers and now IVI-COM drivers. VEE Panel drivers
have not been supported for many years now but they're still in use and you
can find them for older instruments. You'll get a ton of P&P drivers on your
IO Libs disk and you'll be able to find one for almost anything (probably).
IVI-COM is the latest standard (I think).

Personally I usually skip the drivers but that's just me. I'd rather read
the instrument's command reference and use Direct IO. You'll probably get
faster development if you use drivers though.

The VEE language itself probably won't give you any problems. There are a
handful of different "objects" that are connected together to form sort of a
flow chart of your program. Data flows in on the left and out on the right
of these objects. "Sequence" pins are on the top and bottom of objects (used
to control when the object executes) but the general consensus is to write
programs from left to right and let the data flow dictate sequence.
Occasionally you need the sequence pins though.

As a language, VEE is rather nice. There are some grumbling points but for
the most part they're minor. The only one I think is serious is that it is
limited to only one unsigned type (an 8-bit type). When you need to do
bit-twiddling it can get very annoying.

Interaction with Excel is fairly painless. It's like almost any other
component programming model, but it doesn't fit VEE's visual paradigm very
well. That's not a problem, just an annoyance. If you're familiar with
Automation programming with a script language, then this won't be a problem.
If not, then there are a few basic concepts:

  1) You create objects with CreateObject or GetObject (usually Create).
  2) Data are loaded into the object and extracted from the object.
  3) Object methods are called to operate on the data.
  4) These methods are sometimes controlled by Properties.

If you are familiar with Automation programming, bear in mind that VEE
doesn't have the keywords Nothing and ForEach. That's not a problem either -
usually. To set an object variable equal to Nothing simply delete it, and
any collection worth mentioning has both .Count and .Item members so you can
build a manual ForEach loop.

If your Excel installation has VBA help available it will make dealing with
Excel *far* easier.

The details change a little when using .NET but it's all still component
stuff.

As for examples, nothing beats Help->Open Example. Look in ActiveXAutomation
and you'll find six examples that detail Excel Automation. These will get
you started in no time and get you familiar with the basics in only a little
while.

And last - but certainly not least - you have already found the one source
for any questions about VEE, instrumentation, configuration and programming
advice - test or otherwise - right here. And of course, there's always The
Archive. Nearly every message published on the VRF since 1998 (and any
attached example program) is available on line 24/7 via the web or email
(it's the link at the bottom of this message).
-SHAWN-



---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".

Outcomes