GetItem method

The
GetItem
method retrieves data associated with a specified item within the
FactoryTalk Batch
Server application. The
GetItem
method applies to the
BatchServer
and
BatchRemote
objects.
Syntax
strReturn = object.GetItem itemName
The GetItem method syntax has these parts:
Part
Description
object
Object expression that evaluates to a
BatchServer
or
BatchRemote
object.
strExecute
(required) String representing an item supported by the
FactoryTalk Batch
Server application.
strReturn
Data associated with the specified item.
Remarks
The data for the item returns synchronously with this method. The FactoryTalk Batch Server waits, at most, a time period equal to the
TimeoutPeriod
property. If the server does not recognize an item string, then
strReturn
contains FAILED. If the timeout period expires before the data is collected internally to the FactoryTalk Batch Server, then
strReturn
contains TIMEOUT.
This code example is
Visual Basic
6 syntax.
Example:
Dimension a
FactoryTalk Batch
Server object and two strings:
Dim svr As New BatchControl.BatchServer
Dim strItem As String
Dim strReturn As string
Set the item name to get the time item:
strItem = "TIME"
Get the time from the server and display:
strReturn = svr.GetItem(strItem)
MsgBox strReturn
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal