Greetings, I am seeking assistance regarding the programming of a Frequency Generator on my M241 TM241CE24R hardware using SoMachine 4.3 software. After compiling, I encountered an error (C0138) stating that there is no matching FB_init method found for the instantiation of the FrequencyGenerator_M241. The same error occurred when attempting to program PWM. I am unsure of the problem and unable to locate or add the FB_init.tx method on the POU. Any insights on how to resolve this issue would be greatly appreciated.
Hello, have you found the answer yet? I am facing the same issue as well. Can you help me with it?
Is the FB_Init method included in your library? FB_Init is a crucial method that is automatically triggered during downloads and can vary based on its configuration.
I tried searching for the method in the library but couldn't find it. Is there a way for me to download it from another source?
It seems like you're having a problem with the instantiation of a function block. From error (C0138), it's clear that the software is unable to find a matching FB_init method for your FrequencyGenerator_M241. This might be due to incompatible or missing blocks. Check and ensure you've properly configured the blocks in the application tree, and also make sure that the used blocks are compatible with your project. Also, try checking your settings, maybe you unintentionally altered something. Another point worth considering is updating your SoMachine software if it's outdated because sometimes it might not support some of the new features.
Hi, it sounds like the error is arising due to a lack of initialization function for your FrequencyGenerator_M241. The FB_init function is usually automatically created when you instantiate a function block, but if it's missing, you might have to define it manually. Please verify your SoMachine installation, as some files could be corrupted, leading to such issues. Remember that each Function Block instance requires its own FB_Init method for initialization. As for programming PWM, ensure the appropriate library is added before instantiation. I'd also recommend checking the compatibility of all your hardware and software components as inconsistencies there can cause errors as well.
Hello! It sounds like you're dealing with quite a specific hardware and software combination. It's possible that you're encountering error C0138 because you might be using instantiation of the wrong function block or there's a mismatch between the object and the prototype. Try double-checking your references and take a look at your object and class definitions to make sure they match. If the issue persists, you might need to update or reinstall your SoMachine software as there could be some kind of bug. Good luck!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Error code C0138 indicates that there is no matching FB_init method found for the instantiation of the FrequencyGenerator_M241. This error can also occur when working with PWM programming.
Answer: To resolve this issue, you may need to ensure that the FB_init method is correctly defined and implemented in your program. Check the POU (Program Organization Unit) where the FrequencyGenerator_M241 is instantiated to confirm that the FB_init method is present and properly linked.
Answer: When troubleshooting frequency generator issues, it is important to review the error messages carefully and verify the instantiation and method calls within your program. Ensure that all necessary methods, such as FB_init, are correctly defined and accessible in the relevant POUs. Additionally, checking the compatibility of the Frequency Generator configuration with the M241 hardware and SoMachine 4.3 software versions is recommended.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.