Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS Step Functionsで日毎の生産情報を自動集計した話 (JAWS-UG-HAMAMATSU_20210430)

AWS Step Functionsで日毎の生産情報を自動集計した話 (JAWS-UG-HAMAMATSU_20210430)

2021.01より業務課題で取り組んだ生産設備の稼働データ(生産開始/終了時刻・設備稼働時間/停止時間)を自動抽出、自動集計する簡易システム構築で、自動集計部分をAWS Step Functionsで実装した詳細についてLTで発表します。

Saito5656

April 23, 2021
Tweet

More Decks by Saito5656

Other Decks in Programming

Transcript

  1. Architecture AWS Cloud User AWS IoT Core IoT hing /

    gateway IoT MQTT protocol Factory Machine Tools Amazon S3 Bucket for summary Amazon QuickSight Bucket for Time line Amazon Athena Lambda function to extract Event 0 23 * * * AWS Step Functions workflow Lambda function to summarize Bucket for summarized Bucket for queried IoT rule Bucket for archive IoT topic for Time line IoT topic for summary Life Cycle 2日 RPAで 電子日報に入力 Lambda function to archive TL Event 0 23 * * * AWS Step Functions workflow Lambda function to archive sum
  2. AWS Cloud User AWS IoT Core IoT hing / gateway

    IoT MQTT protocol Factory Machine Tools Amazon S3 Bucket for summary Amazon QuickSight Bucket for Time line Amazon Athena Lambda function to extract Event 0 23 * * * AWS Step Functions workflow Lambda function to summarize Bucket for summarized Bucket for queried IoT rule Bucket for archive IoT topic for Time line IoT topic for summary Life Cycle 2日 RPAで 電子日報に入力 Lambda function to archive TL Event 0 23 * * * AWS Step Functions workflow Lambda function to archive sum エッジ処理
  3. 点灯点滅の識別と積算 緑点灯 赤点灯 緑+黄点灯 緑+黄点滅 知りたいこと ・4パターンの積算時間 ・ワーク通過時刻 ・今の点灯点滅状態 ・点灯点滅の継続時間

    各色単体の点灯点滅を確認 パターンの検出 ・各パターンflag格納 ・即時表示用データ格納 ・積算データ格納 (パターン変化時) 変化したら publish ループ内の実行内容 ワーク通過の検出 ・タイムスタンプ取得 ・ワーク数のカウント
  4. データの構造 { "work_num": 0, "NS": 0, "G": 0, "R": 0,

    "GY": 35.916, "GFY": 0, "date": "2021-04-08", "Timestamp": 1617855300 } タイムラインで表示するための 点灯/点滅の継続時間、生産数 日付時刻 表示用 { "work_num": 0, "each_total_NS": 0, "each_total_G": 0, "each_total_R": 0, "each_total_GY": 0, "each_total_GFY": 0, "date": "2021-04-08", "Timestamp": 1617855300 } 製品カウント 積算値を計算するための 点灯/点滅時間の部分集計値 集計用 製品カウント 日付時刻
  5. AWS Cloud User AWS IoT Core IoT hing / gateway

    IoT MQTT protocol Factory Machine Tools Amazon S3 Bucket for summary Amazon QuickSight Bucket for Time line Amazon Athena Lambda function to extract Event 0 23 * * * AWS Step Functions workflow Lambda function to summarize Bucket for summarized Bucket for queried IoT rule Bucket for archive IoT topic for Time line IoT topic for summary Life Cycle 2日 RPAで 電子日報に入力 Lambda function to archive TL Event 0 23 * * * AWS Step Functions workflow Lambda function to archive sum Lambda/Step Functions
  6. QuickSight/RPA AWS Cloud User AWS IoT Core IoT hing /

    gateway IoT MQTT protocol Factory Machine Tools Amazon S3 Bucket for summary Amazon QuickSight Bucket for Time line Amazon Athena Lambda function to extract Event 0 23 * * * AWS Step Functions workflow Lambda function to summarize Bucket for summarized Bucket for queried IoT rule Bucket for archive IoT topic for Time line IoT topic for summary Life Cycle 2日 RPAで 電子日報に入力 Lambda function to archive TL Event 0 23 * * * AWS Step Functions workflow Lambda function to archive sum