Michael Walsh

MrPLC Admin
  • Content count

    1801
  • Joined

  • Last visited

Everything posted by Michael Walsh

  1. help with cx programmer instructions

    It is an index or offset.  So, D5100[D4099] means 15 is moved into the address that is D5100 + the value in D4099.  So if the value in D4099 is 43 (as an integer), then 15 is moved into D5143 (D5100+43). 
  2. Using PTO's to control multiple stepper motors?

    You can make a standard output for the Enable signal to your drive and just program it in ladder.  You can make sure the pulse output is complete using the bit highlighted above (A280.03) before turning off the drive enable output.
  3. Extracting digits from a string

    I don't think that i am quite understanding what you are trying to do, if you want to extract 123 from a string, the answer is just 123.  I have used your example however to provide code that will search one string for 123 and then extract 123 from the string and store it in a variable.  The last rung will check to make sure that the string returned matches the string that was searched for, confirming that the string was indeed found.  If nothing else, you will see how these instructions function and they can help you to solve your problem.  
  4. Extracting digits from a string

    Numbers?  A string is made up of ASCII characters.  If your string was: 'ABC12345' Do you want to extract the number 3 (for example) from the string, or do you want to know the HEX number for that character, which is 33 Hex?
  5. Extracting digits from a string

    By digits, do you mean characters?  
  6. NX1P2- explicit messaging to FANUC Robot

    Yes, monitor your response data for an error response from the robot (use the Watch Tab Page as discussed below to monitor). If something goes wrong with communications to the robot (setup incorrect, or some other issue, command does not get to robot or response does not get back), it is necessary to monitor the outputs of the function block.  Assign variables to the output pins (as shown below): You could just monitor the values right there in the ladder, or open the Watch Tab page: and the window will be at the bottom of the screen.  Just add the variables to the window.  Be sure to enter local variables like this:  ProgramName.Variable Name.  You could also use this window to monitor your Response data.
  7. NX1P2- explicit messaging to FANUC Robot

    The 02 is just the designation for the EtherNet/IP Port.  On controllers that have 2 ports like the NX102 and NX7, the port designations are odd and are done this way: Port 1: '02\192.168.150.25' Port 2: '01\#01\02\192.168.150.25'  Note:  01 is the port and the #01\02 is routing from one processor to the other.  NX102 is a dual core and NX7 is a quad core. I just posted both of these because I know that someone will ask it at some point.  Just putting it out there.
  8. NX1P2- explicit messaging to FANUC Robot

    I have filled in what I think it will be.  Not sure if the attribute is hex or not, I am treating it as if it is.  If it is not, just use UINT#15.
  9. NX1P2- explicit messaging to FANUC Robot

    The difference is described in this document: https://www.odva.org/Portals/0/Library/Publications_Numbered/PUB00138R6_Tech-Series-EtherNetIP.pdf Connected vs. Unconnected (UCMM), top of page 6.  UCMM is easier in the Sysmac Contollers, use CIPUCMMSend unless you really need to use (CIPSend, and therefore CIPOpen and CIPClose).
  10. CS1D I/O Table

    My mistake. The drawing that I attached seemed to imply that you cannot use the CS1D-IC102D in a duplex CPU, single I/O system, but the drawing you attached above says that you can do so.  These seem to contradict each other.  
  11. CS1D I/O Table

    The CPU doesn't take a slot and is listed at the very top of your I/O Table.  Here is the ETN21 (in Communications Adapter group): Here are the SCU units (there is no Modbus specification on the part, it can communicate many different protocols):   I don't think you are using the CS1D-IC102D correctly: I think it has to be done like this:      
  12. CS1D I/O Table

    You right click and insert the modules.  The modules are in the exact same order in the picture as they are in your drawing.  If you have the hardware, you can go into program mode on the PLC and do a Create I/O table and it will make one for you based on the modules connected (but you said you don't want to do it this way).  Of course all the unit number dials on the cards with Blue lettering at the top need to be unique and all the unit numbers with green lettering at the top also need to be unique.    Other than that, I am not really sure what you are asking.
  13. CS1D CPU + ETN21 reading Modbus TCP address

    @BobB From the other post, he has a  CS1D-CPU65H, no FBs.
  14. CS1D Programming

    CS1G-H and CS1H-H processors support Function Blocks, but not all of the CS1D processors.  If it is there for your processor, then it supports Function blocks, if it is not there, then your processor does not support Function Blocks.
  15. D memory data not moving into instructions

    So do as @gtsuport suggests, uncheck the execute timer/counter as binary and use BCD.  All of your timer / counter instructions will need to go back to the non-X versions.  The display will default to HEX and will show the BCD values as your users will understand.  So if they need to enter 800, they just enter 800.  This will cause 800 hex (which = 800 bcd) to be entered and the value of 800 will be used. 
  16. Is it possible to connect an Omron NA HMI to Contrologix?

    No.  Omron NA HMIs (currently, but not sure if that will ever change) only connect to Omron PLCs.  The manual that is installed with Sysmac Studio (NA-Series Device Connection User's Manual) lists the following supported devices in section 1-1:
  17. D memory data not moving into instructions

    Ah, I see.  It keeps defaulting back to HEX.  Since it keeps defaulting back to HEX, why not use the TIM instruction and then enter the values in BCD (which is a subset of HEX) and everyone is happy.  
  18. D memory data not moving into instructions

    The X version of timers and counters is the "newer" version and is the decimal version.  It gives a larger range (65535 as opposed to 9999).   I prefer working in decimal as well.    The image below (from the manual earlier in this post) should allow you to change the format of the display to decimal however:
  19. Limit

    Yes, my post was really answering the first question.  A simple way to do what @PEERPSI wanted to do.  The condition flags (when monitored in CX-Programmer) will show the state they were in according to the last instruction that used them in the ladder.  They can mislead the programmer if you do not understand what is going on.  It is important to look at the coil after the flag to see if the flag was on when the rung in question was executed.  For instance, it is possible that the contact for one of these flags looks off, but the following coil is on.  This is due to the fact that when that rung executed the condition flag was indeed on, but another instruction used the flags as well and turned the condition flag off later in the the code.
  20. Limit

    You can take the = out of the instruction names if you don't want to include the limit itself.
  21. cp1l-el20 connecting to ewon through FINS

    The EWON just acts as a secure bridge between the PLC and your PC.  If you can communicate directly with the PLC you should be able to communicate through the EWON using the same method (assuming everything is configured correctly).  FINS will pass through the EWON just fine.  
  22. Modbus questions from PM

    I have 2 control systems. I want to connect to DCS with Modbus TCP ( as Slave ) first system is CP1H, with MODTC61 i can connect to DCS? second system is CS1D, which module can i use for modbus tcp slave? I have CS1D-ETN21D for connect to HMI, can i use this module for modbus tcp or I must use another module? which module is used for CS1D modbus TCP?
  23. SCL3(487)

    View -> Windows -> Watch
  24. D memory data not moving into instructions

    Besides putting the PLC in monitor mode, post your code and tell us where the date is entered and where it needs to be moved to, used, etc and perhaps we can figure it out.  
  25. Timer modification from HMI

    Yes, this can be a function.  The way you know function vs function block is if it is required to "remember" anything from the past.   Easy examples: Out = In +5   This would be a function as you will always get the same answer no matter what you put into it.   Out = increment of internal counter each time In turns on -  This would be a function block as it would need to "remember" the value of the internal counter and the answer is different each time it executes.