Putting robotics at your service™

Free shipping on orders over $200

Basic Micro Studio - Changes in Beta from Build to build

Print view Share :
Previous topicNext topic

Page 2 of 9 [ 121 posts ]

1, 2, 3, 4, 5 ... 9
User avatar
Guru ( offline )
Posts: 4913
Posted: 2009-12-17 17:03 
Warning with the new build 1.0.0.15, I am having problems getting program to compile that use SLONG variables. IE something like:
x var slong

If anyone else has this version installed, could you verify if it is simply my setup...

Kurt


User avatar
Expert ( offline )
Posts: 536
Posted: 2009-12-17 17:45 
kurte wrote:
Warning with the new build 1.0.0.15, I am having problems getting program to compile that use SLONG variables. IE something like:
x var slong

If anyone else has this version installed, could you verify if it is simply my setup...

Tested here, I get an error too.

That Basic Micro Program Thing wrote:
Error: FILE X:\blahblahblah\ACCELEROMETER TEST.BAS(LINE 4) : [TOKEN SLONG] : Bad ALIAS definition

_________________
Curiously enough, the only thing that went through the mind
of the bowl of petunias as it fell was "Oh no, not again."

James "Don't call me Jim" Frye
Lynxmotion, Inc
http://www.lynxmotion.com


User avatar
Guru ( offline )
Posts: 9257
Posted: 2009-12-17 18:12 
E-mailed them, they are planning to release a new version next week.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Expert ( offline )
Posts: 628
Posted: 2009-12-18 19:04 
Fixed the bad alias for SLONG. Some how I deleted the check for SLONG so it was falling through as a possible alias which of course didn't exist so...bork. :)

And yes I'll be posting a new release early next week(maybe this weekend). I'll be trying to get some videos of the ARC-32 running the BH3-R made this weekend as well.

_________________
Basicmicro


User avatar
Guru ( offline )
Posts: 2120
Posted: 2009-12-19 03:20 
Acidtech wrote:
I'll be trying to get some videos of the ARC-32 running the BH3-R made this weekend as well.

Cool! Looking forward to see the board in action.

_________________
Kåre Halvorsen, Zenta
-----------------------------------------
Zenta's blog
http://zentasrobots.com/
Zenta's YouTube channel
http://www.youtube.com/ZentaOlbaid
-----------------------------------------


User avatar
Guru ( offline )
Posts: 3578
Posted: 2009-12-21 10:53 
Acidtech wrote:
Fixed the bad alias for SLONG. Some how I deleted the check for SLONG so it was falling through as a possible alias which of course didn't exist so...bork. :)

And yes I'll be posting a new release early next week(maybe this weekend). I'll be trying to get some videos of the ARC-32 running the BH3-R made this weekend as well.


A video of the new ARC32 running would be a great Christmas gift! :D :lol:

_________________
Mike

The robotics nut.


User avatar
Expert ( offline )
Posts: 536
Posted: 2010-01-06 14:06 
I've been working with Xan on the phoenix. We were trying to make the robot be able to play canned routines from the SSC-32's EEPROM. The code works... on IDE v8.0.1.7. Using IDE v8.0.1.11 or Studio (tried with 1.0.0.11 and 1.0.0.15) caused the robot not to be able to read information from the SSC-32. So there seems to be a problem with the serin command. At least, that's what it seems to be.

I was using the phoenix 2.0 code. Let me know if you need any additional information.

_________________
Curiously enough, the only thing that went through the mind
of the bowl of petunias as it fell was "Oh no, not again."

James "Don't call me Jim" Frye
Lynxmotion, Inc
http://www.lynxmotion.com


User avatar
Guru ( offline )
Posts: 9257
Posted: 2010-01-06 14:35 
Little more info. Xan's code asks the SSC-32 for it's revision number before it will send the commands to start the GP player. For some reason in studio it does not read this reply properly. By removing the firmware version request it works.

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Expert ( offline )
Posts: 536
Posted: 2010-01-06 15:10 
Robot Dude wrote:
By removing the firmware version request it works.

Sort of. It runs into problems when trying to leave the GP mode. Since the BAP doesn't get any feedback that the sequence is done, the bot can't be stopped because certain controls are enabled during GP play.

I would have brought that up before, but I kind of... forgot. :roll:

_________________
Curiously enough, the only thing that went through the mind
of the bowl of petunias as it fell was "Oh no, not again."

