-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag Data Type Modification #14
Comments
Hi there, Yes, you just need to set var tag = new Tag { Name = "Test", Value = new ComplexType("My_AOI_Type_Name") }; This may look weird, but it keeps var aoi = new ComplexType("MyAoi");
aoi.Add(new LogixMember("Member01", new DINT(100)));
aoi.Add(new LogixMember("Member02", new TIMER { PRE = 3000 }));
aoi.Add(new LogixMember("Member03", new ComplexType("SubType"))); Or you can do this more concisely from var tag = new Tag { Name = "Test", Value = new ComplexType("My_AOI_Type_Name") };
tag.Add("Member01", new DINT(100));
tag.Add("Member02", new TIMER { PRE = 3000 });
tag.Add("Member03", new ComplexType("SubType")); Of course, you could create your AOI type using a C# class and derive from Hopefully this makes sense. Let me know if you need any further clarification. |
5 Stars man! That was a very detailed answer in a very short time. That's exactly what I'm looking for. Thank you very much! |
Hey, I just started checking out your project and it looks really great! I'm trying to use it for some simple things, and I've run into something that I can't quite figure out.
I am opening an existing L5X that has AOIs defined already. What I would like to do is simply create a tag, and set it's data type to that AOI. From what I can see, the DataType is just read-only for the tag. Looking into your code, it seems like I might have to replicate the AOI in C# class form to be able to get it to work is that right?
Is there a way to simply create a new tag and have it's DataType set to a string value?
The text was updated successfully, but these errors were encountered: