Machine Automation Forum
A forum addressing machine automation solutions for the complete machine lifecycle. Including offers like Machine Advisor, Modicon PLC/PacDrive, Lexium or Preventa. Discuss and share knowledge on offers relating to cloud-based service platforms, machine localization and monitoring, industrial operations control, motion products as well as safety function!
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-28 06:58 PM
Hi,
I've observed that during Simulation the user defined default EEPROM values do not load before task execution. Instead, a zero value seems to be passed on first cycle execution. I observed this due to a divide-by-zero error in simulation.
PLC EXECUTION ERROR: Fault in task Background, exception 0xC0000094 at 0x7C4DAFA
I am not observing the same issue on physical hardware. Should simulation perform the same as the hardware? Or should I not assume EEPROM values will be read prior to execution? Nor use EEPROM limits to prevent division-by-zero?
Thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-28 11:45 PM
Hello,
I just verified it, it's a simulator bug, simulator starts before the end of the download all procedure so if you perform a division by a parameter it will cause a division by 0.
The only workaround is add a protection on your project in order to avoid division by 0.
It's just a simulator issue, download all on real target is performed with PLC stopped.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-28 10:03 PM
Hello,
Your problem will be that you have an error in assignment of Pointer. This happend if you missed to use an ADR function in front of a @Var Input of a FB/FC. This generate normally a error like you describe. Please check this. I would expect that the initialisation of EEPROMs are not the fault.
best regards
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-02-28 11:45 PM
Hello,
I just verified it, it's a simulator bug, simulator starts before the end of the download all procedure so if you perform a division by a parameter it will cause a division by 0.
The only workaround is add a protection on your project in order to avoid division by 0.
It's just a simulator issue, download all on real target is performed with PLC stopped.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-03-01 01:24 PM
Thank you @FedericoM, @Bastian_Schmitz.
I'll apply a work around.
Will this bug be resolved in a future version?
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.