LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thoughts on why this VI is not updating my AC Calibrator?

Solved!
Go to solution

There is only one visible picture in this entire post. One has to go to your original post, download the picture and open it in order to compare the images to see you eliminated a race condition by moving where you read your local variable. Your post with the fix is not immediately obvious without extra effort on the readers part. Would it have been so difficult to have posted your picture and included a simple statement saying "look, I moved the read of the local variable into the case structure rather than reading it outside the case structure."

 

This forum is for helping others get better at developing LabVIEW code. Sadly the code posted is not very good code. I've seen far too many examples of code that looks like that in the field. highlighting the flaws in this code is not a dig at you, it is a warning to yourself and others that one should be veru suspicious that this code is reliablle. You may get very lucky and it will continue to work. You may also change something (code, PC, other hardware) and find that the next race condition is exposed. Maybe you won't be given the chance to rewrite and improve this code but hopefully you will not implement your next application in the same way. For all I know you inherited it and you are stuck with it.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 11 of 13
(521 Views)

It was inherited. Originally created in 2014 - 2016 by a certified developer. I was given two projects and told to make one of them work. If you want to see some truly bad code, take a look at the other.

 

0 Kudos
Message 12 of 13
(519 Views)

I feel sorry for you. You inheritted some pretty bad code. If the person who developed these is actually certified, they should have their certification stripped. I have a client with some ugly code that I support (code written by someone else) and everytime I have to make modifications I try to clean things up but it is still pretty ugly code. Over the years they have requested updates and I need to shoehorn in the changes. I have recommended multiple times that they rewrite the code which would make things more stable and eaiser to extend but so far they have stuck with the old stuff.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 13 of 13
(494 Views)