Franz,
Thanks for your detailed reply. I'm new to GOOP and OO paradigms, but
I think they would work well once I grasp the concepts. One person
here has essentially created objects for some our instruments; however,
they're done in C++ and require dll calls (gets messy when dll's are
missing or in the wrong place, but I guess its a good technique because
it seems that's how many of the standard LabVIEW vi's Queues,
semaphores, etc are developed). Anyway, he has been helpful in
introducing me to the concepts of OO but I'm having difficulty
translating practices used C such as abstract classes, virtual methods,
virtual tables, overiding, overloading etc because I can't see how they
are carried out in LabVIEW (and I've never done OO programing in C++).
For instance, say you create a multimeter object in LabVIEW. If you
have different instances (HP, Tektronix, etc) you still end up using
case statements inside the methods to impelement the instrument calls.
Does anyone one know NI's plans for advancing GOOP. I know
polymorphism has been introduced in LabVIEW 6.0, but is it true
polymorphism? My understanding from the manual is that you can only
one level of a VI can have polymorphism. In other words you can't have
polymorphic VI's inside a polymorphic VI.
Thanks again. Also see more disjointed rambling below.
Brian
In article <39EE968F.84440E29@ptb.de>,
franz.ahlers@ptb.de wrote:
> bbean_labview@altavista.com schrieb:
>
> > Is it possible manipulate a GOOP object on a remote machine? I am
> > trying to create a GOOP object for an instrument that is connected
to a
> > remote machine. I would like to be able to query and manipulate the
> > instrument's object data on the local machine, but the actual read
data
> > method for the instrument needs to be executed on the remote
machine.
> >
>
> Right, the 'instrument read method' has to be executed on the remote
> machine. But the GOOP object is created and exists on the local
machine.
>
> >
> > My initial thought process was to create a method to read the
> > instruments data, then call that method via a Call by Reference Node
> > (passing the object reference through the call by reference node).
But
> > I get an error that indicates the object is not found/doesn't exist.
> >
> > Has anyone who GOOPs tackled remote instrumentation before? Is
there
> > an easy way to do this with GOOP? I know how to pass data via VI
> > Server or call by reference node, but I am interested in trying out
> > GOOP and have hit a little roadblock.
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> In order to access the intrument, the GOOP object has to call a read
sub
> vi on the remote machine via the VI-Server mechanism. It needs to
know the
> reference to the the remote 'read instrument.vi'.
It seems like the read "read instrument.vi" would contain all of the
calls to the instrument to avoid having to open multiple vi references
for different "reading" functions. For that matter, it would seem like
you would want your vi to be called "read/write instrument.vi" so that
you could read the instrument and change its settings all through one
remote vi call. I was also wondering if this "read/write
instrument.vi" would created using the standard GOOP wizard or GOOP
techniques such as the GOOP Timer
(http://www.calbay.com/timing/GOOPTimer.htm). At what point do you
disconnect yourself from GOOP and just use the traditional instrument
driver functions in your methods?
This VI-reference is part
> of the (local) GOOP object's private data and MUST exist in the local
> object's data space. This means that 1) either it is opened
('created') in
> the GOOP object's init method and closed ('destroyed') in the
destructor
> method or 2) is created and destroyed immediately before and after the
> remote VI call. I clearly prefer method 1) since it has less overhead.
> In order to open the remote VI-reference you have actually to open two
> refs: one to the remote LV application, which is fed into the 'Open
> strictly typed VI-reference' to get the ref to the remote 'Read
> instrument.vi'. (I am not sure at this stage whether the ref to the
remote
> LV application has to be alive all the time or whether it may be
destroyed
> after succesfully calling of 'Open strictly typed VI-reference'. I
guess it
> has to be open all the time, but it is easy to find out by trial and
> error.)
>
> I did a project where the main application offers the possibility to
> plug-in any (sourcing or measuring) instrument, provided a driver
interface
> VI with a well defined structure exists (or is written for it). The
> advantage is that a large and very complex application can easily (by
> writing just one VI) be extended to use ANY available instrument. The
> information which instruments could be used is communicated to the
main app
> by text-based ini files. I could get this working only with the GOOP
> approach and don't see any realistic chance without using OO paradigms
> (regardless of the language used). Of course, in my project the next
> natural step would be to use (in addition to the instrument's VISA,
GPIB or
> serial address) a host machine name to identify the remote machine
where
> the instrument is hooked up to and then call remote instruments as
easily
> as local ones.
>
> This having said I want to issue a call to all GOOPers who follow this
> thread:
> It seems this small(?) community is growing and it would be nice to
have a
> list of people using GOOP. I suggest to send me short mail, 'outing'
> yourself as GOOPers, maybe with a brief description of planned or
finished
> projects that use GOOP. I would then distribute the answers to all
those
> who responded.
>
I haven't committed to GOOP yet. Mainly because I haven't spent enough
time attempting it. I guess I want to make sure I have the structure
correct before I go re-writing code that all ready works pretty well.
However I sit here every day and see how the C++ guy made instrument
and objects and think that OO works perfectly for instrument
development. Does anyone have any sample code developed with the GOOP
wizard for an instrument object? That would be really helpful.
> Franz Ahlers
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.