ACUnlock

Definition

Usage

Open the door, enable the open door controller to output a unlock signal, and close the door after 10-second delay.

Parameter

Device number

Open door delay

Return Value

Return True if it is successful, or return False.

Related Function

None

 

Ejemplo

C#

//Create Standalone SDK class dynamicly.
zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
int iMachineNumber = 1;
axCZKEM1.Connect_Net("10.0.0.43", 4370);

int idwErrorCode = 0;
int iDelay =4;//time to delay

if (axCZKEM1.ACUnlock(iMachineNumber, iDelay))
{
    MessageBox.Show("ACUnlock, Dalay Seconds:" + iDelay.ToString(), "Success");
}
else
{
    axCZKEM1.GetLastError(ref idwErrorCode);
    MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
}

VB

'Create Standalone SDK class dynamicly.
Dim axCZKEM1 As New zkemkeeper.CZKEM
Dim iMachineNumber As Integer

axCZKEM1.Connect_Net("10.0.0.43", 4370)



Dim idwErrorCode As Integer

Dim iDelay As Integer = 4 'time to delay

If axCZKEM1.ACUnlock(iMachineNumber, iDelay) = True Then
    MsgBox("ACUnlock, Dalay Seconds:" + iDelay.ToString(), MsgBoxStyle.Information, "Success")
Else
    axCZKEM1.GetLastError(idwErrorCode)
    MsgBox("Operation failed,ErrorCode=" & idwErrorCode.ToString(), MsgBoxStyle.Exclamation, "Error")
End If