Question on serial protocol

Discussion in 'C-Bus Toolkit and C-Gate Software' started by MHeaton, Nov 29, 2010.

  1. MHeaton

    MHeaton

    Joined:
    Apr 22, 2008
    Messages:
    106
    Likes Received:
    2
    Location:
    London
    I apologise if this is not the correct forum but wonder if someone could confirm what the expected behaviour of the serial interface is.

    I setup the serial interface by passing the following commands:
    ~~~
    @A3210038g
    @A32200CAh
    @A342000Di

    This sets the SRCHK option. Sometime later I might drop the connection and re-establish it and I can go through a period when SALs are received that seem to contain a checksum regardless whereas CAL replies seem to vary according to the status of this flag.

    What is the expected behaviour? does SRCHK only influence CAL replies and do SAL replies ALWAYS have checksums?

    Thanks
    Mark
     
    MHeaton, Nov 29, 2010
    #1
  2. MHeaton

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    When you send the '~~~' characters to the PCI you are putting it back into basic mode, which turns off the SRCHK option in the PCI, so after that point you won't be seeing checksums on messages sent to/from the PCI.

    The 3 messages you are sending to the PCI are doing the following:
    1) Configuring the first application to monitor as the lighting application $38 (app 56 in decimal)
    2) Configuring the second application to monitor is the Trigger Control application $CA
    3) Configuring the Interface Options 3 parameters such that the EXSTAT, PUN and PCN options are turned on.

    At no point during this initialisation sequence are you defining the SRCHK option. In fact you are not defining either the power-up state or the run-time state for the parameters contained in Interface Options 1 at all.

    What you need to do is configure the 'Interface Options 1' and 'Interface Options 1 power up settings' parameters explicitly whenever you establish a connection to the PCI. If you configure both parameters to have the same values, then the PCI will re-start in the same mode it had prior to being power cycled.

    Refer to the Serial Interface Setup And Options section of the Serial Interface User Guide for more information.
     
    Newman, Nov 30, 2010
    #2
  3. MHeaton

    MHeaton

    Joined:
    Apr 22, 2008
    Messages:
    106
    Likes Received:
    2
    Location:
    London
    Newman,
    Thanks - I realise now I missed a command sent (I hate syslog) which is the one you were looking for....

    @A3300059j

    I will keep looking as I still think something a bit odd is happening - the ~~~ command seems to not stop SALs getting checksums.... but it is not critical as my code is now working.

    Regards
    Mark
     
    MHeaton, Dec 1, 2010
    #3
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.