11/29/2023 9:43 AM | |
Joined: 2/17/2020 Last visit: 4/24/2024 Posts: 6 Rating: (0) |
Hello squad. I made a STL block and through my testing with PLCsim it appeared it worked perfectly. Once put into the actual PLC it had a lot of unexpected behaviours such as, trigging early and setting the "timers" above the setpoint. Note: In and clk require singleshot inputs simply to allow me to implement this as an FC. I would like if either there is an obvious problem that could be pointed out to me or some guidance on how to test my function in way that might invoke the issue. I am new to STL so really any feedback would be appreciated. Thanks Gurus AttachmentFunction.txt (249 Downloads) |
Last edited by: The Helping Hand at: 11/29/2023 13:52:29Function added as txt. |
|
11/29/2023 11:57 AM | |
Joined: 3/30/2020 Last visit: 6/3/2024 Posts: 4562 Rating: (950) |
The code block might be running integrated with other blocks which may have a cross influence. The use of AR2 is opens this possibility. Perhaps the information mentioned in another topic may be helpful: Restrictions on AR1 & AR2 |
Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
This contribution was helpful to1 thankful Users |
11/30/2023 11:55 PM | |
Joined: 2/17/2020 Last visit: 4/24/2024 Posts: 6 Rating: (0) |
Thanks for the replies guys. I think it might be incorrect use of the AR pointers causing this issues as my usage does not follow what was recommended in the provided links. If I find the solution (and remember) I will amend this post with the modified code. EDIT I never managed to find a way to cause the fault in a test environment. However I modified the function to remove the usage of the AR2 pointer and after implementing onto the plant PLC no longer have these issues. Modified Code Attached AttachmentCode.txt (195 Downloads) |
Last edited by: HenryCHB at: 12/08/2023 21:30:18 |
|
This contribution was helpful to2 thankful Users |
Follow us on