LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stand Alone Control

Solved!
Go to solution

Hello.  I am completely new so this may be a very easy question:

 

Here is a photo of my block diagramBD.png

 

All of the code works as expected.  My issue is this:  I need abput 50 sets of these controls (two pressure indicators and one tank level indicator plus all of the logic).  I want all 50 to be controlled by the two knobs and the one stop button.  Is there a clutter free way of doing this... in VB.NET I would simply create a control and have three inputs (two doubles and a boolean).

 

Thank you in advance for any ideas!

 

0 Kudos
Message 1 of 16
(3,532 Views)

Hi seascan,

 

what you call "control in VB.net" is named VI in LabVIEW - yes you can create one with 2 inputs and one output...

 

And when you need 50 of them: consider using arrays for your data - and please go through this!

 

Btw. don't you think it's a bit of overkill to calc gain/offset with fitting routines?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 16
(3,524 Views)

Hi GerdW.  I have been through all of those over the last two days.

 

Perhaps I've missed something, but I can't figure out how to add my VI (below)

FrontPanel.png

 

to a project and see the GUI.  You can see that the upper right corner show the two doubles and the one boolean wired correctly. 

 

 

0 Kudos
Message 3 of 16
(3,509 Views)

Forgot to ask:  besides using the fit function or doing the raw math, is there a built in function for scaling a sensor?

0 Kudos
Message 4 of 16
(3,506 Views)

You could use the slope and offset in the DAQMX channels. This way everything is scaled prior to using it in your code.

Tim
GHSP
0 Kudos
Message 5 of 16
(3,499 Views)

So if I understand you correctly you need to have fifty seperate controls for different tanks correct? How do you expect to do this without having this be cluttered?

Tim
GHSP
0 Kudos
Message 6 of 16
(3,498 Views)

How do you plan on this code working? What is the flow that you expect?

 

Turn two knobs to desired level

Read sensor

Adjust output

...

Tim
GHSP
0 Kudos
Message 7 of 16
(3,497 Views)

Hi Tim.  Yes, basically that is it.  For now I want to knob controls (4-20) to be inputs to all 50 "controls" or VIs.  Later after everything is working I can plug in an actual DAQ and use real data.  For now, two knobs and one stop button to control all 50. 

 

The GUI will be cluttered!  But I was hoping to not have to copy and paste all the logic -- I thought perhaps a cluster would work but I can't seem to add the logic to a cluster (I guess it is only a container).

 

Here is a project I made that contains my VI.  This is great EXCEPT I can't see the VI's Front Panel in the new VI.

Project.png

0 Kudos
Message 8 of 16
(3,488 Views)

Make a sub VI and have the two controls be references into each instance. That way you make the code once and connect the same knobs to the all of the vi's

Tim
GHSP
Message 9 of 16
(3,480 Views)

Tim,

 

That is exactly what I want to do but when I try to create the subVI, it bundles everything except the visual controls.  Is there a way to create a subVI with the associated visuals?  Here are the before and after screen grabs:

Before.png

 

AFTER:

After.png

0 Kudos
Message 10 of 16
(3,459 Views)