panic mode

MrPLC Admin
  • Content count

    2954
  • Joined

  • Last visited

Everything posted by panic mode

  1. Best way to connect with Visual C#

    https://www.ia.omron.com/data_pdf/cat/cx-compolet_v302-e1_13_5_csm1000258.pdf?id=63  
  2. Best way to connect with Visual C#

    if you have OPC server running on PLC, your Visual Studio will need to act as OPC client and you can get data from PLC if you have OPC server running on PC, your Visual Studio will need to act as OPC client and you can get data from PC. But the server still need to somehow get the data from PLC.
  3. How to enable auto-complete while creating new variables

    have not used GX is long time. not sure if your version has autocomplete or intellisense. check this : https://forums.mrplc.com/index.php?/topic/34329-need-help-for-converting-fb-from-codesys-to-gx-works-3-in-st/&do=findComment&comment=160550
  4. Help needed on Toggle Control

    one thing important to add is that order of first two rungs is important. it is used to detect signal edge when button is pressed the next rung toggles the state. using XOR is efficient but in case it is not clear how that works, here is version using set/reset. note that in this case you cannot use output value to change output, you need to store it into some temporary bit first and use that.
  5. robot omron

    that is correct. this is not a simple task. one need to know quite a bit to do it. advantage of using mentioned approach is that many things are already supplied and easy to setup (robot, cell, and everything in it). also all the math is already done including kinematics and transforms. the downside is that one still need to dive into the code and figure out how to swap the data feed. and that is just one of challenges. even though this is in "readable" source code, it is obfuscated by formatting. some of variable and function names are just 1 or 2 characters long. but knowledgeable and dedicated person could still take advantage of this rather than starting from scratch. if you have not worked with OpenGL, well... there is plenty of tutorials and books on the subject. good luck.
  6. robot omron

    if you know how that is exactly what was suggested. another option with very low investment is to simply use live cam.
  7. robot omron

    robot movements or coordinates or both? only coordinates is simple, just get data to your server and update values in page.   for movements you need to show robot. few options exist so here are some of the simplest. install RoboDK (free version will do), insert robot you want to see, create some motions and play with it. when done, export it as HTML. now you can open it in any browser and not just observe the motions but interact with it. now that you have a working page (with correct 3D model, kinematics etc.), you need to modify it (or build your own that does similar job). in case of export, motions are stored in a lookup table that is embedded into HTML document. you will want to replace that by actual robot position value that is obtained from the real robot. This means your robot will need to have software (from factory or more likely created by you) that will connect to your webserver and stream robot position data at suitable interval. server can log this data or use it any way you like, for example to update joint positions in the mentioned page. that is one approach... other is do it all from scratch. you can do OpenGL etc in a web browser. which approach is better suited for you is up to you. good luck. for example see example export   RoboDK Export Example.html
  8. PLC STEPPER MOTOR

    all right, you may proceed...
  9. you need to think how the values are stored.... position measured by encoder is an integer since pulses are counted (0,1,2,3...). so there is no decimal point. to convert that into real world measure (inch, mm degree or whatever) one can process that value and store it a floating point type. but if you want to go reverse, for example to enter some setpoint. you really need to go backwards. note that decimal point is actually only used with floating point data type, also known as REAL or FLOAT. INT/DINT etc do not have that, so your setpoint such as 95.65 need to be converted into something else and integers do not have fractional parts. a good way to get around this is to use fixed point representation. in floating point, place of decimal point can move or float. in fixed it is fixed.  one can choose location of the fixed point based on required accuracy. one common solution is to use 3 decimal places. so when you use an integer such as 145318, value would really mean 145.318. decimal point is assumed to be at filed location - three places from the right. in your case such conversion would involve multiplication by 1000 before using FIXL. less significant positions would still be lost of course but you retain ones that matter...
  10. PLC STEPPER MOTOR

    need to post some info on used hardware (CPU type), addresses used to control stepper, number of steps per revolution etc. normally steppers are controlled by PTO (pulse train output) which need to be configured. check instruction manual for your controller
  11. How to interlock program based on time of day

    that is true but i would guess that in many cases motorized roll up door is not done using Logix series CPU. i have seen no PLCs or smart relays do the job. topic starter should confirm the hardware and software version. for all we know, it is also possible that question is asked in the wrong forum section.
  12. Byte to Word

    yup, that will work too.  as usual there are many ways to get the same result. on a side note - without knowing where the data comes from and what the result is used for, i would just suggest some caution with data manipulation. you may want to check or ensure that "byte values are indeed only 8 bits or you may get surprise result.  if the byte values are from some bitwise memory like I/O or M, you can use form that only takes 8 bits (for example K2M100). if the byte values are stored in D registers you may want to clear higher bits..   for example WAND HFF  HighByteValue HighByteValue   WAND HFF  LowByteValue LowByteValue
  13. Byte to Word

    the same way you would do that with digits in a decimal system. if you want 3 and 8 to become 38, you multiply first one by ten then add the second one. in case of 8-bit, you multiply first one by 256 or simply shift it left 8 places then add or OR result with the second byte.  
  14. Axis with inverter and encoder

    cool times are changing again - and faster and faster. as the electronics becomes more powerful and affordable, adding features is the norm.  https://www.google.com/search?hl=en&as_q=vfd+position+control
  15. Axis with inverter and encoder

    VFDs are good and speed control but not positioning. for position control (servo like) control feedback loop need to be closed at some device that can act fast. if the positional accuracy is not that important you can use programmable controller to make own code to run it at desired speed, decelerate before target position then creep slowly until at position or reasonably close. Also the whole idea of position control is to be able to maintain the reached position. and without feedback loop closed at the drive itself or at least brake, this is not likely to produce satisfactory results. When VFDs use encoder it is usually to maintain speed or to track another drive - not to do positioning. Some VFDs (for example from Eurodrive) have option to wire encoder directly to the VFDs, use internal loop control. They can be programmed to move among few predefined positions which is handy for applications like turn table etc. but this is rare. really this is domain of servos.
  16. PV800 Numeric Entry

    not sure what you got there, buttons should be good 0.5" or larger. maybe check videos like this. you did not state what was the type of the image file you tried to attach, maybe problem is not the file size but the image resolution. try resampling it to something reasonable (1200x900) and try again.
  17. Automatic sub

    PNG is supported. must be the issue with attachments not working earlier this month. Its fixed now.
  18. Automatic sub

    you mean *.PNG?
  19. 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.    
  20. 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
  21. 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.  
  22. alarm_found:=false; for n=0 to 20 if alarm_array[n]<>0 then   alarm_found:=true;   exit; endi_if next  
  23. 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.
  24. 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.
  25. 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