It is currently Thu Sep 09, 2010 5:35 am




Post new topic Reply to topic  [ 4 posts ] 
 Gateway Timer Script 
Author Message
Trooper
Trooper

Joined: Fri Jun 18, 2010 1:59 am
Posts: 13
Post Gateway Timer Script
I'm trying to run a gateway script that updates an sql table with data from another table, the script is basically a few queries from a table manipulated and added to a few strings then an update query to another table.
When I include this in a timer script it causes an error on the console even though it runs fine when put behind a button.
see screen shots for error.
I'm not sure what I'm doing wrong.
Ignition is version 7.1.3


Attachments:
scripterr2.png
scripterr2.png [ 59.95 KiB | Viewed 192 times ]
scripterr1.PNG
scripterr1.PNG [ 63.1 KiB | Viewed 192 times ]
Tue Jul 27, 2010 8:32 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 3:43 pm
Posts: 837
Post Re: Gateway Timer Script
Hi,

A few things might help us track down what's going on- first off, unfortunately some info is lost when looking at errors though the gateway page. Could you attach the "wrapper.log" file from the install directory or email it to support (at inductiveautomation.com)? That will show what the actual error is.

Second, could you post the script here that is being executed? When posting it, surround it with the [c o d e] tag in order to keep the formatting.

Thanks,

_________________
Colby Clegg
Inductive Automation
Software Development


Tue Jul 27, 2010 12:47 pm
Profile
Trooper
Trooper

Joined: Fri Jun 18, 2010 1:59 am
Posts: 13
Post Re: Gateway Timer Script
For step 1 please find attched is the wrapper.log file, I'll post the script tomorrow.


Attachments:
wrapper.log [428.2 KiB]
Downloaded 17 times
Tue Jul 27, 2010 1:16 pm
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 3:43 pm
Posts: 837
Post Re: Gateway Timer Script
Ah, good. That log is much clearer (and illustrates the need for us to improve that gateway console- something that's been on the to-do list for a bit now).

Anyhow, from the log we see this:
Quote:
Error running query "SELECT name FROM syscolumns WHERE id = 1125579048 AND name LIKE '%Running'".
Unknown typecode: -9

It appears that the "name" column is being returned as a data type that we don't currently handle. This will be fixed for the next update. In the meantime, you can get around this by changing your query to cast the return to a supported type, such as:
Code:
SELECT cast(name as varchar) FROM syscolumns WHERE id = 1125579048 AND name LIKE '%Running


Regards,

_________________
Colby Clegg
Inductive Automation
Software Development


Wed Jul 28, 2010 8:56 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: