800xA Batch Function to read OPC Item
I am working on a concept where to interface Batch/Recipe to Control Modules in the Controller by use of OPC_Items instead of using Equipment Attribtues defined on the Unit (via the Batch Equipment aspect), but instead using a naming convention.
In the Batch Configuration manual, it is stated that the Batch Function: Get(), will actually "Get current data for hte specified OPC Item".
I have created a Control Module, which in Control Structure have the Name: "Unit02EMB", inside this module I have defined a structured variable with the name: "BM", which have one element with the name: "Cmd" of data type: dint with attribtues: "retain".
In my Recipe, I have developed a custom batch function, which I for testing have made as simple as possible, it is as follows:
func GetPromptCmd() (
BM_Cmd = get("Unit02EMB:BM.Cmd")
When I test this function, I do get the following Test Retults:
Execution Error; Unit02EMB:BM.Cmd variable get error (get)
I have verified (via Engineering Workplace - Control Structure -...- Unit02EMB, that is actually have a Property named: BM.Cmd, and that it has a value and the data quality is: Good.
Can anyone help me solve my problem, so I can read from OPC items in the controller without having to define these as Equipment Attributes.
I have attached a screenshot of my test to this question.
Thanks in advance,
Insert the URL that your highlighted text will link to.
Copy the video's "embed" tag into Embedded Video below.