Discussion:
valves
(too old to reply)
tanzeel10@gmail.com
2008-08-05 10:40:05 UTC
Permalink
siri want to use DSC valves as bidirectional,i.e if data comes from right side and valve is ON then it forward data to left and if data comes from left side it forwards data to right,data is flow in pipes.i use events,so there comes feedback loop how can i avoid.best regard<img src="file:///C:/DOCUME%7E1/TANZEE%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="">
muks
2008-08-05 10:40:06 UTC
Permalink
I am sorry but may i know what is DSC?
muks
2008-08-05 10:40:07 UTC
Permalink
Can you post your vi which you have tried so far.We can modify it
tanzeel10@gmail.com
2008-08-05 11:10:05 UTC
Permalink
sir. there is an attached vi,now all valves are one directional,but i want to be them bidirectional.i.e if data comes flow comes from any directional valves forward flow to other with out feed back loop and with in events. thanks for previous reply.&nbsp;from DSC i mean DSC module.best regards tanzeel


valves.vi:
http://forums.ni.com/attachments/ni/170/346640/1/valves.vi
muks
2008-08-05 11:40:05 UTC
Permalink
Hi Tanzel, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Sorry but can you post your vi for lv 8.0?
muks
2008-08-05 11:40:06 UTC
Permalink
Please see the attachment.If still u r not able to get it.Post a screen shot of your block diagram and front panel.Sorry for this but i dont have 8.2


save.PNG:
Loading Image...
tanzeel10@gmail.com
2008-08-05 11:40:06 UTC
Permalink
sir, i dont have labview 8,i m currently using lv8.2.best regards tanzeel
yenknip
2008-08-05 11:40:07 UTC
Permalink
You can save a file for a previous version by selecting File-&gt; Save for previous version. You have missed a typedef control, 'TwoPosValve1.ctlAt a quick glance, you may want to rethink all your local variables before you go much further in developing. From what you are saying, I think a state machine may be more relevant for what you are trying to do.Would you mind giving a little more detailed description of what you are trying to do?


valves8.0.vi:
http://forums.ni.com/attachments/ni/170/346653/1/valves8.0.vi
muks
2008-08-05 11:40:08 UTC
Permalink
Thanx for joining in and posting it for 8.0 Yenknip.Will see and get back.
tanzeel10@gmail.com
2008-08-05 12:10:19 UTC
Permalink
sir , now i save this vi lv8.0.my application has more then 200 valves and more then 1500 pipes,so its not possible to convert this whole application to state machine.in my application gas is flowing in pipes,when a vales is open it can flow if its close then gas stops.currently vales are uni directional,but now requirement is to make them bidirectional.more then 150 events are used in my application,every valve event tigers an other valves event,so when i try to make them reverse,then my previous working is damaged,so give me a easy solution.thanks for supporting and replyingbest regardstanzeel


valves.vi:
http://forums.ni.com/attachments/ni/170/346663/1/valves.vi
yenknip
2008-08-05 13:40:08 UTC
Permalink
Thanks for the clarification.Do you have a method of determining which pipes are sources and which are sinks? And some indication of the direction of flow?Regarding your code, you do not need to AND the control with its 'new value' element node. You can just wire the control, as its value is read when the event executes. You can easily do away with all the local variables you have used by updating the boolean values outside of the event structure. Lastly your code is all encapsulated with a frame, which does nothing.Changing the direction of flow, is just a matter of routing gasses through available hardware, or replacing key pieces of hardware. I am not sure what more you are asking for. Below is a diagram showing a possible way to reverse a pipe's flow. I have shown using 2 way and 4 way valves.<img src="Loading Image..."> Message Edited by yenknip on 08-05-2008 02:29 PM


pipes.jpg:
http://forums.ni.com/attachments/ni/170/346694/1/pipes.jpg
tanzeel10@gmail.com
2008-08-05 14:40:06 UTC
Permalink
<img src="file:///C:/DOCUME%7E1/TANZEE%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg" alt="">sir, the real problem is that i don't have a method of determining which pipes are sources and which are sinks. And some indication of the direction of flow.here i attached a image,the pipe may be source or sink at same time.there is a valve between them,if flow comes from left and valve is on the flow will be on right side, and if the flow comes from right and the&nbsp; same valve is on the flow will be on left side,hope that you understands my problem after seeing image now.thanks for replybest regardstanzeel


valve1.jpg:
Loading Image...
muks
2008-08-05 14:40:07 UTC
Permalink
Tanzel, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can u break the long sentence and try reframing it.Def not clear to me.I run your vi the vi is running as u said in #1 of this thread.I still dont get your problem.
yenknip
2008-08-05 14:40:09 UTC
Permalink
Oh, I think I may have got the wrong end of the stick. Is it just a simulation, and not a control system? Or at least a visual representation of a control system. So you want to be able to display which pipes are being used.The problem you have with using an event structure, is that if you turn on a valve further down the line, then turn on an earlier one, the display will not update properly. What you want to use is a recursive algorithm to follow the open line and update your display at the end.How complex will the simulation be? Will there be multiple gasses mixing in pipes, leading to sources going into sources?
tanzeel10@gmail.com
2008-08-05 15:10:10 UTC
Permalink
sir, its difficult to make this recursive,its real trouble implementing with graphical programing.suggest any&nbsp; LV recursive algorithm.best regardsthanks for replyingtanzeel
yenknip
2008-08-06 13:40:09 UTC
Permalink
tanzeel wrote:its difficult to make this recursive, its real trouble implementing with graphical programing.suggest any&nbsp; LV recursive algorithm.How you store your data, is not necessarily how you display your data. What I would do is to make an array of clusters (or classes if you are familiar with objects) detailing the properties of a pipe and a tap.Pipe{int pipeNumber, int ConnectedPipes[ ], int connectedTaps[ ], bool Status, bool Visited};Tap{tapNumber, int Connected Pipes[ ], bool Status, bool Visited};Each object has a unique ID - this could be the index of the object in the containing array and could be done away with.Each object has an array detailing which pipes it is connect toPipes can be connected to pipes and taps, taps can only be conneted to pipesbool Status is the boolean stats of whether the pipe has a flow in it / tap is openvool Visited is a flag for the recursion algorithmWhen the network of pipes is constructed, each instance of a pipe and a tap has a record of which pipes and taps they are connected to. When a tap status change event is triggered, we start at the gas source and follow reference numbers down through open taps, changing the visited flag and the status to true, until we hit a closed tap. Then recurse back up through the visited nodes until there is an unvisited node below, and follow that path down to a closed node. In practical terms, Each node would probably be better placed on a FILO stack to give a more efficient memory footprint than having the whole network copied in working memory, and also do away with the 'visited' flag.After we have determined the status of the nodes, we can update the display in one action.I realise that you will have to do a rewrite of your program**, but given the size you mentioned of your pipes network, this may well be quicker - and definately more elegant - than adding hundreds of events to your already fairly substantial event structure. Lastly, I cannot think of a reason why a local variable would be used anywhere.Apologies if this was a bit rambling, I tried to keep it concise.**Addendum"... rewrite of your program" - but not the time consuming part of redrawing your front panel. Additionally as each pipe and tap should have its own unique name you could put that into the object ID. Message Edited by yenknip on 08-06-2008 02:35 PM
Continue reading on narkive:
Loading...