minute read
Data Collection
You are reading our Automation1 API documentation for the C programming language.
The Basics
In the C API, Data Collection lets you collect a snapshot of data over a specified period of time from an Automation1 controller. Use Data Collection to collect a set of time-series data in a real-time, deterministic way. You can collect only one set of data at a time on an Automation1 controller. The pieces of information that you collect are known as data signals. They are categorized into axis, task, and system categories. See The Three Controller Categories: Axis, Task, and System. All data signals return arrays of points in C, which are double-precision floating-point numbers. Some data signals represent enumerations or masks.
Data Collection is different from Status because status is not real-time, and it is not time-series data. Status also has variable latency when you retrieve it. You can get status at any time. But you can collect only one set of data at a time. See the Status page.
How to Use
Data Collection is part of the controller runtime. Thus the Automation1 controller must be running before you can collect data. For more information, see the Controller page.
To collect data by using the C API, you must:
- Configure the data signals that you want to collect.
- Specify the axes or tasks from which you want to collect the data signals.
- Specify how many points of data you want to collect and the frequency at which to collect them.
First, create a new Automation1DataCollectionConfig handle. This handle stores a configuration of status signals to collect from an Automation1 controller. When you use this handle, make sure that you do the steps that follow:
- To create an Automation1DataCollectionConfig handle, use the Automation1_DataCollectionConfig_Create() function. You must do this before you try to use the handle.
- Specify the number of points to collect and the frequency at which to collect them. The maximum number of points that you can collect is controlled by the DataCollectionPoints Parameter and DataCollectionItems Parameter controller parameters.
- Include an Automation1DataCollectionConfig handle with each C API data collection function that you use. All the C API data collection functions require this handle.
- When you are done collecting data, you must free the configuration. To do this, use the Automation1_DataCollectionConfig_Destroy() function.
bool Automation1_DataCollectionConfig_Create(Automation1DataCollectionFrequency frequency, int32_t numberOfPointsToCollect, Automation1DataCollectionConfig* configOut);
Automation1_DataCollectionConfig_Destroy(Automation1DataCollectionConfig config);
The typical data collection frequency is 1 kHz, which means there is 1 millisecond of time between each collected data point. You can collect data at frequencies that are faster than 1 kHz. They include 5 kHz, 10 kHz, 20 kHz, 100 kHz, and 200 kHz.
IMPORTANT: If you use a data collection frequency that is faster than 1 kHz, it will decrease the total number of signals that you can collect.
After you create a configuration, you can add the data signals that you want to collect. All data signals are categorized into axis, task, and system categories:
- Axis data signals require you to specify the axis from which to collect the data signal. You must specify an axis by its axis index.
- Task data signals require you to specify the task from which to collect the data signal. You must specify a task by its task index.
- The Automation1 controller is the only system. It is not necessary for you to specify a system from which to collect the data signal.
bool Automation1_DataCollectionConfig_AddAxisDataSignal(Automation1DataCollectionConfig config, int32_t axisIndex, Automation1AxisDataSignal axisSignal, int32_t argument);
bool Automation1_DataCollectionConfig_AddTaskDataSignal(Automation1DataCollectionConfig config, int32_t taskIndex, Automation1TaskDataSignal taskSignal, int32_t argument);
bool Automation1_DataCollectionConfig_AddSystemDataSignal(Automation1DataCollectionConfig config, Automation1SystemDataSignal systemSignal, int32_t argument);
bool Automation1_DataCollectionConfig_AddIndustrialEthernetMapping(Automation1DataCollectionConfig config, const char* industrialEthernetMappingName);
bool Automation1_DataCollectionConfig_AddIndustrialEthernetMappingArray(Automation1DataCollectionConfig config, const char* industrialEthernetMappingArrayName, int32_t industrialEthernetMappingArrayIndex);
After you add all the data signals that you want to collect to the configuration, you can start data collection. You can collect one snapshot of data or collect data continuously:
- A Snapshot of Data - This method collects the number of points that you specified in the configuration. Then it stops. To get the collected data, call the Automation1_DataCollection_GetResults() function.
- Continuous Data Collection - This method collects data continuously. It does not collect a set number of points. Each time that new data is available, you must get the results for continuous data collection. For more information and examples, refer to the Continuous Data Collection section of this page.
The Automation1_DataCollection_Start() function starts data collection on the controller, as either a snapshot of data or continuous data collection. This function does not block. It starts data collection and then returns.
bool Automation1_DataCollection_Start(Automation1Controller controller, Automation1DataCollectionConfig config, Automation1DataCollectionMode collectionMode);
After data collection starts, you can use the Automation1 controller to do other operations. For example, you can execute commands.
To get the collected data, call the Automation1_DataCollection_GetResults() function. This function can return data from data collection that is completed or from data collection that is still occurring. This function waits for data collection to collect the specified number of points, blocking until they are available. Then it returns them.
bool Automation1_DataCollection_GetResults(Automation1Controller controller, Automation1DataCollectionConfig config, double* allResultsOut, int32_t allResultsMaxLength);
The double-precision floating-point array that is set by the allResultsOut argument contains all the samples for each data signal that you collected over the period of data collection. The allResultsOut argument is populated with all the points for the first data signal, then all the points for the second data signal, and so on. The time between each sample point is controlled by the frequency that you specified in the configuration.
To get each data signal or Industrial Ethernet mapping out of the allResultsOut
array, use the axis, task, and system or Industrial Ethernet specific functions. You can use these functions by doing one of the options that follow:
- Specify the status item and the corresponding axis or task, if applicable.
- Specify an Industrial Ethernet mapping.
bool Automation1_DataCollection_GetAxisResults(Automation1DataCollectionConfig config, double* allResults, int32_t allResultsLength, int32_t axisIndex, Automation1AxisDataSignal axisSignal, int32_t argument, double* axisResultsOut, int32_t axisResultsMaxLength);
bool Automation1_DataCollection_GetTaskResults(Automation1DataCollectionConfig config, double* allResults, int32_t allResultsLength, int32_t taskIndex, Automation1TaskDataSignal taskSignal, int32_t argument, double* taskResultsOut, int32_t taskResultsMaxLength);
bool Automation1_DataCollection_GetSystemResults(Automation1DataCollectionConfig config, double* allResults, int32_t allResultsLength, Automation1SystemDataSignal systemSignal, int32_t argument, double* systemResultsOut, int32_t systemResultsMaxLength);
bool Automation1_DataCollection_GetIndustrialEthernetResults(Automation1DataCollectionConfig config, double* allResults, int32_t allResultsLength, const char* industrialEthernetMappingName, double* industrialEthernetResultsOut, int32_t industrialEthernetResultsMaxLength);
bool Automation1_DataCollection_GetIndustrialEthernetArrayResults(Automation1DataCollectionConfig config, double* allResults, int32_t allResultsLength, const char* industrialEthernetMappingArrayName, int32_t industrialEthernetMappingArrayIndex, double* industrialEthernetResultsOut, int32_t industrialEthernetResultsMaxLength);
The double-precision floating-point array that is set by these functions contains the individual samples for each data signal that you collected over the period of data collection. The time between each sample point is controlled by the frequency that you specified in the configuration.
Example Code
// Declare the handle for the data collection configuration and the variables for the data points.
Automation1DataCollectionConfig dataCollectionConfig = NULL;
double results[3000];
double positionCommand0[1000], taskState1[1000], timer[1000];
// Configure the data signals that you want to get.
if (!Automation1_DataCollectionConfig_Create(Automation1DataCollectionFrequency_1kHz, 1000, &dataCollectionConfig)) { /* handle error */ }
if (!Automation1_DataCollectionConfig_AddAxisDataSignal(dataCollectionConfig, 0, Automation1AxisDataSignal_PositionCommand, 0)) { /* handle error */ }
if (!Automation1_DataCollectionConfig_AddTaskDataSignal(dataCollectionConfig, 1, Automation1TaskDataSignal_TaskState, 0)) { /* handle error */ }
if (!Automation1_DataCollectionConfig_AddSystemDataSignal(dataCollectionConfig, Automation1SystemDataSignal_Timer, 0)) { /* handle error */ }
// Start a snapshot of data collection on the controller. This does not block.
if (!Automation1_DataCollection_Start(controller, dataCollectionConfig, Automation1DataCollectionMode_Snapshot)) { /* handle error */ }
// Get the data collection results from the controller. This will block until all the data is available.
if (!Automation1_DataCollection_GetResults(controller, dataCollectionConfig, results, 3000)) { /* handle error */ }
// Get each of the signal points out of the results array.
if (!Automation1_DataCollection_GetAxisResults(dataCollectionConfig, results, 3000, 0, Automation1AxisDataSignal_PositionCommand, 0, positionCommand0, 1000)) { /* handle error */ }
if (!Automation1_DataCollection_GetTaskResults(dataCollectionConfig, results, 3000, 1, Automation1TaskDataSignal_TaskState, 0, taskState1, 1000)) { /* handle error */ }
if (!Automation1_DataCollection_GetSystemResults(dataCollectionConfig, results, 3000, Automation1SystemDataSignal_Timer, 0, timer, 1000)) { /* handle error */ }
printf("Axis 0 Position Command: %f\n", positionCommand0[0]);
printf("Task 1 Task State: %f\n", taskState1[0]);
printf("Timer: %f\n", timer[0]);
// Destroy the dataCollectionConfig. This process frees all the memory that is associated with it.
if (!Automation1_DataCollectionConfig_Destroy(dataCollectionConfig)) { /* handle error */ }
// Set the configuration handle to null because it is not valid after you destroy the dataCollectionConfig.
dataCollectionConfig = NULL;
Continuous Data Collection
Instead of collecting one snapshot of data, you can collect data continuously. Continuous data collection does not collect a set number of points. It collects data indefinitely. Each time that new data is available, you must get the results frequently.
Continuous data collection uses an internal circular buffer to store the continuously collected points. You must call the Automation1_DataCollection_GetResults() function frequently to make sure that data is removed from this circular buffer before it fills up and causes an overflow error to occur.
You can configure and start continuous data collection with the same process that you use to configure and start a snapshot of data. But while continuous data collection is occurring, you must call the Automation1_DataCollection_GetResults() function frequently to get the newest chunk of collected data. If you do not call this function a sufficient number of times, an overflow error will occur.
The number of points to collect, that you specified in the Automation1DataCollectionConfig handle, controls the size of the internal circular buffer. Make sure that you specify a number of points to collect that is large enough to prevent overflow errors.
Tip: Calculate how frequently you will call the Automation1_DataCollection_GetResults() function. Then add a minimum of 250 milliseconds to that time period. Set the number of points to collect to the time period that you calculated. The added 250 milliseconds will give your custom application fault tolerance to spikes in latency and other performance dips.
When you call the Automation1_DataCollection_GetResults() function, you can specify the number of points to get. Make sure that the number of points to get is less than the number of points that you configure to collect. Specify the number of points to collect in the Automation1_DataCollectionConfig_Create() function, which creates the Automation1DataCollectionConfig handle.
When you specify the number of points to collect, you must balance the quantity of time necessary to get results more frequently with the quantity of time necessary to process all the previous results. Make sure there is a sufficient quantity of time between each set of results.
If you specify a number of points to collect that is too small, your custom application will get results too frequently. Thus it might not be able to keep up with continuous data collection. As a result, an overflow error will occur and data collection will stop.
Tip: For a good starting point, specify 250 to 500 milliseconds worth of points. This quantity of points prevents an overflow error from occurring by giving your custom application sufficient time to process the results.
Make sure that your custom application can process data quickly. If it does not, your application might not be able to keep up with continuous data collection. As a result, an overflow error will occur and data collection will stop.
Collect Industrial Ethernet Mappings
In the C API, you can use Data Collection to collect the values of Industrial Ethernet mappings. To do this, use the Automation1_DataCollectionConfig_AddIndustrialEthernetMapping() and Automation1_DataCollectionConfig_AddIndustrialEthernetMappingArray() functions.
Automation1DataCollectionConfig configuration;
Automation1_DataCollectionConfig_Create(Automation1DataCollectionFrequency_1kHz, 1000, &configuration);
Automation1_DataCollectionConfig_AddIndustrialEthernetMapping(configuration, “myMapping”);
Automation1_DataCollectionConfig_AddIndustrialEthernetMappingArray(configuration, “myMappingArray”, 2);
After you use the Automation1_DataCollection_GetResults() function to collect points, you can use the Automation1_DataCollection_GetIndustrialEthernetResults() and Automation1_DataCollection_GetIndustrialEthernetArrayResults() functions to access the points that were collected for your configured Industrial Ethernet mappings.
double allResults[2000];
Automation1_DataCollection_GetResults(controller, configuration, allResults, 2000);
double industrialEthernetResults[1000];
Automation1_DataCollection_GetIndustrialEthernetResults(configuration, allResults, 2000, “myMapping”, industrialEthernetResults, 1000);
double industrialEthernetArrayResults[1000];
Automation1_DataCollection_GetIndustrialEthernetArrayResults(configuration, allResults, 2000, “myMappingArray”, 2, industrialEthernetArrayResults, 1000);
Thread Safety
The Automation1_DataCollectionConfig_ functions and the Automation1DataCollectionConfig handle are not thread safe. Only one thread at a time can call these functions or access this handle. If it is necessary for two or more threads to call these functions or access this handle, you must use locks to limit the access.
The Automation1_DataCollection_GetStatus() function is thread safe. You can call it from two or more threads without interference.
The other Automation1_DataCollection_ functions are not thread safe. You can collect only one set of data at a time on an Automation1 controller. Thus only one thread at a time can access data collection. If it is necessary for two or more threads to access or modify data collection, you must use locks to limit the access.
Full Reference
For more information about the structs, enums, and functions that are available for Data Collection, refer to the lists that follow.
Automation1DataCollectionStatus struct
Represents the status of any data collection on an Automation1 controller, for the Automation1DataCollectionMode_Snapshot and Automation1DataCollectionMode_Continuous enums.
Gets the number of points that data collection will collect. In the Automation1DataCollectionMode_Snapshot enum, this number is the total number of points to collect. In the Automation1DataCollectionMode_Continuous enum, this number is the size of each chunk of continuously collected points.
Gets the number of points that data collection has collected for all the configured data signals.
Gets the number of points that data collection has collected and retrieved. There are some data collection periods where the number of points for the NumberOfRetrievedPoints struct might be lower than the number of points for the NumberOfCollectedPoints struct. This occurs because the points have not been retrieved from the HyperWire devices at this time.
Gets information that lets you know if data collection is currently collecting points.
Gets information that lets you know if the internal data collection buffer overflowed and stopped with an error. If the points are not retrieved in a sufficient quantity of time and a single chunk of data exceeds the NumberOfPointsToCollect struct, this overflow can occur in the Automation1DataCollectionMode_Continuous enum.
Gets the current mode of data collection.
Enums
These enums represent the mode that data collection will use when it collects data from an Automation1 controller.
Data collection starts, collects a specified number of data points at a specified period, and then stops. You can stop data collection prematurely by calling the Automation1_DataCollection_Stop() function.
Data collection starts and collects data points continuously at a specified period. You can stop continuous data collection by calling the Automation1_DataCollection_Stop() function.
These enums represent the status of any data collection on an Automation1 controller for the Automation1DataCollectionMode_Snapshot and Automation1DataCollectionMode_Continuous enums.
A data collection frequency was not specified or a data collection period was specified that does not correspond to one of the predefined data collection frequencies.
Represents a data collection frequency of 1
kilohertz or a data collection period of 1
millisecond. 1000
points will be collected in 1
second.
Represents a data collection frequency of 5
kilohertz or a data collection period of 0.2
millisecond. 5000
points will be collected in 1
second.
Represents a data collection frequency of 10
kilohertz or a data collection period of 0.1
milliseconds. 10,000
points will be collected in 1
second.
Represents a data collection frequency of 20
kilohertz or a data collection period of 0.05
milliseconds. 20,000
points will be collected in 1
second.
Represents a data collection frequency of 100
kilohertz or a data collection period of 0.01
milliseconds. 100,000
points will be collected in 1
second.
Represents a data collection frequency of 200
kilohertz or a data collection period of 0.005
milliseconds. 200,000
points will be collected in 1
second.
Functions
Creates a new data collection configuration handle. When you are done with the configuration, make sure to call the Automation1_DataCollectionConfig_Destroy() function to prevent memory from leaking.
frequency
(In): The frequency of data collection (the number of points to collect in one second).
numberOfPointsToCollect
(In): The number of points to collect for each configured data signal.
configOut
(Out): The data collection configuration handle that was created. Use this handle only if the function call was successful.
Returns: True if the configuration was successfully created. False if the configuration was not created. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Creates a new data collection configuration handle. When you are done with the configuration, make sure to call the Automation1_DataCollectionConfig_Destroy() function to prevent memory from leaking.
period
(In): The time, in milliseconds, between each point that is being collected.
numberOfPointsToCollect
(In): The number of points to collect for each configured data signal.
configOut
(Out): The data collection configuration handle that was created. Use this handle only if the function call was successful.
Returns: True if the configuration was successfully created. False if the configuration was not created. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Destroys the data collection configuration handle.
config
(In): The data collection configuration to destroy.
Returns: True if the configuration handle was destroyed. False if the configuration handle was not destroyed. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Adds an axis-based data signal that will be collected on a specified axis on the Automation1 controller.
config
(In): The data collection configuration to which you add the axis-based data signal.
axisIndex
(In): The axis on which to collect the data signal.
axisSignal
(In): The axis-based data signal to collect.
argument
(In): The argument for the data signal. If you are not sure about this argument, set its value to zero.
Returns: True if the data signal was successfully added to the configuration. False if the data signal was not added to the configuration. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Adds a task-based data signal that will be collected on a specific task on the Automation1 controller.
config
(In): The data collection configuration to which you add the task-based data signal.
taskIndex
(In): The task on which you collect the data signal.
taskSignal
(In): The task-based data signal to collect.
argument
(In): The argument for the data signal. If you are not sure about this argument, set its value to zero.
Returns: True if the data signal was successfully added to the configuration. False if the data signal was not added to the configuration. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Adds a system-based data signal that will be collected on the Automation1 controller.
config
(In): The data collection configuration to which you add the system-based data signal.
systemSignal
(In): The system-based data signal to collect.
argument
(In): The argument for the data signal. If you are not sure about this argument, set its value to zero.
Returns: True if the data signal was successfully added to the configuration. False if the data signal was not added to the configuration. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Adds an Industrial Ethernet mapping that will be collected on the Automation1 controller.
config
(In): The data collection configuration to which you add the Industrial Ethernet mapping.
industrialEthernetMappingName
(In): The Industrial Ethernet mapping to collect.
Returns: True if the Industrial Ethernet mapping was successfully added to the configuration. False if the Industrial Ethernet mapping was not added to the configuration. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Adds an Industrial Ethernet mapping array that will be collected on the Automation1 controller.
config
(In): The data collection configuration to which you add the Industrial Ethernet mapping array.
industrialEthernetMappingName
(In): The Industrial Ethernet mapping array to collect.
industrialEthernetMappingArrayIndex
(In): The index of the Industrial Ethernet mapping array to collect.
Returns: True if the Industrial Ethernet mapping array was successfully added to the configuration. False if the Industrial Ethernet mapping array was not added to the configuration. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Removes all data signals from the data collection configuration so that they cannot be collected from the Automation1 controller.
config
(In): The data collection configuration from which to remove all the data signals.
Returns: True if the data signals were successfully cleared. False if the data signals were not cleared. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Gets the current status of any data collection for the Automation1DataCollectionMode_Snapshot and Automation1DataCollectionMode_Continuous enums.
controller
(In): The Automation1 controller where data collection is running.
statusOut
(Out): The current status of any data collection. Use this argument only if the function call was successful. This argument must have memory preallocated before you pass it into this function.
Returns: True if the status of data collection was successfully obtained. False if the status of data collection was not obtained. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Starts data collection on the Automation1 controller with the specified mode and uses the specified data collection configuration. This function waits for data collection to start, but it does not wait for data collection to complete. You can stop data collection by calling the Automation1_DataCollection_Stop() function. You can get the collected data by calling the Automation1_DataCollection_GetResults() function.
controller
(In): The Automation1 controller on which to start data collection.
config
(In): The data to collect and the frequency at which to collect it.
collectionMode
(In): The data collection mode to start.
Returns: True if data collection was successfully started on the controller. False if data collection was not started on the controller. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Stops all data collection on the Automation1 controller, regardless of who started it.
controller
(In): The Automation1 controller on which to stop data collection.
Returns: True if data collection was successfully stopped. False if data collection was not stopped. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Gets results for data collection from the Automation1 controller. This function can return data from completed data collection or from data collection that is still occurring. This function waits for data collection to collect the specified number of points, blocking until they are available, and then returns them. The allResultsOut argument will be populated with all the points for the first data signal. Then it will be populated with all the points for the second data signal, and so on. To get the results for a specific data signal, see the Automation1_DataCollection_GetAxisResults(), Automation1_DataCollection_GetTaskResults(), and Automation1_DataCollection_GetSystemResults() functions.
controller
(In): The Automation1 controller from which to collect the results.
config
(In): The configuration that was used to start data collection.
allResultsOut
(Out): The out
array of data collection results that were collected from the controller. This will be populated with all the points for the first data signal. Then it will be populated with all the points for the second data signal, and so on. Use this argument only if the function call was successful. This argument must have memory preallocated before you pass it into this function.
allResultsMaxLength
(In): The maximum number of elements to copy to the allResultsOut argument. This length divided by the number of configured data signals calculates the number of points per data signal to get from the controller. If the array length provided is smaller than the number of available points, then an equal number of points for each data signal will populate the allResultsOut
array. For Example: Let's say there are 4
data signals and 100
points collected for each data signal, but the length is set to 200
array elements. The allResultsOut
array will be populated with the first 50
points for data signal 1
, the first 50
points for data signal 2
, and so on. This argument must be divisible by the number of signals and must not be greater than the length of the allResultsOut
array.
Returns: True if the results from data collection were collected successfully. False if the results from data collection were not collected. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Copies the results for a single axis-based data signal out of the data collection results that were already collected. To collect data collection results from an Automation1 controller, see the Automation1_DataCollection_GetResults() function.
config
(In): The configuration that was used to start data collection.
allResults
(In): The array of data collection results that were already collected.
allResultsLength
(In): The number of elements in the allResults argument.
axisIndex
(In): The axis on which the data signal was collected.
axisSignal
(In): The axis-based data signal from which to copy the results.
argument
(In): The argument for the data signal.
axisResultsOut
(Out): The out
array of axis results that were collected for the data signal on the specified axis. (These are copied from the allResults
array.) Use this argument only if the function call was successful. This argument must have memory preallocated before you pass it into this function.
axisResultsMaxLength
(In): The maximum number of elements to copy to the axisResultsOut argument. This number must not be greater than the length of the axisResultsOut
array.
Returns: True if the axis results were successfully copied from the allResults argument. False if the axis results were not copied from the allResults argument. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Copies the results for a single task-based data signal out of the data collection results that were already collected. To collect data collection results, see the Automation1_DataCollection_GetResults() function.
config
(In): The configuration that was used to start data collection.
allResults
(In): The array of data collection results that were already collected.
allResultsLength
(In): The number of elements in the allResults argument.
taskIndex
(In): The task from which the data signal was collected.
taskSignal
(In): The task-based data signal from which to copy the results.
argument
(In): The argument for the data signal.
taskResultsOut
(Out): The out
array of task results that were collected for the data signal on the specified task. (These are copied from the allResults
array.) Use this argument only if the function call was successful. This argument must have memory preallocated before you pass it into this function.
taskResultsMaxLength
(In): The maximum number of elements to copy to the taskResultsOut argument. This number must not be greater than the length of the taskResultsOut
array.
Returns: True if the task results were successfully copied from the allResults argument. False if the task results were not copied from the allResults argument. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Copies the results for a single system-based data signal out of the data collection results that were already collected. To collect data collection results, see the Automation1_DataCollection_GetResults() function.
config
(In): The configuration that was used to start data collection.
allResults
(In): The array of data collection results that were already collected.
allResultsLength
(In): The number of elements in the allResults argument.
systemSignal
(In): The system-based data signal from which to copy the results.
argument
(In): The argument for the data signal.
systemResultsOut
(Out): The out
array of system results that were collected for the data signal. (These are copied from the allResults
array.) Use this argument only if the function call was successful. This argument must have memory preallocated before you pass it into this function.
systemResultsMaxLength
(In): The maximum number of elements to copy to the systemResultsOut argument. This number must not be greater than the length of the systemResultsOut
array.
Returns: True if the system results were successfully copied from the allResults argument. False if the system results were not copied from the allResults argument. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Copies the results for a single Industrial Ethernet mapping out of the data collection results that were already collected. To collect data collection results, see the Automation1_DataCollection_GetResults() function.
config
(In): The configuration that was used to start data collection.
allResults
(In): The array of data collection results that were already collected.
allResultsLength
(In): The number of elements in the allResults argument.
industrialEthernetMappingName
(In): The Industrial Ethernet mapping of which to copy the results.
industrialEthernetResultsOut
(Out): The out
array of results that were collected for the Industrial Ethernet mapping. (These are copied from the allResults
array.) Use this only if the function call was successful. This argument must have memory preallocated before you pass it into this function.
industrialEthernetResultsMaxLength
(In): The maximum number of elements to copy to the industrialEthernetResultsOut argument. This number must not be greater than the length of the industrialEthernetResultsOut
array.
Returns: True if the Industrial Ethernet results were successfully copied from the allResults argument. False if the Industrial Ethernet results were not copied from the allResults argument. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.
Copies the results for an Industrial Ethernet mapping array out of the data collection results that were already collected. To collect data collection results, see the Automation1_DataCollection_GetResults() function.
config
(In): The configuration that was used to start data collection.
allResults
(In): The array of data collection results that were already collected.
allResultsLength
(In): The number of elements in the allResults argument.
industrialEthernetMappingName
(In): The Industrial Ethernet mapping array from which to copy the results.
industrialEthernetMappingArrayIndex
(In): The index of the Industrial Ethernet mapping array.
industrialEthernetResultsOut
(Out): The out
array of results that were collected for the Industrial Ethernet mapping array. (These are copied from the allResults
array.) Use this only if the function call was successful. This argument must have memory preallocated before you pass it into this function.
industrialEthernetResultsMaxLength
(In): The maximum number of elements to copy to the industrialEthernetResultsOut argument. This number must not be greater than the length of the industrialEthernetResultsOut
array.
Returns: True if the Industrial Ethernet results were successfully copied from the allResults argument. False if the Industrial Ethernet results were not copied from the allResults argument. See the Automation1_GetLastError() and Automation1_GetLastErrorMessage() functions for more information. You can find information about these functions in the Errors and Error Handling section of C API Guidelines.