Michael Walsh

MrPLC Admin
  • Content count

    1801
  • Joined

  • Last visited

Everything posted by Michael Walsh

  1. project or PLC mode

    I agree BobB, the error only means that you either have the box checked and tried to use a TIM or CNT type instruction, or you do not have it checked and tried to use a TIMX or CNTX instruction.  If you are using a PLC that you can choose this option and you are starting from scratch, always check the box and use TIMX and CNTX instructions.  If you have both TIMX and CNTX / TIM and CNT instructions in your program, it does not matter if the box is checked, you will get the error.  With some PLCs you have to choose one or the other, not both.
  2. How to use plc clock in programming

    The real time clock in a CPM2A is contained in these addresses:  Your code might look like this: First determine if the time range is correct (This example check from 5:00 to 5:30 pm): Then determine if the day is correct (this example does Monday through Friday):
  3. What is "Negative limit input" of servo

    I cannot find the error code that you provided.  What is the error code on the front of the drive?  If it is a standard overload, Overload errors are caused by excessive torque.  Either something is wrong mechanically with your system, or your motor is not sized properly.  I guess that the program could be incorrect also, if it is driving the servo too far and hitting a stop (but this is still a mechanical issue causing too much torque).  If it is a regeneration overload, then you may be regenerating too much voltage back on to the DC bus.  This usually happens in vertical applications, or if you are trying to stop too quickly.  If you have a vertical application, you may need to add a regeneration resistor to burn off the excess regeneration voltage.  If you are just trying to decelerate too quickly, then you can make the deceleration less aggressive. This is one way that you might use the combination of first MC_Reset and then ResetECError: The first rung issues the MC_Reset command if the drive is in alarm and the safety is OK.  Once the drive is no longer in the alarm state, the second rung resets the EtherCAT error.  This is just a quick example, you may want to add more conditions to these rungs.
  4. What is "Negative limit input" of servo

    Yes.  The error on the drive is causing the EtherCAT error.  So, trying to reset the EtherCAT error before resetting the drive will not work.  First reset the drive, then reset EtherCAT.
  5. What is "Negative limit input" of servo

    Use MC_Reset to reset the servo drive, then use ResetECError to reset the EtherCAT error.
  6. Comparing Time Of Day with an NJ Processor

    A little tip:  I had to look this up to make sure that I had the correct format.  One of the manuals that is installed with Sysmac Studio has all the formats located in it, but rather than look it up in the manual, I just looked for Time Of Day functions (TOD) in the Toolbox and then looked at he help file (F1) for one of the instructions.  It showed the constant format in the help file.
  7. Comparing Time Of Day with an NJ Processor

    Like this: or if you want to use a variable in the comparison, like this: I am not sure, but if your task period is >1ms, then you may need to worry about using something other than the = function, perhaps the ZoneCMP instruction where you can specify a min and a max for the range and then use a leading edge one shot of the result.  Or you could check to see if the TOD is less than 00:00:01.000 and do a leading edge one shot of that. 
  8. Create Variables in you global variable table that are the same size as the input and output assemblies for your device like this:   Make sure to set the Network Publish field appropriately.  I just made simple arrays of bytes to the proper size, this would more likely be  a structure that matched the format of your assemblies. Next, create your input and output tag sets for the NJ as shown below in the EtherNet/IP settings:   You have to create the tag set first (right click in window) and then create the tag (right click).  Your tag will show when you start typing. Then go to the connections tab and make the connection:   If you do not know the assembly number (target variable), just select the field and type a 1 in the field, it will show you a pulldown of your options.  When you choose an assembly, it will show you the assembly size.  You can use this when creating your variables (above).  Of course, you will need a manual for the device to see what the 56 and 16 bytes mean respectively.  
  9. You can add an inline structured text block like IO_Rack mentioned and then populate it with as many lines of code to reset any variable you want.  This would need to be done if variables were not arrays or structures.  As IO_Rack also mentions, arrays or structures could be cleared with the Clear command.
  10. problem with display NT620-ST141B-E

    Why is this topic in the NJ / Sysmac Studio section, by the way?  This is old product.
  11. You could use the inline structured text function to reset all in one instruction.
  12. Sorry Jay, not my intention.  My intention was to express the need to upgrade his HMI.   
  13. You can assign initial values to any variable in the variable table.  No code needed at all.
  14. Yes it is very old and therefore obscure.  As soon as you get this up and running again, you should begin to work on planning the upgrade to newer product. 
  15. problem with display NT620-ST141B-E

    Broken cable, damaged HMI, Damaged PLC, someone changed the port settings in either the PLC or the HMI or someone changed a dip switch.  Did anyone download any changes recently or change any switches on the PLC?  That is where I would start.  
  16. What is "Negative limit input" of servo

    Yes, that is a better bit.  The best solution might be to use the DONE bit from the Function block that issued the movement command. This is the done bit from the MC_Move FB:
  17. CP1L-E Socket service porgamme

    Yes.  Three sockets, three ports.
  18. What is "Negative limit input" of servo

    You could look at the bit AxisName.Details.Idle It is no when processing is not being performing. Look at the variable that is created when you add an axis.  It is of type _sAXIS_REF.  You can find details in the NX-Series CPU Unit Motion Control User's Manual that is installed in the Sysmac Studio folder of the start menu.
  19. How to set a value of 10 seconds

    Press F1 when selected on the TOF function block.  You will get a help file that shows this as an example: You have to enter it like this:  T#10000ms or T#10s  
  20. CP1L - Communication loss flags

    Yes, you need to investigate using socket services.  There is a sample program here that seems to work (I just tested it):  He thinks it is not working, but he likely just has a typo somewhere, or his test client is not working.  
  21. CP1L-E Socket service porgamme

    I used your ladder code on my PLC (only changed IP Addresses) and I was able to open the port, send some data, receive data and then close the port.  I have no issues here.  Perhaps you should try a different test Client.  I am using a shareware called TCP Client / Server.
  22. Sysmac Studio, MX2 inventer,

    Check A001.  It is the frequency reference selection.  I believe that it should be set to 4.
  23. CP1L-E Socket service porgamme

    You open the socket to 192.168.25.5 in the code above.  In the comment above, you said that your PC server was 192.168.25.7.
  24. CP1L-E Socket service porgamme

    Please post the code.  It will have a .cxp extension.
  25. CP1L-E Socket service porgamme

    Post your code.