gtt25_dataset_save() file format

GTT TFT Support

Moderator: Mods

Post Reply
Tassie
LCD?
Posts: 5
Joined: Wed Feb 06, 2019 7:52 pm

gtt25_dataset_save() file format

Post by Tassie » Wed Feb 06, 2019 11:02 pm

Hello,

I have six GTT2.5 Chart objects which I can update fine using gtt25_dataset_push_data(). In order to update them more quickly over an RS232 link, I'm writing a file to the SD card using gtt25_filesystem_file_write(), then executing the file with gtt_run_script(). The file simply contains 80 push data commands across 6 Chart objects, but there's a lot of overhead this way, 9 * the number of charts * the number of points per chart.

I think I should be writing files to the SD card, then using gtt25_dataset_load() to load each Chart data. However, I can't find a specification anywhere that says how that file is constructed. I used gtt25_dataset_save() to save a file with what I thought was predictable data (80 ascending integers), but when I looked at a hex dump of the file I really couldn't make out how it was constructed. There is an example of using gtt25_dataset_save() and gtt25_dataset_load(), but the file used in the load function is only ever saved from a previous save function, never constructed from scratch.

Is there a specification somewhere that tells me how to construct a file to be subsequently used in a gtt25_dataset_load() operation?

Or better still, is there an interface that allows me to push multiple data values to a GTT2.5 Chart in a single command? As many data values as there are points in the chart, i.e. something like (hypothetically):

Code: Select all

gtt25_dataset_push_multiple(gtt_device *device, uint16_t ObjectID, uint16_t num_values, int16_t * Values)
Regards,

Adrian

Daniel Divino
Matrix Orbital
Matrix Orbital
Posts: 238
Joined: Thu Sep 24, 2015 9:38 am

Re: gtt25_dataset_save() file format

Post by Daniel Divino » Thu Feb 07, 2019 4:51 pm

Hi Adrian,

Unfortunately no such command exists at the moment due to how IDs are assigned to GTT25 Objects.

I'll talk to the firmware and software developers here to see if there is a similar solution/approach that can be taken based on the commands that are available.

I'll let you know what they say.

Cheers,
Daniel
Daniel Divino
Technical Support
Matrix Orbital

Tassie
LCD?
Posts: 5
Joined: Wed Feb 06, 2019 7:52 pm

Re: gtt25_dataset_save() file format

Post by Tassie » Thu Feb 07, 2019 8:19 pm

Thanks Daniel

It might help if you had some hard numbers to qualify what I'm trying to do. The interface is RS-232, 115,200 baud.

Here's the GTT38A display with 6 graphs, 72 points per graph:

Image

Updating 72 points across all 6 plots using:

Code: Select all

     gtt_set_manual_flush(device, eEnable_Enable);
     432 separate calls to:  gtt25_dataset_push_data(device, object_id, gtt_make_number_uint8(<data>))
     gtt_manual_flush(device);
     gtt_set_manual_flush(device, eEnable_Disable);
takes 3.29 seconds, which is way too slow.

Updating these same 432 points using:

Code: Select all

      gtt25_filesystem_file_write(device, gtt_make_text_ascii("inj.dat"), 0, gtt_make_bytearray_l16(sizeof(stuff), stuff));
      gtt_set_manual_flush(device, eEnable_Enable);
      gtt_run_script(device, "inj.dat");
      gtt_manual_flush(device);
      gtt_set_manual_flush(device, eEnable_Disable);
takes 368 msec, which is much better, almost good enough for the purpose. ("stuff" contains 432 frames each doing a data push command). The size of the resulting file is 3,888 bytes, so the transmission time of the file write command (with no flow control) is only about 3.4 msec. Importantly, of this 368 msec, 367.9+ of it is the "file write" transaction, and only around 20 usec or less is the time to execute the script. This tells me that the GTT38A firmware is updating the points very quickly, and almost the entire 368 msec is to do with writing the file to the SD card. This is ironic, because I don't *want* to write the data to the SD card, I'm just having to do so as a means to update the graphs more efficiently!

The points are 8 bit data, so @ 115,200 baud, 10 bits per character, sending 432 bytes with no flow control takes 375 usec. The transmission of this data plus a bit of protocol overhead isn't the issue.

I'd like to achieve 10 updates per second. Based on the above, it seems that it should be possible - if there was (a) a way to batch data points and (b) a way to avoid writing anything to the SD card. If I have to stage the data through the SD card, then updating about 3 times per second seems the likely "artificial" limit of what can be done.

Regards,

Adrian

Daniel Divino
Matrix Orbital
Matrix Orbital
Posts: 238
Joined: Thu Sep 24, 2015 9:38 am

Re: gtt25_dataset_save() file format

Post by Daniel Divino » Fri Feb 08, 2019 11:11 am

Hi Adrian,

Unfortunately, no such option is available right now, but you've made a good case for a PushMultiData command/function. We've added it to the list of things to do. Our software/firmware team will take a look at adding this functionality when they can, and I'll provide an update when we have a working build.

Cheers,
Daniel
Daniel Divino
Technical Support
Matrix Orbital

Tassie
LCD?
Posts: 5
Joined: Wed Feb 06, 2019 7:52 pm

Re: gtt25_dataset_save() file format

Post by Tassie » Fri Feb 08, 2019 2:23 pm

Thanks Daniel,

There's another aspect to this case. It's not good practice to hammer on an SD card like this, even with wear leveling my three writes per second will reduce the useful life of the SD card to a short time, probably measured in weeks.

I'm happy to be a Beta tester for any multi data capability your firmware group come up with.

Regards,

Adrian

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests