From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-06-2020 08:25 AM
Brand new user here (haven't finished Core 1 yet), but I'm trying to revive an old VI who's original author is no longer with the company. For anyone willing to take a crack at it (after looking at the code) the VI functions fine up until it steps through to "Propel Reverse" which starts fine but then a couple seconds later "Propel Forward" is also switched "on" and that crashes an external component on the test stand (a DC iDrive). The VI itself doesn't care and continues to run.
In short both "Propel Forward" and "Propel Reverse" should NEVER be on at the same time. And in this case "Propel Forward" is turning on before "Propel Reverse" has completed its cycle. All of this can be seen when running the VI and clicking on the "Background" tab.
Any suggestions??
Thank you.
Solved! Go to Solution.
04-06-2020 08:55 AM
Ouch. I feel bad for you. Way too many Value (Signaling) properties in there, some not bound by data flow. So you can easily have some weird race conditions in there. From what am seeing, there needs to be a much more defined loops, preferably broken up into subVIs. I would even argue that most of those loops should not be separate, but including in the main state machine. Sorry, but I don't see a simple fix to this; the architecture needs a massive overhaul.
04-06-2020 09:15 AM - edited 04-06-2020 09:19 AM
I was hoping for a simple "gee just change this value" but I totally get what your saying. The entire program is 37 separate files in 12 different folders and it was based off of a program that was originally written about 12 years ago. Not sure if I can post all of that.
But do you have any idea of what I should look for that would be used to step through from case to case?
04-06-2020 01:34 PM
Well in the bottom loop, there's a "Reverse" case that sends a "True" to the "Propel Forward Output" value signalling node, which seems wrong?
Unless I am missing something...
04-06-2020 01:57 PM
Any chance that you could take a screen shot of that part of the code? Just want to be sure that we are looking at the same code.
Thanks.
04-06-2020 03:48 PM
04-07-2020 06:13 AM
Just got in this morning and tried your suggestion of removing that part of the code and "BAM", success! That was it, I have no idea of how that line of code got in there but thank you for spotting it, kudos on the way!
04-07-2020 06:20 AM
@Rich_Tennant_Tech wrote:
In short both "Propel Forward" and "Propel Reverse" should NEVER be on at the same time. And in this case "Propel Forward" is turning on before "Propel Reverse" has completed its cycle. All of this can be seen when running the VI and clicking on the "Background" tab.
Any suggestions??
Thank you.
Just make sure that in the Propel forward event, you also turn off Propel reverse. And the opposite, ofcourse.
This was a lot better than i feared. The bottom loop can be cleaned up by moving functionality to sub-vis. You shouldn't need a flat sequence, that's a warning sign.