Deploy programs to an MC252
Цей контент ще не доступний вашою мовою.
The workspace deploys the edge programs of an MC252 endpoint to the device. What a deploy does, and when it runs on its own, is in deploying.
A deploy that loads programs restarts every program on the device. Values in memory that is not persisted are lost.
Deploy program changes
Section titled “Deploy program changes”- Save the change to the device’s programs or to device-side logging: on the endpoint’s
Programs tab (see Write programs for an MC252), through the
assistant, the API, or
hmi push. - If Deploy on save is on (the default), the save starts the deploy.
- If Deploy on save is off, select Sync now on the Programs tab, or ask the assistant to sync the device’s programs.
- Check the deploy status. When it is In sync, the device runs the workspace’s programs.
To put back programs someone changed on the device, select Sync now. This works with Deploy on save on too.
Change the device’s program settings
Section titled “Change the device’s program settings”- On the Programs tab, select Settings.
- Turn Deploy on save on or off, turn Device-side logging on or off, and set Readings import period, minutes (1–1440).
- Select Save. Device-side logging applies after the device restarts; until then the tab says that logging settings wait for a restart.
The settings are described in edge settings.
Check the deploy status
Section titled “Check the deploy status”- Open the endpoint’s Programs tab. Programs on the device at its top shows the state and updates while a deploy runs. You can also ask the assistant for the device’s deploy status.
- Act on the state:
| State | Action |
|---|---|
| Changes waiting | With Deploy on save off, select Sync now; otherwise the deploy starts in a moment |
| Blocked by errors | Fix the errors in the programs and save; nothing is uploaded until then |
| Deploy failed | Fix the program and line that the compile error names, or the problem the tab shows, then save again or select Sync now |
| Device offline | Bring the device online; the deploy runs when it is back |
| Connected in another workspace | Resolve a deploy conflict |
| Changed on the device | Select Sync now to put back the workspace’s programs |
Every state is described in deploy status.
Resolve a deploy conflict
Section titled “Resolve a deploy conflict”A device connected in more than one workspace gets no deploys. Every tab of its status page shows a warning in each workspace that holds it.
- Open the device’s status page in the workspace that should manage it, and select Show connection in the warning.
- Disconnect the device from the other workspaces. See Disconnect an MC252 from other workspaces.
The next deploy runs as usual.
Remove programs from a device
Section titled “Remove programs from a device”Deleting the endpoint does not touch the device, and an endpoint that still has programs cannot be deleted. Remove the programs through a deploy first.
- On the Programs tab, select Delete program for each program and confirm. With Deploy on save off, select Sync now. The device reloads without them.
- Wait until the deploy status is Nothing deployed. Until then the programs may still be on the device: if the status is Device offline, Deploy failed, or Connected in another workspace, resolve that first.
- To remove the device from the workspace, delete the endpoint.
To stop one program but keep it in the workspace, disable it with the switch in the editor’s toolbar instead. The next deploy removes it from the device.