|
-
Jun 28th, 2007, 06:33 AM
#1
Thread Starter
Lively Member
dll help for electronic card c# 2005
Ive been trying to program using the dll that is supplied with a USB Relay card.
The source code supplied was in VB 5 or 6 , not that I know that matters, doesnt mean the dll was written in that or that it matters ??
Anyway the error I get is 'the best overloaded method match for OCUSB.classOCUSB.RelayON(ref byte, ref byte) has some invalid arguments
Code:
C# 2005
classOCUSB myUSB = new classOCUSB();
bool myBool = true;
byte a = 0;
byte b = 1;
myBool = myUSB.RelayOn(0, 1);
mybool = myUSB.RelayOn(a, b);
myBool = myUSB.SetPWM(0, 127);
Any ideas what is wrong ?
'-------------------------------------------------------------------
'Function: RelayOn(Address As Byte, Number As Byte) As Boolean
' Turns off a relay specified by Number
' For the unit defined by Address
'Inputs: Number - The number of the Relay to turn on
' 1-8 = Relays 1-8
' 0 = All Relays OFF
'Returns: True = Success
' False = Timed out
'-------------------------------------------------------------------
Last edited by mikelynch; Jun 29th, 2007 at 05:42 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|