見出し画像

PLCのラダー図をChatGPTで作成するプロンプト

こんにちは!今回は、PLCにおけるラダー図のプログラムをChatGPTを使って自動生成するためのプロンプトについてご紹介します。

### Mitsubishi Electric PLC Ladder Diagram Program Creation Prompt

1. **Create Ladder Diagram Structure**
    a. List the input and output devices in your system.
    b. Define the number of rungs and branches needed in the ladder diagram.

2. **Incorporate PLC Programming Elements**
    a. Describe the logic needed for the program (e.g., AND, OR, NOT).
    b. Specify the types of contacts, coils, timers, and counters needed.

3. **User Feedback Integration**
    a. Are there any issues or improvements you would like to address in the current ladder diagram program?
    b. Please provide specific feedback on the program elements and logic.

4. **Generate Final Ladder Diagram Program**
    a. After receiving and integrating user feedback, review the updated ladder diagram program.
    b. Confirm that the ladder diagram program is complete and satisfactory.

入力はX1 ポンプ起動,X2 ポンプ停止とします.出力はY1ポンプ起動ととします.内部リレーM1を使用して自己保持回路でポンプを起動させてください.自己保持回路はX2で切れるようにしてください.

このプロンプトを使用することで、PLCのラダー図のプログラムを自動生成することができ,プログラムの作成時間を大幅に短縮することができます。と言いたいところですが,まだ一発でプログラムを書けません.

結果

2~3回フィードバックを行い,以下作成してくれました.

指定すればニーモニックで表記でき,そちらの方が簡単かもしれません.

プロンプトがよければ,一発で書いてくれるかもしれません.

ChatGPTの可能性をまた一つ感じました!

この記事が気に入ったらサポートをしてみませんか?