panic mode

MrPLC Admin
  • Content count

  • Joined

  • Last visited

Everything posted by panic mode

  1. 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.  
  2. 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).
  3. Rural public water system in TROUBLE

    maybe using hysteresis or PWM to achieve the same? need to check the logic...  
  4. 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.   
  5. 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  
  6. 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...  
  7. 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 
  8. How to move 8 bit only in data memory D ?

    do you want to preserve remaining 8-bits in the destination?
  9. 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.  
  10. 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 
  11. 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.
  12. GetVariable in on NA

    and if i am not mistaken you are using NA terminal (in which case there is no VB.NET)  
  13. GetVariable in on NA

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

    post your attempt and we can discuss it
  15. 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.
  16. agreed. such kind of shenanigans are not acceptable. equipment must pass safety audit.
  17. 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.  
  18. IEEE-754 Floating Point

    not sure i understand, it f the value is already in real format there is no need for any conversion. can you elaborate?
  19. why not simply read the product datasheet?
  20. perhaps this helps: no offense to the laptop, but industrial grade products are just built with different constraints in mind. wide temperature range, interference immunity, operation 24/7/365 for many years, includes bunch of software (fieldbus drivers for wide range of PLCs), form factor, scratch, dent, dust etc resistance. it is not comparable to consumer grade products. and try getting exact same product, off the shelf 30 years later. this is why military and lumberjacks do not use Prius for work. yes someone may drive Prius into some harsh landscape but that is not recommended or planned environment for it. this is where rugged vehicle would be needed and they cost good deal more, special drive train, fancy communication gear etc. (not just standard AM/FM radio and MP3 player).
  21. it is simple really - your Costco laptop is cheap volume product meant to be disposable. it is not an industrial grade product meant to last and have support for 30 years while performing quietly in a harsh environment. to get help in a forum, consider offering some detail such as exact product model and software you use to program it. and read the manual. it explains functionality and how to accomplish what you are after. perhaps lookup text library. it allows you enter texts to be displayed and in different language if needed.
  22. Timer Instruction. Clarity Needed

    have not used Omron in long time so my best guess is that it is a 64-bit value (8bytes). if you prefix literal with DT# it should be in seconds and format may be YYYY-MM-dd-hh:mm-cs. which would make everything single byte except year. not sure if BCD or BCI coded. again, just a guess, not confirmed. you may also try DTToSec instruction, then rest should be easy. good luck
  23. NEMA 10-30 is not grounded. it's been deemed a hazard and replaced by 14-30 long ago. there are adapters or retrofit sets for this like this to add ground connection. note that NR-J3 calls for ground to be connected.(PE = Protective Earth).
  24. I don't think connecting N would make any difference but it is not used in circuit shown. Question is if the N terminal is even connected to anything at all (internally). Personally i would not bother, it it was needed, manual would show it....