Added S7 Protocol support

This commit is contained in:
Dave Nardella
2025-03-15 11:33:18 +01:00
committed by GitHub
parent 4e0d67323b
commit 8a9581590e
+15 -1
View File
@@ -37,6 +37,10 @@
#include "ethercat_src.h"
#endif
#ifdef _snap7
#include "oplc_snap7.h"
#endif
#define OPLC_CYCLE 50000000
extern int opterr;
@@ -103,6 +107,7 @@ int main(int argc,char **argv)
#endif
initializeHardware();
initializeMB();
updateBuffersIn();
updateBuffersOut();
@@ -114,7 +119,11 @@ int main(int argc,char **argv)
readPersistentStorage();
//pthread_t persistentThread;
//pthread_create(&persistentThread, NULL, persistentStorage, NULL);
#ifdef _snap7
initializeSnap7();
#endif
#ifdef __linux__
@@ -243,6 +252,11 @@ int main(int argc,char **argv)
#ifdef _ethercat_src
ethercat_terminate_src();
#endif
#ifdef _snap7
finalizeSnap7();
#endif
printf("Disabling outputs\n");
disableOutputs();
updateBuffersOut();