04-06-2017 09:25 AM
Hi All, very new to Labview and NI, so go easy on me 🙂
I'm working on a project that has a softmotion drive connected to the cRIO via EtherCat. The Scan Engine of the cRIO is set to be Active on start up, which is causing it to fail because the drive hasn't finished booting up by the time the SE tries to go active.
I'm proposing the below solution, to wait 30 seconds (which is long enough) and then set the SE to active (its in config mode on start up now). Is there any better way, or reason why this isn't the best approach?
I'm also hoping that if the drive falls off the network, this will attempt to put the SE back in to active mode every 30 seconds until the drive is available again.
04-06-2017 04:37 PM
If you can not ask the drive, whether it has finished booting, then you have to wait.
Attached is not the best solution because you do not wait before setting Active, no execution order dependence - flat sequence will help.
Why do you have unstoppable while loop?
I would not block execution for 30 seconds, program should be responsive. Check Elapsed time.vi, loop faster and Active-ate only when time has elapsed.
If you need to get back to initialization later in program, implement state machine design pattern.