3:58 pm
March 12, 2015
Hello;
The Arduino Watchdog function hasn't been ported to the Compiler as an API VI.
Here it is an alternate way to do what you need but it would require a small HW addition to the Arduino board.
http://www.instructables.com/i.....-software/
Then you can use the Digital API to set the pulse that will reset the board to the corresponding pin.
Filipe
Cheers
Filipe
4:39 pm
March 12, 2015
Two other solutions for you that involve software only:
1) You could use one of the software reset methods found online (like in Step 2 of Filipe's link). This is a similar ASM instruction:
asm volatile (" jmp 0");
To wrap this in a LabVIEW API you could simply create a user library (see Porting an Arduino Library to LabVIEW section of user manual). You would create a single VI for reset and place the above code in the Translator.vi for that VI. Refer the the Template example as well for this approach.
2) Another easy approach would be to just wrap your entire top level VI in a while loop and just check your error condition inside of that, and on error, you finish your main code/loop and then the outside loop will start your main code over again.
15
1 Guest(s)