I created a straightforward Function Block, and despite its simplicity, I'm encountering a persistent error. After numerous attempts to resolve the issue, the error continues to occur without providing any information about what might be wrong. As a result, I'm unable to download the program to the CJ2M CPU31 PLC or even run a simulation. I've heard that resolving this issue is typically easy, but as someone who is relatively new to this area, I'm unsure how to proceed. I've included an image of the Function Block and its corresponding programming; however, since there are no apparent error messages, I doubt that the programming itself is the source of the problem.
Here’s a suggestion for enhancing the quality, uniqueness, and SEO-friendliness of your text: "I recommend taking the following steps: First, eliminate the branches following the P_On contact. Next, ensure that the subsequent inputs are directed straight to the left-hand side. Since these inputs are linked to the left side, it's already understood that they should be activated. Just a suggestion for consideration. Best regards,"
Hello gclshortt, thank you for responding to my inquiry! I previously configured it the same way, yet the error continued to occur. It's essential to keep the P_On parameter in place to regulate the execution of the FB. I have tried removing it, but unfortunately, the error persists regardless. My colleague suggests that this issue might be a minor bug within the cx-programmer software, but he also isn't sure how to resolve it.
I'm having trouble understanding the error you're referring to. From the screenshots you've shared, it appears that there are no visible errors. Is it possible that the compiler output window wasn't displayed? I recommend removing the P_on and W0.05 from the EN and ENO fields, as well as deleting any empty rungs at the end of your code.
Is it just me, or is the function block labeled as Ricardo's Cousin? It’s been 15 years since I last used CX-Programmer, but could there be a 'verify function' button within CX-Programmer that might help it run? Your logic seems unclear, which may also be part of the problem. It doesn't quite add up: if P_On is set to false, the function won’t execute, meaning the input states won't be evaluated at all, so their condition wouldn't be a concern. I suspect the issue lies in the "complex" logic applied to your inputs. Although I'm not an expert in OMRON products, your input configuration appears unconventional, as I’m primarily familiar with Siemens and Rockwell systems. I recommend using P_On solely for enabling and wiring it in series with each input of the function instead of how you currently have it set up—try this approach and see if it resolves the issue. After a quick five-minute search on Google, I couldn’t find any instances of ladder instructions being used as inputs to a function; typically, inputs are treated as variables rather than the states of ladder logic. However, please keep in mind that I'm not an authority in this area.
User cardosocea commented: "Is it just me, or is the function block labeled 'Ricardo's Cousin'? Click to expand for details. I can't believe how old I'm feeling—how on earth can anyone even see that? I have a 30-inch monitor, and I'm struggling to make sense of what you’re all discussing. The text is just too small for me to read the numbers. I can barely discern parts of the logic. Looks like I might need to invest in some new glasses!"
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.