Modicon PAC Forum
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-04-19 01:24 AM
Hi Experts,
I'm working on an M580 and I am trying to use the first cycle bits to reset a flag when the PLC powers up but it's not working.
I have inputs simulated on the PLC using the write_input_ebool FB to give my program inputs for testing before connecting up the equipment and I use a single bit to trigger the simulation blocks. I am trying to use %S13 or %S21 to call a subroutine at the start of MAST that resets the simulation bit when the PLC powers up but, the bit is remaining active and my simulation runs when I power up the PLC unless I set the bit to 0 on the animation table.
The simulation might be useful in the future so I do not want to delete it when testing is concluded. Any ideas on what is going wrong?
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: 2024-04-23 02:31 AM
This is what I have done, and it seems to be working now.
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: 2024-04-23 09:27 PM
Hi,
No harm of including the %S13 and %S21 but you only need the %S0 and %S1.
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: 2024-04-25 07:36 PM
Are you running this on a real PLC or in the simulator, as the simulator has some limitations, that may not replicate the actual PLC operation.
I also include the %SW10.1 which is a bit that turns on for one scan when the master task first runs. Also use this in the first section of logic in the master task as the PLC always starts in the master task before other tasks take effect.
If possible use the break point to check the status when debugging.
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.