Hi all
My customer would like to create Tags without using Ignition Designer. Is there any endpoint to connect to for Tags creation from outside? Or a tool like gcu, that could get a CSV file in and create gateway Tags accordingly?
Yes, they can do this from vision (definitely, have done it) client, probably perspective (with a bit more work due to file access restrictions).
Open the CSV file. Parse it. Script with Jython to create the new tags.
# This example will add a new OPC Tag. It can be further expanded to modify more
# properties on the Tag. Additionally, this example can be used to edit an existing Tag
# by setting the baseTagPath to a Tag that already exists, and by modifying the collision policy.
# The provider and folder the Tag will be placed at.
baseTagPath = "[default]MyFolder"
# Properties that will be configured on that Tag.
tagName = "myNewTag"
opcItemPath = "ns=1;s=[Simulator]_Meta:Sine/Sine0"
opcServer = "Ignition OPC-UA Server"
valueSource = "opc"
sampleMode = "TagGroup"
tagGroup = "Default"
# Configure the tag.
tag = {
"name": tagName,
"opcItemPath" : opcItemPath,
"opcServer": opcServer,
"valueSource": valueSource,
"sampleMode" : sampleMode,
"tagGroup" : tagGroup
}
# Set the collision policy to Abort. Thus, if a Tag already exists at the base path,
# we will not override the Tag. If you are overwriting an existing Tag, then set this to "o".
collisionPolicy = "a"
# Create the Tag.
system.tag.configure(baseTagPath, [tag], collisionPolicy)
Hi @Matrix_Engineering, thanks for your suggestion: I know I could, but I was wandering if there were anything ready to go.
Hi @pturmel , that sounds very good! Will that mean that through RESTful webservices calls it will be possible to configure some or any gateway/project parameters?