02-21-2025 01:58 PM
Title: Swapping valves when requested
This program is supposed to turn the valves to position 2 ("GO2" in the case structure) then trigger the pump to push all the liquid in, then after all the liquid is finished being pumped, the valves need to switch to position 3, then the closing subvi gets triggered and it waits for user input before closing the whole thing.
I am having a lot of trouble getting the valve to turn to position 3 at the end before triggering the closing vi. I suspect its something in the order the loops are going, but I cannot figure out what it is. The program previously turned the valves to 2 and started the pump simultaneously, but that lead to liquid getting to the wrong destination, so I changed it to only start pumping after the program confirms the valves actually reach the requested spot. And even then the ending switch wouldn't occur consistently, but at least it WOULD happen. But now the switch to position 3 simply refuses to occur and I have no idea why. I've tried using channels, variables, switching the trigger command for position 3 between all the major loops and nothing seems to work.
The push water program is what I currently have. Push saline is one of the older iterations with the trigger command occurring both during the primary loop before it's supposed to close AND during the final loop when the closing subvi gets requested.
02-24-2025 09:20 AM
This program is supposed to turn the valves to position 2 ("GO2" in the case structure) then trigger the pump to push all the liquid in, then after all the liquid is finished being pumped, the valves need to switch to position 3, then the closing subvi gets triggered and it waits for user input before closing the whole thing.
I am having a lot of trouble getting the valve to turn to position 3 at the end before triggering the closing vi. I suspect its something in the order the loops are going, but I cannot figure out what it is. The program previously turned the valves to 2 and started the pump simultaneously, but that lead to liquid getting to the wrong destination, so I changed it to only start pumping after the program confirms the valves actually reach the requested spot. And even then the ending switch wouldn't occur consistently, but at least it WOULD happen. But now the switch to position 3 simply refuses to occur and I have no idea why. I've tried using channels, variables, switching the trigger command for position 3 between all the major loops and nothing seems to work.
The push water program is what I currently have. Push saline is one of the older iterations with the trigger command occurring both during the primary loop before it's supposed to close AND during the final loop when the closing subvi gets requested.
02-24-2025 09:46 AM
If you save your vis in an older version (LV20?) you would have more people that can look at this.
You probably want to include all the vis. Sounds like your are using 3rd party drivers in your application (KD Scientific Legato pumps?)
Good luck
02-24-2025 10:01 AM
attached is the saved version LV 20, let me know if you have any troubles viewing.
02-24-2025 10:40 AM - edited 02-24-2025 10:41 AM
@Manny904 wrote:
attached is the saved version LV 20, let me know if you have any troubles viewing.
We cannot download because of the broken virus scan. Can you place all files into a zip file before attaching?
02-24-2025 10:53 AM
Attached VI zip file...
02-24-2025 11:18 AM - edited 02-24-2025 11:28 AM
We are missing the "done button.vi", but from a casual inspection, there are a lot of things wrong, probably due to inexperience with LabVIEW. There is a lot of "code smell".
02-24-2025 11:23 AM
Done VI should be in the zip folder now.
02-24-2025 11:32 AM
Thanks. Maybe you want to correct some of the glaring mistakes mentioned before giving us another look.
Do you understand most of my points?
02-24-2025 11:37 AM
Deciphering now!!!!