Issue with channel filter on chart

A place to just chat
Post Reply
Posts: 21
Joined: Sat Nov 18, 2023 6:51 am

Sat Nov 18, 2023 6:59 am


I am a new member here and just starting my work with this wonderful tool

I am having a curious problem when sending data to a TIMEPLOT.

There are 2 channels defined, 'Analog' and 'Temperatures'

My messages and data are happily making it to the chart for the channel 'Analog' but having no luck with the channel 'Temperatures'

Code for creation of series:

Code: Select all

 AnalogPlot.SetSeriesProperties("adc0", Plot::Magenta, Plot::Solid, 2, Plot::NoMarker);
              AnalogPlot.SetSeriesProperties("adc1", Plot::Green, Plot::Solid, 2, Plot::NoMarker);
              AnalogPlot.SetSeriesProperties("adc2", Plot::Blue, Plot::Solid, 2, Plot::NoMarker);
              AnalogPlot.SetSeriesProperties("adc3", Plot::Red, Plot::Solid, 2, Plot::NoMarker);
              TemperaturePlot.SetSeriesProperties("tc0", Plot::Magenta, Plot::Solid, 2, Plot::NoMarker);
              TemperaturePlot.SetSeriesProperties("tc1", Plot::Green, Plot::Solid, 2, Plot::NoMarker);
              TemperaturePlot.SetSeriesProperties("tc2", Plot::Blue, Plot::Solid, 2, Plot::NoMarker);
              TemperaturePlot.SetSeriesProperties("tc3", Plot::Red, Plot::Solid, 2, Plot::NoMarker);
Code for updating these:

Code: Select all

 sDevice->printf("{TIMEPLOT:Analog|DATA|adc0|T|%lf}\r\n", analogResults[0].average);
                     sDevice->printf("{TIMEPLOT:Analog|DATA|adc1|T|%lf}\r\n", analogResults[1].average);
                     sDevice->printf("{TIMEPLOT:Analog|DATA|adc2|T|%lf}\r\n", analogResults[2].average);
                     sDevice->printf("{TIMEPLOT:Analog|DATA|adc3|T|%lf}\r\n", analogResults[3].average);

Code: Select all

for (itemp=0;itemp<8;itemp++){
                    if (peripheralStatus.tcExpPresent[itemp]==1) 
                        sDevice->printf("{TIMEPLOT:Temperatures|DATA|T|tc%d|%f}\r\n", itemp,thermocoupleMetrics[itemp].hotJunctionTemp);
                        //TemperaturePlot.SendFloatData("T"+String(itemp), thermocoupleMetrics[itemp].hotJunctionTemp,1);
The messages as they are arriving in Megunolink


The channels are defined in the TIMEPLOT Visualiser but only the Analog channel data is being added.

All of the series are added to the chart.

Any suggestions where to look?
Posts: 21
Joined: Sat Nov 18, 2023 6:51 am

Sat Nov 18, 2023 9:00 pm

This was just a screwup on my part, was sending things out of order with the Temperature channel.

Ie {TIMEPLOT:Temperatures|DATA|T|tc0|27.125000} should be {TIMEPLOT:Temperatures|DATA|tc0|T|27.125000}
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Sat Nov 18, 2023 9:27 pm

Good catch!
Post Reply