Hey guys, been trawling these forums for a while, some great info, so far though i can’t find any answers to my question!
I’ve been using the 8055 card for a sortof network automation system in my house, controlling lights, etc etc. I’ve recently got a second card that ive built and want to integrate into the program to control more devices.
I’m using version 2 of the DLL.
My program is being made in C++ Builder 6. And is quite simple. It uses the 8055 Demo program that comes with DLL 2 and im just adding things in to make it do what i want it to do!
Now, i have a seperate form from the main one, with the button that “Searches Devices”. It reads both my cards, 0 and 1.
Back to my main form and i have 4 buttons setup. 3 control digital outputs 1, 2 & 3 on CARD 0…and the 4th button controls digital output 1 on CARD 1.
Here’s my logic error…
I can turn on and off each output seperatly. So, Turn on Output 1 Card 0, and then turn it off again, then Turn on Ouput 1 Card 1, all good. Turn it off again.
This issue is, when i turn on say, Output 1 and 2 on Card 0, and then turn on Output 1 of Card 1, it also turns on Output 2 of Card 1 also. As if there inter connected. Although for the life of me I can’t see my logic error.
Here’s a snip of the code im using.
So for button “4” it’s:
“DisableOtherFunctionCall = true;
if (LoungeSpeaker == 0)
{
SetCurrentDevice(1);
SetDigitalChannel(1);
LoungeSpeaker = 1;
}
else
{
SetCurrentDevice(1);
ClearDigitalChannel(1);
LoungeSpeaker = 0;
}
DisableOtherFunctionCall = false;”
and for Button 1, 2 and 3 its a variance (changing the D/O number) of:
“DisableOtherFunctionCall = true;
if (GardenLights == 0)
{
SetCurrentDevice(0);
SetDigitalChannel(1);
GardenLights = 1;
}
else
{
SetCurrentDevice(0);
ClearDigitalChannel(1);
GardenLights = 0;
}
DisableOtherFunctionCall = false;”
Now i’ve tried CloseDevice(); after each “Clear” or “Set” DigitalChannel and this shuts the card off and ofcourse won’t recieve any more input!
Im stumped! And have been working on this for hours now !
Can someone point me in the right direction?
Thanks !
Kurt.