Issue with channel filter on chart

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

Sat Nov 18, 2023 6:59 am

Hello,

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);
              AnalogPlot.Run(true);
              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);
              TemperaturePlot.Run(true);
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

{TIMEPLOT:Analog|DATA|adc0|T|3.469012}
{TIMEPLOT:Analog|DATA|adc1|T|3.471310}
{TIMEPLOT:Analog|DATA|adc2|T|3.471378}
{TIMEPLOT:Analog|DATA|adc3|T|3.470928}
{TIMEPLOT:Temperatures|DATA|T|tc0|27.125000}
{TIMEPLOT:Temperatures|DATA|T|tc1|26.875000}
{TIMEPLOT:Temperatures|DATA|T|tc2|26.000000}
{TIMEPLOT:Temperatures|DATA|T|tc3|0.000000}

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?
strud
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}
philr
Posts: 446
Joined: Mon May 26, 2014 10:58 am

Sat Nov 18, 2023 9:27 pm

Good catch!
Post Reply