Antony Posted May 11, 2009 Share Posted May 11, 2009 Hello. Please excuse the nube question How do I configure a spin button to set dac1 to either +5v or -5v depending on the button pressed for a period of .5 second then return the value of Dac1 to 0? Link to comment Share on other sites More sharing options...
AzeoTech Posted May 11, 2009 Share Posted May 11, 2009 No problem. Everyones a nube at some point. You actually can't use the spin button for this, but you can simply use two buttons instead, one for each. First, though, you need a sequence that delays 0.5 seconds and then sets the dac1 back to 0. You could do it in the button event, but then the entire user interface will hang for 0.5 seconds which is probably not want you want. By putting the delay in a sequence, you allow it to run concurrently with the user interface. The sequence would simply be: delay(0.5) dac1 = 0 Lets say you called it ResetDac1. Then the action for the +5 button would be a Quick Sequence action like this: dac1 = 5 beginseq(ResetDac1) the action for the -5 button would be the same, except the first line would be = -5 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.