James "Don't call me Jim" Frye
Lynxmotion, Inc
http://www.lynxmotion.com


User avatar
Guru ( offline )
Posts: 4913
Posted: 2010-01-06 15:28 
Robot Dude wrote:
Little more info. Xan's code asks the SSC-32 for it's revision number before it will send the commands to start the GP player. For some reason in studio it does not read this reply properly. By removing the firmware version request it works.

Which version of studio? I had better luck with 1.0.0.14 then with the current .15

SLong broken
return -1 compile errors

Nathan knows about these, I was hoping that .16 would be up soon, but...

Kurt


User avatar
Expert ( offline )
Posts: 536
Posted: 2010-01-06 16:29 
kurte wrote:
Which version of studio?

Fish (Admin) wrote:
blah blah blah Studio (tried with 1.0.0.11 and 1.0.0.15)

:P

_________________
Curiously enough, the only thing that went through the mind
of the bowl of petunias as it fell was "Oh no, not again."

James "Don't call me Jim" Frye
Lynxmotion, Inc
http://www.lynxmotion.com


User avatar
Guru ( offline )
Posts: 4913
Posted: 2010-01-06 17:17 
Fish (Admin) wrote:
kurte wrote:
Which version of studio?

Fish (Admin) wrote:
blah blah blah Studio (tried with 1.0.0.11 and 1.0.0.15)

:P

Ooops I missed that one...

However I extracted the code into a test program and think the timout is the problem:
Here is a simple test program that both displays the whole string, plus says if it is valid or not:
Code:
;[SERIAL CONNECTIONS]
cSSC_OUT         con P11      ;Output pin for (SSC32 RX) on BotBoard (Yellow)
cSSC_IN          con P10      ;Input pin for (SSC32 TX) on BotBoard (Blue)
cSSC_BAUD       con i38400   ;SSC32 BAUD rate

szTemp      var byte(20)   ; temporary
GPVerData   var byte(3)      ;Received data to check the SSC Version
Index          var byte      ;Index universal used


sound P9, [40\5000,40\5000]
serout s_out, i9600, [13, "Test SSC", 13]

main:

   ; First lets try to print out the version
   serout cSSC_OUT, cSSC_BAUD, ["ver", 13]
   serin cSSC_IN, cSSC_BAUD, 10000, TO_GET, [str szTemp\20\13]
   serout s_out, i9600, ["SSC Version: ", str szTemp\20\13, 13]
TO_GET:   


   ; Like Xans code
   index = 0
   serout cSSC_OUT, cSSC_BAUD, ["ver", 13]
GetSSCVersion:
   serin cSSC_IN, cSSC_BAUD, 10000, timeout, [GPVerData(Index)]
   Index = (Index+1)//3 ; shift last 3 chars in data
   goto GetSSCVersion


timeout:
if (GPVerData(0) + GPVerData(1) + GPVerData(2)) = 164 then ; Check if the last 3 chars are G(71) P(80) cr(13)
   serout s_out, i9600, ["GP player valid", 13]

else
   serout s_out, i9600, [ "GP player NOT valid", dec (GPVerData(0) + GPVerData(1) + GPVerData(2)), 13]
endif

pause 2000
goto main
end


For my old and crusty one I see:
Code:
SSC Version: SSC32-V2.04GP
GP player valid
SSC Version: SSC32-V2.04GP
GP player valid


For my new shiny one from the Free giveaway, I see:
Code:
SSC Version: SSC32-V2.03XE
GP player NOT valid170
SSC Version: SSC32-V2.03XE
GP player NOT valid170
SSC Version: SSC32-V2.03XE
GP player NOT valid170


P.S - I assume that you do have both TX and RX wires going to the SSC-32

Kurt


User avatar
Guru ( offline )
Posts: 9257
Posted: 2010-01-06 17:43 
Thanks Kurt! You are a programming GOD! I bow humbly in thanks. :D

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


User avatar
Guru ( offline )
Posts: 4913
Posted: 2010-01-06 18:47 
You are welcome...

Back to Fish...
Fish (Admin) wrote:
Robot Dude wrote:
By removing the firmware version request it works.

Sort of. It runs into problems when trying to leave the GP mode. Since the BAP doesn't get any feedback that the sequence is done, the bot can't be stopped because certain controls are enabled during GP play.

