Micro maestro 6ch script start/stop button

Hello,

Nice to see this activity here :wink:

I need help from generous guys :confused:

I have done my sequence,transfer the script to the board(I want it ā€œstand aloneā€), I know how to do the button wiring and input mode on the board but I donā€™t know how to modify the script to have a push button to start(always from the beginning) and stop the script,could you help me pleas ?

Jay

Hello, Jay.

You can find an example of how to incorporate buttons into your Maestro script under the ā€œExample Scriptsā€ section of the Maestro userā€™s guide. However, it sounds like you want to be able to start and stop your script at any point, which is probably going to be complex to do with a script. It might just be easier to add something like our Pushbutton Power Switch SV to toggle power to the logic side of the Maestro on and off.

-Jon

Hi Jon,

thank a lot for your input,I have already seen the example scripts section but did not find how to make start script from a buttonā€¦and which command to use for thatā€¦

so, to stop it any time, I will use a power switch on the servos power line(I have one continuous rotating servo that can cause memory effect/trouble when controller board powered off ) but I still need a start button,anybody can write me this script pleas?

Jay

Hi, Jay.

Switching off servo power while maintaining power to the Maestro would not stop your script from running. It would also not allow you to start from the beginning of your script as soon as you switch power back on to the servos. As I mentioned earlier, adding a pushbutton to start and stop your script like that might not be trivial; it depends on the specific details of your script. If you post your script, and tell me what it is you are trying to do, I might be able to help you think of a good solution.

-Jon

Hi Jon,

so i will power the board (from VIN pin ) and the servos from the same controlled power supply

test code:

begin
  500 2368 6000 4992 0 0 0 frame_0..5 # mise a 0
  1800 5829 frame_1 # avance 1
  100 6031 frame_1 # avance break
  100 6000 frame_1 # avance stop
  1000 8336 0 0 frame_0..2 # pliage 1
  1000 2368 frame_0 # pliage 1 retour
  500 0 6222 frame_0_2 # chariot2
  3200 5829 0 frame_1_2 # avance 2
  100 6035 frame_1 # avance 2 break
  100 6000 frame_1 # avance 2 stop
  1000 8265 0 frame_0_1 # pliage 2
  1000 2368 frame_0 # pliage 2 retour
  500 0 8086 frame_0_2 # cariot 3
  2200 5833 0 frame_1_2 # avance 3
  100 6035 frame_1 # avance 3 break
  100 6000 frame_1 # avance 3 stop
  1000 8195 0 frame_0_1 # pliage 3
  1000 2368 frame_0 # pliage 3 retour
  1600 0 5854 frame_0_1 # avance fin
  500 6000 frame_1 # stop
repeat

sub frame_0..5
  5 servo
  4 servo
  3 servo
  2 servo
  1 servo
  0 servo
  delay
  return

sub frame_1
  1 servo
  delay
  return

sub frame_0..2
  2 servo
  1 servo
  0 servo
  delay
  return

sub frame_0
  0 servo
  delay
  return

sub frame_0_2
  2 servo
  0 servo
  delay
  return

sub frame_1_2
  2 servo
  1 servo
  delay
  return

sub frame_0_1
  1 servo
  0 servo
  delay
  return

I use the ā€œOn start up -go to-ā€ function under Channel setting panel to initialise servoā€™s at a desired position when all is powered on so I just need a start script button(always from the beginning of the script => my ā€œstop buttonā€ is the power button(or maybe the RST pin on the board,I will seeā€¦),each script stooped must be restart from beginning)

Jay

You might consider adding an SPDT switch like one of these to your setup. This would allow you to set up two states that the pin can be in, depending on which side of the switch the contact is on. You could then use while loops in between the subroutines of your script to check the state of the Maestro input pin connected to the switch.

-Jon