K8055 multiple board programming C/C++

Hello,

I use K8055D_C.h and the dll found in k8055_vc2005.zip.

In my code I use OutputAnalogChannel function, for DC voltage output,
all is working good with 1 K8055 connected, however with 2 K8055, the outputs voltage of each boards are in strange ranges, the red led of the 2nd board blink very fast …

I tried to add some delays, but …
do CloseDevice only at the end, and not each time.

I can’t find my answers in the dll doc and in the forum.

Maybe, I should try the last Dll in k8055dll_rev3_0_2.zip, but I tried so many things …

Test with XP SP3, 32 bits

Dev IDE : QTCreator

Also another question, can we run two K8055 on the same address ? (same Sk5 and SK6) cause they are doing the same thing.

Thanks

[code]void MainWindow::convertisseur(double val1, double val2)
{
QString styleRouge(“color:#C00000”);
QString styleVert(“color:#008000”);

if(OpenDevice(0)==0)
{
    ui->K_status->setText("K8055 board 0 OK");
    ui->K_status->setStyleSheet(styleVert);

}
else
{
    ui->K_status->setText("K8055 board 0 open error");
    ui->K_status->setStyleSheet(styleRouge);
}

    if(OpenDevice(1)==1)
    {	ui->K_status1->setText("K8055 board 1 OK");
            ui->K_status1->setStyleSheet(styleVert);
    }
    else
    {	ui->K_status1->setText("K8055 board 1 open error");
            ui->K_status1->setStyleSheet(styleRouge);

    }
    

if(val1<0)
{	val1 = val1 * (-1);
    val1 = val1 / loc;
    val1 = val1 * 51;
    OutputAnalogChannel(2,(long)val1);
    OutputAnalogChannel(1,0);// - negative of HSI



}
else
{

    val1 = val1 / loc;
    val1 = val1 * 51;
    OutputAnalogChannel(1,(long)val1); // + positive of HSI
    OutputAnalogChannel(2,0);
}
CloseDevice();

    if(val2<0)
    {
            val2 = val2 * (-1);
            val2 = val2 / glide;
            val2 = val2 * 51;
            OutputAnalogChannel(2,(long)val2);
            OutputAnalogChannel(1,0);// - negative of HSI

    }
    else
    {
            val2 = val2 / glide;
            val2 = val2 * 51;
            OutputAnalogChannel(1,(long)val2); // + positive of HSI
            OutputAnalogChannel(2,0);


    }

}
[/code]

The DLL versions 2 and 3 support SetCurrentDevice(card_address) function call. You can use it to switch the control between the cards.
Use OpenDevice(0) and OpenDevice(1) only once in your program at the beginning.
Use the CloseDevice() only once in your program before the exit.

The documentation of the SetCurrentDevice() function is included to this package:
[size=85][color=#000080]Software DLL Rev 2
older DLL with examples and source code (source can also be used with DLL rev 3) [/color][/size]
velleman.eu/distributor/supp … 8055&type=

Thanks, it s what I ve found this evening.
Your answer confirms that.