3/3/2020 12:05 AM | |
Joined: 10/31/2018 Last visit: 1/21/2025 Posts: 1 Rating: (0) |
The atached js script works fine when calling from a screen ("Click right mouse button") but returns a error when calling from Scheduled Tasks ( T10s ). It return the following error in the Trace Viewer: FUNCTION_CALL Invoke failed (id=1, function='HMIRuntime->Database->CreateConnection', error=80000004) Why could this happen? Thanks in advance AttachmentInsertMaq_script.txt (995 Downloads) |
6/19/2020 11:25 PM | |
Joined: 9/21/2006 Last visit: 5/25/2023 Posts: 247 Rating: (65) |
I don't know if it will help the original poster (I haven't tried using DB functions from within the scheduler), but I wrote up an example of doing PostgreSQL database access for a client. The example and documentation is at https://tsuoad.box.com/s/k30wlbu49tlk1x7y2wnusvwjwelkrghr. This may be helpful in getting started with using the WinCC Unified DB objects and methods. My first thoughts on the screen vs. scheduler issue is to check to make sure that the function being called from the scheduler is declared as "Asynchronous". The DB methods complete asynchronously, so would throw errors when setting up the callback if the function were trying to run synchronously. The next thing I would look at is whether there are any value/object persistence issues. A screen has a number of objects that persist as long as the screen is displayed. The scheduler generally does not persist objects between execution events.
AttachmentWinCC_Unified.zip (782 Downloads) |
Last edited by: Jen_Moderator at: 06/22/2020 10:09:29Added files from webiste as an attachment. |
|
9/16/2020 9:38 AM | |
Joined: 7/31/2019 Last visit: 6/13/2023 Posts: 3 Rating: (0) |
Hi hansbenkel1962, I have same problem. Can you solve the problem? Best Regards Mawin. |
11/11/2020 2:11 PM | |
Joined: 6/20/2013 Last visit: 12/4/2024 Posts: 1 Rating: (0) |
This issue is fixed in V16 Update 3. Get it here: https://support.industry.siemens.com/cs/ww/en/view/109773716 |
Follow us on