MATLABによる三菱PLCのデータレジスタへの書き込み。
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Pythonにおいて、PLCをソケット通信で実施しており、MCプロトコルにて連続データをデータレジスタへ書き込んでおりました。
MATLABに置き換えるにあたって、TCP/IP通信=ソケット通信であることは理解したのですが、MCプロトコルでの通信が可能なのか。
また、データレジスタへの書き込みの参考資料があればご教授願います。
下記が、MCプロトコルになります。
#シーケンサに書き込むプログラム
data = [
0x50,0x00, # サブヘッダ
0x00, # 要求先ネットワーク番号
0xFF, # 要求先局番
0xFF,0x03, # 要求先ユニットI/O番号
0x00, #
0x00,0x00, # 要求データ長 (後で設定)
0x04,0x00, # 監視タイマ
0x01,0x14, # コマンド (1401H)
0x00,0x00, # サブコマンド
0x00,0x00,0x00, # 先頭デバイス番号
0xA8, # デバイスコード
0x05,0x00, # デバイス点数
0x06,0x00, # D0000
0x33,0x44, # D0001
0x55,0x66, # D0002
0x77,0x88, # D0003
0x99,0xAA, # D0004
]
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Instrument Control Toolbox Supported Hardware finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!