Mini Maestro 12 servo

Hi guys,

why if I write the simple code

[code]# Sequence 2
begin
500 8935 2721 9013 2799 5168 6527
5595 7304 0 0 0 0 frame_0…11 # Frame 0
repeat

sub frame_0…11
11 servo
10 servo
9 servo
8 servo
7 servo
6 servo
5 servo
4 servo
3 servo
2 servo
1 servo
0 servo
delay
return[/code]

I receive this error message

[quote]Subroutine call overflow/underflow
Script execution out of bounds[/quote]

What mean?

Many Thanks

Hello.

When I copy and paste the script you provided to my 24-channel Maestro (running firmware version 1.02), it does not give me any errors. Could you post your Maestro settings file? Also, what firmware version do you have on your Maestro? The firmware version should be displayed next to the drop-down box in the upper left corner of the Maestro Control Center.

-Brandon

Hi Brandon,

my config file

[code]

false UART_FIXED_BAUD_RATE 9600 0 false 12 0 9000 3000 9000 3000 5888 5952 5568 6592 0 0 0 0 9000 3000 7616 3000 5888 5952 5568 6592 0 0 0 0 9000 3000 7616 3000 5888 5952 4672 6592 0 0 0 0 9000 3000 7616 3000 5888 5312 4672 6592 0 0 0 0 9000 2304 7616 3000 5888 5312 4672 6592 0 0 0 0 9000 2304 7616 3000 5888 5952 4672 6592 0 0 0 0 9000 3000 9000 3000 5888 5952 4672 6592 0 0 0 0 9000 2304 9000 4800 6720 5952 4672 6592 0 0 0 0 9984 2304 9000 4800 6720 5952 4672 6592 0 0 0 0 9984 2304 9000 4800 5888 5952 4672 6592 0 0 0 0 9000 2304 9000 3000 5888 5952 4672 6592 0 0 0 0 9000 2304 9000 3000 5888 5952 4672 6080 0 0 0 0 9000 2304 9000 4800 5888 5952 4672 6080 0 0 0 0 9000 2304 9000 4800 5888 5952 4672 6592 0 0 0 0 9000 2304 9000 3000 5888 5952 4672 6592 0 0 0 0 9984 2304 9000 3000 5888 5952 4672 6592 0 0 0 0 9000 3000 9000 3000 5888 5952 5568 6592 0 0 0 0 9000 3000 7616 3000 5888 5952 5568 6592 0 0 0 0 9000 3000 7616 3000 5888 5952 4672 6592 0 0 0 0 9000 3000 7616 3000 5888 5312 4672 6592 0 0 0 0 9000 2304 7616 3000 5888 5312 4672 6592 0 0 0 0 9000 2304 7616 3000 5888 5952 4672 6592 0 0 0 0 9000 2304 7616 3000 6720 5952 4672 6592 0 0 0 0 9984 2304 7616 3000 6720 5952 4672 6592 0 0 0 0 9984 2304 7616 3000 5888 5952 4672 6592 0 0 0 0 9984 4429 7616 3000 5888 5952 4672 6592 0 0 0 0 9984 4429 9000 3000 5888 5952 4672 6592 0 0 0 0 9984 4429 9000 3000 5888 5952 4672 4800 0 0 0 0 9984 4429 9000 4800 5888 5952 4672 4800 0 0 0 0 9984 4429 9000 4800 5888 5952 4672 6557 0 0 0 0 9984 4429 9000 3000 5888 5952 4672 6557 0 0 0 0 9000 4429 9000 3000 5888 5952 4672 6557 0 0 0 0 9984 5312 9984 4416 6592 5440 5504 4864 0 0 0 0 7488 2240 9984 4416 6592 4416 5504 5888 0 0 0 0 7488 2240 8448 2432 6592 5440 6272 5888 0 0 0 0 9984 5312 8448 2432 7488 5440 5504 5888 0 0 0 0 [/code]

Firmware version is 1.

Many Thanks,

Your script looks like it has changed since your first post. I tried loading your Maestro settings on my Maestro and running your new script, but it still does not result in any error messages. The firmware versions are 1.00, 1.01, and 1.02; when you said that your firmware version is 1, did you mean 1.00?

Could you try hitting the “Clear Errors” button in the “Errors” tab and restarting the device by clicking on “Device” then “Restart Device” and try running your script again?

-Brandon

Hi Brandon,

sorry for my slowly response… :unamused:

I’m talking about 1.5.2.0 version.

I try always CLEAR ERROR + RESTART button

ThANKS

It sounds like you are referring to the version of the Maestro Control Center Software. I am asking what firmware version is on your Maestro servo controller. You can find this by connecting your Maestro to your computer using your USB cable, selecting your Maestro in the control center, and looking to the right of the drop down device selection box at the top of the control center, above the tabs.

-Brandon

I Brandon,

I hope understand the problem…

When I try to execute my simple script:

### Sequence subroutines: ###

# Sequence 2
sub Sequence_2
  150 8000 7424 6848 7296 6592 5440 
  5517 4864 0 0 0 0 frame_0..11 # Frame 1
  150 4480 4544 4416 5888 frame_0_1_5_7 # Frame 2
  150 4352 5248 5440 6272 frame_2_3_5_6 # Frame 3
  150 8000 7424 7488 5504 frame_0_1_4_6 # Frame 4
  return

sub frame_0..11
  11 servo
  10 servo
  9 servo
  8 servo
  7 servo
  6 servo
  5 servo
  4 servo
  3 servo
  2 servo
  1 servo
  0 servo
  delay
  return



sub frame_0_1_5_7
  7 servo
  5 servo
  1 servo
  0 servo
  delay
  return

sub frame_2_3_5_6
  6 servo
  5 servo
  3 servo
  2 servo
  delay
  return

sub frame_0_1_4_6
  6 servo
  4 servo
  1 servo
  0 servo
  delay
  return

In the upper-right corner of the Maestro Control Center I can read:

In fact I receive the follow error:

[quote]Subroutine call overflow/underflow
Script execution out of bounds
[/quote]

Why this happens?

Hi brandon now is OK!!

The problem was the use of all 126 level of subroutines call.

In fact, now I use one only level (only one subroutines call) and does work very fine!!! :laughing:

Thanks a lot

I am glad you were able to figure out what your problem was and correct it. Thank you for letting us know.

-Brandon

Yes,
because It’s important to note that when copy the frame sequence to script tab,
Micro Maestro runtime calling nested subroutines until overflow memory :blush:

You must prefer write correct code like

begin
       sub 'calling subfunction'    
repeat

where [quote]sub ‘calling subfunction’[/quote] is code copied from frame sequence

I hope it’s a clear explanation

It sounds like you understand what the problem was. When you copy your sequences to the script using the “Copy all sequences to Script” button, the Maestro Control Center enters them into the script as subroutines that should be called from the main body of the script. If you only copy one sequence to your script using the “Copy Sequence to Script” button, the Maestro Control Center will set the script to be a looped version of the sequence and no additional code would be needed. More information about this can be found in the “Sequencer” section of the Maestro user’s guide.

-Brandon