Documentation

xPCGetTimeLog

Copy time log to array

Prototype

void xPCGetTimeLog(int port, int first_sample, int num_samples, 
int decimation, double *time_data);

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

first_sample

Enter the index of the first sample to copy.

num_samples

Enter the number of samples that the function is to copy from the time log.

decimation

Select whether to copy all the sample values or every Nth value.

time_data

The log is stored in time_data, whose allocation is the responsibility of the caller.

Description

The xPCGetTimeLog function gets the time log and copies the log into time_data. This function is especially useful in the case of value-equidistant logging, where the logged values are not necessarily spaced uniformly in time. Entering 1 for decimation copies all values. Entering N copies every Nth value. For first_sample, the sample indices range from 0 to (N-1), where N is the return value of xPCNumLogSamples. Use the xPCNumLogSamples function to get the number of samples.

The real-time application must be stopped before you get the number.

Introduced before R2006a

Was this topic helpful?