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,
Hi all, I got in contact with ABB R&D and they provided me with the answer, that it is not possible to access Controller OPC_Items directly from Batch Functions when using the Test Function. Instead they send me instructions on how to test the function using test variables, please see attachment.