panic mode

MrPLC Admin
  • Content count

    3016
  • Joined

  • Last visited

Everything posted by panic mode

  1. FX5U Shift Dword

    i know you did but... you still did not show what exactly did you try. please post your code and how you try to use the instruction as well as how used variables are declared and their values. Also post example of what you want or expect the code to produce. Then others will be able to comment on it or try it out themselves.    
  2. FX5U Shift Dword

    you should get a copy of the manual for your PLC. it will make your life much easier. many instructions are available in 16 and 32 bit version. names of 32bit instructions are easy to recognize since they start with D ("double word" is 2x16bit=32bit) example of such pairs include HCMOV and DHCMOV - move word or doubleword from highspeed counter RCL and DRCL - rotate left with carry RCR and DRCR - rotate right with carry exact name, availability and details of each instructions is in the manual i have not used FX5 but quick glance suggests that things are bit different here - instruction name does not change so SHL can be 16 or 32 bit as determined by type/side of the operands. https://dl.mitsubishielectric.com/dl/fa/document/manual/plcf/jy997d55801/jy997d55801t.pdf see page 1283
  3. that is correct manual will explain what the dial switches are for. the factory default setting is to use 192.168.1.X subnet, in which case dial switches are used to specify the last octet of that address so if you set the switches to 123, IP address will be 192.168.1.123. for other settings you really need to check manual. if this does not work you need to do a factory reset (set switches to 888, power up for 15 seconds, then power down, set 999, power up again and defaults are set). then to assign IP that is in a range different from default, use AB utility BOOTP and follow manual. of course make sure to disable BOOTP/DHCP or everything so far is useless.  
  4. alarm_found:=false; for n=0 to 20 if alarm_array[n]<>0 then   alarm_found:=true;   exit; endi_if next  
  5. Data Logging Floating Point Access 2000

    first of all is the value correctly saved in DB? if you open it in Access can you see the correct (not rounded) value? Can you manually set value in correct format? that could narrow down where the problem is. maybe everything is fine and the only issue is display format/settings of the "Live Monitor". one could also play with DB and create calculated field/column that produces any format or representation you like.
  6. F2-40 Replacement

    It also depends on your familiarity with PLCs. Like Inntele suggested, i too would most likely just write the new program from scratch. I like programming and structuring things my way. That requires knowing how machine works. But that's me.
  7. F2-40 Replacement

    wow, a blast from the past... very distant past... a real museum piece that somehow still works. to get program out of it you would need one of several equally ancient options. like some hardware programmers and cassette decks, or one of LCD programmers... none of those will be of any use unless you have a way to transfer data from tape deck to some media used by todays computers or if you do not mind reading instructions of LCD display or printout. the best option is a really old computer running MEDOC along with programming interface F2-20GF1. finding working F2-20GF1 will be a challenge. those who may still have will gladly sell it for a measly few hundred $$$. if this is a one-off case, you will be better of to not waste money on it and rather hire someone with needed tools and skills to transfer the program for you.  https://ibb.co/9q53xj5    
  8. Connecting Sensors to External devices

    LOL, that could be one of the reasons... are those machines automated with some sort of industrial controller (PLC, DCS, Robot ....). if so what are the network options? for anything inside plant today, one would try to go Ethernet. plenty of existing installations use legacy bus type networks.  The idea is that each controller would take care of local automation and if needed communicate with other units.  
  9. i skimmed over instruction set and yes there are options to measure time using timer or not. timers are really just counters. if the built in version does not work for you (maybe you need different range etc) then make your own using clock and counter. counters are always edge sensitive so to change counter value use input that is stream of clock pulses enabled when valve is open (just AND them).
  10. Rural public water system in TROUBLE

    maybe using hysteresis or PWM to achieve the same? need to check the logic...  
  11. Rural public water system in TROUBLE

    agreed.... btw. access to water is vital and will easily gain sympathy. a good word and plea for help may go long way. cost of replacement hardware that would make job easier is really not high. single donation could take care of it. maybe start page at GoFundMe and cross fingers...? or consider asking AD for a possible hardware donation.   
  12. not Schneider guy either but here is a generic example in structured text for consideration. since it does not rely on specialized instruction, this is easy to implement on any platform. note that it does use simple bubble sort but this is fine when data set that is not big (and 8 elements is very small). VAR PUMPS_ENABLED:INT; PUMP_RUN : ARRAY[1..8] OF BOOL; AGE_MEASURED :ARRAY[1..8] OF REAL; AGE_SORTED :ARRAY[1..8] OF REAL; INDEX : ARRAY[1..8] OF INT; TMP_REAL:REAL; TMP_INT:INT; I:INT; J:INT; END_VAR // assume some random data (before sorting...) // this set is normally obtained by using retentive // timer or counter to keep track of each pump age AGE_MEASURED[1]:=763.91; AGE_MEASURED[2]:=8161.8; AGE_MEASURED[3]:=1008.9; AGE_MEASURED[4]:=6731.8; AGE_MEASURED[5]:=450.75; AGE_MEASURED[6]:=108.3; AGE_MEASURED[7]:=4400.18; AGE_MEASURED[8]:=9250.75; // Initialize sort data before sorting FOR i:=1 TO 8 BY 1 DO AGE_SORTED[i]:=AGE_MEASURED[i]; INDEX[i]:=i; END_FOR // simultaneously sort both AGE and INDEX arrayes by values in AGE FOR i:=1 TO 8 BY 1 DO FOR j:=i+1 TO 8 BY 1 DO IF AGE_SORTED[i] > AGE_SORTED[j] THEN // --- swap values for age --- tmp_real:=AGE_SORTED[i]; AGE_SORTED[i]:=AGE_SORTED[j]; AGE_SORTED[j]:=tmp_real; // --- also swap value for index --- tmp_int:=INDEX[i]; INDEX[i]:=INDEX[j]; INDEX[j]:=tmp_int; END_IF END_FOR END_FOR // use index after sorting to control outputs //PUMPS_ENABLED := 3; // just an example FOR i:=1 TO 8 BY 1 DO PUMP_RUN[INDEX[i]]:= i<=PUMPS_ENABLED; END_FOR   btw. code to totalize pump age is not shown but this is easy to accomplish in different ways. for example just use periodic clock (1s or whatever) to increment 8 counters if their pump is active. also may want to add some code to prevent reaching overflow some some day. for example from time to time (every hour or every day), subtract from each counter value of the lowest counter. EDIT attachments are broken again so here is external link showing result https://ibb.co/stvtRvj  
  13. Rural public water system in TROUBLE

    first of all congrats on taking charge of the situation and making thing better. i only used Alphas couple of times and that was years ago. one of the big problems i recall is exactly what you are describing - code representation. code does not retain state and that alone is a death sentence to anything more than a most trivial exercise since it makes code maintenance practically unusable. this is by far the biggest complaint i have with FBD language on any platform, but in case of a small controller (smart relay) this is particularly painful as one cannot organize code in separate files or pages. i would have hoped that over time more control over this is added but i guess that was not the case.  i do not want to use programming language unless code representation is rigid. that means sticking with ladder and structured text. i really do not want to waste my time dragging boxes and lousy rubber band connections....  since there is only handful of I/O, changing platform should be easy. i would just replace it with something newer, more flexible and much easier to use. for example Click PLC from AD is robust, very low cost, modular and software is free. using ClickPlus you also get Ethernet option so this can be tied to network, etc. good luck...  
  14. unfortunately you are correct. i noticed the same. for some reason, that function is down from time to time. i will contact the web admin. meanwhile if you really need to show something,  perhaps try link to external image storage such as https://imgbb.com/ 
  15. How to move 8 bit only in data memory D ?

    do you want to preserve remaining 8-bits in the destination?
  16. Omron safety relay G7SA - output NG

    well, what is the type of the load, what is the current? i used it a lot. btw. this is a safety relay with six contacts but contact rating is rather low. in other words it is suitable for interfacing and making hardwired logic but not very good for driving loads. and even light loads could be too much if those loads are inductive and without proper suppression. that wears contacts rather quickly. one of the problems with using suppression is that response times are lower and that is one thing one tries to avoid in safety circuits.  
  17. Omron safety relay G7SA - output NG

    if the contact is open, then side not connected to supply will float and any voltage is possible. if contact or socket is damaged, results can also be pretty much anything. for more details please post exact circuit and test method 
  18. i think your example is just too complicated. i am not fan of branched rung being folder either. to me, mode selection and permissives are two completely different things and my advice is to keep them separate (break up the long rungs). i like to think that mode selection is just mode selection - no IFs and BUTs. like a selector switch -you choose mode and machine is immediately in that mode - always and unconditionally. what you can do with that mode will depend on permissives... and that can come later... in this example i tried restructuring it a bit but externally this should be compatible with rest of your program. note that chain of contacts in rungs with permissives is very simple - just a chain. even when such rung is long, such chain folds nicely.
  19. GetVariable in VB.net on NA

    and if i am not mistaken you are using NA terminal (in which case there is no VB.NET) https://assets.omron.eu/downloads/manual/en/v3/v118_na_series_programmable_terminal_software_users_manual_en.pdf  
  20. GetVariable in VB.net on NA

    if i understand, the problem is not pasring the value but actually reading value
  21. PTO Axis not ready

    post your attempt and we can discuss it
  22. Distance in milimeter from Encoder pulses

    very good. btw thanks for the feedback. i recall almost not posting it because i though anyone would get it if they just though about it... but then, we all have moments when exhaustion clouds judgement so i decided to post it anyway. glad it helped.
  23. agreed. such kind of shenanigans are not acceptable. equipment must pass safety audit.
  24. it depends on what you really want to accomplish. to narrow down the specs you need to specify number and type of I/O, any communication interfaces, budget etc. for example one thing to consider is cost of software and any drivers needed for communication. Emergency stop is a safety device. PLC can monitor that state (for example for troubleshooting or indication) but not control EStop function unless PLC itself and relevant IO are also safety rated.  How many heaters? If it is one or two, simple regulation using dimmer is ok (this is called random trigger). but this creates EMI and requires filtering but it is a way to go for dimming lights on a budget. another option is to use zero crossing triggering. this way load is turned on and off as sine is at zero point so there are no spikes, transients or harmonics. this is not suitable for visible lights due flicker but it is an excellent choice for heaters and loads that do not radiate visible light.