12-12-2023 12:06 AM
Hi wise NI LabVIEW people,
I am struggling with a valve-switching issue. I can directly control the valve with a switch as shown in the "Valve Control.JPG" but I want the valve to flip every time a new number is displayed at Current Dp(nm). In the "DMA Loop Trial Simple" file, I am sending a number via an array that is visible on Current Dp(nm).
There is a more complicated original file "DMA Full 2017ver.zip" is also shared if you need any more details about the program. For this file, this is a subVi named "Pre.vi" which was responsible for all the functioning of the loop but I am unable to decode that.
For now, I want to send a different number and want the valve to either switch every time a new number passes from the system or I can manage a fixed time when the valve will switch and after the same time, it switches back. So suppose, the condition is true for one minute, the valve will remain open for one minute and then will turn off for one minute. Same goes on for different numbers coming the array.
I hope I could explain the issue. Please feel free to connect for more discussion.
Solved! Go to Solution.
12-12-2023 12:48 AM
Hi Harsh,
@HarshRaj18 wrote:
There is a more complicated original file "DMA Full 2017ver.zip" is also shared
Unfortunately you converted those VIs to LV2023.
You would get a broader audience when you would provide a downconverted version of those VIs! (File->Save for previous)
I prefer LV2019…
In your images there are a lot of "misunderstandings":
@HarshRaj18 wrote:For now, I want to send a different number and want the valve to either switch every time a new number passes from the system or I can manage a fixed time when the valve will switch and after the same time, it switches back
Which "system passes new numbers"?
Which "fixed time" do you want to manage?
Right now you output a constant value to your hardware, so how do you want to switch back and forth?
12-12-2023 02:12 AM
Thanks a lot for your reply. Here I again attach 2017 version files. Hope it helps.
12-12-2023 05:23 PM
Hi GredW,
As you can see, a new number will be generated from the array, and the same number is displayed at "Current Dp(nm)". How can I control the valve boolean case structure so that it changes to true and false for every new number passing through "Current Dp(nm)". I hope it is more clear now. Please let me know if I am not clear. Looking for your kind support.
Kind regards,
Harsh
12-13-2023 02:09 AM
Hi Harsh,
@HarshRaj18 wrote:
How can I control the valve boolean case structure so that it changes to true and false for every new number passing through "Current Dp(nm)".
You don't need a case structure…
12-14-2023 12:22 AM
Hi GredW,
Thank you for mentioning a solution. Could you please confirm which file you are referring to here? It would be so kind of you if you could help me by making these little changes in the Vi and send me the updated version from the end. I would highly appreciate your efforts. Thank you.
12-14-2023 01:09 AM - edited 12-14-2023 01:18 AM
Hi Harsh,
@HarshRaj18 wrote:
Thank you for mentioning a solution. Could you please confirm which file you are referring to here?
I'm referring to your "DMA Loop Trial Simple" VI.
@HarshRaj18 wrote:
It would be so kind of you if you could help me by making these little changes in the Vi and send me the updated version from the end.
Unfortunately I don't have the ULx functions installed and LabVIEW doesn't like to edit your VI with all those functions missing…
So I replaced all the ULx functions by DAQmx counterparts:
@HarshRaj18 wrote:
Hi GredW,
It seems you have problems spelling my nickname correctly…
12-15-2023 12:13 AM
Hi GerdW,
I am happy to update you that this solution helped and I could change the valve as needed. Thank you for pointing out that I was misspelling your name. I hope it is correct now.
As I can see the delay time is in milliseconds so I tried to multiply it to convert it into minutes but that doesn't work. Any suggestion for wait time to use in minutes so that the valve switches in minute time not very quickly in seconds?
Thank you again for your kind support and efforts to give the solution. I appreciate your help.
Kind regards,
Harsh
12-15-2023 12:46 AM
Hi Harsh,
@HarshRaj18 wrote:
Any suggestion for wait time to use in minutes so that the valve switches in minute time not very quickly in seconds?
Simple math: 1min = 60s = 60000ms
So using the Wait function you just need to provide the correct number of milliseconds to wait…
Warning: having a VI waiting for minutes will create a VERY bad UX.
(It's better to use a state machine, that waits until a certain timestamp has been reached…)