I'm new to ignition and I am following the courses from the inductive university. However I fail to figure out something that is not working for me regarding binding a script to a tag value change event.
I've created a boolean named "hi" that toggles each second between true and false on a Beckhoff IPC:
I've successfully imported this variable as a tag in my Ignition Designer:
I was able to execute a simple logging message in the script console with following code:
After trying all sorts of code onto the Value Changed event, I really think I am overlooking something here. Would anyone be able to point me into the right direction please?
If you hover over the check mark on the Ignition tags, see if it says any bad quality error. Booleans don't go red when bad quality and can be deceiving
I haven't tried to log anything else or experimented with anything else. Could this be why my log is empty? Or should there be more that is logged automatically like a reactivation of the trail etc?
There should be a number of logged events in there... just normal Ignition stuff.
What OS is this?
In the directory that holds the Ignition installation, there should be a logs folder with a wrapper.log file. Can you open that and see if there is anything in that file?
INFO | jvm 1 | 2023/09/13 16:52:02 | 16:52:02,789 |-ERROR in com.inductiveautomation.logging.SQLiteAppender[DB] - problem appending event org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: LOGGING_EVENT)
INFO | jvm 1 | 2023/09/13 16:52:02 | at org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: LOGGING_EVENT)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.core.DB.newSQLException(DB.java:1179)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.core.DB.newSQLException(DB.java:1190)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.core.DB.throwex(DB.java:1150)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.core.NativeDB.prepare(NativeDB.java:126)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.core.DB.prepare(DB.java:264)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:46)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:32)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:25)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:34)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:226)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:206)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:221)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at com.inductiveautomation.logging.SQLiteAppender.batchAppend(SQLiteAppender.java:494)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO | jvm 1 | 2023/09/13 16:52:02 | at at java.base/java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2023/09/13 16:52:03 | I [Liem says ] [14:52:03]: Hello
Great, that wrapper log is usefull! So it does get logged sort of and apparently i first had to set up my database it seems for the logs to work. I will look into that now, thank bschroeder for your feedback and showing me this.
I downloaded the zip file for ignition edge on my personal laptop and then i pasted it on the ipc through remote desktop because I don't have internet access on the IPC. Then I believe i just extracted it and installed from there. It's possible i did not install as admin. Do you recommend a clean installation?
Yep. It's possible that permissions are messed up.
You can download the regular install file for Ignition install it and then a web page will show up that will allow you to select the flavor of Ignition to use. Pick Edge and then go from there.