For what its worth, I did a quick experimental hack – given that the *.sal
file is really just a ZIP archive with a set of *.bin
analog and/or digital files and a meta.json
file describing everything stored.
If you want to rename the channels manually, you can just:
- open the
*.sal
file in the Logic 2 software
- manually rename the channels
- save the changes back to a
*.sal
file
Likewise, you can also rename the channels by the following steps:
- unzip the
*.sal
file
- modify the label/strings in the
meta.json
file
- zip the modified
meta.json
and *.bin
files back into a *.sal
file
This modified *.sal
file should have the channel labels you desire.
Note: the meta.json
includes a "version"
key that indicates the revision of the *.sal
JSON format. So, if you do actually try to hack this yourself, just realize that the *.sal
format is subject to change and you may need to modify your ‘rename the channels’ script accordingly in the future.
Meanwhile, if you also have saved presets, you could export the presets and use the corresponding *.logic2Preset
file – as it is also just a JSON file with similar contents as the meta.json
file described above. So, hypothetically – a script could be written that reads a *.logic2Preset
file and applies the channel labels to one (or more) *.sal
saved capture file(s).
Note: if you are curious – the support documentation has some information on the .sal file format, which points to a saleae discussion post on the logic2 capture format. As the articles above point out, the Saleae file formats are not officially documented and subject to change in any given release of Logic 2 application. Thus, if you go down this path, I recommend you pay close attention to the "version"
values to handle any future JSON format/schema changes.
Perhaps Saleae could upload the schema(s) for each JSON "version"
of the *.sal
and/or *.logic2Preset
file format(s) to GitHub? Disclosing some level of internal details could allow 3rd party/open source solutions to be developed in lieu of having the internal development team bridging all of these feature/capability gaps. In fact, some python ‘helper functions’ could be added to the current Logic2 Automation GitHub that could do what was described here and cover both the near-term request and provide the JSON schemas for future/3rd party reference, too
Finally, a StackOverflow article about modifying a string within a file within a ZIP archive may help to streamline the above steps (depending on how Saleae tweaks the JSON format in the future).
With that article, it might be as simple as a quick str().replace()
of "Channel 0"
… "Channel 15"
(or "Channel 7"
… ?) strings based on your desired labels and using the python zipfile
module. Note: each channel string/label appears twice: once for "type":"Digital"
and once for "type":"Analog"
… so it really depends on how smart your channel renaming script needs to be and which channels you’re actually capturing in the *.sal
file.