I'm new to Ignition so please bear with me. I am currently trying to see if I can schedule a Tag change based on user input. My hope is to run a script that will change a tag value based on the date and time entered by the user. Is this possible and where do I start? Thank you in advance
To restate your requirement:
You want to present UI to the end user where they will enter a specific date and time, a tag path, and particular value.
Then, when some date/time rolls around, you want their tag to be updated to the value specified?
Yes
There's nothing built-in that will do this. But you can use a database table of incomplete tasks and a gateway timer event to implement this.
-
Create a table that has a serial/autoincrement primary key, a "due" timestamp column, a tagpath column, and the desired value column.
-
In a timer or scheduled event, run a query that retrieves all tasks that have due timestamp before
current_timestamp
. -
Loop through the result dataset, performing the tag write and then running a delete query on the incomplete tasks table.
-
Set the interval or schedule for your event to something that gives you the precision you need, but not finer than that.
-
In your user interface, you just have to insert the new task into the database.