01-02-2025 08:14 AM
Hi everyone,
I'm a complete beginner to LabVIEW and coding in general, and I'm working on a project to automate soil respiration measurements using a Soil Health Innovations SR-1 with a LiCor 850 detector.
Project Goal:
I'm building a multi-chamber manifold system with automated purging to analyze multiple soil samples sequentially. The system uses an Arduino Mega, a relay module, and SMC VQ20 solenoid valves to control the airflow between the chambers and the SR-1.
Current Status:
I'm using LabVIEW to create a VI that controls the valves based on the status of the SR-1 software. I've designed the front panel with controls for each valve and a string combo box to simulate the different status states of the SR-1 software (e.g., "Standby", "Pump Only", "Ready for Sample", etc.). I've also implemented the "Pump Only" case logic, which activates the purge valve and deactivates all chamber valves.
Where I'm Stuck:
I'm currently working on the "Ready for Sample" case, where I need to:
I've managed to create the basic structure the first three steps, but I'm struggling with how to:
Case Structure
or other logic to activate the correct chamber valve based on the chamber number.Specific Questions:
Case Structure
to activate the correct valve based on the chamber number?Additional Information:
Any help, guidance, or code examples would be greatly appreciated! I'm eager to learn and make this project a success.
Thanks in advance!
01-02-2025 08:40 AM
I hope you have some guidance/mentor/instructor to "get you started in LabVIEW". Please tell us:
To provide the best help, we need to see your LabVIEW code. Best (if you have a Project contained in a Folder) is to right-click the Folder, "Send to:", "Compressed (zipped) folder", and then attach the .zip file it produces. If everything is inside one huge VI, you can simply attach that VI.
Bob Schor
01-02-2025 09:11 AM
Take a look into State machines and how to implement them on LabVIEW.
01-02-2025 10:15 AM
Thank you Bob,
Operating System: Windows 11 Home 64-bit
LabVIEW Version: 2022 Q3 (32-bit) 22.3.4f8 (using Community version)
I did start by creating a new project (using Blank VI template), but to be upfront, I undertook this project with absolutely zero knowledge in any of this, so I am unsure what you mean by how to 'develop what I am describing in the context of a LabVIEW project'. I am happy to share any information or details, simply subject ignorance.
I thought I had attached my VI to my original post, but will upload the current version to this.
01-02-2025 10:36 AM
Just an FYI, LV Community Edition is for personal use only, generally not for commercial or academic use.
01-02-2025 10:49 AM
I will certainly dive into that, thank you!
01-02-2025 10:50 AM
When you open LabVIEW and click the "New Project" button, it opens (or, at least in LabVIEW 2019, which I just opened), with the first item in the right-hand side being "Blank Project".
How are you learning LabVIEW? Are you taking any of the Tutorials, either on the Web or the series listed in the first page of this Forum? Do you have a mentor/professor/friend to get you started? [I'm trying to do a little of that for you ...].
Anyway, as you probably know, LabVIEW uses "Virtual Instruments" (VIs, for short) that have a Front Panel with Inputs and Outputs (also called Controls, because you can use them to "control" what happens inside the VI, and Indicators, because they can show you what values are expressed on the "wires" inside the VI.
LabVIEW is a Data Flow system. It is programmed (on the Block Diagram) using Controls, Indicators, Functions, and Structures, connected by "wires", which are conduits for "data" (which include numeric quantities, arrays, strings, booleans, and other things). There are Three Laws of Data Flow (that's my made-up name):
(Sorry about the disjointed nature of this brief note -- just hoping to get you started).
A LabVIEW Project provides an environment to keep a "LabVIEW Project", meaning a body of code that you want to keep together, say in a Folder, that all pertain to one "Project" (meaning a specific Task or Tasks that this code "does for you") coherently organized on disk. Often the Project file (which has the extension .lvproj), which is an ordinary text file (that you should not mess with!) that "organizes" the various VIs and other items you want to keep together as they cooperate to do What You Want The Code To Accomplish.
Can't look at your code right now (the PC I'm using doesn't have LabVIEW 2022 or higher, so I can't yet open your VI, but my machine at work can ...
Bob Schor
01-02-2025 11:03 AM
This is 100% a personal project based on my understanding, it just overlaps with one of the work tasks I have. To give a little background:
As I am the main operator of the SR-1, I have to read 100's of samples a day, which requires manual handling of each sample container individually. I dabble in 3d printing as well and designed a compact multi-chamber sampler to incorporate into the system and automated solenoid valved made the most sense, so wanted to take a crack at figuring out how to incorporate those into the system. I figured the best approach was to simulate as much as I could before ordering any physical parts, and after starting in WokWi, I was guided to LabVIEW.
If this does violate the EULA/T&Cs, I will absolutely take steps to remedy that. It is not my intention at all.
01-02-2025 11:16 AM
That is certainly great information and adds a bit of clarity!
As for how I am learning LabVIEW, its a mix of trial and error, utilizing the help/guidance within program, and the old classic, google. I do not know anyone who does this specific type of work to act as an SME. I started my journey last Friday and am slowly making my way through the forum and will continue to do so!
01-02-2025 01:34 PM
@ThenaTheGrey wrote:
This is 100% a personal project based on my understanding, it just overlaps with one of the work tasks I have. To give a little background:
As I am the main operator of the SR-1, I have to read 100's of samples a day, which requires manual handling of each sample container individually. I dabble in 3d printing as well and designed a compact multi-chamber sampler to incorporate into the system and automated solenoid valved made the most sense, so wanted to take a crack at figuring out how to incorporate those into the system. I figured the best approach was to simulate as much as I could before ordering any physical parts, and after starting in WokWi, I was guided to LabVIEW.
If this does violate the EULA/T&Cs, I will absolutely take steps to remedy that. It is not my intention at all.
I just wanted you to be aware, because it sounded like a work project. I figured you probably already knew this, but I wanted to save you some potential legal headaches in case you didn't. 🙂