bicarlsen / easy-biologic

Python library for communicating with Biologic devices.
GNU General Public License v3.0
18 stars 11 forks source link

Incorrect Channel Firmware Error #19

Open whs92 opened 2 years ago

whs92 commented 2 years ago

I am trying to give your package a go to control a biologic sp300.

As a first attempt, I would like to run an OCV technique.

I can connect to the device at a specific IP address with this:

import easy_biologic as ebl

# create device and connect to it
bl = ebl.BiologicDevice('172.17.9.42')
bl.connect()

If then try and load a technique like this:


params = {
    'time': 10,
    'time_interval' : 1,
    'voltage_interval' : 0.01
}

bl.load_technique(0,'ocv',params)

Then I get the following error:

easy_biologic.lib.ec_errors.EcError: ERR_TECH_INCOMPATIBLEECC (-401): Ecc file not compatible with the channel firmware.

But I don't know what to do about it. Can you make a suggestion? Is the firmware on the device a newer/different version to the ocv.ecc file used by the package? If so how can I use the latest version of ecc file?

Thanks!

bicarlsen commented 2 years ago

The first thing to do is restart the device. If you used the device with EC Lab before using it with the easy_biologic library there will be incompatible firmware loaded. So you need to connect to the device with the easy_biologic library only.

If that doesn't work, it could be that the library is trying to load the incorrect version of the technique file. Please print the results from BiologicDevice.info after connecting with the device and post them here. Specifically we are interetsed in the DeviceCocde which can also be checked with BiologicDevice.kind.

e.g.


 import easy_biologic as ebl

bl = ebl.BiologicDevice('172.17.9.42')
bl.connect()
print(bl.info)
print(bl.kind)
whs92 commented 2 years ago

I powered off the device, then ran the code you pasted above. Here is the result.

<easy_biologic.lib.ec_lib.DeviceInfo object at 0x000001E048EF9740>
DeviceCodes.KBIO_DEV_SP300
bicarlsen commented 2 years ago

It is being read as the correct device so should be loading the correct technique file.

I'm guessing that after the power reset, you were receiving the same error. Have you updated the device's firmware to the most recent version? It could be that the technique files included in the package are incompatible with the firmware loaded on your device.

whs92 commented 2 years ago

Yes, after the power reset I receive the same error. I think the firmware of the device may have been updated to the most recent version.

Do you know where I can get a copy of the version of firmware that matches the package?

Or alternatively how can I tell the package to use the .ecc files that are correct for this version of firmware?

whs92 commented 2 years ago

In EC-Lab express I see the following under device info:

image

whs92 commented 2 years ago

I used the example script from biologic to investigate, and found that it also doesn't work. Specifically C:\EC-Lab Development Package\Examples\Python\ex_tech_CP.py

I get the error:

> EcLib version: 6.4.0.0

> device[172.17.9.42] info :
SP300 32MB, CPU=9200, 2 channels, 2 slots
Firmware: v11.40 2021/6/17
1 connection, HTdisplay on

channel info error : Invalid function parameters
> Channel 0 info :
C340_IF0 board, no firmware

> kernel must be loaded in order to run the experiment

I have contacted bio-logic and will report the result here in case it is useful for anyone else