[IALabs] Scripting Module

Is there a trick for using the [color=#BF0000]w[/color][color=#BF4000]o[/color][color=#FFBF00]n[/color][color=#40FF40]d[/color][color=#008080]e[/color][color=#0080BF]r[/color][color=#0040BF]f[/color][color=#8000FF]u[/color][color=#8000BF]l [/color]addTag() function to make Client tags too?
Thanks!

Found a workaround. I can create my tags (Expression and SQL) programatically as normal tags first, then export them and change the tagType from a ‘1’ to a ‘2’, and then re-import them as Client tags. I’m sure there is a much better way; by using the proper tagType enumeration perhaps?

We finally have upgraded the scripting module to work for Ignition 7.6. You can download the new version here:

marketplace.inductiveautomation. … oduleId=46

The new version is 1.6.0 and includes the following changes:


Added ability to override UDT instances in addTag and editTag.
Added recursion, filtering, and sorting to browseTags.
The function getAlarmStates now returns an array of TagAlarmDefinition.
Works with the new alarming configurations.
Fixed the bug where alarm states get removed when editing tag.
Added ability to get data type from the browseTags function.


Documentation is included in the module. Once you install the module you will see a “View Documentation” link to the right of the module.

Support will still be handled through this forum.

[quote=“Dustin.Schroll”]Found a workaround. I can create my tags (Expression and SQL) programatically as normal tags first, then export them and change the tagType from a ‘1’ to a ‘2’, and then re-import them as Client tags. I’m sure there is a much better way; by using the proper tagType enumeration perhaps?[/quote]You can’t make client tags with this module so that is best workaround.

the recursive option “stop” on UDT type, when an UDT contain other UDT.
tags = system.tag.browseTags(parentPath=“Batterie_01”, recursive=1)

Is it possible to improve the recursive option for the browseTags function in order browse inside all UDT contained into other UDT ?
:prayer:

I will add a request in for that.

for the browse tag function, we have ASC or DESC order, can we have an option for the native order displayed in the designer tag’s tree.

Will do.

Thanks travis :thumb_left:

Any Idea for the date of the next release of the Scripting Module ?

I am working on it right now. I will have an update today.

Ok there is now a new update for the IA labs scripting module. You can download it on the marketplace:

marketplace.inductiveautomation. … oduleId=46

Here is the changelog:

  • system.tag.browseTags function now recurses UDT tags

  • New native sort order on browseTags function

  • Fixed bug that didn’t allow multiple overrides on a single tag withing a UDT

  • Added new system.opc.browse function to browse the OPC servers

  • Added system.db.runSFPrepUpdate and system.db.runSFUpdateQuery to run inserts, updates, and deletes through the store and forward system in scripting.

  • Added new OPC browse function to the expression language. Simply bind a tree view component to an expression “browse()”

  • Added new tag browse function to the expression language. Simply bind a tree view component to an expression “browseTags()”

I’ve upgrade from IA Script module 1.6.1 to 1.6.3 (b13).

num = event.source.parent.parent.Num folder = event.source.parent.getComponent('DropdownFolder').selectedStringValue tags = system.tag.browseTags(parentPath="Simulink_" + str(num) + "\\" + folder, recursive=1)

browseTags function return an error :

[quote] Traceback (most recent call last):
File “event:actionPerformed”, line 6, in
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: TagFunctionsImpl.browseTags does not have the @KeywordArgs annotation.
caused by GatewayException: TagFunctionsImpl.browseTags does not have the @KeywordArgs annotation.
caused by IllegalArgumentException: TagFunctionsImpl.browseTags does not have the @KeywordArgs annotation.

Ignition v7.6.2 (b2368)
Java: Oracle Corporation 1.7.0_21[/quote]

I’ve probably miss a new parameter but I don’t find in the module documentation ?

I would like to use the “native sort order”, could you give an example forthe synthax please ?

mazeyrat, are you still have this problem?

To sort native just put “,sort=NATIVE” as an argument.

I've tried with sort="NATIVE"
for example in my script :
system.tag.browseTags(parentPath="Param", recursive=1,sort="NATIVE")

I always have the same error :

the same error is produce with :
tags = system.tag.browseTags(parentPath="")

Any idea ?

Ok there is now a new update for the IA labs scripting module. You can download it on the marketplace:

marketplace.inductiveautomation. … oduleId=46

Here is the changelog:

  • Fixed bug with system.tag.browseTags returning error: does not have the @KeywordArgs annotation.

I’m trying to download the module, however I can’t see it on the marketplace. Where can I found it?

marketplace.inductiveautomation. … oduleId=46

Or

Go to marketplace.inductiveautomation.com, click on “Most Popular” tab and then in the IA Labs Scripting.

Next, go to “Try module” on the upper right, agree the terms, click on continue and click on “download module”

Troubles with
system.device.listDevices()
function (IA Labs Scripting 1.6.4 (b14)).
It's returning me a set of devices.
Two of them are None in each column (Name, Enabled, State, and Driver), in fact what i see in the Device page is a N/A under the Status column and not the Connected/Disconnected string.
I've found the related exceptions in the console:

Any suggestion?
Thank you!

Any news about my script issue? Thank you

Mario,

  1. What are those two devices?
  2. Does the connection status on the Devices page always show n/a, or only after you try to set it in scripting?
  3. Can I see the full script?