Announcement

Collapse
No announcement yet.

Problem with an AAG TAI8558

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Back to work for me!

    I had what appeared to be a very unstable 1-wire system so I put this project aside for a while to regroup. The whole 1-wire thing seemed so unstable I was going to find some other way to go about monitoring these data points. After looking at other options, I decided to give 1-wire a last try.

    To that end I got a new DS9490, pulled in new wire through a different route, bought some additional sensors from hobby-boards and got them running, and tested it connected to different computers and through different ports.

    The 1-wire network is now stable.

    The last thing to get working is the AAG.

    Michael, I may be the only person using this I/O board, so if it's not high on your priority list, I sure understand.

    But here's what I figured out.
    I monitored the Aag TAI8558 with the one wire viewer for a week with no problem. I switched it over to mcsTemperature and all the input port indicator leds came on. It looks as if you are sending low bits to the lower nibble of the output latch. This forces p0 through p3 low. Since the output of these pins in the 2408 is wire-ored with the opto-isolator inputs, pulling them low effectively blinds the inputs and they always show low. I think if you can just always 'or' the control bytes you send to the board with 0F, it should play nice. I know this may break other boards out there that use the 2408, so I understand if support for this board doesn't happen.

    And if you're in a giving mood, could I have my sunlight back?
    The first image shows what I had in 5.2.12. The second shows the lack of sunlight in 5.2.16
    Attached Files

    Comment


      #17
      If you enable General Debug then the log output will show lines that contain

      SetDS2408 Channel

      each time the DS2408 is being controlled. It is done on a bit-by-bit basis that should corrrelate to HS device-to-device.

      In the original implementation of the multiio I wrote directly to the adapter and pushed bits to the devices registers. With the current implementation I use a library function to communcate with the DS2408 and now only use the bit-level control for the LCD Text.

      I did not see any init code that would set the registers unless perhaps it is the startup with HS device status being conveyed to the DS2408. Also, in case there is some init code for the LCD that is being exercised I also added a debug output to V5.2.17 whenever the DS2408 is being written via the apapter directly.

      You lost your sunshine because there was no code behind the label. I had only implemented the Sunshine/HB solar sensor in xapmcs1Wire.

      Comment


        #18
        Using V5.2.17, here's when it first sets up the board after turning on the DS9490. After this exchange the four pins p-0 through p-3 are pulled low.
        Code:
        1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 0, NewValue=254 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=0, FullValue=254, DC=`1, SensorIndex=0 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S, UseDatabase=True, databaseSchemaIsBeingChanged=False 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S (SampleDate,Discrete) SELECT #2007-01-27 11:54:41 PM# AS QT,1 AS Q1 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=1 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 1, NewValue=252 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=1, FullValue=252, DC=`2, SensorIndex=1 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S1, UseDatabase=True, databaseSchemaIsBeingChanged=False 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S1 (SampleDate,Discrete) SELECT #2007-01-27 11:54:41 PM# AS QT,1 AS Q1 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=2 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 2, NewValue=248 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=2, FullValue=248, DC=`3, SensorIndex=2 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S2, UseDatabase=True, databaseSchemaIsBeingChanged=False 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S2 (SampleDate,Discrete) SELECT #2007-01-27 11:54:41 PM# AS QT,1 AS Q1 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=3 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  SetDS2408 Channel 3, NewValue=240 
        1/27/2007 11:54:41 PM   mcsTemperature Debug  ReadDS2408 Channel=3, FullValue=240, DC=`4, SensorIndex=3
        Then subsequent communication after changes are made to the setup:
        Code:
        1/28/2007 10:02:45 AM   mcsTemperature Debug  SetDS2408 Channel 0, NewValue=240 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=0, FullValue=240, DC=`1, SensorIndex=0 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=1 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  SetDS2408 Channel 1, NewValue=240 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=1, FullValue=240, DC=`2, SensorIndex=1 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=2 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  SetDS2408 Channel 2, NewValue=240 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=2, FullValue=240, DC=`3, SensorIndex=2 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=3 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  SetDS2408 Channel 3, NewValue=240 
        1/28/2007 10:02:46 AM   mcsTemperature Debug  ReadDS2408 Channel=3, FullValue=240, DC=`4, SensorIndex=3
        You lost your sunshine because there was no code behind the label. I had only implemented the Sunshine/HB solar sensor in xapmcs1Wire.
        So can you recommend a sensor type for the Solar Radiation data that comes from my weather station plugin - not 1-wire?

        Thanks,
        Ken

        Comment


          #19
          The DS2405/06 relay interface described on the MidonDesign site requires the Latch output to be set to OFF for the input side to function properly. Based upon your description it looks as if the AAG design expects it to be ON. I changed the DS2408 output init to set the Latch output to be ON for the 4 inputs. It is posted as V5.2.18.

          The Sunlight was a unitless device type. Index is also an unitless one. This means that no Y axis label will be produced for it on the trend charts. If you want a label then use one of the 4 user-defined types and you can select whatever label you want. If you do not need a lable then use index type.

          Comment


            #20
            I agree, the AAG requires the Port Output Latch lower nibble to be set to ON (bits high). In other words the Latch has to be set to xFh. With x being the upper nibble control bits for the four relays. Using V5.2.18 I still get:

            Code:
            1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 0, NewValue=240 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  LogDiscrete tbl3500000000A84229S, UseDatabase=True, databaseSchemaIsBeingChanged=False 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  Log Discrete INSERT INTO tbl3500000000A84229S (SampleDate,Discrete) SELECT #2007-01-28 4:12:47 PM# AS QT,0 AS Q1 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=0, FullValue=240, DC=`1, SensorIndex=0 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=1 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 1, NewValue=240 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=1, FullValue=240, DC=`2, SensorIndex=1 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=2 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 2, NewValue=240 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=2, FullValue=240, DC=`3, SensorIndex=2 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405Output Address=3500000000A84229, port=, Channel=3 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  DS2405 3500000000A84229 output False 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  SetDS2408 Channel 3, NewValue=240 
            1/28/2007 4:12:47 PM   mcsTemperature Debug  ReadDS2408 Channel=3, FullValue=240, DC=`4, SensorIndex=3
            By full value of 240 (F0h) it looks to me like the lower nibble is set low, not high.
            I confirm this by
            starting 1-wire viewer,
            setting the low nibble bits high (Latch = FFh),
            turning off 1-wire viewer,
            starting mcsTemperature,
            capturing the log above,
            stopping mcsTemperature,
            starting 1-wire viewer and noting that the Latch value is now F0h.

            I now understand what you are saying about my sunlight! Thanks.

            Ken

            Comment


              #21
              I'll try a little different approach. Give V5.2.19 a try.

              Comment


                #22
                Been up and running for a half day now. All looks good!

                Thanks again Michael.

                Ken

                Comment

                Working...
                X