9/14/2023 3:30 PM | |
Joined: 8/8/2022 Last visit: 9/11/2025 Posts: 26 Rating:
|
I am running a script on WinCC 7.4 to pull a recipe from a SQL DB. It's triggered by a BIT on the PLC. It will retrieve the recipe but then it appears to run a second time and it will load the value of 472 in all fields. It's as if it is running the script twice once with a record set than the second time with an empty record set. The trigger is on for 1 second or till the end of the script I added the Set rst = Nothing and Set conn= Nothing lines thinking it would fix the problem. I see the same behavior on multiple PLCs all scripts are pretty much the same. [snip]
AttachmentScript.txt (361 Downloads) |
Last edited by: Jen_Moderator at: 09/15/2023 09:48:10Script added as .txt file. |
|
9/24/2023 6:07 AM | |
Joined: 9/3/2008 Last visit: 8/19/2025 Posts: 938 Rating:
|
Hi mlmartinet About the trigger. Why not put the tag "Borer2_RecipeReq" as trigger to the function directly instead of having another trigger trigger another function that reads the tag to see if it is 1? Regards |
Michael |
|
Follow us on