![](/img/trans.png)
[英]How to communicate Python with Siemens PLC using Python-snap7 and plcsim?
我使用 pycharm 編寫代碼,使用 plcsim 進行仿真。 當我運行我的代碼並運行 plcsim 時,我得到一個錯誤。 我使用了 Tia portal V16 和 s7-1200,我想在 S7-1200 和 python-snap7 之間進行通信這是錯誤: 這是我的代碼: 我看了這個視頻ht ...
[英]How to communicate Python with Siemens PLC using Python-snap7 and plcsim?
我使用 pycharm 編寫代碼,使用 plcsim 進行仿真。 當我運行我的代碼並運行 plcsim 時,我得到一個錯誤。 我使用了 Tia portal V16 和 s7-1200,我想在 S7-1200 和 python-snap7 之間進行通信這是錯誤: 這是我的代碼: 我看了這個視頻ht ...
[英]Snap7 module not found with python .exe
我正在使用 Pycharm 創建一個使用 snap7 庫的簡單程序。 讀取 S7-1200 PLC,當我使用 Pycharm 運行它時它工作正常,但是當我嘗試使用 an.exe 文件運行它時它提示此錯誤消息: 回溯(最近調用最后):文件“main.py”,第 1 行,在 ModuleNotFound ...
[英]Snap7 get_real command not working, how to fix?
此代碼應該以字節數組形式打印 DB,然后使用 PLC output 的浮點值打印數組。 但是,當我運行代碼時,我收到以下錯誤消息: ...
[英]Splitting a String from byte array
我對 python 和 PLC 完全陌生。 我從西門子 PLC 的特定標簽中收到一個字符串,格式如下(b'\\xfe\\x07Testing\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00')我只需要獲取字符串“Testing” ...
[英]Siemens LOGO! PLC data in the wrong order
所以我正在訪問一個西門子 LOGO。 PLC從中提取一些數據。 我設法和我的工作伙伴一起做到了這一點,但我們對如何保存數據感到困惑。 數據在帶有 output 和來自 PLC 的輸入字節的字典中加上時間戳。 但是數據以特定順序出現,並在提取數據的那一刻加上時間戳。 現在的問題是時間戳和數據的保存順 ...
[英]Converting From a list of bits to a byte array
我在這里真的很掙扎,作為一個新的編程,使用 snap7 庫連接到 siemens PLC,在樹莓派上使用 Python3。 基本上,我將數據作為字節數組讀取,然后對其進行修改並將其發送回 PLC。 我能夠讀入它並將其轉換為列表並修改數據。 所以我的數據是一個看起來像 [0,0,0,0,0,0,1,0 ...
[英]python snap7 on Anaconda for windows 10 - can't find snap7 library
我嘗試在 Anaconda 上使用 snap7(從 S7-1200 讀取)python 3.8 用於 Windows 10。我在此問題上遵循了許多建議。 但是,我無法解決這個問題。 Snap7Exception:找不到 snap7 庫。 如果已安裝,請嘗試運行 ldconfig 如果您對此問題有任 ...
[英]Variable Name read from DB instead address(offset)
有沒有辦法只在 C# 中從其變量(名稱)讀取數據庫數據? 考慮 SIMATIC S7 PLC 1200 例如,我想從我不知道地址(偏移量)的數據庫中讀取數據,我只知道數據庫編號、符號名稱和數據類型。 供參考,請參見下圖。 我已經通過 Sharp7(非優化數據庫方法)建立了工作連接,但我總是需要一 ...
[英]How can I write data to int value in plc with Python
我的代碼: output: BağlantıDurumu:是的數據 AA: HELLO WORD //字符串數據 BB: 55 //int 數據 CC:True //bool 進程以退出代碼 0 結束... //////////////////////////////////// 如何在此處更 ...
[英]communciation with Fluke endurance pyrometer (profinet/RS485) via python
我有一個 Fluke Endurance 高溫計(和一個非常脆弱的用戶指南),它通過以太網電纜具有 output,然后我通過 USB3.0 到千兆以太網適配器連接到我的計算機(Windows 控制面板告訴我它正在工作)。 根據指南,應該可以通過 RS485 和 profinet 進行通信。 但我不清 ...
[英]How to communicate Python with Siemens PLC using Python-snap7?
我正在嘗試與 CPU1212C PLC(使用 PLCSIM)通信 Python,但總是出現錯誤。 代碼: 這是Windows10的問題嗎? 我正在使用 Windows10 64 位、Python 2.7.17、Snap7 1.1.0、Python-Snap7 0.10。 我將 snap7.dll ...
[英]Job Pending Exception During Snap7-Python Data Read / Write to PLC
在使用 Python-Snap7 向 Siemens s7 1200 PLC 讀取和寫入數據時,出現如下異常: Exception in thread Thread-2: Traceback (most recent call last): File "C:\Users\MDoganli\App ...
[英]Can't use python-snap7 on Windows
我可以使用pycharm在Linux上運行Snap7,但不能在Windows上運行。 我得到: WindowsError:[錯誤193]%1不是有效的Win32應用程序。 我已經嘗試過使用snap7.dll的所有組合(在Win32和Win64檔案中進行組合)的Python 3 ...
[英]Read string from plc using moka7
如何從DB560從PLC讀取偏移量為0.0,大小為12個字節的字符串。 垃圾值來自輸出。 ...
[英]Try to read data from plc s7 1200 with snap 7 and get the wrong string
我嘗試從數據塊 (DB60) 讀取數據,但我只得到?5 。 所以在數據塊中應該是JAMES17 。 ...
[英]python snap7 windows - can't find snap7 library
我嘗試使用它的 python-snap7 0.4 包裝器安裝 snap7(從 S7-1200 讀取),但我總是使用以下簡單代碼獲得回溯。 追溯: 我安裝 snap7 和 python 包裝器的步驟是: 從sourceforge下載snap7並將snap7.dll和snap7.lib復制 ...
[英]can't find snap7 library - linux
我在Raspberry Pi版本B上運行Rapbian。 我按照此網頁上的說明下載了模塊python-snap7: Snap7安裝 我嘗試了兩次:一次使用pip,另一次手動進行。 但是,我先通過setup.py build然后setup.py install 。 如果我嘗試創 ...