Please login or register.

Login with username, password and session length

Author Topic: Signal collision or cached commands?  (Read 1934 times)

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Signal collision or cached commands?
« on: July 29, 2014, 10:58:22 AM »

I'm working with a different automation software than AHP, so this is a question about what the controller should do and not how the software will react.

I have a CM15A set up with HomeGenie on a Raspberry Pi (HG1).  In order to monitor the results of commands, I turned off my AHP installation on my WinXP box and installed a second instance of HomeGenie (HG2).  The HA software is in development and the X10 code is currently in work.  I noticed a peculiar operation last night, but I'm not sure what should have happened.  Here's what I did and the result:

1) Sent commands A2 ON, A3 ON, A4 ON, A5 ON from HG1 within 1-2 seconds.
2) Module A2 turned on.
3) HG2 reported that modules A2-A5 were all turned on.

My question is, should the CM15A send all commands successfully if they are issued too quickly?  If I sent 4 commands within 1 second, that would be too much for the PLC protocol to transmit, right?  So, will the CM15A skip or cache these extra commands, or will it act like a TM751 and allow them to collide?  When AHP is run, I never saw this but that could be a software limitation.  Is the hardware smart enough not to break PLC signals it is sending?  If the CM15A sees a storm of RF commands, it only issues one PLC command every second or so.  But that doesn't mean it won't act differently for sending PLC.

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: Signal collision or cached commands?
« Reply #1 on: July 29, 2014, 11:14:37 AM »

I think you are asking about the CM15A firmware and, since X10 never published the communications protocol nor any details on the firmware, I doubt anyone here can answer your question.

However, X10 has published...
which, if memory serves, calls for waiting for six empty half-cycles before initiating a transmission.
Quote
NOTE 1 X-10 Receiver Modules require a "silence" of at least 3 power cycles between each pair of 11 bit code transmissions (no gaps between each pair). The one exception to this rule is bright and dim codes. These are transmitted continuously with no gaps between each 11 bit dim code or 11 bit bright code. A 3 cycle gap is necessary between different codes, i.e. between bright and dim, or 1 and dim, or on and bright, etc.
And, if the CM15A protocol is patterned after the CM11A protocol (it seems so), communication is controlled by handshaking OK to send signals to prevent sending more data than can be digested.
Also, the TM751 does not overwrite its own commands but, since it does not hear the powerline, can collide with signals sent by other PLC transmitters.
« Last Edit: July 29, 2014, 11:31:10 AM by dhouston »
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Signal collision or cached commands?
« Reply #2 on: July 29, 2014, 11:35:54 AM »

I believe I had help calculating that the best case time for a command to come in to the CM15A from another module and the CM15A to send a response was 0.4 seconds.  I assume that means that 0.2 seconds is required for 1 command at a minimum.  I can't remember if that was 1 command or 2 thought (A1 and then A ON versus A1 or A ON).

The PLC protocol states that a single command is actually a repeated single command for redundancy.  So If the command I am sending is A1, A ON, I'd expect the transmission time to be 2x 2 commands.  So, this would be 44 cycles of the power line or 44/60=0.733 seconds.  If I sent 4 of these, it would take 2.933 seconds minimum.  Right?  I think that HG1 and HG2 must be talking over the network since they both responded so quickly.

As for the CM15A, it doesn't appear that all of these commands are cached.

JeffVolp

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 122
  • Posts: 2286
    • XTB Home Page
Re: Signal collision or cached commands?
« Reply #3 on: July 29, 2014, 04:19:26 PM »

The PLC protocol states that a single command is actually a repeated single command for redundancy.  So If the command I am sending is A1, A ON, I'd expect the transmission time to be 2x 2 commands.  So, this would be 44 cycles of the power line or 44/60=0.733 seconds.  If I sent 4 of these, it would take 2.933 seconds minimum.  Right?

Don't forget the required 3-cycle inter-command gap.  It is true that each doublet takes 22 cycles to transmit, but then there must be a 3-cycle gap before the next command is transmitted.  Including the gap, that means each standard commands takes 25 cycles, or .417mS.

Jeff
Logged
X-10 automation since the BSR days

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Signal collision or cached commands?
« Reply #4 on: July 29, 2014, 05:06:31 PM »

I actually miscalculated a bit since I was taking each half sine wave as 1/60th of a second.  That's 1/2 wave though.  So, I guess it would be 22 cycles for a command plus 22 cycles for a function plus the 3 cycles for a total of 47 cycles.  That would be 47/(2*60) = 0.392 seconds.  Of course, the next command would require the 3 which gets you up to 0.416 seconds.  So, sending 4 commands of A1 ON would take 1.67 seconds.

Thanks for correcting me Jeff.
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.