Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ラズベリーパイで工場が見える話
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Saito5656
June 20, 2022
Programming
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ラズベリーパイで工場が見える話
Unagi.py 勉強会53枚目in スイーツバンクでLT予定の原稿を登録します。よろしくお願いいたします!
Saito5656
June 20, 2022
More Decks by Saito5656
See All by Saito5656
今年やったこと最近やったこと2025
saito5656
0
50
ついに(CDKで)Cognito実装した話
saito5656
0
150
今年やったこと最近やったこと2024
saito5656
0
230
今年やったこと最近やったこと
saito5656
1
230
【ポエム】PythonのWatchdogを調べてみた
saito5656
0
670
LoRaデバイスからAWS IoTに通信やってみた
saito5656
1
340
Local NW データを S3 に転送してみた
saito5656
0
98
シェル芸人見習い修行 〜 ラズパイ で 一発環境 構築してみた 〜
saito5656
1
220
工場でStep FunctionsでStep Functions
saito5656
0
220
Other Decks in Programming
See All in Programming
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
130
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
260
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
170
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
280
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
4.7k
Agentic UI
manfredsteyer
PRO
0
160
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
840
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
390
Everyday Curiosity
cassininazir
0
230
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The browser strikes back
jonoalderson
0
1.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
GitHub's CSS Performance
jonrohan
1033
470k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Designing for Performance
lara
611
70k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
320
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Transcript
ラズベリーパイで工場が見える話 @Saito5656 2022. 6. 25 Unagi.py 勉強会53枚目 in スイーツバンク
自己紹介(Py流は「お前誰よ」でmm) @Saito 5656 情報技術者ではない?が 静岡のITコミュニティに出没する 浜松在住の変なオヂサン にわかだけど製造業の情シス アイコンは同居する🐈
祝・春華堂スイーツバンクさんコラボ記念 『お菓子にまつわるPythonのはなし』
お菓子にまつわるPythonと言えば…コレ! と言うことで少し強引ですが ここからは製造業でのRaspberryPi活用事例をご紹介します
実は勤務先では国内で 30台以上稼働中
春華堂さん近所でも 約20台動いてます 現在の常駐先はnicoe店さんから直線距離700mだったりします 弊社 浜北工場
がしてるのは生産データの自動取得 稼働と停止の自動集計 各色単体の点灯点滅を積算 パターン別の積算時間に再計算
今日の話は全体Architectureのこの部分 IoT hing / gateway MQTTS Factory Machine Tools IoT
topic for Time line IoT topic for summary 今日の話 RPAで 電子日報に入力 sfnで自動集計 生産開始と終了の時刻 設備の稼働/不稼働/停止時間
中身はタワー信号と生産数をpubするloop 作る過程でmethodを整理分類した流れでClass分けもしました
Projectの構成 src ┣ main_Pr.py ┣ awsMQTTconnect.py ┣ data_process.py ┣ init_obj.py
┣ obj_container_Pr.py ┣ sensing.py ┗ /cert sensing、data_process、awsMQTTconnectを呼び出して タワーライト状態と製品通過を検知積算して、AWSにpublish MQTTクライアントを起動してobject作成し、各種triggerでpubするmethod タワーライトの連続点灯を判定して時間を積算、pub用のdatasetも作成 起動時とシフト切り替え時にオブジェクトを初期化するmethod mainで受け渡しする各種オブジェクトとclassオブジェクトを定義 タワーライト状態とワーク通過のロジック信号を設備から受け取る関数 AWS IoTとのmqtts接続に必要な証明書とroot証明書を格納するdirectory
main.py 状態取得->積算->dataset->pub->状態保存のloop
awsMQTTconnect.py AWS IoT mqtt brokerとmqtts確立してpublish
obj_container_Pr.py 環境変数読み込みとmqtt起動、定数定義
init_obj.py obj_containerとshift切替時の初期化
sensing.py タワー状態とワーク通過をロジック受信 CTセンサー利用を想定したmethodも準備
data_process.py タワーライトの連続点灯判定と積算 pub用のdatasetも作成
動作(AWS IoT MQTTクライアントでのsub)
最後に お菓子×Python= とからめて 製造業内作でのRaspberryPi活用事例をご紹介しました いずれIoTピザのような食品IoTも挑戦したく思います 定価のRaspberryPi安定供給が待ち遠しいですね(心の声
参考 本LTを捕捉する内容として以下もご参考ください https://speakerdeck.com/nsaito9628/gong-chang-destep- functionsdestep-functions https://speakerdeck.com/nsaito9628/pycharity202109- pythonwoiothuo-yong-suruxiao-netahua
ご清聴ありがとうございました