Menu

Timing

Help
Evert
2015-04-14
2015-04-15
  • Evert

    Evert - 2015-04-14

    Hi there,
    I was wondering if the duration of "pulseout" hangs the program.
    So, is everything after that waiting until the pin where pulseout
    goes to, is going down ?
    example:
    pulseout pin 1: 10 sec
    pulseout pin 2: 10 sec

    Does the total takes 10 seconds or 20 seconds.

    I know that the commands are not 100% correct, it's only to make
    the question clear.

    Many thanks in advance.

    Evert

     
  • William Roth

    William Roth - 2015-04-14

    Pulseout is a blocking command. Therefore the next command is not executed until pulseout is done.

    So to answer your question the total will be 20 sec.

     
  • Evert

    Evert - 2015-04-14

    Thank you very much !!
    It COULD be different, because 20 sec is the same what you get with using
    the WAIT-command. In effect there are two commands doing the same.
    I'm starting with everything, and I could not test it yet.
    Thanks again!

    Evert

     
  • William Roth

    William Roth - 2015-04-14

    A little more info ...

    "Pulseout" is implemented as a simple macro in the stbasic.h header file. Here it is:

        macro Pulseout (Pin, Time)
        Set Pin On
        Wait Time
        Set Pin Off
        end macro
    

    So all it really does is set the pin on, "wait", and then set the pin off.

     
  • Evert

    Evert - 2015-04-15

    Thanks !
    I understand.
    Although it could be very nice when the pulseout would be on it's own,
    so that the example in the first post would take only 10 seconds :-)

    Need to clean up a room, to put an extra table for the laptop with the GCB on
    it, than I can really go on.
    I don't know if it is only me, but special the easy way of the wait command,
    makes it very powerfull to use. Special the very long times it can wait.
    Like hours: 168 hours for a week ! Or wait 167 h, set pin(x), wait 60 m,
    clear pin (x), goto the beginning.
    So easy should it be to recharge a carbattery every week, when the car is not
    in use for a longer time. Last year they made the cartax 215 US$ per month
    in the netherlands. That might stop in 2021...
    Kind regards,

    Evert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.