1

I've a old(er) battery analyzer, a CASP 2500. It has a DB25 connector on the back of it. I'm using a DB25-DB9 converter to connect it to the COM1/Serial Port of my computer.

I've modified some C# code to capture data from the serial port. According to the user manual for this battery analyzer, the recommended printer is the Epson FX Series 1.

The C# program does a good job of capturing the textual data, but when it comes to plotting (charge/discharge curves of a particular battery's life cycle) then it fails miserably and all I get is a bunch of "gibberish".

I've read about the ESC/P commands, but what I'm getting doesn't look even remotely like anything I've seen in the Epson user manual.

Basically, it needs to be able to print the plot to a file via the C# program, at which point it stores the file, including the graphical plots, to a network drive for long-term storage.

The company that manufactures the battery analyzer sells software to do just this, but for a seemingly exhorbitant amount of money, so if possible, would like to circumvent this by possibly developing my own program to convert this "gibberish" into the proper graphical output.

This is what the gibberish looks like when the program automatically saves it to a Microsoft Word .docx file:

CASP  H 7.0b14  ok  

Lw ?????????                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?????????   
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           
Lw ?????????                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?????????   
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           
Lw ?????????                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?????????   
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           
Lw         ?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ?           

etc. etc.

enter image description here

As you can see, the small amount of "gibberish" that I posted seems to correspond to the upper part of the plot.

enter image description here

  • 1
    As I was posting this "gibberish" here, it started to look somewhat "intelligible". I'm will post a quick screenshot from the CASP user manual that shows an example charge and discharge plot curve, and it looks as though with some clever parsing/replacing techniques, I might be able to get what I need. – Daniel Pavlovsky May 28 '19 at 19:25
  • Still could use some help, especially if there's a more expedient way to do this. – Daniel Pavlovsky May 29 '19 at 13:28
0

Interpretation of ESC/P2 data to create meaningful output requires a lot of code. Viewing the output in a text editor is no help whatsoever - as the graph could be drawn by means of using one of the various Epson graphics modes (some of which are compressed), or it could be using Epson specific character tables.

Because your graph is shown by question marks (which sort of looks correct), the best guess is that the vertices are drawn using Epson specific character tables (which have various vertical and horizontal line combinations) and then overprinting with a graphics mode dump.

This is not easy - there are various Epson convertor written in C out there, including my own www.github.com/RWAP/PrinterToPDF - however, I have not re-created the numerous character tables and fonts in the freeware version which it appears you will require.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.