libplctag / libplctag.NET

A .NET wrapper for libplctag.
https://libplctag.github.io/
Mozilla Public License 2.0
220 stars 55 forks source link

Expose remaining attributes on `Tag` or `Tag<M,T>` #162

Closed timyhac closed 2 years ago

timyhac commented 3 years ago

There are many more attributes that could be configured but are currently not exposed on Tag and Tag<M,T>. https://github.com/libplctag/libplctag/wiki/Tag-String-Attributes

ShadowMarker789 commented 3 years ago

I would also like this functionality exposed to C#.

I've had great success with LibPlcTag.NET so far, this would be a very welcome addition.

timyhac commented 3 years ago

Which ones in particular do you need?

ShadowMarker789 commented 3 years ago

Ah, apparently I've misunderstood.

I somehow got the impression that 'attributes' was talking about data present in the CIP Service Success messages being returned that wasn't exposed to the library, or tag extended properties.

For instance, Allen-Bradley document 1756-pm020 shows that the PLC-side data-type is specified in the frame along with the data.

E.g.: [ snippet from Page 18 ] 1756-PM020G-Page-18

But as far as I'm aware there's no methods for obtaining that on the C# side. Don't know if that's exposed on the C-side either.

timyhac commented 3 years ago

Yes, that is different to the intent here and I think is exactly what is discussed on https://github.com/libplctag/libplctag/issues/252, and is not yet possible in the core library.

timyhac commented 3 years ago

@rastreus - PR #205 has been merged and released under beta version v1.0.14-beta.1

My primary concern with this is that the tag events are now exposed publically (as well as being used internally for Task completion). I have done some testing using the simulator, but have not tried with a real PLC. All of the warnings about callbacks apply: https://github.com/libplctag/libplctag/wiki/API#event-callback

timyhac commented 3 years ago

Hi @rastreus - just wondering if you have had a chance to do any testing on this?

rastreus commented 3 years ago

No. I have not yet, but I am still working on a project that will use libplctag.NET and this functionality. I hope to get this tested with a real PLC soon.

timyhac commented 2 years ago

Hi @rastreus - have you had a chance to test your project as yet? I think I will close this ticket - if you have any further needs please raise a new ticket.