Download CM0711 Controllers SDK User manual

Transcript
17.4. Obtaining Sampled, Filtered, and Converted
Data
The Input Manager samples, filters, and converts data.
There are three methods that can be used to obtain sampled, filtered, and
converted data with the input manager, as follows:
•
Refer to the data storage location for the input, as specified in the input
table.
•
Use the general service
o
•
input_get_value.
Use one of the specific services:
o input_get_raw_value,
o input_get_filtered_value
o input_get_converted_value
NOTICE
Refer to section 13.1 “Services” and its sub chapters for using the service
input_get_value.
17.4.1. Getting Input Data by Referring to a Data Storage Location
Referring to a data storage location is the most efficient way to obtain data using
the Input Manager.
NOTICE
In order to use this method, you must know the specific storage location for the
input.
To get input data by referring to a data storage location
•
Refer to the respective data storage location for the input, as specified in
the input table.
NOTICE
If an input is not configured to be sampled by the input manager, then just
referencing the respective data storage location is not sufficient, and a call to
input_get_value is required to force the required operation(s) to occur.
Example call:
The following example assumes an input table already exists, and that it is
configured to store the state of INPUT_1 in Din[0].
Copyright 2011-2015 © Parker-Hannifin Corporation. All rights reserved.
Page 90 of 114