Activity for Snap7

  • mandadan mandadan posted a comment on discussion General Discussion

    Hi Henkauto Were you ever able to resolve this issue?

  • tompet50 tompet50 posted a comment on discussion General Discussion

    Hello, In the picture you can see a connection and signal exchange with a CPU 416F-3. I can also establish a connection with a CP443-1. Is it possible that signal exchange of inputs and outputs via a CP443-1 with the Sharp7 library does not work? If it should work, what should the programming for signal exchange via the CP443-1 look like? Have any of you ever programmed a connection via a CP443-1? I hope that one of you can help me. Thanks in advance.

  • Sandra Kawamoto Sandra Kawamoto posted a comment on discussion General Discussion

    Thanks for your answer, but that seems not to work, at least on windows.

  • Davide Nardella Davide Nardella posted a comment on discussion General Discussion

    You need to reconnect on TCP/Network error i.e. when (Error & 0x0000FFFF)!=0;

  • Sandra Kawamoto Sandra Kawamoto posted a comment on discussion General Discussion

    I understood that "Connected()" does not inform the real connection status. I need to get error from a Read/Write function. The question is, which error codes indicate that I should try to connect again? For example, doing some tests, I think theses error codes mean I should try to reconnect: 599677, 665414, 12582912. But, for example, error "Address out of range" is not a connection problem. Trying to reconnect would not help. So, which error codes means I should try to reconnect? Thanks.

  • Ato Ato posted a comment on discussion General Discussion

    for real value Pos=??, int Value = GetDIntAt(Buffer, Pos); Pos=? Thank You

  • Ato Ato posted a comment on discussion General Discussion

    Hello everyone, could someone please give me an example, in vbnet, of reading a real number as per the attached image? That is, read all three "variables" MD170, MD174 and MD178. Thank you

  • Ato Ato posted a comment on discussion What you would like to see in Snap7

    Hello everyone, I wanted to know, please, if there is a method to recover the IP address to which my PLC(s) is connected. Thank you all.

  • Michele Bridi Michele Bridi posted a comment on discussion Bugs reporting

    Good morning, I have installed the same version of a software I developed on the same PC (Intercomp Icomac 9000) with two different partitions, one running Windows IOT LTSC 2019 and the other running Windows IOT LTSC 2021. The application reads various data blocks from the PLC, and within one of these blocks, there is a watchdog that increments by 1 with each PLC cycle. With the 2019 version, I can read all data blocks without any problems (losing a maximum of 5 PLC cycles). However, with the 2021...

  • dlyc dlyc posted a comment on discussion Bugs reporting

    BigInt is 2300000

  • dlyc dlyc modified a comment on discussion Bugs reporting

    代码:`#include <iostream></iostream> include "snap7.h" include <vector></vector> using namespace std; TS7Client* MyClient; int a = 33; short b = 12; void SymplyGet() { MyClient = new TS7Client(); MyClient->SetConnectionType(3);//对应 s7-200smart cout << MyClient->ConnectTo("192.168.2.1", 0, 1) << endl; //PLC的IP地址,机架号,插槽号 //cout << MyClient->WriteArea(S7AreaMK, 0, 0, 4, S7WLByte, &a) << endl; cout << hex<<MyClient->ReadArea(S7AreaCT, 0, 8, 2, S7WLCounter, &b) << endl; } int main() { SymplyGet(); return...

  • dlyc dlyc posted a comment on discussion Bugs reporting

    代码:`#include <iostream></iostream> include "snap7.h" include <vector></vector> using namespace std; TS7Client* MyClient; int a = 33; short b = 12; void SymplyGet() { MyClient = new TS7Client(); MyClient->SetConnectionType(3);//对应 s7-200smart cout << MyClient->ConnectTo("192.168.2.1", 0, 1) << endl; //PLC的IP地址,机架号,插槽号 //cout << MyClient->WriteArea(S7AreaMK, 0, 0, 4, S7WLByte, &a) << endl; cout << hex<<MyClient->ReadArea(S7AreaCT, 0, 8, 2, S7WLCounter, &b) << endl; } int main() { SymplyGet(); return...

  • mira mkk mira mkk modified a comment on discussion General Discussion

    Hi, I am working on a STM32H743ZI nucleo Board and I want to establish communication with a siemens automate (PLC S7 1500). Is it possible to use snap7 library on this embedded system (Im using LWIP and FreeRTOS) ? I tried to make that happens so i add the client.c and snap7.h (founded in examples/plain-c )in my project and i have this issue : undefined reference to `Cli_Create'

  • mira mkk mira mkk posted a comment on discussion General Discussion

    Hi, I am working on a STM32H743ZI nucleo Board and I want to establish communication with a siemens automate (PLC S7 1500). Is it possible to use snap7 library on this embedded system (Im using LWIP and FreeRTOS) ? I tried to make that happens so i add the client.c and snap.7 (founded in examples/plain-c )in my project and i have this issue : undefined reference to `Cli_Create'

  • Matthieu Penant Matthieu Penant posted a comment on discussion Bugs reporting

    When including "s7_partner.h" or another header that includes it, on a platform that is c++17 or more, the line "using namespace std;" leads to errors as byte will become ambiguous in the code between std::byte and ::byte declared in "snap_platform.h". Removing the using fixes the issue.

  • Petr Petr modified a comment on discussion General Discussion

    Hi , i cant import snap7 to codeblocks. I know , here is enough topics about it , but it seems a bit confusing. From what subdirectory ,from downloaded file of Snap7 library , to import where and what? I made that like this = Search directories -> Compiler = ...\snap7-full-1.4.2\examples\cpp Search directories -> Linker = ...\snap7-full-1.4.2\release\Windows\Win64 Linker settings -> snap7 ( just written snap7 ) to the file project ..\bin\Debug i added snap7.dll from \snap7-full-1.4.2\release\Windows\Win64...

  • Petr Petr posted a comment on discussion General Discussion

    Hi , i cant import snap7 to codeblocks. I know , here is enough topics about it , but it seems a bit confusing. From what subdirectory ,from downloaded file of Snap7 library , to import where and what? I made that like this = Search directories -> Compiler = ...\snap7-full-1.4.2\examples\cpp Search directories -> Linker = ...\snap7-full-1.4.2\release\Windows\Win64 Linker settings -> snap7 ( just written snap7 ) to the file project ..\bin\Debug i added snap7.dll from \snap7-full-1.4.2\release\Windows\Win64...

  • Donato Giansanti Donato Giansanti modified a comment on discussion General Discussion

    HI! Can anyone help me please? I try with the Cli_DBWrite function to write data in DB1 (28 Byte) with Xojo. My problem is that when I insert, for example, the new frequency value, snap7 does not send the data to the DB and gives me error code 262144 which, reading on the internet, signals me BadDatasize passed to send/receive. Thanks

  • Donato Giansanti Donato Giansanti posted a comment on discussion General Discussion

    HI! Can anyone help me please? I try with the Cli_DBWrite function to write data in DB1 (28 Byte) with Xojo. My problem is that when I insert, for example, the new frequency value, snap7 does not send the data to the DB and gives me error code 262144 which, reading on the internet, signals me BadDatasize passed to send/receive. Thanks

  • Donato Giansanti Donato Giansanti posted a comment on discussion General Discussion

    Good morning everyone, I'm trying to connect the Xojo RAD to a S71200 PLC with profinet. I managed to load snap7.dll on Xojo but I have a doubt about the function declarations to establish the connection with the PLC. The strange thing for me is that when I start the runtime the application loads the library correctly, but when it tries to connect to the controller it exits the runtime without getting errors or warnings back. I attach the complete code used in Xojo.

  • Donato Giansanti Donato Giansanti posted a comment on discussion General Discussion

    Ciao Davide e Ciro, Per esigenze lavorative hanno chiesto anche a me di collegare il RAD Xojo ad un PLC S71200 con profinet. Sono riuscito a caricare snap7.dll su Xojo ma ho un dubbio sulle dichiarazioni delle funzioni per stabilire il collegamento con il PLC. Il fatto a me strano è che quando avvio il runtime l'applicazione carica correttamente la libreria, ma al tentativo di collegarsi al controllore esce dal runtime senza avere in ritorno errori o avvisi. Potrei nel caso farvi vedere il mio codice...

  • Kunal Mod Kunal Mod modified a comment on discussion General Discussion

  • Kunal Mod Kunal Mod posted a comment on discussion General Discussion

    How did you resolve the issue then? I am stuck at the same problem and would really appreciate a little help.

  • indohoki4d indohoki4d modified a comment on discussion General Discussion

    Selamat datang di artikel ini yang akan membahas tentang Slot Online Terbaik Indohoki4D. Mengetahui tentang situs ini akan memberikan Anda kesempatan untuk menikmati permainan menarik, bonus menggiurkan, dan peluang menang besar. Dalam artikel ini, Anda akan menemukan informasi yang perlu Anda ketahui tentang Slot Online Indohoki4D. Mungkin Anda bertanya-tanya, apa sebenarnya Slot Online Indohoki4D itu? Bagaimana cara memainkannya? Bagaimana cara mendapatkan bonus yang menggiurkan? Bagaimana cara...

  • indohoki4d indohoki4d posted a comment on discussion General Discussion

    Selamat datang di artikel ini yang akan membahas tentang Slot Online Terbaik Indohoki4D. Mengetahui tentang situs ini akan memberikan Anda kesempatan untuk menikmati permainan menarik, bonus menggiurkan, dan peluang menang besar. Dalam artikel ini, Anda akan menemukan informasi yang perlu Anda ketahui tentang Slot Online Indohoki4D. Mungkin Anda bertanya-tanya, apa sebenarnya Slot Online Indohoki4D itu? Bagaimana cara memainkannya? Bagaimana cara mendapatkan bonus yang menggiurkan? Bagaimana cara...

  • Jojakim Stahl Jojakim Stahl posted a comment on discussion Bugs reporting

    Hi, first of all, big thanks for creating this easy to use library! I stumpled over a behavior likely already reported in https://sourceforge.net/p/snap7/discussion/bugfix/thread/de352e4cc2/ or https://sourceforge.net/p/snap7/discussion/bugfix/thread/927e97c11c/ When S7ReadArea returns with a timeout error on waiting for the response from the PLC, it returns WSAETIMEDOUT in the lower word of the return code. In the meanwhile, the PLC sends its answer (or it arrives retarded). The next call to S7ReadArea...

  • Edoardo Gazzola Edoardo Gazzola posted a comment on discussion General Discussion

    Buongiorno, Stamattina ho riprovato e confermo che funziona. FALSE result = Client.WriteArea(S7Area.DB, 104, 0, 1, S7WordLength.Bit, new byte[1]{0}); TRUE result = Client.WriteArea(S7Area.DB, 104, 0, 1, S7WordLength.Bit, new byte[1]{1});

  • Edoardo Gazzola Edoardo Gazzola posted a comment on discussion General Discussion

    Buonasera, Riscontro un problema nell'impostare un singolo bit in un DB, il seguente codice restituisce un errore: client.WriteArea(S7Area.DB, 104, 0, 1, S7WordLength.Bit, bytes); l'obbiettivo è scrivere il primo bit del DB104. Errore Restituito - $exception {"Non-negative number required. (Parameter 'length')"} System.ArgumentOutOfRangeException

  • Thomas Perl Thomas Perl posted a comment on discussion General Discussion

    Could it be that the telegrams for stop/run etc have changed? If i try the RunStopDemo the current status of the plc is detected right, but snap7 or Settimo isn't able to put the cpu in run or stop state

  • Opher Gazith Opher Gazith modified a comment on discussion General Discussion

    Hello, I'm using snap7 for some time, and first time I have problem reading DB from A PLC. I have 2 CPU 1515R-2 PN (6ES7 515-2RM00-0AB0 V2.9) both are define with full access (no protection), I have checked the only allow secure PG/PC and HMI communication, and I have also PLC communication certificate to be the default (LEFTPLC?Communication-1). DB are unoptimized. create for CLI I get no error. when I try to read I get the error 'CLI : function refused by CPU (Unknown error)' I checked that no...

  • Opher Gazith Opher Gazith posted a comment on discussion General Discussion

    Hello, I'm using snap7 for some time, and first time I have problem reading DB from A PLC. I have 2 CPU 1515R-2 PN (6ES7 515-2RM00-0AB0 V2.9) both are define with full access (no protection), I have checked the only allow secure PG/PC and HMI communication, and I have also PLC communication certificate to be the default (LEFTPLC?Communication-1). DB are unoptimized. create for CLI I get no error. when I try to read I get the error 'CLI : function refused by CPU (Unknown error)' I checked that no...

  • Thomas Perl Thomas Perl posted a comment on discussion General Discussion

    Hi. I'm trying to connect my ESP32 with Ethernet to an Siemens PLC using Tasmota. But i'm unable to create a simple tcpClient connection. Is it mandatory to perform also the S7Protocol Connection to work with an Plc over Ethernet? Or can someone who maybe already did something like this guide me, how i can create a connection using tasmota as an tcpClient?

  • Şahin AKIN Şahin AKIN posted a comment on discussion Bugs reporting

    Hi , i am instersting problem showing sometimes. I am use the sharp7 with my projects. I guess find a bug. My code is while do inside to a lot of read write procedure . sometime. is network is too slow and ping to 10 second get to tcp error data showing snap7. next time connection coming and read the buffer diffrent before that. we exceptted to one retain value 215 but read to 0. how to the fix ?

  • compactview compactview created ticket #33

    GetCpuInfo fail with S7-300

  • yassine beraich yassine beraich posted a comment on discussion General Discussion

    hello @Jorge Rodriguez & @Jorge Rodriguez ! im an embeedded systemes student and i have a project to do whit this same library snap7 it consist on writhing a script on python to read data from the PLC S7-300 and and devoloping an interface so workers can easly access to the PLC data via a local server. so i would realy apreciate it if you can explain to me what this script can do and if dont mind giving me it equivalent on C, cause im working on a critical systeme and as you know python has a lot...

  • yassine beraich yassine beraich posted a comment on discussion General Discussion

    hello @Jorge Rodriguez & @Jorge Rodriguez ! im an embeedded systemes student and i have a project to do whit this same library snap7 it consist on writhing a script on python to read data from the PLC S7-300 and and devoloping an interface so workers can easly access to the PLC data via a local server. so i would realy apreciate it if you can explain to me what this script can do and if dont mind giving me it equivalent on C, cause im working on a critical systeme and as you know python has a lot...

  • Benito Ivan Lecce Benito Ivan Lecce posted a comment on discussion General Discussion

    Hi, i have a problem with building an application using snap7, in android studio when i run my app i have this OSError: dlopen failed: "/data/data/org.test.simulator420_2/files/app/_python_bundle/site-packages /snap7/lib/libsnap7.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183), and I can't set the correct architecture for snap 7. Thanks to whoever will answer me

  • Eric Ervin Eric Ervin posted a comment on discussion General Discussion

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;}...

  • Piotr Bzdręga Piotr Bzdręga modified a comment on discussion General Discussion

    Found solution: link

  • Piotr Bzdręga Piotr Bzdręga modified a comment on discussion General Discussion

    Found solution: link

  • Piotr Bzdręga Piotr Bzdręga posted a comment on discussion General Discussion

    Found solution: https://stackoverflow.com/questions/75910206/lnk2001-snap7-library-vs2022#:~:text=I%20follow%20this,10.0.20348.0%5Cum%5Cx64

  • Piotr Bzdręga Piotr Bzdręga posted a comment on discussion General Discussion

    I'm trying to use Snap7 (1.4.2) library in VS 2022 (C++), but getting LNK2001 error.: Severity Code Description Project File Line Suppression State Error LNK2001 unresolved external symbol __imp_bind Project2 C:\Users\piotr\source\repos\Project2\snap7.lib(snap_msgsock.obj) 1 Error LNK2001 unresolved external symbol __imp_inet_ntoa Project2 C:\Users\piotr\source\repos\Project2\snap7.lib(s7_partner.obj) 1 Error LNK2001 unresolved external symbol __imp_inet_addr Project2 C:\Users\piotr\source\repos\Project2\snap7.lib(s7_partner.obj)...

  • Jorge Vieira Jorge Vieira posted a comment on discussion General Discussion

    I use this code, to read a analog input, but i not have result, is give me erro in the funcion plc.ReadArea. **error message** Uncaught TypeError TypeError: Wrong arguments at <anonymous> (c:\Users\jorge.vieira\Desktop\ESTUDO - LOGO\LOGO-TESTE\javascript\main.js:19:7) at callbackTrampoline (internal/async_hooks:130:17) --- nan:AsyncWorker --- at init (internal/inspector_async_hook:25:19) at emitInitNative (internal/async_hooks:202:43) at <anonymous> (c:\Users\jorge.vieira\Desktop\ESTUDO - LOGO\LOGO-TESTE\javascript\main.js:8:5)...

  • mmn mmn posted a comment on discussion General Discussion

    Hi, we're using the Sharp7 File directly in a Visual Studio Solution, written in C#.

  • Michele Danna Michele Danna posted a comment on discussion General Discussion

    Language of programming? Who IDE ?

  • mmn mmn posted a comment on discussion General Discussion

    Hey, we've been trying to use a CP 1243-1 Module to connect an 1200 PLC to a program of ours. We were not able to communicate with the PLC, the Error we received was TCPDataReceive 0x05. We were able to ping the PLC. For Slot/Rack settings we tried 0/0, 0/1, 1/0 and 1/1, as well as Rack 0, Slot 101, as it is defaulted in this position in the Device view - Although looking into the documentation and code, values over 31 cannot be used (but we gave it a shot anyway). Can anyone confirm if Sharp7 can...

  • Andrej Vuk Andrej Vuk posted a comment on discussion General Discussion

    Hi everyone, im trying to connect 1500 and android app with moka7 library. Can someone here help me to establish connection? Im not sure what im doing wrong... On PLC side is all set and already tested with SNAP tester. But in java app i cant create connection: Thank you Java code: public classPLCReadextendsAsyncTask<String,Void,String> { Stringdata1="null"; Stringdata2="null"; @Override protectedStringdoInBackground(String... params) { try { client.SetConnectionType(S7.S7_BASIC); int check =client.ConnectTo("192.168.1.55",0,0);...

  • ame ame modified a comment on discussion General Discussion

    Nothing

  • ame ame modified a comment on discussion General Discussion

    I am facing this issue in my code while trying to access my s7 1500 and read a datablock. Traceback (most recent call last): File "c:\Users\xx\Documents\code\Python\PLC_com\plc\plc_read.py", line 20, in <module> db = plc.db_read(DB_NUMBER, START_ADDRESS, SIZE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xx\AppData\Roaming\Python\Python311\site-packages\snap7\client.py", line 226, in db_read check_error(result, context="client") File "C:\Users\xx\AppData\Roaming\Python\Python311\site-packages\snap7\common.py",...

  • ame ame posted a comment on discussion General Discussion

    I am facing this issue in my code while trying to access my s7 1500 and read a datablock. Traceback (most recent call last): File "c:\Users\xx\Documents\code\Python\PLC_com\plc\plc_read.py", line 20, in <module> db = plc.db_read(DB_NUMBER, START_ADDRESS, SIZE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xx\AppData\Roaming\Python\Python311\site-packages\snap7\client.py", line 226, in db_read check_error(result, context="client") File "C:\Users\xx\AppData\Roaming\Python\Python311\site-packages\snap7\common.py",...

  • bejaoui bejaoui created ticket #32

    Invalid PDU received issue while reading from s7 plc

  • Matthew Gallo Matthew Gallo modified a comment on discussion General Discussion

  • Matthew Gallo Matthew Gallo posted a comment on discussion General Discussion

    Hmmm, I am using s7-1200 cpu, could there be an incompatibility with the mb_read function? Is there any other functions I can do to get the buffer...

  • Matthew Gallo Matthew Gallo posted a comment on discussion General Discussion

    Hmmm, I am using s7-1200 cpu, could there be an incompatibility with the mb_read function? Is there any other functions I can do to get the buffer...

  • f. b. f. b. posted a comment on discussion General Discussion

    Hi Matthew, this looks like a python-snap7 (the python wrapper) problem. Snap7 is the core of it, but may not be the cause of your error.

  • Matthew Gallo Matthew Gallo posted a comment on discussion General Discussion

    I am communicating data between PLCs using python snap7. I am trying to read a boolean with an address of M110.7. M meaning internal memory byte=110 bit=7. I am using the mb_read function to get the byte array of internal memory. So, I am passing start = 110, and size = S7WLBit (0x01). Which indicates the data type (boolean). This returns a byte array = b'\x00'. After this, I use the get_bool function to retrieve the value. Where I am passing the byte array I achieved. The byte index (110) and the...

  • Ben Ben modified a comment on discussion General Discussion

    Hi Gents, it would be appreciated to guide me into the solution in python to overcome the issue with 'tcp timeout' while reading DB,therefore stopping the code and you have to relaunch again. I know you answered this question in C but if you guys have a sample of recovery from this exception in python . PLease share

  • Ben Ben posted a comment on discussion General Discussion

    Hi Gents, it would be appreciated to guide me into the solution in python to overcome the issue with 'TCp timeout' while reading DB

  • Johannes Alef Johannes Alef posted a comment on discussion Bugs reporting

    I have a C# program that calls Snap7 via DLLImport to Upload entire blocks from a Type 300 PLC. Some of the DBs are rather large. One of them for example has a loadsize of 91666 bytes. The data is only 26164 bytes but with header and data for a user defined datatype that is used the block gets this large. When I try to upload this block, my program just crashes and in the windows event log I find an error that usually indicates heap corruption (exceptioncode 0xc0000374). Exception Handling in C#...

  • f. b. f. b. posted a comment on discussion General Discussion

    Hi Chetan, first things first: snap7(then you are here right) != python-snap7(you would be on their github right). Anyway. Afaik snap7 and python-snap7 can't flash firmware to a PLC. but there are possibilities for block functions (upload/download a DB, OB ...) but just for S300 and S400 (see the docs). http://snap7.sourceforge.net/snap7_client.html#target_compatibility You may need to dig either in the snap7 code or take a look in python-snap7 about e.g. "block_type" and similar. Not sure how much...

  • Chetan Chetan posted a comment on discussion General Discussion

    I wanted to update a PLC program I have existing PLC program with Function So I have added some networks to this existing PLC function(updated the function on another machine) , now I want to upload this new function to PLC. I want information if it is possible to do using Snap7. I am trying to use the python-snap7 wrapper to achieve this.

  • f. b. f. b. posted a comment on discussion General Discussion

    You are here in snap7, not python-snap7: https://github.com/gijzelaerr/python-snap7/issues If you got further issues/questions you may ask there. Anyway: Have you checked and done what is written in the general Notes for S7 1200/1500? http://snap7.sourceforge.net/snap7_client.html#1200_1500

  • Davide Nardella Davide Nardella posted a comment on discussion Bugs reporting

    just delete -mword-relocations from the makefile. It's no longer needed

  • Paulius Paulius modified a comment on discussion Bugs reporting

    Hello, I'm unable to compile snap7 on RPi 4 with the latest 64-bit Raspbian OS (made a fresh install today). I'm not sure if I'm even supposed to be able, as 64-bit RPi is not listed as supported in the compatability -> OS table, but "Raspberry Pi 4 ARM V7 x64 (02-11-2020)" is mentioned in the IOT downloads readme. Anyhow, it would be great if you supported latest 64-bit RPi 4, or if you gave me a hint on what I'm doing wrong. So far it went as follows: pi@raspberrypi:~/testbuild $ sudo apt install...

  • Paulius Paulius posted a comment on discussion Bugs reporting

    Hello, I'm unable to compile snap7 on RPi 4 with the latest 64-bit Raspbian OS (made a fresh install today). I'm not sure if I'm even supposed to be able, as 64-bit RPi is not listed as supported in the compatability -> OS table, but "Raspberry Pi 4 ARM V7 x64 (02-11-2020)" is mentioned in the IOT downloads readme. Anyhow, it would be great if you supported latest 64-bit RPi 4, or if you gave me a hint on what I'm doing wrong. So far it went as follows: pi@raspberrypi:~/testbuild $ sudo apt install...

  • Luciano Moretti Luciano Moretti posted a comment on discussion General Discussion

    Okay, I think I figured out the "W#16#" is 16 bit width data, the X is the first byte, which is the Module class, Y is the index for subset of the partial list to extract, and the last two bytes are the list number. So my example of 0xC0E1 is CP module, List 0xE1, No subset. I can't find 0xE1 in the list of SSL in the document though. I also found a reference that "The system status lists (SSL) used with S7-300/S7-400 in STEP 7 V5.x are not supported with the S7-1200/S7-1500 CPU modules. You need...

  • Luciano Moretti Luciano Moretti posted a comment on discussion General Discussion

    Hi All: I've been tasked with trying to get the MAC address info off of remote S7-1200. We're using Snap7 to query the data on an S7-400 using a read_szl(0xC0E1, 0x0000) which works but apparently doesn't for the S7-1200. I don't know where the SSL_ID came from or where to find IDs for other data. I found the "System Software for S7-300/400 System and Standard Functions" document and it talks about SSL IDs, but the table lists them as stuff like "W#16#xy11" and I'm not sure how that translates to...

  • mira mkk mira mkk posted a comment on discussion General Discussion

    and i got this error :

  • mira mkk mira mkk posted a comment on discussion General Discussion

    i try this code

  • mira mkk mira mkk posted a comment on discussion General Discussion

    i wanna make a communication betwen plc s7 1500 and my pc using snap7 .. i work on Pycharm with python 3.9

  • Niclas Dahlgren Niclas Dahlgren posted a comment on discussion What you would like to see in Snap7

    Hi Guys, I am a test engineer here, I also met this problem when I want to use snap7 with LabVIEW to run in LabVIEW RT which is linux os. I am not very familiar with make file... so I may not able to build this linux driver my self. Not sure if @Christian Lequeux @davenardella have succeed ? Or is there any official LabVIEW RT driver that I can use? Thank you very much!! Regards!

  • f. b. f. b. posted a comment on discussion General Discussion

    def ReadBool(db_number, start_offset, bit_offset): reading = plc.db_read(db_number, start_offset, 1) bool = snap7.util.get_bool(reading, 0, bit_offset) return bool This doesn't sound like C++ Code, more like python-snap7. Post your question on the Discussionboard on github : https://github.com/gijzelaerr/python-snap7/discussions/categories/q-a

  • pypy pypy pypy pypy posted a comment on discussion General Discussion

    Hey, i use Snap7 in one of my scripts and so far my tests were successful. I can build a connection from my python script running on Win10 PC to PLC S7 1200. After i built the connection i want my script to read a DB. For that i defined a function: def ReadBool(db_number, start_offset, bit_offset): reading = plc.db_read(db_number, start_offset, 1) bool = snap7.util.get_bool(reading, 0, bit_offset) return bool When i use that function (e.g. ReadBool(2, 0, 0)) i get following error: b'CPU : Address...

  • Dmitry Dmitry posted a comment on discussion General Discussion

    Thank you, guys.

  • Davide Nardella Davide Nardella posted a comment on discussion General Discussion

    f.b. is right. GetPlcDateTime() and other functions are not implemented in S7Protokol of S71200/1500.

  • Dmitry Dmitry posted a comment on discussion General Discussion

    Yes, config is correct: full access enable, PUT/GET enable, optimized block disabled =(

  • f. b. f. b. posted a comment on discussion General Discussion

    Hey Dmitry, the message tells you that a client cannot access either due to "protocol not enabled" or DB optimized. Are your configs correct? http://snap7.sourceforge.net/snap7_client.html#1200_1500 What I can't interpret if this is even supported on S1200... but I can't test it myself at the moment :( http://snap7.sourceforge.net/snap7_client.html#target_compatibility

  • Dmitry Dmitry posted a comment on discussion General Discussion

    Hello! Need some help, please... I try use function GetPlcDateTime(); It work good on S7-300, S7-400, Sinumerik 840D, but on S7-1200 I get an error: "CLI : invalid CPU answer". Maybe any peculiarities?

  • henkauto henkauto posted a comment on discussion General Discussion

    I didn't realize I declared the struct I was writing to as an INOUT variable in the application .. solved the problem..

  • henkauto henkauto modified a comment on discussion General Discussion

    Same thing here. Every so often a write command seems to not be processed by the PLC. Regardless of single write of multi var write. Only happens to S7-1500. Tried with S7-1200 and this PLC does not experience this problem. Also tried different firmware versions of S7-1500. Wireshark shows the write command, and it is also confirmed by the PLC with a success, however, the actual value in the PLC is not changed. Any solution to this? EDIT: Ok, solution found.. I used the data I was writing to as a...

  • Davide Nardella Davide Nardella posted a comment on discussion General Discussion

    that's not a funny thing :-( I discovered (I guess) a bug into the S71500 Firmware (only 1500, neither 1200 nor S73XX/4XX) The write command returns Error 0, I analyzed the telegram and it was ok, but the variable is not written. Only write operations are affected. I solved in this way: 1 - The DB must be unoptimized (and that was known). 2 - Il the variable that we write is passed directly or into a struct to a FB/FC, also that FB/FC must be unoptimized Seems that there is something wrong to the...

  • henkauto henkauto posted a comment on discussion General Discussion

    Same thing here. Every so often a write command seems to not be processed by the PLC. Regardless of single write of multi var write. Only happens to S7-1500. Tried with S7-1200 and this PLC does not experience this problem. Also tried different firmware versions of S7-1500. Wireshark shows the write command, and it is also confirmed by the PLC with a success, however, the actual value in the PLC is not changed. Any solution to this?

  • Julen Julen posted a comment on discussion General Discussion

    Could you tell me how you solved it? I have the same problem but with a S7-1200. Thank you.

  • Vojko Cendak Vojko Cendak posted a comment on discussion General Discussion

    Hi, is it possible to write generic S7_PLC <->[ Client <-> Server] gateway (multiplexed connections) on same PC <-> multiple S7 clients (S7 panels ...), without registering memory areas so that it would be generic. In nutshell in server events, we wouldn't read internal memory areas, but would read directly from plc with s7 client. thank you, Vojko Cendak

  • Marius-Florin Cristian Marius-Florin Cristian posted a comment on discussion Bugs reporting

    Thanks for the updates, I'm tuned and enthusiastic!

  • msgr msgr modified a comment on discussion General Discussion

    Here is my code: byte[] buffer3 = new byte[2]; int resultABRead = plc.ABRead(0, buffer3.Length, buffer3); //PLC output read if (resultABRead != 0) { Debug.Log("Error on ABRead() line 165"); } // Read Variables testbool1 = S7.GetBitAt(buffer3, 0, 0); testbool2 = S7.GetBitAt(buffer3, 0, 1); testbool3 = S7.GetBitAt(buffer3, 0, 2); testbool4 = S7.GetBitAt(buffer3, 0, 3); testbool5 = S7.GetBitAt(buffer3, 0, 4); testbool6 = S7.GetBitAt(buffer3, 0, 5); testbool7 = S7.GetBitAt(buffer3, 0, 6); Debug.Log("*******...

  • msgr msgr modified a comment on discussion General Discussion

    Here is my code: byte[] buffer3 = new byte[2]; int resultABRead = plc.ABRead(0, buffer3.Length, buffer3); //PLC output read if (resultABRead != 0) { Debug.Log("Error on ABRead() line 165"); } // Read Variables testbool1 = S7.GetBitAt(buffer3, 0, 0); testbool2 = S7.GetBitAt(buffer3, 0, 1); testbool3 = S7.GetBitAt(buffer3, 0, 2); testbool4 = S7.GetBitAt(buffer3, 0, 3); testbool5 = S7.GetBitAt(buffer3, 0, 4); testbool6 = S7.GetBitAt(buffer3, 0, 5); testbool7 = S7.GetBitAt(buffer3, 0, 6); Debug.Log("*******...

  • msgr msgr posted a comment on discussion General Discussion

    Here is my code: byte[] buffer3 = new byte[4]; int resultABRead = plc.ABRead(0, buffer3.Length, buffer3); //PLC output read if (resultABRead != 0) { Debug.Log("Error on ABRead() line 165"); } // Read Variables testbool1 = S7.GetBitAt(buffer3, 0, 0); testbool2 = S7.GetBitAt(buffer3, 0, 1); testbool3 = S7.GetBitAt(buffer3, 0, 2); testbool4 = S7.GetBitAt(buffer3, 0, 3); testbool5 = S7.GetBitAt(buffer3, 0, 4); testbool6 = S7.GetBitAt(buffer3, 0, 5); testbool7 = S7.GetBitAt(buffer3, 0, 6); testbool8 =...

  • msgr msgr posted a comment on discussion General Discussion

    Every time I call the ABRead() function I always get the result false, false, false...

  • Michael Krebietke Michael Krebietke posted a comment on discussion Bugs reporting

    Hi Stéphane, I also stumbled into that problem and finally applied your fix. Seems to work fine. Thanks a lot!

  • msgr msgr posted a comment on discussion General Discussion

    Hello, I would like someone to give me more details about the ABRead() and ABWrite() functions because the documents in the Sharp7 and Snap7 libraries don't have much detail about them. For example, in which part or region of the TIA PORTAL v16 program can I read and write the values of the variables? Do I need other functions to find out where they are being written and read? Where is the IPU area shown in TIA PORTAL? Thanks in advance.

  • Fredrik Gustavsson Fredrik Gustavsson posted a comment on discussion General Discussion

    Is there any simple way to read data from a S7-300 cpu using Excel and VBA? Long time ago I used Libnodave for this but for some reason I cant add that Libnodave.dll as a reference in Excel anymore.

  • tompet50 tompet50 posted a comment on discussion General Discussion

    Hello, With this method can i set the Bit DB100.dbx54.7 to false. It's working. private void SetBit() { int S7AreaDB = 0x84; int dbnumber = uivalues.DBNr; int ValueByte = uivalues.ValueByte; int ValueBit = uivalues.ValueBit; int dboffset = (ValueByte * 8) + ValueBit; int S7WLBit = 0x01; byte[] buffersize = new byte[1]; s7Client.WriteArea(S7AreaDB, dbnumber, dboffset, 1, S7WLBit, buffersize); } What do I have to change in the method so that the bit can set to true? My idea is to set a bit when there...

  • Davide Nardella Davide Nardella posted a comment on discussion Bugs reporting

    I'm working on a new Open Source communication suite ;-) (stay tuned.....) After, I will manage that.

  • f. b. f. b. posted a comment on discussion Bugs reporting

    Just made the test and compared the contribution with the tool you recommended: It seems that these issues haven't been reduced, but other vulnerabilities and issues have been fixed (which seems to be unseen by flawfinder). Many lines of the isses are a warning, about easily wrongly handling functions, which isn't always a vulnerability.

  • f. b. f. b. posted a comment on discussion Bugs reporting

    Hi Marius, at the moment, there is a code contribution in progress to tackle (hopefully) most of these issues. I informed Davide about it today and guess there will be an update in near future. :)

  • f. b. f. b. posted a comment on discussion General Discussion

    snap7 != python-snap7 snap7 is the C++ brain part, while python-snap7 is just a wrapper around it. Please post your question here in the github discussions

  • f. b. f. b. posted a comment on discussion General Discussion

    Like I said, snap7 can't do it. You need to take care of 2 datasets atm. A list-management function or similar in your higher applications to manage the Offsets and one dataset in your PLC. I wouldn't know another way for s7comm.

  • Pandit Pandit posted a comment on discussion General Discussion

    I want to read multiple variables at a time. I found this "client.read_multi_vars(data_items)" But this is for static only. I want to read around 200 vars at a time in dynamically. the offsets are stored in list format.

  • Pandit Pandit posted a comment on discussion General Discussion

    Thanks. The problem with using offset is, if any tag added in between then all other later addresses get affected. So every time it must to add a new tag at the end (after the last tag)

1 >