LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Functional global with too many terminals

Okey

0 Kudos
Message 11 of 26
(1,133 Views)

Isnt this exactly what LVOOP is usefull for ?

 

If I made the FG in LVOOP style, I would still keep data in prison and get the possibility to select the method (function) and get different terminals for each class member.

0 Kudos
Message 12 of 26
(1,122 Views)

Well yeah, but it has a sttepish learning curve.

0 Kudos
Message 13 of 26
(1,120 Views)

@Bublina wrote:

Isnt this exactly what LVOOP is usefull for ?

 

If I made the FG in LVOOP style, I would still keep data in prison and get the possibility to select the method (function) and get different terminals for each class member.


Exactly,  the differences between a "LVOOP" Class and a FGV "wrapped up to nirvana" are fairly small when it comes down to actually running. 

 

There are some small perfomace penalties with either approach but you hardly ever NEED highly optomized code to expose data storage retrival and manipulation functions.  (You need to be smart about data copies but, an extra synchronization boundry here and there is not an issue)  What choice you use should depend on your audience.  Can your client understand the code?  for some reason I can't really define most users of LabVIEW don't understand OOP and IT SCARES THEM!Smiley Surprised  Maybe the next generation of bright minds will be taught a OOP class in kindergarten.


"Should be" isn't "Is" -Jay
0 Kudos
Message 14 of 26
(1,115 Views)

@JÞB wrote:

@Bublina wrote:

Isnt this exactly what LVOOP is usefull for ?

 

If I made the FG in LVOOP style, I would still keep data in prison and get the possibility to select the method (function) and get different terminals for each class member.


Exactly,  the differences between a "LVOOP" Class and a FGV "wrapped up to nirvana" are fairly small when it comes down to actually running. 

 

There are some small perfomace penalties with either approach but you hardly ever NEED highly optomized code to expose data storage retrival and manipulation functions.  (You need to be smart about data copies but, an extra synchronization boundry here and there is not an issue)  What choice you use should depend on your audience.  Can your client understand the code?  for some reason I can't really define most users of LabVIEW don't understand OOP and IT SCARES THEM!Smiley Surprised  Maybe the next generation of bright minds will be taught a OOP class in kindergarten.


The only reason why am I not doing any commercial stuff using LVOOP is that I have never done any commercial stuff using LVOOP 🙂

 

There is allways a darkzone factor for big projects (something is not working sometime and you have no clue why) and you have to find it out the hard way. So I hardly ever use new features if I am not forced to.

 

I am familiar with OOP, I had to learn Cpp and C#, but it was not easy to start with LVOOP. No wonder, that folks with no OOP knowledge fear it.

Message 15 of 26
(1,101 Views)

@Bublina wrote:

The only reason why am I not doing any commercial stuff using LVOOP is that I have never done any commercial stuff using LVOOP 🙂

There is allways a darkzone factor for big projects (something is not working sometime and you have no clue why) and you have to find it out the hard way. So I hardly ever use new features if I am not forced to.

I am familiar with OOP, I had to learn Cpp and C#, but it was not easy to start with LVOOP. No wonder, that folks with no OOP knowledge fear it.


 

My 0.02 with regards to this, as I have relatively recently started messing with OO (6 months or so). There is no rush to dive into OO, so don't rush yourself. I waited until I got some small projects to start with. I didn't just decide one day that I had a 1,000 hour fixed price project that I was going to "learn OO" on.

 

You will be compelled to "get great flexibility and code reuse" from OO. I would suggest not falling into this trap. When you start trying to use dynamic dispatch for everything so you can just "plug in other modules" it becomes overkill when you don't need it and you cause a big pain for yourself (and potentially others).

 

The wise, LabVIEW Champion Ben Rayner told me over a Texas steak and a beer that doing a project with OO doesn't mean the entire thing needs to be OO. There is nothing that says your file handling can't be OO without everything being OO. If something makes sense to use OO, then use it. If you can't think of a good way to use OO for another part because you're learning, then don't. 

 

I'l leave you with some food for thought from a g chat I had with another LabVIEW Champion, Jack Dunaway, while I was starting to use OO more extensively: "yeah; the trick, is not leaving a wake of destruction with colleagues who don't necessarily believe in LVOOP. it's tricky; be careful."

 

Message 16 of 26
(1,086 Views)

@for(imstuck) wrote:

@Bublina wrote:

The only reason why am I not doing any commercial stuff using LVOOP is that I have never done any commercial stuff using LVOOP 🙂

There is allways a darkzone factor for big projects (something is not working sometime and you have no clue why) and you have to find it out the hard way. So I hardly ever use new features if I am not forced to.

I am familiar with OOP, I had to learn Cpp and C#, but it was not easy to start with LVOOP. No wonder, that folks with no OOP knowledge fear it.


 

My 0.02 with regards to this, as I have relatively recently started messing with OO (6 months or so). There is no rush to dive into OO, so don't rush yourself. I waited until I got some small projects to start with. I didn't just decide one day that I had a 1,000 hour fixed price project that I was going to "learn OO" on.

 

You will be compelled to "get great flexibility and code reuse" from OO. I would suggest not falling into this trap. When you start trying to use dynamic dispatch for everything so you can just "plug in other modules" it becomes overkill when you don't need it and you cause a big pain for yourself (and potentially others).

 

The wise, LabVIEW Champion Ben Rayner told me over a Texas steak and a beer that doing a project with OO doesn't mean the entire thing needs to be OO. There is nothing that says your file handling can't be OO without everything being OO. If something makes sense to use OO, then use it. If you can't think of a good way to use OO for another part because you're learning, then don't. 

 

I'l leave you with some food for thought from a g chat I had with another LabVIEW Champion, Jack Dunaway, while I was starting to use OO more extensively: "yeah; the trick, is not leaving a wake of destruction with colleagues who don't necessarily believe in LVOOP. it's tricky; be careful."

 


Oh look at you Greg. Quite the name dropper.

 Smiley Very Happy

 

(Just giving you a hard time)

 

In regards to the thread I would recommend using LVOOP. While there can be a steeper learning curve OOP does bring quite a bit to the table and can make code reuse much easier. I also believe that your code will be much more readable using a LVOOP approach over a super bloated action engine. As you already learned managing your connector pane is becoming very difficult. Also, the documentation for individual methods will be much easier than trying to document all of the actions available in your action engine. If you have 20 fairly complex actions the documentation for that single VI will read like a book. Whereas individual methods will only require the documentation for the single task being performed by the method. You can also leverage dynamic dispatch.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 17 of 26
(1,064 Views)

@Mark_Yedinak wrote:
Oh look at you Greg. Quite the name dropper.

 Smiley Very Happy

(Just giving you a hard time)


Debated long and hard about the name drops, actually. But, I decided they help to improve credibility. 

 

Oh, the wise LabVIEW Champion Mark Yedinak once called me a name dropper, and then I made him buy me a beer at NI week.

Message 18 of 26
(1,055 Views)

for(imstuck) wrote:Oh, the wise LabVIEW Champion Mark Yedinak once called me a name dropper, and then I made him buy me a beer at NI week.

In a way, you already bought him dinner at the CLA Summit this year (mine as well).  Ok, it was your company.  But still.  I guess that means you should have two beers coming your way.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 19 of 26
(1,048 Views)

@crossrulz wrote:

  I guess that means you should have two beers coming your way.


woahhhhhhhh now, let's not get too crazy 😉

0 Kudos
Message 20 of 26
(1,035 Views)