User Activity

  • Posted a comment on discussion General Discussion on Snap7

    If you are using python-snap7 you may ask them as well. But a connection time out seems to be ... like the error says ... a connection time out. Did you check the IP Address? Did you check rack and slot number? Perhaps you want to post your python code here in an issue.

  • Posted a comment on discussion General Discussion on Snap7

    I guess you want to use the python-snap7 library, which is wrapping around snap7. Just ask your question there in discussions. ;)

  • Posted a comment on discussion General Discussion on Snap7

    int S7API Cli_ReadArea(S7Object Client, int Area, int DBNumber, int Start, int Amount, int WordLen, void *pUsrData) { if (Client) return PSnap7Client(Client)->ReadArea(Area, DBNumber, Start, Amount, WordLen, pUsrData); else return errLibInvalidObject; } You need to choose the Area (see S7AreaWHATEVER), the DB number, where you want to start, how many bits and the address where to store them. There isn't a 1:1 usecase in examples, but take a closer look in the client.cpp example where MultipleVars...

  • Posted a comment on discussion General Discussion on Snap7

    On the sourceforge page, got to -> Files -> choose 1.4.2. That contains the snap7 project. Have a look, that you get the right dll files for your device!

  • Posted a comment on discussion General Discussion on Snap7

    1) It seems that snap7 wasn't tested with the new Raspberry Pi 4 (seems to be arm7 or arm8?). This may cause trouble (a question Davide may can answer?). 2) When compiling was sucessfull and libsnap7.so was created in <your folder="" target="">, you have to execute "ldconfig". Like the error says. 3) Then you should be able to use snap7 in Python context</your>

  • Modified a comment on discussion General Discussion on Snap7

    Another question: in s7_client.cpp: void TSnap7Client::CloseThread() { int Timeout; if (FThread) { FThread->Terminate(); if (Job.Pending) Timeout=3000; else Timeout=1000; EvtJob->Set(); if (FThread->WaitFor(Timeout)!=WAIT_OBJECT_0) FThread->Kill(); try { delete FThread; // <---- if you delete FThread } catch (...){ } FThread=0; // <----- is this even legit then? Isn't FThread is already deallocated? } }

  • Posted a comment on discussion General Discussion on Snap7

    Another question: in s7_client.cpp: void TSnap7Client::CloseThread() { int Timeout; if (FThread) { FThread->Terminate(); if (Job.Pending) Timeout=3000; else Timeout=1000; EvtJob->Set(); if (FThread->WaitFor(Timeout)!=WAIT_OBJECT_0) FThread->Kill(); try { delete FThread; <---- if you delete FThread } catch (...){ } FThread=0; <----- is this even legit then? Isn't FThread is already deallocated? } }

  • Posted a comment on discussion General Discussion on Snap7

    Hi Davide, yes I am handling with the Cli_AsXYZ functions from snap7libmain.cpp (I am using snap7 with the python-snap7 wrapper and try to understand & handle async requests from there. It seems only to use methods etc. from that file). The problems seems to happen, when I trigger the async request (e.g. Cli_AsReadArea) and using one of the waiting/checkin methods like Cli_WaitAsComplete. If everything works fine, it's fine. No problems. But if I got a Job pending or Job timeout error, I am not able...

View All

Personal Data

Username:
swamper123
Joined:
2020-06-15 09:46:15

Projects

  • No projects to display.

Personal Tools