All Activity

This stream auto-updates   

  1. Past Hour
  2. The fear of FOR TO loops

    The biggest objection I have to loops in the PLC is that they're harder to diagnose later. I would say if you're using loops, be meticulous and over-zealous in your documentation. Explain every detail of what you're doing and why so a technician on 3rd shift won't have any issues figuring it out 5 years from now. Without having to call an engineer. From a programming standpoint, just be careful when designing your loops to properly limit check them so you don't run past the end of your array. Most production managers don't have much of a sense of humor when it comes to faulting processors. Writing the loop is often simpler to avoid typos and copy-paste errors than having a rung for each element. If you have 40 items, it may not be a huge deal to have a rung for each, but when your array is a couple hundred or a thousand items, you almost have to do a loop just to stay sane. As an end user (not an OEM) who has to support the code in the long term, I will sacrifice memory/performance every time for ease of troubleshooting except in a few limited scenarios where the loop is doing something that's not critical to the machine's operation and that's unlikely to require diagnostics later. Like looping through alarm messages to display on an HMI. War story: we had a contractor come in and create a very complex piece of code for us that has multiple nested loops that are almost impossible to untangle. It works great...until something goes wonky and we have to download an old copy of the program into the PLC to get it working again. Power-cycling the PLC doesn't fix it. There's some tag value somewhere that makes it not work. After several years of it happening every few months, we're no closer to identifying the pattern. I spent several days one time just going through the code and making a flowchart but wasn't able to reproduce the bug. Weirdly enough, we have the identical code running in 3 lines in 3 different processors. One of them (originally a ControlLogix -L55M12 at v16 and now an -L81E at v30) has never gone wonky, another one (ControlLogix -L71, v24) goes wonky every other month or so, and the third (CompactLogix -L33ER, v24) has only gone wonky twice in 1.5 years or so. I've run comparison after comparison between the systems and haven't been able to figure out why that would be. In my opinion, loops definitely have their place, but PLEASE document them so I don't get a phone call at 3AM.
  3. Today
  4. Hi everybody,For a while I’ve been wondering, in every plc forum where the use of loops come to discussion I find most people answering that it’s best to stay away from them and that there are better, easier and mostly less scan time demanding solutions out there. Why is that?In my experience they’re the next best thing.Why would referencing data from an array of 40 Dwords using a FOR X:= 0 TO 40 DO loop be any more scan time demanding then the PLC scanning through 40 rungs of statments?Just curious if I’m missing something here. Cheers
  5. Prv instruction in structured text

    Oh and btw, thanks Michael,  reading A 270 as a DINT made me recieve some numbers
  6. Prv instruction in structured text

    Maybe it’s a European thing  Like Michael said, in certain cases it’s very useful. In my current project for example, I work with large amounts ascii strings and data set in Lwords, which need to be shifted or moved and referenced in various ways Also I have remote in- and outputs from 40 individual stations for which I use arrays and lots of FOR TO loops and CASE statements  to make things easier to implement en modify.  In my opinion, once you get the hang of it the possibilities are endless and it’s much less time consuming to write, especially when using loops.
  7. Function Block

    I don't use Function Blocks much but some of Omron's examples use the TST(350) instruction. I'm not sure if there is an easier method.
  8. Prv instruction in structured text

    Structured text is incredibly valuable for specific situations such as calculations and loops, etc.  However I find it very tedious for boolean operations and greatly prefer ladder for that case.
  9. MSG alternative to acees BOOL type data?

    An array of BOOLs?
  10. Safety Inputs/Outputs

    Edit - managed to do it. Omron tutorial isn't relevant any more.
  11. You could also use a timer and increase the index every time it elapses, in this case you wouldn't use a for loop.
  12. Change CIP Service Code

    Hi all, This is my first post here, I read through the FAQ, searched the Allen-Bradley forum and this one for my question but couldn't quite find what i was looking for. My main questions is: Is it possible to programmatically change the service code of a MSG instruction?  It is possible to change the class,  instance and attributes but the application I'm currently writing would be a lot simpler if all I had to create is one instance of the MSG block (and its data) . The only thing stopping me is the service code.   Edit: I'm using a CompactLogix 5380-L306ER   Any input is greatly appreciated!
  13. Hi,   How do I address safety inputs and outputs from the safety PLC to my main PLC program? Usually I'd use a PILZ relay to drop out coil&main power to contactors and then control contactors from my PLC, however someone else has designed this machine so there is a safety PLC which I have to turn the contactors on through the safety PLC.   So the inputs from the safety PLC and outputs from the safety PLC need to be read + written to from my main ladder this possible?   Also - using a variable in my main PLC program in the safety program, is this possible?   I want to use my 'Safety OK' + a variable from my PLC to turn on a Relay (which is connected to a safe output)
  14. ASCII with BRX-DM1E-18ER3-D PLC

    Have you looked in the software help file?  There are examples in there along with complete descriptions of how each instruction works. Also there are videos on the Youtube channel:
  15. MSG alternative to acees BOOL type data?

    Ok, then mapping the tag works (same thing as bit packing, just one at a time). Message to an INT, then assign the bits from the INT to the BOOL
  16. Module configuration error - 1FE6

    Excellent. Good find and good to know    
  17. MSG alternative to acees BOOL type data?

    Michael, I said any tag created by the standard procedure, so it exists. But it is a base type BOOL tag, not an alias nor member of UDT.
  18. GE ENET station manager

    HiI am just starting out at a new job full of GE systems.I have a IC695ETM001 ethernet card which has a RS232 port for Station manager access.I can currently see some info (such as IP, firmware version etc.) from the card when I connect with Putty and cycle the power but I cannot send commands to the card. I've tried Putty, hyper-terminal and a standalone Station manager terminal from GE but nothing works.Anyone know whether I'm missing something?
  19. Sample blocks for S7 1200 plc's

    No it should not open only Tia v13.1 will open the all previous version of Tia portal . And Tia v14 opens the Tia v13.1   So thats the problem ............and its okay thanks for your support......... i started to develop my own block in tia v14...........
  20. Sample blocks for S7 1200 plc's

    You should be able to open your TIA Portal V12 project in V14.  Try going to Project -> Open to open your .ap12 project file, or if you have an archive, go to the Project -> Retrieve your .zap12 file.    
  21. Module configuration error - 1FE6

    Thank you for the response Gambit, problem is now resolved. My hardware setup was correct and matching, the error was found to be a check box within the System parameter - I/O assignment, there is a system config check box that was chosen to check rather than not to. Even Mitsubishi support couldn't find the issue with program or hardware.
  22. Function Block

    how to access the bits in word variable in function blocks
  23. Keyence IV500CA and ML1400

    Hello Friends I need to communicate through Ethernet a IV500CA and a Micrologix 1400. Have you done this? In the Keyence page there are examples but only for compact and contrologix.   Thanks in advance.   
  24. Sample blocks for S7 1200 plc's

    hi  i am having software already but my laptop is not compatible. So please share the backup for editable timer 
  25. E900 Operating System Required

    Thanks for your help. I contacted Beijer and they were able to supply the version 6.10 firmware in a BIN file. I was able to download this to the E900 via System Loader Software but only after I erased the memory on the E900 first. My project was then able to download and now I have a working spare for the company - happy days.
  26. MSG alternative to acees BOOL type data?

    Logix 5000 is a tagname based environment. If there aren't any Boolean tags there aren't any Booleans
  27. OMRON CJ2M-CPU13 - SCU32- Communication

    thanks a lot 
  28. Load more activity