Copy scope data to array


void xPCScGetData(int port, int scNum, int signal_id, int start,  
int numsamples, int decimation, double *data);


Do not use this C API type definition. Support for this type definition relies on support for the C API, which will be removed in a future release.



Enter the value returned by the function xPCOpenTcpIpPort.


Enter the scope number.


Enter a signal number. Enter -1 to get timestamped data.


Enter the first sample from which data retrieval is to start.


Enter the number of samples retrieved with a decimation of decimation, starting from the start value.


Enter a value such that every decimation sample is retrieved in a scope window.


The data is available in the array data, starting from sample start.


The xPCScGetData function gets the data used in a scope. Use this function for scopes of type SCTYPE_HOST. The scope must be either in state "Finished" or in state "Interrupted" for the data to be retrievable. (Use the xPCScGetState function to check the state of the scope.) The data must be retrieved one signal at a time. The calling function must allocate the space ahead of time to store the scope data. data must be an array of doubles, regardless of the data type of the signal to be retrieved. Use the function xPCScGetSignals to get the list of signals in the scope for signal_id. Use the function xPCGetScope to get the scope number for scNum.

To get timestamped data, specify -1 for signal_id. From the output, you can then get the number of nonzero elements.

Introduced before R2006a