As a user new to VB programming I have found your developed project a breeze to use (mostly.. issues with MS not the project…); however I am struggling to read (&write) values to program scoped tags within a compactlogix PLC (L16BER) using the EthernetIP driver. I have several DPM components on a screen to show timer values (.PRE, .ACC, & .DN via a pilot light), they are all program scoped tags in an existing product. I am trying to simplify a process for shop floor employees to modify timer values if required as there is no HMI on the stand alone products.
In the components PLCAddressValue property of the DPM & pilot light components I have the plc address in the format of "Program:programname.tagname" but in runtime the returned text in the DPM component is "Invalid Value Returned". The IP address and configuration is correct because I can read & write to controller scoped tags. I have checked several times for spelling errors relating to the physical PLC porram name etc and all is correct…
Basically.. in my VB code,
This works… (writing to controller scoped array a value entered in a text box)
_ 'when the confirm button is clicked trigger a write to the PLC to move the required Value into the Timer Preset_
Private Sub ConfirmTrackNotBelowHigh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
This Doesn't… (writing to a program scoped timer tag a value entered in a text box)
Private Sub ConfirmTrackPRE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConfirmTrackPRE.Click
Any assistance would be greatly appreciated.
Thanks in advance.
I can check this later, but I think the problem is in the UDT GenericFeeder. I don't think the driver can handle UDTs. Try the same format, but with a timer that is not part of a UDT
Thanks for the quick response; the name 'GenericFeeder' is the program name in RSLogix that contains the timers in question and isn't a UDT, the naming convention we use for timers is for example pT_Track_Jammed.. in this case it is a _p_rogram scoped _T_imer relating to a _Track[/u} with a function of timing a Jammed condition… It's a standard program scoped TON timer instruction…
in the controller tree we have in the tasks folder:
This should give the program scoped timer a path of "Program:GenericFeeder.pT_Track_Jammed.PRE" being of the format of "Program:programname.tagname
Should the format in my case be "GenericFeeder:pT_Track_Jammed.PRE"???
oopppsss missed a closed bracket somewhere I guess….. sorry!
Any updates or findings with regards to accessing program scoped tags?
The format for accessing program scope tags is as follows:
I will have to test it, but I'm not sure if you can access sub elements of things like timers within program scope tags because it requires 2 periods in the tag name and I'm not sure if the driver correctly parses it.
Okay, thanks for the update and info..
On a second note, are there any plans for a USB driver for the HMI?
Nothing in the works for any USB drivers. Writing drivers for USB involves lower level hardware programming, so its not an easy task with .NET