Documentation

xPCScGetState

Get state of scope

Prototype

int xPCScGetState(int port, int scNum);

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

scNum

Enter the scope number.

Return

Returns the state of scope scNum. If the function detects an error, it returns -1.

Description

The xPCScGetState function gets the state of scope scNum, or -1 upon error. Use the xPCGetScope function to get the scope number.

Constants to find the scope state, defined in xpcapiconst.h, have the following meanings:

Constant

Value

Description

SCST_WAITTOSTART

0

Scope is ready and waiting to start.

SCST_PREACQUIRING

5

Scope acquires a predefined number of samples before triggering.

SCST_WAITFORTRIG

1

After a scope is finished with the preacquiring state, it waits for a trigger. If the scope does not preacquire data, it enters the wait for trigger state.

SCST_ACQUIRING

2

Scope is acquiring data. The scope enters this state when it leaves the wait for trigger state.

SCST_FINISHED

3

Scope is finished acquiring data when it has attained the predefined limit.

SCST_INTERRUPTED

4

You stopped (interrupted) the scope.

Introduced before R2006a

Was this topic helpful?