08-09-2011 02:42 PM
Hello. I am completely new so this may be a very easy question:
Here is a photo of my block diagram
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!
Solved! Go to Solution.
08-09-2011 02:49 PM - edited 08-09-2011 02:51 PM
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?
08-09-2011 03:07 PM
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)
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.
08-09-2011 03:08 PM
Forgot to ask: besides using the fit function or doing the raw math, is there a built in function for scaling a sensor?
08-09-2011 03:11 PM
You could use the slope and offset in the DAQMX channels. This way everything is scaled prior to using it in your code.
08-09-2011 03:12 PM
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?
08-09-2011 03:13 PM
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
...
08-09-2011 03:21 PM
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.
08-09-2011 03:35 PM
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
08-09-2011 04:24 PM
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:
AFTER: