Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Ich möchte ein Projekt mithilfe einer Kommandozeile in die SPS laden (online Einloggen) und starten (online Start)
In der Hilfe habe ich die Befehlssätze dafür (/online und /run gefunden). Leider funktioniert es bisher nicht.
Ich schaffe es ein Projekt zu öffnen ( C:...pfad\projekt.pro)
wenn ich an den Pfad noch eine Kommando anhänge öffnet sich zwar das Projekt aber das Kommando wird nicht ausgeführt
(C:...pfad\projekt.pro /online)
Wenn ich nur Codesys öffne (C....pfad...\codesys.exe) erhalte ich den Fehler "Projekt/Bibliothek kann nicht geöffnet werden (keine gültige Projekt-/Bibliotheksdatei)
Ich freue mich über jede Unterstützung
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
cd D:\Programme\codesys2.3\CoDeSys" "V2.3\
D:
codesys.exe Systemtest_SR.pro /cmd command.cmd
Jetzt startet es das gewünschte Projekt, lädt es in die SPS und startet es.
command.cmd:
query off ok
online login
online run
Wenn allerdings auf der SPS ein anderes Projekt aufgespielt ist kommt die Meldung "Das Programm wurde geändert Soll das neue Programm geladen werden"
Nachdem ich "OK" bestätigt habe führt er den "online run" Befehl aber nicht mehr aus.
Ich dachte das "query off ok" Kommando bestätigt für mich automatisch das "OK"
Muss ich dieses Kommando irgendwie anders anwenden?
Robin
PS:
Wenn ich die Anführungszeichen ändere kommt bei mir immer noch die gleiche Fehlermeldung
"D:\Programme\codesys2.3\CoDeSys V2.3\codesys.exe" "Systemtest_SR.pro" /cmd command.cmd
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hallo
Ich möchte ein Projekt mithilfe einer Kommandozeile in die SPS laden (online Einloggen) und starten (online Start)
In der Hilfe habe ich die Befehlssätze dafür (/online und /run gefunden). Leider funktioniert es bisher nicht.
Ich schaffe es ein Projekt zu öffnen ( C:...pfad\projekt.pro)
wenn ich an den Pfad noch eine Kommando anhänge öffnet sich zwar das Projekt aber das Kommando wird nicht ausgeführt
(C:...pfad\projekt.pro /online)
Wenn ich nur Codesys öffne (C....pfad...\codesys.exe) erhalte ich den Fehler "Projekt/Bibliothek kann nicht geöffnet werden (keine gültige Projekt-/Bibliotheksdatei)
Ich freue mich über jede Unterstützung
Hi,
ich würde es mal so angehen:
ne Batch datei anlegen also Start.bat Beispielsweise:
"C:\Program Files\3S Software\CoDeSys V2.3\Codesys.exe" "projekt.pro" /cmd command.cmd
die Command.cmd müsste dann so aussehen:
query off ok
online login
online run
das müsste gehen...
cu
Edwin
Danke für die schnelle Antwort, aber ich bekomme es immer noch nicht hin.
Ich habe jetzt eine start.bat erstellt mit folgendem Inhalt:
D:\Programme\codesys2.3\CoDeSys" "V2.3\codesys.exe First Step.pro /cmd command.cmd
Die command.cmd hat folgenden Inhalt :
query off ok
online login
online run
Das Projekt "First Step.pro" und die command.cmd habe ich in den gleichen Ordner wie die codesys.exe
Es öffnet sich Codesys (ohne Projekt)aber mit dem Fehler Projekt-/Bibliothek kann nicht geladen werden. Keine gültige Projekts-/Bibliotheksdatei
denke da stimmt was mit den Anführungszeichen in Start.bat nicht
D:\Programme\codesys2.3\CoDeSys" "V2.3\codesys.exe First Step.pro /cmd command.cmd
oder ist das ein copy und paste fehler beim antworten?
Bei mir ist es so im start.bat
"C:\Program Files\3S Software\CoDeSys V2.3\Codesys.exe" "projekt.pro" /cmd command.cmd
cu
Edwin
Ich habe eine Lösung für mein Problem gefunden:
Meine Start.bat Datei sieht jetzt so aus:
cd D:\Programme\codesys2.3\CoDeSys" "V2.3\
D:
codesys.exe Systemtest_SR.pro /cmd command.cmd
Jetzt startet es das gewünschte Projekt, lädt es in die SPS und startet es.
command.cmd:
query off ok
online login
online run
Wenn allerdings auf der SPS ein anderes Projekt aufgespielt ist kommt die Meldung "Das Programm wurde geändert Soll das neue Programm geladen werden"
Nachdem ich "OK" bestätigt habe führt er den "online run" Befehl aber nicht mehr aus.
Ich dachte das "query off ok" Kommando bestätigt für mich automatisch das "OK"
Muss ich dieses Kommando irgendwie anders anwenden?
Robin
PS:
Wenn ich die Anführungszeichen ändere kommt bei mir immer noch die gleiche Fehlermeldung
"D:\Programme\codesys2.3\CoDeSys V2.3\codesys.exe" "Systemtest_SR.pro" /cmd command.cmd