LoggerSetSamplingSetting


Function

Set the number of samples, conversion speed, and number of repeats.

Format

Ret = LoggerSetSamplingSetting ( AppId , SamplingTimes , ScanClock , RepeatTimes , StartTrigger , StopTrigger , DelayTime )

Parameters

AppId [ VB.NET: Short ] [ C++: short ] [ C#: short ] 

Specify Application ID retrieved by LoggerOpenApplication.

SamplingTimes [ VB.NET: UInteger ] [ C++: unsigned long ] [ C#: uint ]

Specify the number of samples.

When you set 0, it samples infinitely.

ScanClock [ VB.NET: Single ] [ C++: float ] [ C#: float ]

Specify the scan clock in μsec units.

RepeatTimes [ VB.NET: Double ] [ C++: double ] [ C#: double ]

Specify the number of repeats.

In the case SamplingTimes=0, you have to specify RepeatTimes=1.

StartTriggerType [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ]

Specify the type of start trigger.

Value

[Dec]

Macro

Description

0

LOGGER_PARAM_TRIGGER_NONE

None

1

LOGGER_PARAM_TRIGGER_DIGITAL_RISING

Digital Edge Rising

2

LOGGER_PARAM_TRIGGER_DIGITAL_FALLING

Digital Edge Falling

3

LOGGER_PARAM_TRIGGER_LEVEL

Analog Level

4

LOGGER_PARAM_TRIGGER_INRANGE

Analog In Range

5

LOGGER_PARAM_TRIGGER_OUTRANGE

Analog Out Range

6

LOGGER_PARAM_TRIGGER_TIME_AFTER

Time (Elapse time(sec))

7

LOGGER_PARAM_TRIGGER_TIME_TIME

Time (Current time)

StopTriggerType [ VB.NET: UShort ] [ C++: unsigned short ] [ C#: ushort ]

Specify the type of stop trigger.

Value

[Dec]

Macro

Description

0

LOGGER_PARAM_TRIGGER_NONE

None

1

LOGGER_PARAM_TRIGGER_DIGITAL_RISING

Digital Edge Rising

2

LOGGER_PARAM_TRIGGER_DIGITAL_FALLING

Digital Edge Falling

3

LOGGER_PARAM_TRIGGER_LEVEL

Analog Level

4

LOGGER_PARAM_TRIGGER_INRANGE

Analog In Range

5

LOGGER_PARAM_TRIGGER_OUTRANGE

Analog Out Range

6

LOGGER_PARAM_TRIGGER_TIME_AFTER

Time (Elapse time(sec))

7

LOGGER_PARAM_TRIGGER_TIME_TIME

Time (Current time)

DelayTime [ VB.NET: UInteger ] [ C++: unsigned long ] [ C#: uint ]

Specify the delay count.

When you set 0, data sampling is not performed after the stop trigger condition is satisfied.

Return Value

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

Definition

Return code

[Dec]

Description

LOGGER_ERR_SUCCESS

0

Normal completed

LOGGER_ERR_STARTED

10006

Cannot execute because the device is in operation.

LOGGER_ERR_INVALID_ID

10010

Invalid AppId was specified.

LOGGER_ERR_SAMPLING_TIME

20017

Sampling count is out of the settable range.

LOGGER_ERR_SCANCLOCK

20018

Conversion speed is out of the settable range.

LOGGER_ERR_REPEAT_TIMES

20019

Repeat count is out of the settable range.

LOGGER_ERR_DELAY_TIME

20036

The delay sampling time is outside the configurable range.

LOGGER_ERR_DELAY_DEVICE

20037

The specified device does not have delay sampling capability.

LOGGER_ERR_DELAY_STOPTRIGGER_TYPE

20038

The delay sampling does not support on this stop trigger type.

The others (See also: Error Code List)

Initial Value

Nothing in particular.

Remarks

Set the number of samples, conversion speed, and number of repeats.

Example

Specify the following: sampling count =1000, scan clock =10 [μsec], repeat count =0, start trigger = none, stop trigger = none, delay count = none.

VB.NET

Dim Ret As Integer

Ret = LoggerSetSamplingSetting(AppId, 1000, 10, 0, LOGGER_PARAM_TRIGGER_NONE, LOGGER_PARAM_TRIGGER_NONE, 0)

 

C++

long Ret;

Ret = LoggerSetSamplingSetting(AppId, 1000, 10, 0, LOGGER_PARAM_TRIGGER_NONE, LOGGER_PARAM_TRIGGER_NONE, 0);

 

C#

int Ret;

Ret = logger.SetSamplingSetting(AppId, 1000, 10, 0, LOGGER_PARAM_TRIGGER_NONE, LOGGER_PARAM_TRIGGER_NONE, 0);

 

See Also

LoggerGetSamplingSetting