AdvancedHMI Software
General Category => Support Questions => Topic started by: johwaa on April 13, 2015, 03:50:18 PM
-
Hi guys,
Does anyone know what the syntax would be for reading or writing to a tag in an Add On Instruction?
Thanks!
-
FWIW, this is what I have:
EthernetIPforCLXCom1.Write("PD_AB300:AB301:HMI_AB301_F2103PT.ACtrl[0]", CSng(0.09))
EthernetIPforCLXCom1.Write("PD_AB300:AB301:AB301_F2103PT.ACtrl.LowFaultSP", CSng(0.09))
Which causes a "PLCDriverException was unhandled" fault (without a Try - Catch). With the Try - Catch, it responds with a "CIP Error Path Segment Error".
I've got the PLC address correct, and the slot number is correct as well. The PLC can be pinged with no problem, and I have it up in RSLogix at the moment.
Thanks!
-
Is the Add On Instruction tag a global scope? What is the tag name used for the instance of the Add On Instruction. If it is a global scope tag, then you should be able to drill down into the tag name of the AOI to get to the variable you want, then copy that complete name.
-
Hi Archie, thanks for the reply.
PD_AB300 is the controller name. And AB301 is a program within the PD_AB300 controller. And the tags were created in the AB301 program (I think that you already knew all of this).
The Add On Instruction's tag name is: zaAB301_F2103PT and it was created in AB301 as well.
From reading some of the other posts on this subject, I thought that: "PD_AB300:AB301:AB301_F2103PT.ACtrl.LowFaultSP" would work.
Thanks,
John
-
PROGRAM:AB301.zaAB301_F2103PT.ACtrl.LowFaultSP
-
It works great, thanks Archie!
I had tried using "PROGRAM" in my efforts as well, but my mistake was using a colon when I needed a period. Thanks again! :)