0
\$\begingroup\$

I'm trying to create an automatic startup override system whereby when an ESD override button is clicked, a signal will be held true for 10 seconds overriding my ESD interlocks.

enter image description here

This seems like there really ought to be a simple solution:

  1. Restart Activated.
  2. Set timer to 0 and start.
  3. While Timer < x seconds output true.
  4. Then revert to false and stop timer.

However, I have no idea of how to implement this in LabVIEW so would appreciate some help!


I've tried implementing this using a case with a wait command in it but I'm getting a "member of a cycle" error.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ This should be migrated to LabVIEW.SE. A quick answer is to trigger a delay timer in the case structure which when timed out writes '1' back to your dashed line as a named variable. For it to run again this variable must be cleared. This is very basic LabVIEW stuff. \$\endgroup\$ – Sparky256 Oct 16 '18 at 22:04
  • \$\begingroup\$ Your second drawing will cause an error as you are creating a loop. You need to create a variable inside the first case, and set it TRUE when times out. A copy of the variable is what stops the function. You have much to learn... \$\endgroup\$ – Sparky256 Oct 16 '18 at 22:08
  • \$\begingroup\$ I'm voting to close this question as off-topic because this is a pure programming question. \$\endgroup\$ – Scott Seidman Oct 19 '18 at 12:51
0
\$\begingroup\$

Since you don't show more of your schematic, I guess you have some kind of process which runs again and again within a loop.

One way to accomplish your task is using a shift register to carry data into the next iteration of the loop. If the button is pressed, (current time + 10 seconds) is written to the register, otherwise, it stays unchanged:

enter image description here

You should always initialize a shift register (wire something to the left input) unless you have a reason not to do so, because shift register will keep the value from the last time the VI ran.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy