VBA Report Using ABBGetOPCDA
Good afternoon , Could you support in the folloiwng question ?
We are performing a report tests, at the beginning we run a test using PPA Values from excel to get the values , and we wrote the path , after that because we need to delete some rows according to the result of the some values , we need to read the values from the excel cells , to do some procedures , because of the PPA values gotten in each cells , when we select the cells ( internally when we see upper) , it shows the path used ( no the values eventhough the cells shows the values) .
We run from VBA some simple commands from VBA ( in ABBGetOPCDA we used the same that we used when we run PPA Values,) please see the code it is simple , it shows an error in line ABBGetOPCDA,
Sub Test_Report()
Worksheets("sheet1").Select
Range("A2").Select
Range("A2").Value =Application.Run("abbdatadirect.xla!ABBGetOPCDA"("[Control Structure][Control Structure]Root/Control Network/CURSOTEST/Controllers/Controller_1/Hardware/0/11/1:3.Forced",FALSE)
End Sub
the result would show if channel 3 is forced or not in S800IO 1 , and does not show timestamp
Thanks for your support
Best Regards
Answers
Hi,
You can modify the code as below. It will work. But you will not get the time stamp for the value. Only you will get the value of the particular varibale.
Sub Test_Report()
ThisWorkbook.Sheets("Sheet1").Cells(2, 2).Formula = "=ABBGetOPCDA"(""[Control Structure][Control Structure]Root/Control Network/CURSOTEST/Controllers/Controller_1/Hardware/0/11/1:3.Forced", True)"
End Sub
Add new comment