from the M340 Modicon PLC department...
Regarding CAN error on M340 Modicon PLC
PLCs and related questions. topic
Posted by rohitd on 25 October, 2012 - 7:58 am
We are testing our code using the Modicon M340 PLC the canopen module is P342030. The CANopen module is continuously going in to error state and the PLC is not coming in to the operational state.

We are using shielded cable, where the shield is properly grounded . We are not working in conditions where there are any big noise generation sources. Even then the PLC canopen module is going in to the CAN Err i.e. the CAN Err led is continuosly 'ON' .

So we made a change in the PLC code to bring the PLC in to operational state. We check the CAN status bit CAN_STS, if it is 16#90 (90 hex) then we bring the CAN in to the operational state by writing 0x20 to %QW0.0.2.0 (as mentioned in the modicon M340 manual). Along with this i have incremented one DINT counter in the if(16#90) loop and observed the variable in the unityPro software animation window, now it is seen that the variable is incrementing to 1000 within 60 seconds, which means the error condition is occurring again and again, this was not the case earlier.

After this change we were able to test our hardware with modicon plc for 5-6 days, but suddenly since yesterday the modicon plc is continuously going in to CAN_ERR ,even if we bring the PLC in to operational mode as mentioned above the PLC enters CAN_ERR immediately after that.

The PLC is going in to CAN_ERR even if there is no CAN bus connected to its DB9 connector.
This was not observed earlier.And thus the PLC is not in to the operational state.(Please note that we are not working in any noise prone area, and the PLC was working earlier. Now the PLC is going in to Error and not transmitting any byte on the CAN bus)

Does any one have any clue what has gone wrong.
Can some one please guide me through this issue.

Thanks in advance

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2014 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

We may not return the affection of those who like us, but we always
respect their good judgement.
Advertise here
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive