11/14/2016 7:01 PM | |
Joined: 12/27/2006 Last visit: 4/27/2024 Posts: 1196 Rating: (113) |
Take a a Mathematical instruction Block Value 1 is by reference the couts Then - 5 Then : 10 Only if counts = 0 then the output = -1. If ist a problem you can fix it. What LOGO have you a 0BA6? Attachment10.zip (76 Downloads) |
11/14/2016 7:23 PM | |
Joined: 12/18/2014 Last visit: 5/2/2024 Posts: 32921 Rating: (4069)
|
Here is a solution suggested by me. The program splits in ones digit and tens digit. It limits the values at the input to 0 - 99. Smaller or larger values produce the output "0". Attachmenttens_digit.zip (71 Downloads) |
11/14/2016 9:34 PM | |
Posts: 65 Rating: (1) |
Thank you. How do I see the contents of the UDF, it is asking for a password when I try to expand it ? Best I have come up with is, multiply the count by 2, add 10 then divide by 20. This gives 1 for 0-9, 2 for 10-19, 1 more than I require, but copes with an input of 0. See attached file. Does require another block just to deduct 1. Can cope with the +1 value in further calculations but shame can't be done in a single block. AttachmentDivide counter 2.zip (59 Downloads) |
Last edited by: ian_m42 at: 11/14/2016 9:34:44 PM |
|
11/15/2016 10:14 AM | |
Posts: 65 Rating: (1) |
Yes the UDF does what I want it too, I just wanted to see what was in the box. |
Follow us on