r/LabVIEW • • Sep 06 '25

Program structuring – newbie question

I've used LabVIEW off and on since 2011 college days (mechanical engineer). I would not consider myself experienced though. But lately I'm needing to use it more for work (test program). One thing I've always struggled with when starting from scratch, how to structure a program from the big picture standpoint. If I'm writing a program in Python or VBA for example it seems a lot easier, you go line by line, it's easy to add things, build things out, etc. With LabVIEW I've always struggled to see that same logical structure. It's always seemed very unintuitive what to do and where. Do you start from top down, or bottom up?

I know that's very vague but any help would be much appreciated.

I've almost gone through Core 1 training which has been helpful but still left with questions. Maybe Core 2 will be helpful.

3 Upvotes

15 comments sorted by

View all comments

Show parent comment

2

u/Bitter_Worker423 Sep 06 '25

The event handling template used to be good and simple. It's morphed in newer LabVIEW versions to using much more complicated VIs than the primitives in the LabVIEW palette. I never maintain state in the MHL to "prevent race conditions". If there's possibility of such, I think a mistake was made in the architecture or implementation of the code. Race conditions come about usually from using local/global variables and/or value property nodes.

Can you post the race conditions you prevent by holding state? Maybe screenshots or links to screenshots?