I would have brought that up before, but I kind of... forgot. :roll:

I have not used this code much as I am not very good at creating these sequences :lol:

It looks to me that once you start a sequence, the code does not return to the main loop, until the sequence is completed. I will try to summarize this. If you look in phoenix_v20.bas a little after the label main: you will see the code:
Code:
  ;GP Player
  IF GPEnable THEN
    GOSUB GPPlayer
  ENDIF

If you look at GPPlayer
Code:
;--------------------------------------------------------------------
;[GP PLAYER]
GPStatSeq       var byte
GPStatFromStep    var byte
GPStatToStep   var byte
GPStatTime      var byte
GPPlayer:

  ;Start sequence
  IF (GPStart=1) THEN
    serout cSSC_OUT, cSSC_BAUD, ["PL0SQ", dec GPSeq, "ONCE", 13] ;Start sequence
   
   ;Wait for GPPlayer to complete sequence   
GPWait:
   serout cSSC_OUT, cSSC_BAUD, ["QPL0", 13]
   serin cSSC_IN, cSSC_BAUD, [GPStatSeq, GPStatFromStep, GPStatToStep, GPStatTime]
      
   IF (GPStatSeq<>255 | GPStatFromStep<>0 | GPStatToStep<>0 | GPStatTime<>0) THEN
     GOTO GPWait ;Continue waiting
   ENDIF
 
    GPStart=0

  ENDIF   

return

To me it looks like it will hang up in this loop until it completes. So you won't have any more input possible from the PS2 or DIY remote... until it completes. To me it looks like it would be easy to change this to allow input to be processed. For example could change the code to look more like:
Code:
;--------------------------------------------------------------------
GPStart     var    byte;   was bit
;[GP PLAYER]
GPStatSeq       var byte
GPStatFromStep    var byte
GPStatToStep   var byte
GPStatTime      var byte
GPPlayer:

  ;Start sequence
  IF (GPStart=1) THEN
    serout cSSC_OUT, cSSC_BAUD, ["PL0SQ", dec GPSeq, "ONCE", 13] ;Start sequence
    GPStart=2   ; set the state to do query...
  ELSEIF (GPStart=2)
    ;See if  GPPlayer has completed sequence
    serout cSSC_OUT, cSSC_BAUD, ["QPL0", 13]
    serin cSSC_IN, cSSC_BAUD, [GPStatSeq, GPStatFromStep, GPStatToStep, GPStatTime]
    IF (GPStatSeq=255) and  (GPStatFromStep=0) and (GPStatToStep=0) and (GPStatTime=0) THEN
        GPStart=0
    ENDIF
  ELSEIF GPStart=0xff
    ; user requested us to abort the sequence.
    serout cSSC_OUT, cSSC_BAUD, ["PL0", 13] ;Stop the sequence now
    GPStart = 0
  ENDIF
return

Now in the main code might change it like:
Code:
  ;GP Player
  IF GPEnable THEN
    GOSUB GPPlayer
    IF GPStart <> 0 THEN Main
  ENDIF


I would also probably change the PS2 code that processed the button to start the sequence to maybe something like:
Code:
IF (DualShock(2).bit1 = 0) and LastButton(1).bit1 THEN   ;R2 Button test    
  IF GPStart = 0 THEN   ; See if we are running a sequence
    GPStart=1    ; Nope then try to start it.
  ELSE
    GPStart = 0xff  ; Yes - cancel it.
  ENDIF
ENDIF


Now I did this on the fly here so there are probably some major problems here. Probably should run it by Xan and move to different thread...

Kurt


User avatar
Guru ( offline )
Posts: 9257
Posted: 2010-01-06 18:51 
Ok that fixed the not going into GP player mode. :D But it begs the question why would the timeout value that worked in 8.0.1.7 not work in Studio.

But it still does not recover from playing the sequence. It appears to read the query and the program waits till the sequence is finished before accepting other commands, and you can play a stored sequence several times over and over, but... When you press X to go back to walking mode it immediately runs to the left at high speed and ignores the PS2 forever till reset.

James and I have followed the program fairly well, but having the PS2 stuff in a separate file is blowing my mind. lol

We are so close!!! :twisted:

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


1, 2, 3, 4, 5 ... 9

All times are UTC - 5 hours [ DST ]. It is currently 2014-10-25 10:32
Feedback Form
Feedback Form