ZmSingleCMeasure


Function

Perform a C (Capacitance) measurement only once.

Format

Ret = ZmSingleCMeasure ( Id , ChannelNo , CValue , Dvalue , Status )

Parameters

Id [ VB.NET: Short ] [ C, C++: short ] [ C#: short ]
Specify the device ID retrieved from ZmInit.

ChannelNo [ VB.NET: UShort ] [ C, C++: unsigned short ] [ C#: ushort ]
Specify the channel number.

CValue [ VB.NET: Single ] [ C, C++: float * ] [ C#: out float ]
Specify the variable address for storing the capacitance. The unit is F (Farad).

Dvalue [ VB.NET: Single ] [ C, C++: float * ] [ C#: out float ]
Specify the variable address for storing the dissipation factor.

Status [ VB.NET: UInteger ] [ C, C++: unsigned long * ] [ C#: out uint ]
Specify the variable address for storing the measurement status.

Bit number of Status

Description

16

Result of contact check before measurement(L measurement end side)

17

Result of contact check before measurement(H measurement end side)

18

Result of contact check after measurement (L measurement end side)

19

Result of contact check after measurement (H measurement end side)

24 - 25

Equivalent circuit mode
  1 : Serial circuit
  2 : Parallel circuit

※Undefined bit numbers are unused.

Return Value

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ]

Definition

Value
[Dec]

Description

ZM_ERR_SUCCESS

0

Normality completion

ZM_ERR_SYS_CHANNEL_NO

20100

Channel No is out of the settable range.

ZM_ERR_SYS_MEASURE_STOP

20116

Measurement stopped.

The others (See also: Details of Error Code)

Initial Value

None

Remarks

Perform a C (Capacitance) measurement only once.
Only the specified channel will be measured.

This function will not return until the measurement is complete.
The process will return when the measurement is complete, so check the measurement results contained in the parameters.

Measurement will stop when the ZmResetDevice function is executed.

For details about the equivalent circuit mode in the measurement status, please refer to the glossary "Equivalent Circuit Mode".
For details about the contact check in the measurement status, please refer to the glossary "Contact Check".

Example

Get the capacitance, dissipation factor and measurement status for ChannelNo=1.

VB.NET

Dim Ret As Integer

Dim CValue As Single

Dim Dvalue As Single

Dim Status As UInteger

Ret = ZmSetCorrectionValue ( Id , 1 , 0 , CValue , Dvalue , Status )
 

C, C++

long Ret;
float CorrectionValue1;

float CorrectionValue2;
unsigned long Status;
Ret = ZmSetCorrectionValue ( Id , 1 , 0 , &CValue , &Dvalue , &Status );
 

C#

int Ret;

float CorrectionValue1;
float CorrectionValue2;

ulong Status;
Ret = zm.SetCorrectionValue ( Id , 1 , 0 , out CValue , out Dvalue , out Status );
 

See Also

ZmResetDevice