LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What would be the best design pattern for this application?


cireyellamo wrote:

One thing that is part of this project is to create a Power Supply control interface.  Get/Set Voltage/Current, Turn ON/OFF, etc.  I was just going to do a .lvlib for it, though.


Fair enough, tbh I haven't really used libraries much unless I've inherited code.

 

In our company we've started adding OOP resources to use as like a hardware library, so we've got a class for PSUs, a class for Scopes etc. with the stuff that you always need, and subclasses for each different piece of equipment we use. Then we also have a comms class with subclasses such as TCP/IP and VISA comms.

 

At first it was difficult to see the benefit as its a lot of extra work to start off with, but now we can just go "I need a Tektronix Scope with VISA comms" and just pull the resources, so half of the code is written for you.

0 Kudos
Message 11 of 14
(499 Views)

@vascibean wrote:
In our company we've started adding OOP resources to use as like a hardware library, so we've got a class for PSUs, a class for Scopes etc. with the stuff that you always need, and subclasses for each different piece of equipment we use. Then we also have a comms class with subclasses such as TCP/IP and VISA comms.


See, in your case I can see why it would be best to go with OOP.  Work smart, not hard, right!?  For what we do here, I think it best to stick with task-oriented methods.  As awesome as it would be, I don't see the company shelling out that kind of money and time resources for virtualizing the workbench. Would be pretty cool to set up though, thats for sure!

0 Kudos
Message 12 of 14
(494 Views)

@cireyellamo wrote:

 

@billko wrote:

I saw a really neat graphic in my LabVIEW Core 3 stuff that simplifies the decision-making process by turning it into a flowchart based on requirements, but I'm not sure I have permission to reproduce it.


Nice, I'll have to look in to that.  Any idea wich module it is contained in?


I think it was module 14.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 14
(483 Views)

Hi crossrulz,

 

I was suggesting a mod of the producer/consumer pattern rather than the QMH - ie the queue would only be used to send data between the loops rather than control the state machine. The QMH is probably more expandable though I agree - just seems a bit over complicated for the described application.

 

Smiley Happy

Regards

Paul

CLD running LabVIEW 2012 32 & 64 bit on Windows 7 64 bit OS.
0 Kudos
Message 14 of 14
(455 Views)