Michael Walsh

MrPLC Admin
  • Content count

  • Joined

  • Last visited

Everything posted by Michael Walsh

  1. CX Programmer (CJ1M CPU12-ETN)

    The date and time values are kept in the following registers: Unfortunately, Hours and minutes are not stored in a way that are easy to use, so you need to manipulate the information into a more useful arrangement.  I use the MOVD instruction to do this in the code below.  If I put hours in the upper two bytes of a word (bits 8-15) and minutes in the lower two bytes (bits 0-7), I can use two comparison instructions.  In my example below, I turn on the output between 7:30 am and 5:15 pm.  The time on my system was 11:51 am when I captured the image below.
  2. cx programmer

    His comparison constant is input using hex (#0).  The code is working exactly as intended and is done correctly.  The only issue is that D896 is being displayed as an Unsigned Integer (that is what & means).  To force it to show BCD (HEX), just click the button in the toolbar that has a pair of eyeglasses and the number 16.
  3. NX1P2 Fins

    This was answered in the other post.  You are using an NX102, not an NX1P2, right?  Only port 2 supports FINS on the NX102.
  4. Connecting NB Series HMI to CP1L Series PLC

    If you could attach your programs, it would be helpful.  
  5. CP1L autoonline

    I believe that he is saying that he did both (on and off) and it did not work either way.  I would suggest unchecking the box and connecting directly to the PLC with a cable (no switch) as photovoltaic was suggesting.
  6. Motion Control

    I imagine that this is done with pulse train control.  A change in scaling will likely need to be done on either the PLC or the drive side.  It would probably be easier to do it on the drive side.  But yes, more info would be helpful.  
  7. NS5 HMI Connection Problem

    As was requested earlier in the thread, post your PLC and HMI code.  You can take all of the actual code out of each (CX-Programmer and CX-Designer files), but be sure to leave the settings.  Make sure to get the folder that is the same name as the .ipp file for your HMI program and zip them in a file together. For instance: If your file name is NewProject.IPP, make sure to also include the folder located in the same directory called NewProject.   For CX-Programmer, only the .cxp file is needed.
  8. CP1E won't connect or run program

    Solution is to buy new hardware.
  9. NX1P2 FTP Data Sending Process

    You also need to configure the PC to be an FTP Server.  The attached document describes how to do that with Win10 and also shows sample code on how to do the FTPPutFile function block. Configuring Windows 10 As A FTP Server Quick Start Guide.docx
  10. how to set up timer in st

    I wanted to point out some misleading info / mistakes in my comments above.  The first bit in the TIMX structured text instruction is the enable bit (highlighted yellow).  To access the done bit, you need to look at the TimerNumber.CF flag (Complete Flag - Highlighted green) and to access the present value of the timer, you would use the TimerNumber.PV (Present Value - Highlighted blue)  UINT variable.  See my example below.  
  11. unable to address Arrays in NX1P2

    To add to @photovoltaic's comment, you actually have to go into the Memory Settings under Controller Setup (Multiview Explorer option) and enable the areas you want to use.  Unlike the NJ processors, the NX1P2 and NX102 processors do not have the memory areas enabled by default. NX1P2 has 4 options: The NX102 has more options:
  12. Implementing the Omron CX Server DDE and Excel

    @Rahul_Punk_ I have fixed the link in Jay's post.
  13. Cycle Time and Accurate Positioning

    I would expect that this issue is mechanical in nature.  0.02 mm variance in a mechanical system is not that much unless you have specialized actuators.  If you observe the command and the feedback from the encoder using CX-Drive and the numbers are repeatable, then you have an issue with your actuators.
  14. OMRON NJ/NX PLC to PLC Over Internet

    @NootNoot @IO_Rack I have fixed the links in the other thread.
  15. plc-plc via internet

    @NootNoot I fixed the links in PMCR's post.
  16. EJ1N-TC4 Temperature Controller stop Output on Alarm

    It looks like this ought to do it:
  17. Cant´t download program to NS8

    This has been resolved.  See third post in this thread.
  18. Kepware to Omron via Remote Server - No Comms

    Can you provide a picture of what you are trying to do?  Complete with IP addresses.  Please show the PLC, the router and the remote PC.  Perhaps help can be provided with that information.  Also include the node # on the switches on the front of the CJ2M.
  19. File Copy for NX/NJ

    The MOVE instruction now does indeed convert data types (only certain combinations where you don't lose resolution however).  
  20. Sysmac Studio Improvement Request

    The variable discussion made me think of this tip.  It does not address your online edit issue, but is useful for programming offline.  There is a setting that allows you to select whether a variable will be created as a global or a local variable when you add it in the ladder editor.  To do so, go to the Tools Pulldown menu and choose options.  Then check the box as shown below: Then the following dialog will shown when creating a variable as you add elements:  
  21. From a DM: Hello Michael , I'm new here , i have doubt with the display of a timer , my boss request a count down display in the HMI but how we can display the real value? I mean i need to put  Countdown display of 5min but the TIM is in miliseconds 6000 = 5min and in the display only put 6000. i hope you can help me.  Regards. Ivan  @Ivan Fajardo
  22. 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.
  23. 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.
  24. 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).  
  25. 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.