Logging from meters

It is some time ago I last updated this thread, the program has been update many times since, but still look the same.
The last function (LogEvent popup) I have added makes it very easy to test batteries with a computer controlled electronic load:

First I configure the load for desired discharge current and remote sense.

Next I open the LogEvent setup and defined the final voltage, here I use 2.5V. Then pressed Start

After some time I have this curve.

That can be formattet, I used these commands to do it (They can be copied to the log window and executed with the run button):

#CHARTSCALENAME IT8512.Voltage “Battery voltage”
#CHARTSCALENAME IT8512.Capacity “Capacity”
#CHARTCURVES IT8512.Voltage
#CHARTX IT8512.Capacity
#CHARTANNOTATE text “Discharge 5A” LB 0 3.0 red 3
#CHARTTITLE “Keeppower 26650 5200mAh P2652U”
#SAVECHART BatteryTestCurveFormatted

;To remove all formatting again
#CHARTRESET
#CHARTANNOTATE

Hello, HKJ

Sorry, but it is very difficult for me to understand logic of your devices defininition files.

Would you be kind to share an example for displaying simple serial stream with ASCII values:

12.34, 56.78 LFCR

12.34, 56.78 LFCR

...

etc.

I started as example Protek 506 and sent to it repeating 123.45LFCR pattern.

I saw in debug mode received data correctly, but nothing in Current values and other tabs.

What else should be done to display the values in the tabs?

Thanks in advance,

Vladimir

The first point about device definitions is to know that there are many different types and none of them are really good at working with a continuous serial stream. Mostly the driver is designed to send a command and receive an answer (There is some for streaming data, but they are usually very device specific).

You can check the documentation for the more generic drivers here:

https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html
https://lygte-info.dk/project/TestControllerConfigDevice2%20UK.html

If you want to make you own devices, I have a couple of Arduino examples that will work with a SCPI driver:

https://lygte-info.dk/project/TestControllerArduino1%20UK.html
https://lygte-info.dk/project/TestControllerArduino2%20UK.html

These examples includes both Arduino code and a simple driver definition.

It’s okay if the driver makes a request. If my device continuously and fast enough is sending data, this will be interpreted by the driver as a valid response.
And I see it in debug.

Arduino with SCPI driver is too complex

The problem is that TC will often receive part of a message.

You can try with the ascii driver, start with in the driver file:

#idString my_id_string
#name my_name
#handle my_handle
#port com
#driver Ascii

Then you can connect it to a serial port and start using commands (See documentation).

If you get something working, ext step is to define one or more columns:

#value VoltageDC V D6 DC_Voltage

Optionally map the working commands to a command word:

#scpiCmd myCmd? txrx? xxxx

And define the command to read values:

#askValues myCmd?

Well, I was never able to get the “Power supply test” script to work properly.


I don’t know anything about programming and tried to edit the script at random. There may be a problem with the load, DL24MP is the “purple” version. However, if I use the Noob method:

transistors connected to the “+” button, the graph looks beautiful.