Jump to content

Starting with GOOP


Recommended Posts

Hello,

I want to begin with GOOP. So I found an entry in Tools->LabVIEW GOOP Wizard.. (I use LV 8.0.1)

post-7689-1189691412.png?width=400

Klicked it on and to create my first class. Saved it under "Auto" into project directory. An LLB was created. Ok.

post-7689-1189691717.png?width=400

After generating the next step, where I can Edit the calss reference.

post-7689-1189691825.png?width=400

So I should give the class name and put the enum into the reference.

post-7689-1189691929.png?width=400

And here the first question !!! Why it is a ENUM and not a string? Can I add more than one classes (using Add Item in Enum Properties) ? Why is it an enum?

In the next step I can edit the member data of the class. So I leaved only one string control inside the cluster and named it "Color".

post-7689-1189692152.png?width=400

After finishing the wizard I got following

post-7689-1189692209.png?width=400

I created a MainVI, where I want to use my class Auto and saved it in my project directory. Then I want to create an object. But I can't dropthe Auto Create.vi from wizard into my MainVI. So I opened Auto create VI and dropped the Icon into MainVI. It's OK, but can be better (that is no critic to wizard, but can be added into the wish list).

Auto Create is not executable, because I should init my member data with initials. Ok, I opened the VI and initialized my Color String whith "white".

post-7689-1189692632.png?width=400

Now, I want to get the actualy color of my Auto. So I created a public method GetColor.

post-7689-1189692921.png?width=400

Opened this VI and edited them. And edited the connector pane of them. I set the Color String to an output.

post-7689-1189693101.png?width=400

So I can get the color of my object "Auto". Cool!!!

post-7689-1189693170.png?width=400

It works. If I run my Main.vi I see that my Auto is "white".

Now I want to recolor my Auto in red. So I created a new public method "SetColor".

post-7689-1189693341.png?width=400

But forgotten to set the method type to "modify". After the method was created I want to delete them, BUT I SEE, THAT I CAN'T.

So my second question is: where I can delete methods in wizzard? That is my next wish, or can I do it anywhere?

So I opened the Auto.LLB and deleted the method SetColor in WinExplorer.

After them I created a new method SetColor with the right Method Type.

post-7689-1189693731.png?width=400

Modified the SetColorVI and the connector pane of them. Color is an input.

post-7689-1189693904.png?width=400

My mainVI shows as following now

post-7689-1189693969.png?width=400

Is all right? Am I on the right way?

Eugen

Link to comment

I'm in a bit of a rush, so I can only answer a little:

QUOTE(Eugen Graf @ Sep 14 2007, 12:34 AM)

The data in the enum is part of the datatype of the enum itself - this means that enums with different text in them are seen as different datatypes in LabVIEW, so your class is more defined. So, if you have two different classes, when you wire the refnum from one classes "create" into another classes "write" the wire will break. If you had a string, then it wouldn't.

QUOTE(Eugen Graf @ Sep 14 2007, 12:34 AM)

Can I add more than one classes (using Add Item in Enum Properties) ?

No - that just changes the definition of one class. You need a separate datalog/enum for each class.

PS: welcome to OOP! When used appropriately, it's freakin' awesome!

Link to comment

QUOTE(crelf @ Sep 13 2007, 05:02 PM)

I'm in a bit of a rush, so I can only answer a little:

The data in the enum is part of the datatype of the enum itself - this means that enums with different text in them are seen as different datatypes in LabVIEW, so your class is more defined. So, if you have two different classes, when you wire the refnum from one classes "create" into another classes "write" the wire will break. If you had a string, then it wouldn't.

No - that just changes the definition of one class. You need a separate datalog/enum for each class.

PS: welcome to OOP! When used appropriately, it's freakin' awesome!

Thank you for your reply, crelf. I did understand why GOOP uses enum instead of a string reference.

My next big question is:

how can I inherit a new class, e.g. class "truck" from my class "auto"?

Eugen

Link to comment

QUOTE(crelf @ Sep 13 2007, 08:41 PM)

Hello crelf,

I think Endevos Tools are licensed and if I want to use them in my industial projects, I have to pay some money for it.

I think on an update from LV 8.0 to 8.5, but here I have to pay too.

What is free, good and good supported? Some ideas?

Eugen

Link to comment

QUOTE(Eugen Graf @ Sep 13 2007, 11:57 AM)

I think Endevos Tools are licensed and if I want to use them in my industial projects, I have to pay some money for it.

I think on an update from LV 8.0 to 8.5, but here I have to pay too.

What is free, good and good supported? Some ideas?

If these are 'industrial projects', wouldn't you expect to pay for support? The upfront money almost always means less cost in the long run.

Link to comment

