The Modicon M251 Logic Controller allows file transfers with an SD card.
To upload or download files to the controller with an SD card, use one of the following methods:
The clone function (use of an empty SD card)
A script stored in the SD card
When an SD card is inserted into the SD card slot of the controller, the firmware searches and executes the script contained in the SD card (/sys/cmd/Script.cmd).
For file transfer commands, the SD card.
editor lets you generate and copy the script and all necessary files into theThe SD card must have a label. To add a label, insert the SD card in your PC, right-click on the drive in Windows Explorer and choose
.WARNING | |
---|---|
If you remove power to the device, or there is a power outage or communication interruption during the transfer of the application, your device may become inoperative. If a communication interruption or a power outage occurs, reattempt the transfer. If there is a power outage or communication interruption during a firmware update, or if an invalid firmware is used, your device will become inoperative. In this case, use a valid firmware and reattempt the firmware update.
NOTICE | |
---|---|
The clone function allows you to upload the application from one controller and to download it only to a same controller reference.
This function clones every parameter of the controller (for example applications, firmware, data file, post configuration). Refer to Memory Mapping.
By default, clone is allowed without using the function block ExternalCmd
object on group. Refer to Default users and groups. As a result, cloning will be not allowed without using . For more details about this function block, refer to the Modicon M251 Logic Controller, System Functions and Variables, PLCSystem Library Guide. For more details about Access Rights, refer to the EcoStruxure Machine Expert Programming Guide.
If you wish to control access to the cloned application in the target controller, you must use the Web Server) of the source controller before doing the clone operation. For more details about Access Rights, refer to the EcoStruxure Machine Expert Programming Guide.
button (on the subpage of theThis procedure describes how to upload the application stored in the source controller to your SD card:
Step |
Action |
---|---|
1 |
Erase an SD card and set the card label as follows: CLONExxx
NOTE: The label must begin with ‘CLONE’ (not case sensitive), optionally followed by up to 6 unaccented alphanumeric characters (a...z, A...Z, 0...9).
|
2 |
Select if you want to clone the subpage of the web server. . Refer to the |
3 |
Remove power from the controller. |
4 |
Insert the prepared SD card in the controller. |
5 |
Restore power to the controller. Result: The clone procedure starts automatically. During the clone procedure, the and LEDs are ON and the LED flashes regularly.
NOTE: The clone procedure lasts 2 or 3 minutes.
Result: At the end of the clone procedure, the SD LED is ON and the controller starts in normal application mode. If an error was detected, the ERR LED is ON and the controller is in STOPPED state. |
6 |
Remove the SD card from the controller. |
This procedure describes how to download the application stored in the SD card to your target controller:
Step |
Action |
---|---|
1 |
Remove power from the controller. |
2 |
Insert the SD card into the controller. |
3 |
Restore power to the controller. Result: The download procedure starts and the SD LED is flashing during this procedure. |
4 |
Wait until the end of the download:
|
5 |
Remove the SD card to restart the controller. |
Click
in the main menu:
Element |
Description |
---|---|
|
Create a new script. |
|
Open a script. |
|
Insert a Macro. A macro is a sequence of unitary commands. A macro helps to perform many common operations such as upload application, download application, and so on. |
|
Generate the script and all necessary files on the SD card. |
|
Basic instructions. |
|
Source file path on the PC or the controller. |
|
Destination directory on the PC or the controller. |
|
Add a script command. |
|
Change the script commands order. |
|
Delete a script command. |
Commands descriptions:
Command |
Description |
Source |
Destination |
Syntax |
---|---|---|---|---|
|
Downloads a file from the SD card to the controller. |
Select the file to download. |
Select the controller destination directory. |
|
|
Sets the node name of the controller. |
New node name. |
Controller node name |
|
Resets the node name of the controller. |
Default node name. |
Controller node name |
|
|
|
Uploads files contained in a controller directory to the SD card. |
Select the directory. |
- |
|
|
Deletes files contained in a controller directory.
NOTE: Delete "*" does not delete system files.
|
Select the directory and enter a specific file name Important: by default, all directory files are selected. |
- |
|
Removes the UserRights from the controller. |
- |
- |
|
|
Deletes the files contained in the SD card or a folder of the SD card |
- |
- |
or
|
|
|
Restarts the controller (only available at the end of the script). |
- |
- |
|
This table describes the macros:
Macros |
Description |
Directory/Files |
---|---|---|
|
Download the application from the SD card to the controller. |
|
|
Upload the application from the controller to the SD card. |
|
|
Download the project archive from the SD card to the controller. |
|
|
Upload the project archive from the controller to the SD card. |
|
|
Download multiple files from the SD card to a controller directory. |
Defined by user |
|
Upload the log files from the controller to the SD card. |
|
(1) If OPC UA is configured. |
You can manually create a script to remove the user rights, along with the application, from the controller. This script must contain this command:
Format "/usr/"
Reboot
Step |
Action |
---|---|
1 |
Remove power from the controller. |
2 |
Insert the prepared SD card in the source controller. |
3 |
Restore power to the source controller. Result: The operation starts automatically. During the operation, the and LEDs are ON and the LED flashes regularly. |
4 |
Wait until the operation is completed.
Result:
|
5 |
Remove the SD card from the controller.
NOTE: The controller reboots with the default user rights.
|
WARNING | |
---|---|
Step |
Action |
---|---|
1 |
Create the script with the editor. |
2 |
Click SD card root directory. and select theResult: The script and files are transferred on the SD card. |
3 |
Insert the SD card into the controller. Result: The transfer procedure starts and the SD LED is flashing during this procedure. |
4 |
Wait until the end of the download:
|
5 |
Remove the SD card from the controller.
NOTE: Changes will be applied after next restart.
|
When the controller has executed the script, the result is logged on the SD card (file /sys/cmd/Cmd.log
).
WARNING | |
---|---|