CGate bug? Ramp to %age

Discussion in 'C-Gate Developers' started by more-solutions, Jul 6, 2011.

  1. more-solutions

    more-solutions

    Joined:
    Apr 23, 2006
    Messages:
    267
    Likes Received:
    4
    Location:
    Peterborough, UK
    Code:
    201 Service ready: Clipsal C-Gate Version: v2.8.0 (build 2309) #cmd-syntax=1.0
    ramp 254/56/0 98 0
    200 OK: //TESTRIG/254/56/0
    ramp 254/56/0 98% 0
    400 Syntax Error: Invalid integer parameter : <level>
    
    Am I doing something wrong? The documentation for RAMP suggests this should work unless I'm doing something silly.
     
    more-solutions, Jul 6, 2011
    #1
    1. Advertisements

  2. more-solutions

    Jasp

    Joined:
    May 25, 2010
    Messages:
    24
    Likes Received:
    0
    Location:
    Melbourne
    CGate doesn't recognise the '%' symbol and that is what is returning the invalid integer error.

    To send a ramp command via CGate you must select a value between 0 and 255, where 0 is off and 255 is on (100%) and also your time function should include an 'm' to state minutes.

    It should look something like:

    ramp 254/56/0 250 2m

    but if you want you want it to be instant, you can just drop the time parameter.

    ramp 254/56/0 250
     
    Jasp, Jul 6, 2011
    #2
    1. Advertisements

  3. more-solutions

    more-solutions

    Joined:
    Apr 23, 2006
    Messages:
    267
    Likes Received:
    4
    Location:
    Peterborough, UK
    In that case the docs are wrong (maybe I have old docs but it seems odd this would have been removed); they say that either 100% or 255 can be used.

    That's useful, thanks, I'll look again at that parameter (it was seconds I was after but I've obviously not fully grasped the ramp time). To be honest I think I'm going to be only using instantaneous ramps in my project anyway (I think they only have relay outputs anyway). I was just testing some library code and this came out of the testing.
     
    more-solutions, Jul 6, 2011
    #3
  4. more-solutions

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    285
    Likes Received:
    0
    Location:
    South Africa
    It must be a bug because the Ramp-Time is also optional but if you don't specify it then the command also fails.

    Code:
    ramp //MIDSTRM/254/56/0 255
    400 Syntax Error: Missing parameter : <time>
    Code:
    101-Help: The ramp time parameter is optional. If not given, then the ramp time is set 
    101-Help:   to 0 seconds and the ramp is immediate.
    Ingo
     
    Ingo, Jul 6, 2011
    #4
  5. more-solutions

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    761
    Likes Received:
    14
    Location:
    Adelaide
    Those are indeed bugs - regressions in both cases.

    Thanks for reporting those!

    Reference #21640, #21641
     
    daniel, Jul 7, 2011
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.