Query Tag and Date Selection
The following parameters are supported by the SAP Manufacturing Integration and Intelligence (SAP MII) connectors. You can use the following techniques to select tags and time intervals.
You can use the following techniques to select tag names for tag queries:
Use the TagName
and TagName.1 -- TagName.32
parameters.
Use the Mask
and Group
parameters for wildcard matches and selection of tags.
You can use the Mask
parameter, with or without the Group
parameter. If you do not use the Group
parameter, the mask is applied to all tags. If you use the Group
parameter, the mask is applied to the tags within the selected group.
Not all historians and HMI systems support groups.
A query using the Mask
parameter utilizes the SQL operator LIKE. For example, to obtain all tags that end with Speed
from the Simulator
server, you could use the following query:
http://<servername>/XMII/Illuminator?Server=Simulator&Mode=Current&Mask=%25Speed
Where %25
represents the URL-encoded form of the percent symbol, which is used as a filtering wildcard value.
Use both of the above. You can process a maximum of 128 tags in a single query.
For example: http://<servername>/XMII/Illuminator?Server=Simulator&Mode=Current&Group=MixerTemps
The tags contained in the Simulator
server's MixerTemps
group are used in the query.
A requirement for many data queries, particularly historical data queries, is a date and time range. If you do not provide one in a query, the system uses a time interval offset from the current Web server time based on the default Duration
and DurationUnits
parameter values. This queries the last hour of data.
You can enter values for the S
tartDate
and EndDate
parameters to specify the time interval. If you only enter a StartDate
value, the system adds the Duration
and DurationUnits
values to the Start
Date
to determine the interval. If you only enter an EndDate
value, the system subtracts the Duration
and DurationUnits
values from the EndDate
to determine the interval.
Note
StartDate
and EndDate
parameter values must be in the same format as the DateFormat
parameter.
If you enter a Time
parameter value, the system adds the Duration
and DurationUnits
values to it to determine the interval. The T
ime
parameter value is the query StartDate
; however, if you enter a negative duration, the T
ime
parameter value is the EndDate
. For example, if you enter a Time
parameter value of Yesterday@06:30:00 and the Duration
and DurationUnits
value is 4 hours, the interval is from yesterday at 6:30 AM to yesterday at 10:30 AM. If the Time
parameter value is Yesterday@06:30:00 and the Duration
and Duration Units
value is -4 hours, the interval is from yesterday at 2:30 AM to yesterday at 6:30 AM.
You can set up predefined time periods, which define both the start time (in the same format as the Time
parameter) and the Duration
and DurationUnits
. You cannot edit the CurrentYear
and CurrentMonth
time periods. The system determines the start and end times for these time periods based on the current date and time.
You can define time schedules that represent logical breakpoints, such as shifts, in your query times. You can enter the current or previous shift, and the system determines the start and end times.
The order of priority of these parameters is as follows:
Schedule
Time period
Time
Start date and end date
If a Schedule
or TimePeriod
parameter is provided, the system ignores the Duration
and DurationUnits
parameters.