​ ​ ​ ​ Blockly mise à jour ? - Page 2
Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Blockly mise à jour ?

  1. #11
    Senior Member
    Join Date
    Jul 2010
    Location
    paris
    Posts
    1,507

    Default

    Quote Originally Posted by Technical View Post
    PE6 does already support 'time'. Do you mean you want to use 'time' in Blockly?
    Attachment 21958
    Hello Technical,

    I don't use Blockly, but will there be the same Grove commands with basic ?

    Thanks for the answer, but il is not the best exemple.

    This is a simulation with PE5
    simu time.JPG

    I wrote 20000, but 2 is enough
    On my computer, with PE6, the solution is : Ctrl +Alt + Suppr

    Try to simulate this code with PE6, please

    MM
    Last edited by MGU; 22-02-2018 at 15:29.

  2. #12
    Senior Member
    Join Date
    Sep 2011
    Location
    Montpellier (FRANCE)
    Posts
    2,797

    Default

    Quote Originally Posted by MGU View Post
    Hello Technical,

    I don't use Blockly, but will there be the same Grove commands with basic ?

    Thanks for the answer, but il is not the best exemple.

    This is a simulation with PE5
    simu time.JPG

    I wrote 20000, but 2 is enough
    On my computer, with PE6, the solution is : Ctrl +Alt + Suppr

    Try to simulate this code with PE6, please

    MM
    Problème déjà débattu : il ont choisi de simuler le temps en nombre de boucles au lieu de temps réel...
    Du coup, la simulation étant 1000 fois plus lente qu'un Picaxe, une seconde dure des dizaines de minutes et il faut être extrêmement patient pour que votre programme marche !

    Ça peut se comprendre pour certains cas particuliers, mais il faut bien reconnaître que dans la majorité des cas, c'est piégeux....
    On a déjà demandé une option pour pouvoir choisir l'une ou l'autre simulation (et si possible que par défaut, la simulation se fasse en temps réel).
    Mais nous pourrions tout aussi bien pisser dans un violon ou cracher en l'air...
    There are 10 types of people in the world: those who understand binary, and those who don't.

  3. #13
    Technical Support
    Join Date
    Jan 1970
    Location
    Bath,UK
    Posts
    6,468
    Blog Entries
    1

    Default

    Besqueut is correct, but it is actually the PE5 simulation that is very inaccurate - after the simulation w0 will not be a realistic value compared to a real life chip...

    It is easy to test in real-time in PE6 like this:

    do
    inc w0
    #ifdef simulating
    pause 1000
    #endif
    loop while time<20000

    http://www.picaxe.com/BASIC-Commands...ef-simulating/
    PICAXE Technical Support

  4. #14
    Senior Member
    Join Date
    Jul 2010
    Location
    paris
    Posts
    1,507

    Default

    Quote Originally Posted by Technical View Post
    Besqueut is correct, but it is actually the PE5 simulation that is very inaccurate - after the simulation w0 will not be a realistic value compared to a real life chip...

    It is easy to test in real-time in PE6 like this:

    do
    inc w0
    #ifdef simulating
    pause 1000
    #endif
    loop while time<20000

    http://www.picaxe.com/BASIC-Commands...ef-simulating/
    Hello,

    Yes Technical, we know that, use a pause to accelerate time...curious. Why not include this pause in time simulation ?

    "Besqueut is correct" ,la réponse est là

    MM

  5. #15
    Technical Support
    Join Date
    Jan 1970
    Location
    Bath,UK
    Posts
    6,468
    Blog Entries
    1

    Default

    In PE5 the 'time' clock runs in 'computer' time which is very inaccurate because it does not match how the real life chip works. In your example in a real chip the do-loop will loop thousands of time, but in PE5 simulation only a few hundred. So the value of w0 will be very inaccurate at the end of a PE5 simulation because it does not mirror what a real chip does to w0.

    In PE6 the time clock runs in 'PICAXE simulation' time instead. Therefore it takes several thousands of loops to reach 1 second. This is similar to a real chip so w0 will be more accurate (but of course simulation is slower than a real chip, so takes longer). By adding a 'pause 1000' you also add a second of 'picaxe simulation' time, so the overall simulation is faster too.
    PICAXE Technical Support

  6. #16
    Senior Member
    Join Date
    Jul 2010
    Location
    paris
    Posts
    1,507

    Default

    Quote Originally Posted by Technical View Post
    In PE5 the 'time' clock runs in 'computer' time which is very inaccurate because it does not match how the real life chip works. In your example in a real chip the do-loop will loop thousands of time, but in PE5 simulation only a few hundred. So the value of w0 will be very inaccurate at the end of a PE5 simulation because it does not mirror what a real chip does to w0.

    In PE6 the time clock runs in 'PICAXE simulation' time instead. Therefore it takes several thousands of loops to reach 1 second. This is similar to a real chip so w0 will be more accurate (but of course simulation is slower than a real chip, so takes longer). By adding a 'pause 1000' you also add a second of 'picaxe simulation' time, so the overall simulation is faster too.
    Hello Technical,

    I'm just trying to give you the advice of a user who can not wait for hours, which should last a second.
    If you have to include break 1000 so that the simulation looks like reality, the simulation should do it. Without your explanation, nobody understands what's going on, especially not a student.
    (Google traduction)
    MM

  7. #17
    Senior Member
    Join Date
    Sep 2011
    Location
    Montpellier (FRANCE)
    Posts
    2,797

    Default

    Quote Originally Posted by Technical View Post
    By adding a 'pause 1000' you also add a second of 'picaxe simulation' time, so the overall simulation is faster too.
    I do not understand : how adding some time to a loop can lower the loop time ?

    With this (stupid) pause, simulation is quicker, but not real time.

    Will not be easier for all to have an option to chose from "real time" or "processor loops" ?
    There are 10 types of people in the world: those who understand binary, and those who don't.

  8. #18
    Technical Support
    Join Date
    Jan 1970
    Location
    Bath,UK
    Posts
    6,468
    Blog Entries
    1

    Default

    AXE300 PICAXE Grove Board

    http://www.picaxe.com/grove
    PICAXE Technical Support

  9. #19
    Senior Member
    Join Date
    Feb 2012
    Location
    Anjou
    Posts
    407

    Default

    AXE300 PICAXE Grove Board
    That's great news!

    I wish we can order it soon from our favourite suppliers.

    I guess we'll have to update PE6 to 6.1.0.0. Hope it's not too late for us as every school computers are updated these days...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •