LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hardware Abstraction Layer using Object Oriented Programming: Adapting to different output type interface

Solved!
Go to solution

@champion2019 wrote:

Well, I might get how to do that. Here is a link that exactly described this issue. And it is a little bit hard for me to understand. But finally I figured it out. 

https://forums.ni.com/t5/LabVIEW/Display-different-measurement-data-types-with-dynamic-dispatched/m-...


This is a little hard for everyone. It isn't easy stuff.

 

I started with 'pick your battles'. Do you really need this or is it the thrill of finding 'the holy grail'. Or is it a pink fluffy unicorns in disguise (aka chasing rainbows)? Nothing wrong with HALs I guess, but I'd stop at a level I need. You wouldn't be the first to create a HAL that's so complex nobody dares to use it.

0 Kudos
Message 21 of 26
(870 Views)

Haha, yeah! That is hard. But you know, it is really fasinating for me. I like the OOP design. That has many advantages. It is easy to code. I think it is good to learn and HAL is very useful for very complecated project. 

0 Kudos
Message 22 of 26
(860 Views)

I would say that developing a good HAL design is a lot more work than developing a somewhat less flexible and universal approach. So a HAL design will only pay off if you intend to reuse it in several projects. That said the chance is pretty big that in your next project you will find that the design constraints you have come up with for a practical approach don't align well with the new requirements, making you reinvent at least part of the wheel again. 😀

Rolf Kalbermatter
My Blog
0 Kudos
Message 23 of 26
(856 Views)

That is true. But in my project, I designed just like normal way. Then I really came across deffirent hardware. And I had to recode that. That is so annoying. In fact, I think before a big project, using the HAL design is always a good choise that you can extend your project very easily. After all, HAL is just an abstraction layer that you can add some method when you need.

0 Kudos
Message 24 of 26
(851 Views)

@champion2019 wrote:

That is true. But in my project, I designed just like normal way. Then I really came across deffirent hardware. 


I've been there. We had 5 spectrum analyzers, 6 multimeters, 4 power supplies and so on.

 

Somehow it made sense to management to buy a random 2nd hand spectrum analyzer to save 2000$, and let us make a new driver in a week or so (including testing)...

 

Still, normal polymorphism worked just fine. DIY polymorphism with VI references, this was 2005. Put all multimeter in a hierarchy, and the power supplies in another. I couldn't exchange a multimeter for a power supply, but why would I want that?

0 Kudos
Message 25 of 26
(843 Views)

wiebe@CARYA wrote:

. I couldn't exchange a multimeter for a power supply, but why would I want that?

Hah, I have a system like that actually... I use a programmable power supply to set a voltage, then measure the current draw as measured by the power supply. There's been some question if the current draw is accurate enough, so I may have to switch that for a multimeter, or even a DAQ card (for transient measurements).

 

I'm looking forward to the interfaces in LV2020 🙂

0 Kudos
Message 26 of 26
(826 Views)