steliosliv Posted December 28, 2021 Report Share Posted December 28, 2021 Hello everyone, I have a question regarding UDFBs. In my program I use a large function that has to be called multiple times. But when I run the program only the call that was first is successful the second call is never made. I tried a simple UDFB as shown below to test this, and I get the same problem. Is there a limit to call the same UDFB only one in the program or I am doing something wrong. Thanks Quote Link to comment Share on other sites More sharing options...
steliosliv Posted December 28, 2021 Author Report Share Posted December 28, 2021 I found that the problem was the positive edge of the frequency. I understand that if you call multiple functions which use the same positive edge only the first call will work. Quote Link to comment Share on other sites More sharing options...
ORSO2001 Posted December 28, 2021 Report Share Posted December 28, 2021 hi steliosliv, what happens if in your UDFB you put a "direct" contact ...-| |-...instead of the "positive" contact...-|P|-...? edit: I just see now that you use the "frequency." variable and not an "user" variable that you can reset... Quote Link to comment Share on other sites More sharing options...
Ness Posted December 28, 2021 Report Share Posted December 28, 2021 I'm not seeing this behavior with a quick test? I'm triggering a UDFB multiple times off Frequency.Frequency 1 (s) and all the UDFB instances are being called. Quote Link to comment Share on other sites More sharing options...
Isakovic Posted December 29, 2021 Report Share Posted December 29, 2021 I believe @steliosliv refers to -P- contact inside of function. In that case you should make a bit for that positive edge and have a network like this in main before function is called several times: Then you use normal contact of that new bit instead of -P- contact inside of function. Quote Link to comment Share on other sites More sharing options...
steliosliv Posted December 29, 2021 Author Report Share Posted December 29, 2021 @Ness That is because you inserted the positive edge outside of the UDFB1. Quote Link to comment Share on other sites More sharing options...
steliosliv Posted December 29, 2021 Author Report Share Posted December 29, 2021 @ORSO2001 The problem is with the positive edge. I tried making a simple UDFB with a normal contact and it works fine Quote Link to comment Share on other sites More sharing options...
steliosliv Posted December 29, 2021 Author Report Share Posted December 29, 2021 @Isakovic Yes that is correct, this way it works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.