Documentation

xPCScSetNumSamples

Set number of samples in one data acquisition cycle

Prototype

void xPCScSetNumSamples(int port, int scNum, int samples);

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

scNum

Enter the scope number.

samples

Enter the number of samples you want to acquire in one cycle.

Description

The xPCScSetNumSamples function sets the number of samples for scope scNum to samples. Use this function only when the scope is stopped. Use xPCScGetState to check the state of the scope. Use the xPCGetScope function to get the scope number.

For file scopes, the NumSamples parameter works with the autorestart parameter.

  • Autorestart is on — When the scope triggers, the scope starts collecting data into a memory buffer. A background task examines the buffer and writes data to the disk continuously, appending new data to the end of the file. When the scope reaches the number of samples that you specified, it starts collecting data again, overwriting the memory buffer. If the background task cannot keep pace with data collection, data can be lost.

  • Autorestart is off — When the scope triggers, the scope starts collecting data into a memory buffer. It stops when it has collected the number of samples that you specified. A background task examines the buffer and writes data to the disk continuously, appending the new data to the end of the file.

Introduced before R2006a

Was this topic helpful?