Skip to content
Start free evaluation

pdcomm::putFormattedProgramStore

Function

Writes a program to the equipment's formatted program store.

inline void putFormattedProgramStore(GemEndpoint &endpoint, const SecsItem &id, const std::string &model, const std::string &softwareRevision, const std::vector<GemFormattedProgramStoreCommand> &commands, GemFormattedProgramStoreAction action)

Declared in: #include <pdcomm_gem_formatted_program_store.hpp>

The program is validated as a complete S7F26 answer before the store changes. Programs in the store answer S7F25 requests and can be selected for execution.

Parameters

NameDescription
endpointEquipment endpoint with formatted program requests configured.
idPPID: a non-empty ASCII or Binary item of at most 120 bytes.
modelMDLN, ASCII, at most 20 bytes.
softwareRevisionSOFTREV, ASCII, at most 20 bytes.
commandsProgram commands in order.
actionGemFormattedProgramStoreAction::CreateOnly, ReplaceOnly or Upsert.

Notes

  • Throws pdcomm::Error: PDCOMM_INVALID_ARGUMENT for GemFormattedProgramStoreAction::RespondOnly or invalid input; PDCOMM_INVALID_STATE on a host, without a store, or when CreateOnly finds the PPID or ReplaceOnly does not; PDCOMM_LIMIT_EXCEEDED when the store, command, parameter, or SECS-II item limits are exceeded.