MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

7 Neutral

About dunc

  • Rank

Profile Information

  • Country United Kingdom
  1. linearisation on Q series?

    final code has been done. cone section has been calculated using the TAN function. i have also calculated the mound/hollow of grain using the same method (this is a grain silo). the cylindrical section of the tank i elected to use linear interpolation. i have 2 tables setup, 1 for the fill and 1 for the empty. these switch between with a deadband to try and smooth the transition as best we can. i just need to tidy it all up and put in the PLC to test once have the figures for the interpolation.  
  2. linearisation on Q series?

    right. my modified code had a mistake. they now both work. speaking with my colleague he suggested using TAN rather than the rule of sines. as we have a 90 degree angle at all times, this works and is far simpler. we divide the height by the tan of the slope angle to give us the radius. we then calculate the volume as before.
  3. linearisation on Q series?

    when i run your original code with those figures i get a radius of 11.547 and a vlume of 1396? with my code using your initial technique with law of sines then Pythagoras, i get 5.774m radius and a volume of 349.06 m3 using the modified version, just using the law of sines, but calculating the 3rd angle before using the law of sines, i get 17.375m radius and 3161.251m3 volume. the volume calculation is done the same way on both. i have passed this to my colleague who has far better maths skills than me to see if he can work out what is going wrong!
  4. linearisation on Q series?

    are you sure thats right? i input the same figures into both yours and my code and we get different results? is the further calculation using Pythagoras adding in some additional errors?
  5. linearisation on Q series?

    thanks for your help. managed to write a bit of code to calculate the volume of a cone and then switch to calculate the volume of a cylinder (and add the max volume of the cone too it) i can now look to use this for different angles and then use this to proportion the tonnage readout accordingly. still needs a bit of work, but i have something to start with at least.   thanks again 
  6. linearisation on Q series?

    thanks for the input.   i had got to the point with the volume of a cone, but struggled to get my head round how to implement that within the PLC. i have discussed with my colleague who is far better with maths than i am and he doesn't think it looks too bad!!!! we have the added issue in this application of it being a coned bottom grain silo. we have issues as when it fills as it has a peak in the center, but when it empties we get a dip. we wanted to have an alternating linearisation curve which we would switch between depending on whether it is filling or emptying. i will see how we get on with it and get back to you.
  7. linearisation on Q series?

    we have some storage tanks with coned bottoms. the levels are measured using radar. we wish to use some sort of linearisation table or function to account for the cone in the tank and acheive more accurate results. my maths isnt the best, i was considering doing a rudementary offset table to achieve this, but i would like to do a nicer job if possible, does the Q series (specifically a Q03UDE) have a function that could assist with doing a nice linearisation curve?
  8. GOT 2000 scripting?

    i believe it is similar to C when i was looking through the manual. it gave an example of slightly changing it to run in a C compiler.  i think the issue i was experiencing was more to do with how the script is being run in the GOT rather than an issue with the script itself.
  9. GOT 2000 scripting?

    brilliant, that explains it then. i guess when you use a 60 second sampling time, it is running the script once every minute so it doesn't time out. that does restrict its use somewhat, but at least i now know the limitations.   thanks
  10. GOT 2000 scripting?

    looks like the while loops time out after a time. if you have 10 seconds before you break out of the while loop, its fine. when i increased it to a minute, that gives up and appears to do nothing.   this rings true with my other more basic bit of code i tried.
  11. GOT 2000 scripting?

    previously i have just controlled it from the PLC, but after moving over from the E-series terminals to the GOT, i thought it would be nice to keep the same logout control done from the HMI itself to keep things neat. i have got something that works, but whilst getting that to work, found that the 'while' statements are not really working as expected.
  12. GOT 2000 scripting?

    tried this basic script and it works, but only for a short period of time, then it stops working? while ([b:GB200] == 1) { [s16:GD200] = 10; }   this is very odd?
  13. GOT 2000 scripting?

    the GOT turned up about an hour ago (i was using a GT23), so gave it a try myself and got the same result. like you say, it appears the 'while' loop is not working at all. 'if' statements are fine for alot of situations, but the 'while' statements should still work!? perhaps 'while' statements do not work in project scripts for some reason?
  14. GOT 2000 scripting?

    i have only been using the simulator, so suspect that could be a potential issue. i have ordered the screen for the project, but it hasn't arrived yet. if you have the chance to test it, that would be appreciated.
  15. GOT 2000 scripting?

    there are object scripts, screen scripts and project scripts. i used this script as a project script so should run constantly. the second script i posted functions perfectly fine, i just cant see why i couldnt get it to work using "while" statements? on this occasion i got round it, but i may have an application where i cant just use "if" statements to achieve what i want!   hopefully someone will come along who has played around with them a bit more