LoggerSetAnalogLevelTrigger


Function

Set the analog level value of the specified trigger (start or stop).

Format

Ret = LoggerSetAnalogLevelTrigger ( AppId , StartStopTrigger , StartStopTriggerEdge , SequencelNo , BorderValue )

Parameters

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

Specify Application ID retrieved by LoggerOpenApplication.

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

Specify whether the trigger is a start trigger or a stop trigger.

Value

[Dec]

Macro

Description

0

LOGGER_PARAM_STARTTRIGGER

Start Trigger

1

LOGGER_PARAM_STOPTRIGGER

Stop Trigger

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

Specify the edge direction.

Value

[Dec]

Macro

Description

0

LOGGER_PARAM_EDGE_RISING

Edge rising

1

LOGGER_PARAM_EDGE_FALLING

Edge falling

2

LOGGER_PARAM_EDGE_BOTH

Both of them

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

Specify the sequenceNo.

The configurable range is from 0 to "SequenceNum -1".
"SequenceNum" is specified by LoggerSetChannelSetting function.

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

Specify the threshold value.
If Scaling Setup is enabled, the value is specified after scale conversion.

If Scaling Setup is disabled, the voltage value (or the current value) is specified.

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_CHANNEL_NO

20003

The channel number is out of the configurable range.

LOGGER_ERR_TRIGGER_STARTSTOP

20023

The trigger start/stop setting is out of the configurable range.

LOGGER_ERR_TRIGGER_DIRECTION

20026

The trigger direction is out of the configurable range.

LOGGER_ERR_TRIGGER_VALUE

20027

The threshold is out of the configurable range.

The others (See also: Error Code List)

Initial Value

Nothing in particular.

Remarks

Sets the analog level value for the specified trigger.

The edge direction, sequence number, and threshold can be set separately for each start trigger and stop trigger.
One start trigger and one stop trigger can be set for one device.

It is not possible to set more than one start trigger and more than one stop trigger for one device.
It is also not possible to set start triggers and stop triggers for more than one sequence number.

The total number of sequences can be obtained from the third(3) argument(SequenceNum) of the LoggerGetChannelSetting function.

Example

Specify a start trigger for the specified device with edge direction = rising, sequence 0, threshold =5.0.

VB.NET

Dim Ret As Integer

Ret = LoggerSetAnalogLevelTrigger(AppId, LOGGER_PARAM_STARTTRIGGER, LOGGER_PARAM_EDGE_RISING, 0, 5.0)

 

C++

long Ret;

Ret = LoggerSetAnalogLevelTrigger(AppId, LOGGER_PARAM_STARTTRIGGER, LOGGER_PARAM_EDGE_RISING, 0, 5.0);

 

C#

int Ret;

Ret = logger.SetAnalogLevelTrigger(AppId, LOGGER_PARAM_STARTTRIGGER, LOGGER_PARAM_EDGE_RISING, 0, 5.0F);

 

See Also

LoggerGetAnalogLevelTrigger LoggerGetChannelSetting