Browse FAQs

How do I power cycle a Modicon M221 PLC with an SD Card inserted without cloning the application to the SD Card or requiring the run of a Script.cmd?

Published date: 17 April 2019

Issue
When my Modicon M221 PLC has an SD Card inserted, after a power cycle the ERR LED is lit indicating that the PLC is cloning the application to the SD Card or attempting to run of a Script.cmd from the root of the SD Card. I wish to only use the SD Card for either Data Logging or backup and loading of saved %MW values when commanded in the program.
How do I ensure the PLC does not attempt a clone operation or running the Script.cmd upon startup after a power cycle?
 
Product Line
SoMachine Basic v1.6+, Modicon M221

Environment
Physical PLC
 
Cause
The default behaviours for a Modicon M221 PLC at power cycle startup are:
  1. If an inserted SD Card is does not contain at the root folder 'Script.cmd', the M221 will clone the application to the SD Card.
  2. If the inserted SD Card has 'Script.cmd', it will interrupt normal startup, execute the script.
In both cases, the PLC will not go back to RUN mode until after the SD Card is removed and another power cycle is applied.
 
Resolution
There is a Data Logging function (added in SoMachine Basic v1.6 and higher) which allows the SD Card to be kept in the slot of the M221 without starting the Clone process.
 
The requirement is that:
  1. The Modicon M221 is of Functional Level 6.0 or higher a.k.a. a Boot loader version of 50 or higher - this can be checked in the system word %SW13
  2. The Modicon M221 has an SV number (on the sticker with the serial number) of 1.6 or higher (devices manufactured after May 2017).
 
To set up the SD Card as a "Data Logging" storage device for the M221, follow these steps:
  1. Put your SD Card in your PC card reader
  2. Open Windows File Explorer
  3. Right-click on the drive letter associated with the SD Card in File Explorer
  4. Choose "Properties"
  5. In the General Tab's first field presented at the top, set name of the SD Card to "DATA"
  6. Click OK
  7. Delete 'Script.cmd' from the root directory of the SD Card
  8. Eject the SD Card
 
For more information on the Data Logging, please see the guide on the feature in the HTML Help of SoMachine Basic:
SoMachine Basic-> SoMachine Basic - Generic Functions Library Guide->Software Objects->Data Logging

Was this helpful?

What can we do to improve the information ?

Can't find what you are looking for?

Reach out to our customer care team to receive information on technical support, assistance for complaints and more.