Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-30715

Rewrite the Logic to Assign the DDS Telemetry Data

    XMLWordPrintable

Details

    • 2
    • TSSW Sprint - Jun 07 - Jun 21
    • Telescope and Site
    • No

    Description

      Rewrite the logic to assign the DDS telemetry data. This task will check the data to DDS is useful or not, and might add new field if needed. In addition, the DDS telemetry data should come from the GUI data directly.

      Some comment from rowen in the slack channel to debug DM-30550:

      ttsai and I were talking. I suggested that the first step is for ttsai to print one or both of strutEncoderRaw and strutEncoder_microns (to stdout, a log, or a file – whatever is easy) from the dds telemetry packet when he publishes that packet. This will tell us if the problem is in the low-level controller or in the CSC. Also the code that sets these fields is suspicious and he will probably change it. But first I think it is important to prove whether the problem is actually in the low-level controller or in the CSC.

      A longer-term improvement we have tentatively agreed on is to make the telemetry sent to the CSC identical to the telemetry sent to the EUI. That way if we see a problem in one, we expect to see it in the other as well. Unfortunately the amount of data sent to the EUI is likely too much — it may overwhelm the python in the CSC. So a variant of that suggestion is to divide the telemetry into two pieces: one has all the “important” information that is sent to the CSC and the EUI. The other piece has additional information that is only sent to the EUI.
      This would be a big improvement over the present situation: the telemetry packet for the CSC is computed entirely separately from the telemetry packet sent to the EUI. A bug in one will not show up in the other.

      Attachments

        1. HexapodEUI.png
          HexapodEUI.png
          60 kB
        2. image (1).png
          image (1).png
          592 kB
        3. loggingDataInGUI.png
          loggingDataInGUI.png
          72 kB
        4. messages
          3.24 MB
        5. telemetry.txt
          2.09 MB

        Issue Links

          Activity

            ttsai Te-Wei Tsai added a comment -

            Get the strut encoder raw data in DDS from the GUI telemetry directly.

            ttsai Te-Wei Tsai added a comment - Get the strut encoder raw data in DDS from the GUI telemetry directly.
            ttsai Te-Wei Tsai added a comment - - edited

            The mapping between the GUI and telemetry field is here:

            The first sub-figure maps to strutEncoder_microns in DDS telemetry. The following is the mapping of CSC code by Russell:

            self.tel_actuators.set_put(
                        calibrated=server.telemetry.strut_encoder_microns,
                        raw=server.telemetry.strut_encoder_raw,
                    )
            

            ttsai Te-Wei Tsai added a comment - - edited The mapping between the GUI and telemetry field is here: The first sub-figure maps to strutEncoder_microns in DDS telemetry. The following is the mapping of CSC code by Russell: self.tel_actuators.set_put( calibrated=server.telemetry.strut_encoder_microns, raw=server.telemetry.strut_encoder_raw, )
            ttsai Te-Wei Tsai added a comment -

            The GUI can log data:

            I need to write the related script to read the binary data.

            ttsai Te-Wei Tsai added a comment - The GUI can log data: I need to write the related script to read the binary data.
            ttsai Te-Wei Tsai added a comment - - edited

            Added the following log message just before the sending of DDS packet in sys.c (need to remove this before PR):

            // Print the debug message (REMOVE THIS BEFORE PR)
                        syslog(LOG_NOTICE,
                               "DDS telemetry: tlmStruct->strutEncoder_microns[0] is %f.",
                               ddsTlm.strutEncoder_microns[0]);
             
                        mq_send(gTlmDdsSendMsgQueue, (char *)&ddsTlm, sizeof(ddsTlm), 1);
            

            ttsai Te-Wei Tsai added a comment - - edited Added the following log message just before the sending of DDS packet in sys.c (need to remove this before PR): // Print the debug message (REMOVE THIS BEFORE PR) syslog(LOG_NOTICE, "DDS telemetry: tlmStruct->strutEncoder_microns[0] is %f." , ddsTlm.strutEncoder_microns[0]);   mq_send(gTlmDdsSendMsgQueue, ( char *)&ddsTlm, sizeof (ddsTlm), 1);
            hdrass Holger Drass added a comment -

            The following image shows that the low-level controller is not sending zero values:

            hdrass Holger Drass added a comment - The following image shows that the low-level controller is not sending zero values:
            ttsai Te-Wei Tsai added a comment -

            The system message in the test is: messages.
            Extract the debug message of telemetry publish is: telemetry.txt.

            ttsai Te-Wei Tsai added a comment - The system message in the test is: messages . Extract the debug message of telemetry publish is: telemetry.txt .
            ttsai Te-Wei Tsai added a comment - - edited

            Added the GUI binary output file in repo. The binary order is little-endian: Write to Binary File Function.

            ttsai Te-Wei Tsai added a comment - - edited Added the GUI binary output file in repo. The binary order is little-endian : Write to Binary File Function .
            ttsai Te-Wei Tsai added a comment - Please help to review the PRs: 1. https://github.com/lsst-ts/ts_hexapod_controller/pull/16 2. https://github.com/lsst-ts/ts_hexapod_gui/pull/12

            Reviewed on github

            rowen Russell Owen added a comment - Reviewed on github

            People

              ttsai Te-Wei Tsai
              ttsai Te-Wei Tsai
              Russell Owen
              Holger Drass, Russell Owen, Te-Wei Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.