panic mode

MrPLC Admin
  • Content count

    2285
  • Joined

  • Last visited

Community Reputation

33 Excellent

3 Followers

About panic mode

  • Rank
    Mitsubishi Moderator
  • Birthday 12/15/69

Contact Methods

  • Website URL http://www.google.com
  • ICQ 0

Profile Information

  • Gender Male
  • Location Mississauga, ON
  • Country Canada
  • Interests many...

Recent Profile Visitors

5612 profile views
  1. not enough info... it is a trivial task to create toggle function using button (and that is where you should start). next part is to see how program is structured and organized. this is harder. palletizer would be controlled by some sort of sequencer or state machine. you need to find what is the logic based on. you can then use pause bit to either stop scanning the sub or prevent indexing of sequencer or state machine.
  2. MR J4 CAN NOT JOGING

    yep... we all have been there... anyway, this is not plug and play... what commissioning steps have been completed? message suggests to check mains power. what messages servo drive reports? is everything connected correctly (motor, encoder, over-travel switches,...) and configured (motor type, gear ratio etc.)?  
  3. MR J4 CAN NOT JOGING

    in just 15min you created four identical topics. stop spamming or you will be banned... give chance to someone to respond.
  4. to do positioning you need a servo. in recent years some VFD drives (but not all) also support this functionality. to do any kind of precision you need tight loop. normally that loop is part of the drive or motion controller. You can of course use PLC  code for this but the fact remains that this is not a fast loop resulting in loss of performance (either speed or accuracy or both). using only contactors to control motor in an attempt to control position is exercise in futility. another issue is braking (slowing down). if you need an example, use any cheap motor (ceiling fan, drill gun etc) and try to operate it manually using switch and - stop at specific position. it just wont work... if you have VFD, you can control velocity (and deceleration!!!). this allows you to slow down axis before reaching stop position. with clever code and calculating deceleration ramps etc this can get you potentially close to what you expect. theoretically the only compromise would be speed. the other issue is that induction motors are designed to operate at specific speed (within some tolerances).  
  5. Bit Shift GX Works2 shifting 2 bits simultaneously

    Can you please elaborate on this.. 
  6. Trouble Wiring a Simple LED with a Micro820 Controller

    LEDs are polarized devices like all diodes. When forward biased voltage drop is usually 2-3V and current is usually 5-20mA. To operate on higher DC voltage al you need is series resistor but 10K will be too high value (LED will likely show some output but very dim).  If we assume 15mA (0.015A) and 3V for LED, then resistor will be 21V/0.015A = 1400 Ohm. Nearest common value is 1.5k and it should be rated for 0.5W    But keep in mind that reverse biased LED will not survive if it is connected to voltage that exceeds some 6-7V.  common solution is to either make sure this will never happen or protect LED somehow. simplest solution is to wire another diode anti-parallel to LED. another option is to use bridge so polarity will not matter.  
  7. Binary string to int conversion

    i agree, using string to represent numeric values is less than ideal. but if that's what you have, use a loop and go through each string character, something like this (sample pseudo code): INT N, I N:=0 FOR I:=1 to stringData.LEN   N:=N+N   if stringData[I]=='1' then       N:=N+1   endif NEXT  
  8. Binary string to int conversion

    and post your code
  9. PE Exam

    Ever hired or relied on services of others? contractor, doctor, anyone?  Is there any value in confirming that they are capable of doing their job?   
  10. New laptop, comms errors

    you put HDD into another laptop? are you sure they are identical machines? do you have drivers for all hardware (such as network port)? did you try to connect to anything else and at least try PING? also check network settings on both nodes, communication between two devices is possible if both are on a same subnet
  11. Float substraction?

    Computer representation of numbers in different formats is a really interesting topic. Key is to use correct format... Note, REAL is encoded data format. If you are interested in making each and every digit count.... do not use REAL data type! This is why servo controllers count pulses. You only see distances in REAL format as a secondary result. Many things about REAL look nice and easy at first but there are pitfalls. For example: - comparing floating points directly for equality is generally a bad idea (even if some systems may have some sort of a workaround in place) - adding or subtracting floating point values that greatly differ in size is a bad idea. one can check it by making loop and adding very small value to a real number. eventually it will stop increasing, usually long before reaching maximum value that REAL can hold. - etc.   I see cases all the time when programmers favor REAL in calculations thinking they get "better resolution" because software they look at generates bunch of meaningless digits. They don't realize that 32-bit is 32-bit. both 32-bit INT and 32-bit REAL can represent same number of different states.... they are just distributed differently. in case of integers, distribution is uniform. in case of REAL it is not. you get really small increments when values are close to zero. but you get really huge increments when values are big. in fact REALs have a problem with significant figures because they only use 23-bit for this. There is no magic or "free lunch". 32 bits are divided into groups:          1 bit is sign          8 bits are exponent          23 bits are significant those 23 bits are determining how many significant figures in your number are correct. 23 bits in binary comes up to some 6, in best case 7 significant figures in decimal. Anything after that is garbage.... there is no point in using so many decimal places in your examples when system that is used to do calculation can at best do 6-7 significant figures.   Back to your question:  IF result<=Param then .... IF 0.05000305 <= 0.05000000 this is a problem?   I would not even consider it....    note: Value 0.05000000 is a result of subtraction from "70.000000". i would not count on more than 6 significant figures. this means 70.000000 is an exaggeration as only four decimal places are useful so this should be displayed as 70.0000 instead of 70.000000. subtracted number is of same magnitude so result is going to be good only for up to those four places after decimal point. Anything beyond 0.0500 in this case is nothing but wishful thinking... values such as 0.05000305 or 0.05000000 make no sense as they are really no better than 0.0500. Sure you can get "wrong" result at the very slim margins of your range but why would you care. And if you do .... don't use REALs (floating point numbers), use integers to represent fixed point numbers.          
  12. Float substraction?

    i don't see why would one care unless this is data to be displayed on HMI. in that case HMI should have options to display specific format (number of decimal places etc.). If for some reason this is not available, don't use floating point, use fixed point format... for example multiply value by 1000 and place result into an integer variable. so value such as 79500 will really represent 79.500 (three decimal places are implied). This is something even oldest HMIs would handle.
  13. Float substraction?

    70.0 - 69.95 = 0.05  - nothing wrong with that...  0.05000305 is just closest floating point representation possible in 32-bit...   note that not all REAL numbers can be presented accurately, most are approximated. and you get "artifacts" after 6th place or so.  
  14. floating and Nonfloating I/O modules

    Floating means that output is galvanically isolated so it 'floats'. This means that it is not referenced to ground and if you measure potential difference between one of output terminals (positive or negative) and ground, just about any value is possible.    Using floating output is special case in electrical standards around the world and may need special condition in order to be deemed acceptable.  Normally this is reserved only for low power device, some instrumentation etc. and when used, double insulation is a minimum. You can see this on small consumer devices and power supplies - it is double wall rectangle.  Generally transformer and PSU outputs are required to be referenced in order to meet safety requirements and avoid harm due certain modes of failure (leakage current).         
  15. Modbus RTU communication Toshiba PLC - Hitech HMI

    Well, supplier is only one link in support chain. Did you contact manufacturer of your HMI?