Michael Walsh

MrPLC Admin
  • Content count

    1801
  • Joined

  • Last visited

Everything posted by Michael Walsh

  1. sample logic

    There really is not much logic to it.  The temperature shows up in a register for each of the 4 inputs: Input 1 is in word n+1 Input 2 is in word n+2 Input 3 is in word n+3 Input 4 is in word n+4 n = 2000 + 10 x unit number. So if the unit number dialed in on the front of the card is 3 and you are looking for the current value of input 2, then you would look in address 2032. Explaining - n = 2000 + 10 * 3  = 2030.  Input 2 is word n+2, 2030 + 2 = 2032. then you use that number for whatever purpose that you need.   Here is the manual:  https://www.fa.omron.com.cn/data_pdf/mnu/w368-e1-10_cs1w-p____cj1w-p___.pdf?id=1644 Look in section 3-3.
  2. Timer Countdown in Minutes and Seconds

    The TIM instruction is not in milliseconds, it is in 0.1s increments.  So, 6000 (BCD) = 600.0 s = 10 minutes. I cannot save the picture on here, so I will have to type it.  You can use any addresses that you want, but I chose these.  My timer is T0. P_On contact to do all of this: BIN T0 D0               Convert the present value of the timer to an integer / D0 &600 D2          Divide the integer by 600.  This gives you minutes remaining as a whole number. FLT D02 D4             Convert the integer to real. D4 has the value of minutes remaining as a real number.  Display it on the screen with no decimal places. FLT D0 D10             Convert the current value of the timer (0.1s value) into a real number. /F D10 +600.0 D12   Divide the value by 600 to convert to number of minutes as a real number, so 900 (integer) would convert to 1.5 minutes. -F D12 D4 D14        Subtract the whole number of minutes remaining from the real number of time remaining.  Given the 900 example, this would be 1.5 minus 1 = 0.5.  D14 has the fractional minute value remaining. *F D14 +60.0 D16    This converts the fractional minute value in D14 to seconds.  So, 0.5 * 60.0 = 30 s.  In this example, T0 would have a BCD 900 in it, D4 would be 1.0 (whole minutes) and D16 would be 30.0 (30 seconds).  Be sure to display the D4 value on the screen with 0 decimal places.  You could display D16 with one decimal place or 0, that is up to what you want to see on the screen.   There are other ways to do this, but this is one suggestion.
  3. Comm1 orange LED steady and communication problems

    If the orange COM1 light is on all the time with nothing connected, this sounds like you have a hardware issue with that port.  This is not too surprising considering that Omron has not sold C200HS PLCs in 20+ years (my guess).  
  4. Omron Ascii Compare

    Use =$.  Note that the leftmost byte of the word after your data needs to be a NULL character (00 Hex) to signify the end of the string.   I created some pictures, but cannot attach them....You will need to populate three different memory areas with the hex values of your three different ASCII strings.  Then use the =$ function to compare the actual string in question against the three predefined memory areas.
  5. Can a CJ2M communicate to a C200H??

    The EtherNet options with the C200HG were somewhat limited, but Controller Link would work (CLK module), or serial.  Controller Link has a data link option, much like EIP Implicit messaging. For serial comms, you could issue Host Link Commands from the CJ2 PLC to write or read data to / from the C200H if you have a spare serial port available.  
  6. NA Alarm Popup Location & Size

    Answered on your other post.  Please only ask one time.  Thanks!
  7. Omron NA Alarms

    It logs each of the following: 1)  When the alarm occurs 2)  When the alarm is acknowledged 3)  When the alarm turns off This is important to some operations as they want to know how long it took the operator to see what the fault was and how long it took the operator to resolve the issue.
  8. Host Link Communication vis CJ1W-SCU41-V1

    Nothing, except put the PLC in Monitor Mode (for writing).  The cable is not a standard pinout. If the communication settings match and the 3rd party device has properly implemented Host Link communications, it will work.
  9. Multiple Modbus RTU Reads

    Sorry, I have not been on here very much as of late.  Trying to catch up.  Conceptually, it looks like it will work.  I would use one Function block and move the info to the inputs and then move away the output data for each execution.  If you compile this code, it fails because the FBs take up too much non-retained memory and the defaults need to be changed.  That being said, if you change the default memory allocations to accommodate the FBs, it should work as is.  
  10. Split a byte to two nybbles

    Use the MoveDigit function.  You can pull a digit (Nibble) out of a word and store it in another word or byte.
  11. OneShot CX-programmer

    Do you mean this: A bit turns on and the timer times for a fixed amount of time.  When the bit turns off, the timer continues.  When the timer is done, you can then accept another one shot of the bit. If so, then this should work:
  12. Sysmac Studio IDE Very Slow

    I agree with Crossbow and would advise against trying to have the HMI and controller in different projects
  13. Data from an NX102 to Excel

    Here is sample code on how to write to a csv.  You will need to create a login on the site to get to the file if you have not already done so. https://automation.omron.com/en/us/support/resources/sample-code/sd-card-write-sample-code-in-njnx-controller Here is a video that explains how to FTP the file from the SD card: https://www.youtube.com/watch?v=a1d81yiaHu0
  14. How to use a timer inside a function block?

    Looking at your code, your coffee_stop bit will only turn off for 1 scan.  It will then immediately turn back on and the timer will start timing again.  The problem is not the timer in side the FB, but the code as written.
  15. How to use a timer inside a function block?

    I did this and it worked just fine:
  16. From your drawing it looks like 192.168.250.2 is the correct address.  I am not familiar with the Python side of things.  If I had seen this earlier, I would have suggested that you just write a FINS command (published Omron protocol that can be implemented over Ethernet).  If you let me know what address you want to write to, I can generate a FINS command and Wireshark it and attach the trace for you.  
  17. Sysmac studio support FINS/TCP?

    One note on the NX102: only port 2 supports FINS.  
  18. Recipes using NB HMI + CP1

    @LD_M I fixed the link.
  19. TXD & RXD with CQM1H SCB41 W/232 ASCII

    @Tamara - please post your question in only one place.  Thank you.
  20. Axis Synchronization (Rotary and Linear )

    What you are proposing sounds like linear interpolation to me.  You do have to have the 1040 or 1140 to do interpolation as well.  To do interpolation, you need to create an Axes Group.  Then you can issue the MC_MoveLinear Function Block.   However, gearing would work as well.  You don't have to have a virtual axis to do that if you don't want to do so.  You can just figure out how fast you want one of the axes to move, call it the "master" axis and then gear the other to it.  Standard command to the master.  The gear ratio then becomes important though.  In your example if the linear axis is the master, the gear ratio would be 12/1 (360/30).  I would recommend that you use _mcCommand as the Reference type or _mcLatestCommand (if the master has a lower axis number than the geared axis).  
  21. ROTARY AXIS POSITION ERROR

    The value in Modulo was definitely your issue.
  22. ROTARY AXIS POSITION ERROR

    What do you have for the Modulo setting in the Position Count Settings for the Axis?  It should be set to Maximum: 360.0, Minimum 0.0.  Make sure that it is not set to 359 or something for the maximum.    
  23. OMRON CJ1W-CT021

    The Special I/O Units (Blue letters on part number on front of the card).The memory areas for the modules cannot overlap.  Typically each special I/O module takes the space of one unit number.  However, the CT021 uses 4 slots. If you have a unit #0 CT021 module, it uses the space reserved for unit #0 - 3 and the next module should be at unit #4 and would then use the space reserved for units 4-7.
  24. PIDAT in Sysmac Studio

    It does indeed work in simulation.  I agree start with a non-zero Prop band.  I would start with I and D = 0.  
  25. CQM1H-CPU61 password recovery / Plc Backup Tools V6.0

    We are not allowed to assist you with breaking a password on this site. Omron should be able to bypass it for you if you can prove to them that your customer owns the rights to the program.  Otherwise you will need to contact the company that owns the rights and see if they can provide the password.