Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Code -6 (function failed) with BL_LOADTECHNIQUE_LV #1

Closed
MLackner opened this issue Aug 30, 2022 · 7 comments
Closed

Error Code -6 (function failed) with BL_LOADTECHNIQUE_LV #1

MLackner opened this issue Aug 30, 2022 · 7 comments

Comments

@MLackner
Copy link

Hi,

I use the example Main.vi with an SP-200 connected via USB. Connecting the instrument seems to work fine (I can retrieve the Device Information). However, the Load Technique VI throws an error (error code -6, function failed). The cause is the call to BL_LOADTECHNIQUE_LV. Happens for every supported technique.

Do you have any idea what could cause this?

Here are the technique parameters for the CA technique (flattened to json):

[
    {
        "Parameter Label": "tb",
        "Parameter Type": 2,
        "Parameter Value": 936490775,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "vs_initial",
        "Parameter Type": 1,
        "Parameter Value": 1,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "Voltage_step",
        "Parameter Type": 2,
        "Parameter Value": 0,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "Duration_step",
        "Parameter Type": 2,
        "Parameter Value": 1065353216,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "vs_initial",
        "Parameter Type": 1,
        "Parameter Value": 1,
        "Parameter Index": 1
    },
    {
        "Parameter Label": "Voltage_step",
        "Parameter Type": 2,
        "Parameter Value": 1036831949,
        "Parameter Index": 1
    },
    {
        "Parameter Label": "Duration_step",
        "Parameter Type": 2,
        "Parameter Value": 1065353216,
        "Parameter Index": 1
    },
    {
        "Parameter Label": "vs_initial",
        "Parameter Type": 1,
        "Parameter Value": 1,
        "Parameter Index": 2
    },
    {
        "Parameter Label": "Voltage_step",
        "Parameter Type": 2,
        "Parameter Value": 1045220557,
        "Parameter Index": 2
    },
    {
        "Parameter Label": "Duration_step",
        "Parameter Type": 2,
        "Parameter Value": 1065353216,
        "Parameter Index": 2
    },
    {
        "Parameter Label": "Step_number",
        "Parameter Type": 0,
        "Parameter Value": 2,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "N_Cycles",
        "Parameter Type": 0,
        "Parameter Value": 0,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "Record_every_dI",
        "Parameter Type": 2,
        "Parameter Value": 925353388,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "Record_every_dT",
        "Parameter Type": 2,
        "Parameter Value": 1008981770,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "I_Range",
        "Parameter Type": 0,
        "Parameter Value": 8,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "E_Range",
        "Parameter Type": 0,
        "Parameter Value": 3,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "Bandwidth",
        "Parameter Type": 0,
        "Parameter Value": 5,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "em",
        "Parameter Type": 0,
        "Parameter Value": 0,
        "Parameter Index": 0
    },
    {
        "Parameter Label": "ce",
        "Parameter Type": 0,
        "Parameter Value": 0,
        "Parameter Index": 0
    }
]
@fisothemes
Copy link
Owner

fisothemes commented Sep 1, 2022

Hi, I was unable to replicate the issue with my unit (SP-150e) even with a USB connection. I will still look into it, but this might take some time. If you have the software dev package check if the issue still occurs with the included VI examples (see last attached image). Also do you have the complete call chain produced by the error message?

BL_LOADTECHNIQUE_LV is one of the functions included in the DLL.

I have attached screenshots of my results when testing CA using the dummy cell.

USB Test
USB Test 2
USB Test 3

@MLackner
Copy link
Author

MLackner commented Sep 1, 2022

Thanks for your quick response!

I get the same error with the example provided with the development package. The error message displayed is

Error -6 occurred at EClib.dll
(BL_LoadTechnique_LV)

Possible reason(s):
function failed

so that's not very informative.

I verified that the loaded firmware is compatible with the dll version used. I also have no problems executing other functions from ECLib.dll like BL_GetData_LV.

I tried clearing the error but that does not work. It seems the technique is indeed not loaded on the channel.

The Python example does work however. So I'll look into that later.

Edit: It may be noteworthy that I'm running Windows 11. Not sure if that should have an influence.

Edit2: Tested with Windows 10 and SP-300. Same problem. LabVIEW version is 2020 (64 bit).

@MLackner
Copy link
Author

I did test this with different LabVIEW versions. Here are the results:

- LV 2016 (64 bit)   --   OK
- LV 2017 (64 bit)   --   ERROR
- LV 2019 (64 bit)   --   ERROR
- LV 2020 (32 bit)   --   OK
- LV 2020 (64 bit)   --   ERROR
- LV 2021 (64 bit)   --   ERROR

It looks like the 32 bit versions work okay and the error only occurs with the 64 bit versions for LabVIEW versions newer than 2016.

Here's maybe a similar issue: https://forums.ni.com/t5/LabVIEW/Problem-with-call-library-dll/td-p/3984095

@fisothemes
Copy link
Owner

Thanks for the investigation, does this issue occur if you link to the 64bit dll? I believe it is called EClib64.dll, I'm currently nowhere near a computer so I may get the name wrong.

I will also look further into the issue on Monday and see if I can reproduce it.

Thanks again for the info, things are looking up.

@MLackner
Copy link
Author

does this issue occur if you link to the 64bit dll?

Yes, the Call Library Function node is correctly linked to the 64 bit dll.

@robert0x43
Copy link

Hi! Did you ever manage to solve the issue? I've been stuck on this same thing. @MLackner @fisothemes

@MLackner
Copy link
Author

Unfortunately not. Also, I wasn’t able to find out if it’s a problem on LabVIEW’s or Biologic’s end. I had to resort to running my ECLab process in 32bit while communicating with the rest of the application running with 64Bit via TCP. As a framework I used HSE flavoured DQMH, which made this relatively easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants