Dummy MPS(MEMO 4)

さて,MPS のPLC のRegister の解析です.

ざくっと言えば,llsf-refbox/src/libs/llsf_sps にて,

grep -E modbus_.*_registers *

で出できたmodbusのreadとwriteを見ていく感じです.

  • mps_band.cpp
  • 送信:reg[addr] = 2 で run the band
    受信:reg[addr] がcommand (=3)の時,reg[addr + 1]が状態(boolean)を表す.

  • mps.cpp
  • 送信:reg[0x0a] に type をセット.
    送信:reg[0x00] = 10 で resetMachine
    送信:reg[0x03] = 緑のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x04] = 黄のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x05] = 赤のシグナル(0:off, 1:on, 2:blinks)

  • mps_deliver.cpp
  • 送信:reg[0x00] = lane on which lane have to be deliver
    送信:reg[0x01] = ?
    送信:reg[0x02] = ?
    送信:reg[0x03] = 緑のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x04] = 黄のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x05] = 赤のシグナル(0:off, 1:on, 2:blinks)
    受信:reg[0x03] = state(1: AVAILABLE, 2: PROCESSING, 3: PROCESSED, それ以外: IDLE) (read_input_registers)
    受信:reg[0x05] = Delivery が成功したか否か(1: 成功,それ以外: 失敗) (read_input_registers)

  • mps_incoming_station.cpp
  • 送信:reg[0x00] = 1 で getCap
    送信:reg[0x01] = color; // color what kind of workpiece
    送信:reg[0x02] = side; // side on which side workpiece have to be delivere
    送信:reg[0x03] = 緑のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x04] = 黄のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x05] = 赤のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x09] = 1; // deliverProduct
    受信:reg[0x00] = capReady (13:true, それ以外: false) (read_input_registers)
    受信:reg[0x01] = isEmpty (0: false, それ以外: trueかなぁ.inputレジスターの値がそのまま戻り値) (read_input_registers)
    受信:reg[0x03] = state(2: PROCESSING, 3: PROCESSED, 4: DELIVER, 5: DELIVERED, 6: RETRIEVED, それ以外: IDLE) (read_input_registers)

  • mps_pick_place_1.cpp
  • 送信:reg[0x00] = updown; // updown set workpiece(1) or get workpiece(2) // ProduceEnd.
    送信:reg[0x01] = 1; // deliverProduct
    送信:reg[0x03] = 緑のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x04] = 黄のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x05] = 赤のシグナル(0:off, 1:on, 2:blinks)
    受信:reg[0x00] = isEmpty (13: true, それ以外: false) (read_input_registers)
    受信:reg[0x03] = isReady (1: true, それ以外: false) (read_input_registers)
    受信:reg[0x03] = state(1: AVAILABLE, 2: PROCESSING, 3: PROCESSED, 4: DELIVER, 5: DELIVERED, 6: RETRIEVED, それ以外: IDLE) (read_input_registers)

  • mps_pick_place_2.cpp
  • 送信:reg[0x00] = workpiece; // workpiece what kind of workpiece have to be produce // produceRing
    送信:reg[0x01] = 1; // deliverProduct
    送信:reg[0x02] = 1を送って,次に0を送る; // resetCounterSlide
    送信:reg[0x03] = 緑のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x04] = 黄のシグナル(0:off, 1:on, 2:blinks)
    送信:reg[0x05] = 赤のシグナル(0:off, 1:on, 2:blinks)
    受信:reg[0x00] = ringReady (13:true, それ以外: false) (read_input_registers)
    受信:reg[0x03] = isEmpty (1: false, それ以外: true) (read_input_registers)
    受信:reg[0x03-0x04] = state(1: AVAILABLE, 2: PROCESSING, 3: PROCESSED, 4: DELIVER, 5: DELIVERED, 6: RETRIEVED, それ以外: IDLE) (read_input_registers)

reg[0x00] – reg[0x02] = command ? // clearRegister で,取り敢えずこの3つを0にする.
at Delivery MPS
reg[0x00] = lane; // lane に配送
at incoming station
reg[0x00] = 1; // getCap
reg[0x01] = color; // color what kind of workpiece
reg[0x02] = side; // side on which side workpiece have to be delivere
reg[0x09] = deliverProduct; // (0: no, 1: yes)
at pick place 1
reg[0x00] = updown; // updown set workpiece(1) or get workpiece(2)
for all MPS
送信
reg[0x00] = 10; // resetMachine
reg[0x01] = ?; // reg[0x00]による.
reg[0x02] = ?; // reg[0x00]による.
reg[0x03] = 緑のシグナル; //(0:off, 1:on, 2:blinks)
reg[0x04] = 黄のシグナル; //(0:off, 1:on, 2:blinks)
reg[0x05] = 赤のシグナル; //(0:off, 1:on, 2:blinks)
reg[0x0a] = type; // MPS の種類(1: IncomingStation, 2: PickPlace1, 3: PickPlace2, 4: Deliver)
受信
reg[0x00] – reg[0x04]

band って何?addr が未代入のような?使っていないのかなぁ.

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*