dunc

MrPLC Member
  • Content count

    141
  • Joined

  • Last visited

Posts posted by dunc


  1. i was lucky enough to be given a copy of the conversion tool for this from a mitsubishi rep. it converts certain E series projects to a GOT1000 project. you can then convert this to a GOT2000 project.

    it is very hit and miss though and takes a lot of fiddling about to get it to work properly.

    depending on the size of the project, its sometimes easier to just start again.


  2. i was initially using a  GT01-C30R4-25P(3m) cable and it doesn't work on this CPU, but works fine on our spare one of the same type. all the settings our correct.

    i can only connect to this CPU using a genuine SC-09 cable with the programming software. nothing else works.


  3. done a bit more testing today;

    the spare CPU works fine in all situations.

    the existing one will communicate with the E700 fine. it will also communicate with the PC using GX developer using a genuine sc-09 lead. however, if i use a non-genuine sc-09 lead, it no longer communicates??? the spare cpu works with the non-genuine lead.

    i popped the case of the CPU and couldn't see anything obvious. it all looked pretty good.

    i have tried a format (clear plc memory) and this made no difference. i even tried just making up a small 5 line program for testing and it still didnt work.

    i am just using the 485 port in the front of the CPU for comms as that is the only option available on this CPU.


  4. i have a strange comms issue with an A2AS cpu.

    currently this cpu is connected via serial from the programming port to an E700, this works fine, but we have no spare E700 HMI's so i have developed a replacement on a GOT 2000 HMI.

    when i try it on the current CPU, i get no comms at all. i have tried loading up a spare A2AS CPU we have and this works fine, so there appears to be a strange fault with the existing CPU?

    some other odd things i have noticed is that on the existing CPU, the program doesn't quite run as expected. it isn't using anything particularly complex, but i have had to alter some new software mods i installed just to get it to work on this CPU. it works as expected on another CPU and on the simulator.
    the GX developer program is also set as an A2U CPU? i have tried reloading as an A2AS, but that made no difference.

     

    has anyone got any ideas as to what the issue could be and how to rectify it (other that swapping out the CPU)?


  5. 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.

     


  6. 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.


  7. 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!


  8. 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?


  9. 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 :-)


  10. 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.


  11. 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?


  12. 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.


  13. 3 hours ago, Veganic said:

    @dunc

     

    GS385 Script Monitoring TimeSet

    the monitoring time for one script in units of seconds. 
    If a script does not end even when the set time has elapsed after the start of the script, the script processing stops. (Error code: 15) 
    The setting range is [1] (second) to [300] (seconds). 
    If 0 or any value greater than 301 is set, the value is processed as 10 seconds. 

     

    The following shows examples of settings.
    ・When 0 is set for GS385, the monitoring time is 10 seconds.
    ・When 1 is set for GS385, the monitoring time is 1 second.
    ・When 10 is set for GS385, the monitoring time is 10 seconds.
    ・When 11 is set for GS385, the monitoring time is 11 seconds.
    ・When 301 is set for GS385, the monitoring time is 10 seconds.

     

    You can check for errors here:

    GS16 to GS47
    Script Error DataStores the script Nos. and error codes of the script where an error has occurred are stored in order from the upper address of the storage area. 
    When an error occurs, the script No. and the error code are stored in 2-word unit as a history. 
    If 15 or more errors occur, the upper addresses are overwritten in order.

     

    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


  14. 59 minutes ago, Veganic said:

    OK.

    This modified version of your first example works with an ordinary trigger:

    //if login level above 0 or login above 0 and login time count at 0
    if (([w:GD0] > 0) || (([w:GD0] > 0) && ([w:GD1] <= 0)))  {
    //set GOT seconds to login time count
    [w:GD1]=[w:GS7];}
    //while login level is above 0
    while ([w:GD0] > 0) {
    [w:GD2]=[w:GD2]+1; //increment GD2 to show we are in the loop
    //if 60 seconds elapsed
    [w:GD3]=([w:GS7]-[w:GD1]); //check the calc
    if([w:GS7]-[w:GD1]>=10){
    //set login level to 0
    [w:GD0]=0;}}

     

    Only tried it with the simulator.

     

    EDIT:

    This is pretty much identical to your first example.  I have added some parts to help with debugging.  GD2 is incremented every scan of the HMI when the while loop is active. GD3 calculated GS7 - GD1 just to check if there was a problem with the this calcuation.

    It now works with the additions edited out so that it is back to your original version as far as I can tell

     

    Edit2:

    If I cut and paste your original code it fails to work on the simulator.

    Oh the simulator the while statement seems to block the screen refresh.

     

    @dunc

    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.


  15. 8 minutes ago, Veganic said:

    Which security method are you using? Level or operator?

    LEVEL:

    Setting the security level device will log-out and even elevate the security level when changed in the controller. Well it does in the simulation I have tried.

    OPERATOR:

    The manual explains out to log out an operator - I haven't simulated this one.

     

    It seems that control from the PLC should be possible.

    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.


  16. 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?


  17. 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.


  18. 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


  19. managed to get it to work. i cant get my head around how the WHILE statements work. if i use IF statements only it works fine!? am i being dumb?

    anyway, this worked:

    if ([w:GD0] == 0) {
    [w:TMP0] = 5;}
    if ([w:GD0] > 0) {
    [w:TMP0] = [w:TMP0] - 1;
    if ([w:TMP0] <= 0) {
    [w:GD0] = 0;
    }
    }


  20. has anyone used this and had much luck with it?

    i have been trying to do something relatively simple and am struggling.

    i simply want to add in a project script to log out a user after a set period of time.

    initially i tried it by trying to write to the data register in the PLC and this didnt work. I then tried managing it all within the GOT and it partially works, but if i fire the simulator up with the login level already there, it just wont work?

    below is the script i am using:

    //if login level above 0 or login above 0 and login time count at 0
    if (([w:GD0] > 0) || (([w:GD0] > 0) && ([w:GD1] <= 0)))  {
    //set GOT seconds to login time count
    [w:GD1]=[w:GS7];}
    //while login level is above 0
    while ([w:GD0] > 0) {
    //if 60 seconds elapsed
    if([w:GS7]-[w:GD1]>=60){
    //set login level to 0
    [w:GD0]=0;}}

     

    i have tried lots of different iterations. i have tried using a 1 second sampling trigger point method as well as the method above with an ordinary trigger with no real joy.
    could it be me using the simulator causing the issue and i should get some proper hardware, or am i just being completely stupid?

    any guidance would be appreciated. thanks


  21. in GX works; is there any way around reading a structured project from a Q series CPU if the symbolic data (which takes up loads of room) isn't downloaded to the CPU initially?

    with a simple project you can simply read the program straight to a new project and then work with it. this doesn't appear to be possible with a structured project?

    siemens and allen bradley can manage this without having a huge CPU for a relatively small program, why cant mitsubishi?


  22. really odd one.

    day 3 of trying this and i had another look about. found a utility on the taskbar which allowed you to monitor and change point values. did this with the signal that i was having trouble with and this managed to change the signal.

    the SCADA button now works as it should?

    did i miss something when adding the button and me using that utility forced it to work?


  23. this should be simple and i have done it before with no issues.

    i simply want to add a button on screen to turn a bit on in the PLC. i added the signal in the point editor and all the settings are the same as a button i have added before.

    i have added the button on the mimic, done a bit of script to control it as before.

    i have recompiled the runtime.

    if i try and use the button, the signal does not change in the PLC. if i force the signal in the PLC, the colour of the button will not change either. everything else works perfectly fine including the button i added in a month or so ago.

    any ideas what i have missed? im sure its something stupid!

     

    many thanks
    Duncan