QUOTE(Eugen Graf @ Sep 14 2007, 04:57 AM)

What is free, good and good supported?

post-949-1170073389.gif

Oh - you're serious. If you really expect good support, then you should also expect to pay for it. That said, you'll get a lot of good support from us here at LAVA on pretty much any of the toolkits (this thread is an example). I just had a look at the Endevo website (I suggest you do the same) and found the community edition limitations:

QUOTE

Community Edition

The community edition is a free version of the tool. It has the same features as the Professional version but with the following limitations:

* It does not support the Endevo GOOP 3 class architecture.

* Maximum number of classes in a project is 10.

* There is no support.

* There is no update class to latest class template feature.

I wasn't able to find anything about "industrial" use.

Link to comment

QUOTE(crelf @ Sep 13 2007, 09:33 PM)

post-949-1170073389.gif

Oh - you're serious. If you really expect good support, then you should also expect to pay for it. That said, you'll get a lot of good support from us here at LAVA on pretty much any of the toolkits (this thread is an example). I just had a look at the Endevo website (I suggest you do the same) and found the community edition limitations:

I wasn't able to find anything about "industrial" use.

Thank you, crelf.

If I say good supported, I don't think on help from manufacturer (developer), I think much more on product bebugging and featuring and documentation. LAVA's support (help in developing) is great, so I don't need any else. :thumbup:

Surely, I will try out Endevo's tool.

What is GOOP 3 ?

Eugen

Link to comment

QUOTE(Eugen Graf @ Sep 14 2007, 05:48 AM)

No worries - anytime.

QUOTE(Eugen Graf @ Sep 14 2007, 05:48 AM)

What is GOOP 3 ?

It's the repository engine behind the GOOP. The tool you are already using is GOOP 1, Endevo the bought out GOOP 2, and they recently annouced GOOP 3 - they're essentially products with more and mroe functionality.

Link to comment

QUOTE(crelf @ Sep 13 2007, 10:11 PM)

To read more about the tool and the GOOP 3 check out the tool manual online:

http://www.endevo.se/files/downloads/products/gds/

View the section: GOOP 3 Provider and also OpenG Provider.

About licensing. The restrictions for the free Community Edition is exactly as Chris listed in a previous reply. The license allows commercial use, it does not restrict the usage compared to the Professional (non-free) edition. It is only a functional limitation and no Endevo support.

Jan Klasson

Endevo

Link to comment

QUOTE(Eugen Graf @ Sep 14 2007, 10:26 AM)

Oh no, :oops:

Endevos GOOP is only for LV 8.2.1 and later !!!

Is there nothing for 8.0.1 ?

Eugen

Yes, GOOP 3 is built on lvclass which came in 8.20.

For LV 8.0.1 your options are GOOP 1 and the free Wizard from NI which you already started using or our GOOP 2 (GOOP Inheritance Toolkit) but we don't have any free tools to offer.

On the other hand, why use 8.0.1? Upgrade...:-)

/Jan

Link to comment

QUOTE(Eugen Graf @ Sep 13 2007, 07:10 PM)

You are right, but I am not my own BOSS. I am an sole LV engineer in our company.

Eugen

I feel your pain Eugen.

No one here (where I work) really appreciates the skill it takes to use LabVIEW effectively.

Link to comment

QUOTE(TG @ Sep 14 2007, 10:58 AM)

I feel your pain Eugen.

No one here (where I work) really appreciates the skill it takes to use LabVIEW effectively.

So on that note... I too am currently in that boat of either using the GOOP1 or the OpenGoop, as I am sure are many others out there... (and I do see lots of advantages in using OOP on the project I am currently working and future projects)

I've begun playing with them and am admittedly having a diffiicult time getting anything useable to work. ANd I've not had much success in finding explanations or documentation on their use and implementation. The begining of this thread looks like a really good start to what could help alot of people make the transition. Could we please continue along our originators course? And for those of you who are in the know, where are some good resourses that currently exist?

james

Link to comment

QUOTE(jccorreu @ Sep 21 2007, 03:22 AM)

So on that note... I too am currently in that boat of either using the GOOP1 or the OpenGoop, as I am sure are many others out there... (and I do see lots of advantages in using OOP on the project I am currently working and future projects)

I've begun playing with them and am admittedly having a diffiicult time getting anything useable to work. ANd I've not had much success in finding explanations or documentation on their use and implementation. The begining of this thread looks like a really good start to what could help alot of people make the transition. Could we please continue along our originators course? And for those of you who are in the know, where are some good resourses that currently exist?

james

Sorry James, I will first continue this or a new topic related to GOOP- if my boss pay an update to 8.5

And I really understand you and me :rolleyes: , who have "no money" and have to use unchildable classes :headbang:

Eugen

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.