LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3 way valve

Solved!
Go to solution
Highlighted

I have a problem regarding 3-way valve. Since there is no block of 3-way valve in DSC module, i am trying to program it but i saw everywhere i couldn't learn something like that. The only option for me would be creating sub VIs but i am facing problem with that also . 

 

My topic is related to building techniq so this 3-way valve is just one of them.

 

I was thinking of using a picture of this valve on the front panel but i can't click on that and hence can't change any property.

 

I attached the logic diagram i made instead of the valve 

 Unbenannt.PNG

Unbenannt.PNG

Instead of the Schiebregler i have to use DAQ but for now i am controlling through this slider.

 

Can i make a single block according to the logic on the front panel ?

0 Kudos
Message 1 of 17
(2,106 Views)

Hi rb767,

 

You have a lot of local variables and a lot of unwired controls/indicators, it should be the other way around. Only use local variables when you can't connect to the actual control.

 

If you want a picture that is "clickable" you have to follow a special procedure when modifying the control. There are some good posts about how to make custom controls, but I will explain to you how to make a "decal".

 

1. Right click on control >> advanced >> customize.

2. Click edit >> import picture to clipboard... and select your picture from the computer.

3. Right click on control >> import picture from clipboard >> decal

 

Import Decal.png



CLA // LabVIEW 2016 // BALUG // Unofficial Forum Rules and Guidelines
Message 2 of 17
(2,079 Views)

Hi rb,

 

You have a lot of local variables and a lot of unwired controls/indicators, it should be the other way around.

To add one more important note:

You have a lot of control terminals without a label on them. This is a NO GO!

Never delete the label of a control. Never hide the label in the blockdiagram (you can hide it on the front panel)!

 

With text-based programming you would always write formulas like "a:= b +c". Deleting the labels is like writing " '' := '' + '' "…

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 3 of 17
(2,055 Views)
Message 4 of 17
(2,046 Views)

@Gregory wrote:

You have a lot of local variables and a lot of unwired controls/indicators, it should be the other way around.


Not only that, you have two case structures where only two possible combinations can occur (upper:T, lower:F or lower:T, upper:F). All you need is a single case structure. I am assuming that the FALSE cases are empty. Are they?

 

Even easier, wire all indicators to either the output of the comparison or the inverted output of the comparison and you are already there (delete the other comparison operation, it is redundant). No case structure and no local variables needed.


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 5 of 17
(2,033 Views)

@GerdW wrote:

You have a lot of control terminals without a label on them. This is a NO GO!

 


I think they have labels, but the labels are hidden (equally bad). Without labels, the local variables would show no text at all.

Terminal labels should always show.


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 6 of 17
(2,024 Views)

You may want to try...

 

Tools >>> DSC >>> Image Navigator >>> Valves >>> 3-D 3-way Valve.

 

Possibly export that image as a "wmf" file and then import the image into a Picture Ring...

 

It could be a codeless solution that will allow resizing.

 

Ben

0 Kudos
Message 7 of 17
(2,002 Views)

I have also a project where I had to represent a 3 state hand valve on the P&ID in my GUI. I just used a picture ring, very easy, and I have three states:

  1. Closed valve (black colour, value 0)
  2. Opened valve (green colour, value 1)
  3. Undefined state (yellow colour, value 2)

I saved the control as a custom ctrl, so it is very easy to use over in my project.

 

edit: actually using a simple picture ring is just much better compared to the DSC module valves. When the user clicks on the DSC valve in the GUI, there is a chance he/she clicks on the empty part between the "handle" and the "valve body". It is very annoying! If you use a picture ring, you have a rectangular object, so easier to click on it with the mouse...

The procedure I use to create such 3 state valve picture ring is the following:

I create the valve using two filled triangles in powerpoint (for all three colours) first. After I place a rectangular behind it, with matching sizes. I colour the rectangle with the exact same RGB colour as the colour of the GUI background will be on the Front Panel. When I create these objects for the 3 colours, I just copy paste them into a LabVIEW picture ring.

I do not have right now the laptop with the project, if I do not forget it, I will post the custom control tomorrow!

0 Kudos
Message 8 of 17
(1,960 Views)

I would look up how to customize the images for boolean controls. Find (or make) the two images that show a single valve in the two states you are trying to depict and apply them to a single boolean control. You can start with the valves, a button, LED, etc. In the context menu for the control you can find an option to customize the control. I presume you are trying to route the left pipe either to the pump or as a bypass with a single physical valve?

0 Kudos
Message 9 of 17
(1,920 Views)

Maybe these are not what you need, but anyway feel free to use them...

Custom ctrls saved for version 2013

0 Kudos
Message 10 of 17
(1,898 Views)