CNCペンダント用基板の使い方【CNCペンダント】

CNCjsを使っているPC もしくは Duet基板にてCNCペンダント(いわゆる手パ)を使用できるようにする基板です.
ベースはDuetのCNCペンダントとなっており,基本的に配線の接続も同じです.今回は接続用の基板を設けることでCNCペンダントの配線のはんだ付けをしなくてもいいようにしています.(ただしProMicroの購入場所によってはピンヘッダのはんだ付けが必要です)

直接ProMicroにCNCペンダントの線をはんだ付けする場合は接続用基板は不要です。その場合はDuetのCNCペンダントの説明を確認して配線してください。

またここでの説明はWindows10向けです.

必要なもの

  • CNCPendantBoard基板
  • CNCペンダント
  • Pro Micro(5V版)
  • Micro USBケーブル(ProMicro用、充電用ではなく通信できるもの)
  • 3 or 4芯のケーブル(Duetに接続の場合)

CNCPendantBoardキット

ケース,ペンダントと基板、はんだ付け済みPro Microを含めてAvalontechより自作キット化することになりました.

動作時の動画


公開データ

公開しているデータです.改良案等はGithubのissueあるいは本掲示板でお伝えください.

Eagleデータ等

Duet用ソフトウェア

[ProMicro用ソフトウェア(Duet3D社開発)] GitHub - Duet3D/CNC-Pendant-Firmware

CNCjs用のソフトウェア

[ProMicro用プログラム] GitHub - nyarurato/CNC-Pendant-Firmware-for-CNCjs
[PC側のソフトウェア] GitHub - nyarurato/cncjs-real-pendant: Software to communicate cncjs with real pendant.


目次

  1. 準備
  2. 配線
  3. ファームウェアの書き込み
  4. CNCjsで使うための設定
  5. Duetで使うための設定
  6. 収納
  7. わかっていること
  8. 調整

License

私が製作した基板及びソフトウェアに関しては以下のライセンスとします.

ハードウェア:CC BY SA
クリエイティブ・コモンズ・ライセンス
この 作品 は クリエイティブ・コモンズ 表示 - 継承 4.0 国際 ライセンスの下に提供されています。

ソフトウェア:GPLあるいはMITライセンス

オープンソースとして公開している基板データ及びソフトウェアを用いて製作された製品により生じた損害等に関してデータ製作者は一切責任を負いません。

1. 準備

1.1 Pro Microの準備

ProMicroのUSBポートは簡単にもげるので接着剤等で補強することをおすすめします.

ProMicroをペンダント基板のピンソケットに差し込みます.


1.2 ペンダントの準備

下の画像のように銀色の撚り線みたいなものがでています.これはシールドです.GNDに接続しますが,他のところに接触してショートされると困るので熱収縮チューブやビニールテープ等を巻いておくといいと思います.


また、ケースに収める場合は先にペンダントのケーブルをケースの穴に通しておきます。(基板に配線するとケースにケーブルが通らなくなります)
ケースには大小2つのケーブルクランプがありますが、小さい方がペンダントのケーブル用、大きいほうがUSB用です。

1.3 ソフトウェアの準備

ソフトウェアの準備にファームウェア書き込み用としてArduino IDEを使います.

以下のリンクよりArduino IDEをダウンロードしインストールしてください.

インストール方法の参考:
https://www.kkaneko.jp/tools/win/arduinoide.html

2. 配線

ペンダント基板上の書いてある文字に従ってペンダントの線を差し込みます.

基板上の文字 線の色
r
g
b
br
G グレー
Y
O オレンジ
V
P ピンク
B
W

基板上ではg/BやY/Bなどの表記もありますが,これは緑/黒,黃/黒の2色の線を示しています.
今回使うペンダントでは赤/黒,紫,紫/黒,ピンク,ピンク/黒はペンダントの内部的にはどこにも繋がっていないので,繋げなくても良いです.(接続用基板のNCと書いてある部分はどこにもつながっていないので,そこに差し込んでおきます)
ただし,5軸,6軸用のペンダントの場合はピンク,ピンク/黒を繋がないと使えません.

またシールドはどこかのGNDに挿入してください.なお接続用基板のGNDと書いてある部分はすべて共通GNDです.



ちなみに多少線の色が異なりますがDuetのペンダント配線と同じです.

ProMicro Pendant   Wire colours
VCC      +5V       red
GND      0V,       black
         COM,      orange/black
         CN,       blue/black
         LED-      white/black

D2       A         green
D3       B         white
D4       X         yellow
D5       Y         yellow/black
D6       Z         brown
D7       4         brown/black
D8       5         powder (if present)
D9       6         powder/black (if present)
D10      LED+      green/black
A0       STOP      blue
A1       X1        grey
A2       X10       grey/black
A3       X100      orange

NC       /A,       violet
         /B        violet/black

(from: https://github.com/Duet3D/CNC-Pendant-Firmware)

3.ファームウェアの書き込み

3.1 USB接続の認識しているか確認

USBケーブルでPCに接続すると以下のようにArduino Leonardoとして認識されます。
環境によってはArduino Leonardoではなく、ただのシリアルポートとして認識されるかもしれませんが問題はありません。USBを挿したときにポートが増えるかどうか、どのポート番号かを確認してください。


Windows10ではドライバは自動でインストールされると思いますが,認識されない場合はsparkfunのチュートリアルを確認しドライバを入れてみてください.
https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide#installing-windows

ドライバを導入した場合は下記のようにSparkFun Pro Microとして認識されるようになります。

3.2 Pro Micro用ファームウェア書き込み

使う環境に合わせてプログラムをダウンロードしてください.
ファイルを解凍し,中にある.inoファイルをクリックしてプログラムを開きます.

プログラムを書き込むための設定をします.
Arduino IDEのメニューのファイル→環境設定
%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%202020-11-12%20172130
追加のボードマネージャのURL右のボタンを押します.
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
をコピペして入力します.

その後ボードマネージャーを開いて、SparkFun AVR Boardsをインストールします。

これにより下図のようにProMicroを選択できるようになります.
ファームウェア書き込み時は下記の設定となるようにしてください.
ボードはSparkFun Pro Micro,プロセッサはATmega32U4(5V,16MHz),シリアルポートは前もって確認していたポート名のもの(接続時にデバイスマネージャーを開くと確認できます)
特に5V,16MHzの選択部分は間違えて3.3V,8MHzを選択してプログラムを書き込んでしまうとブートローダーが破損しUSBで認識されなくなってしまうので注意してください。(ブートローダーを直すには別のArduinoなど書き込み装置が必要です)
自身でProMicroを用意する場合はProMicroの5V仕様か3.3V仕様かを確認しておいてください。


ここまでの設定が終わったら左上の横矢印ボタンを押します.
少し待つとプログラムがProMicroに書き込まれます.

書き込みに成功すると「ボードへの書き込みが完了しました」と表示されます.

書き込みに失敗すると下記のようになんらかのエラーが表示されます.

補足(CNCjs用ファームウェアの動作確認)

ファームウェア及び配線の動作確認(ここをクリック) 補足としてProMicroから正しいデータがでているかの確認方法です。 USBをPCにつないだ後、シリアル通信のできるソフト(TeraTermなど)を立ち上げます。

ss1

image
その後、ペンダントの側面スイッチ(インターロック解除スイッチ・安全スイッチ)を押しながらハンドルを回すと下記のように出力されます。

パラメータ 説明
“ax” 軸(“X”,“Y”,“Z”,“U”)
“rt” 倍率(1,10,100)
“mv” 移動量
“emg” 緊急停止スイッチの状態(0:なし、1:オン)

補足(Duet用ファームウェアの何クリックで移動するか設定変更)

ファームウェアの設定変更(ここをクリック) Duet用ファームウェアではデフォルトで4クリックで1移動となっています。(4カチで1移動) もしこれが多いと感じた場合は変更できます。

CNC-pendant.inoソースコード内の120行目

const int PulsesPerClick = 4;

の部分を変更します。
1クリック1移動がいい場合は以下のように変更します。

const int PulsesPerClick = 1;

変更が完了したらpromicroへファームウェアを書き込みます。

参考:

https://learn.sparkfun.com/tutorials/pro-micro–fio-v3-hookup-guide

https://www.shigezone.com/?product=arduino-pro-micro

http://okiraku-camera.tokyo/blog/?p=7988

4. CNCjsで使うための設定

Duetで使う場合は飛ばしてください
CNCjsで使う場合の構成としては以下のようになります.

4.1 Nodejsインストール

CNCjsとProMicroの橋渡しをするソフトウェアを動かすため,nodejsをインストールします.

v12系、v14系、v16系で動作確認できています。(12.22.7、14.18.0、16.13.0)
最新のものでは動かないかもしれないです。その場合は最新ではなく古いバージョンのnodejsの導入をお願いします。
nodejs v12
nodejs v14
nodejs v16

インストール方法参考:


4.2 CNCjs橋渡し用プログラムインストール

以下からプログラムをダウンロードします.

ダウンロードしたファイルを解凍し,フォルダを開きます.
開いたフォルダにてコマンドプロンプトを開きます.
図のようにファイルエクスプローラーのパス欄にcmdと入力するとコマンドプロンプトを開くことができて簡単です.

以下のコマンドを実行します.

npm install

npm installの際にERRが出る場合はwindows-build-toolsのインストールが必要かもしれません。
詳細はこちら

4.3 プログラムの起動

ある程度自動で起動する方法と手動で起動する方法の2種類あります。

4.3.1 プログラムをある程度自動で起動する場合

これはCNCjsとペンダントのソフトを一緒に起動する方法です。ポート番号の設定も自動でします。
CNCjsは前もって起動する必要はありません。

start_for_windows.batというファイルがあります。これをテキストエディタ等で一度開きます。

set cncjs_path=C:\Users\testuser\AppData\Local\Programs\cncjs-app\CNCjs.exeと書かれている部分を自分の環境に合わせて変更します。一度変更すればその後は変更の必要はありません。

CNCjsのショートカットがある場合はプロパティからexeファイルの場所を確認できます。

start_for_windows.batのCNCjsのパスの編集が完了後、保存して閉じます。
その後start_for_windows.batをクリックして起動します。
CNCjsのexeのパスが間違っていなければエラー表示がなく起動します。

しばらく待つとCNCjsが起動します。黒い画面に文字が流れることがありますが、CNCjsが起動していれば気にする必要はありません。
CNCjsの起動を確認後、適当なキーを押します。すると別のウィンドウが開かれCNCペンダント通信用のソフトが立ち上がります。


矢印キーを使って、制御基板のポート名、CNCペンダントのポート名を選択します。
Connectedの表示が出ていればOKです。

終了時は黒い画面を閉じても、CNCjsを閉じても大丈夫です。

4.3.2 プログラムをマニュアル起動する場合

CNCjsとProMicroを繋ぐ場合はコマンドプロンプトにて以下のコマンドを実行します.

node bin/cncjs-real-pendant --socket-port ◯◯◯

この◯◯◯の部分はCNCjsのポートですが,Windowsの場合はCNCjsを起動するたびにポートが変わります.(linux系ならデフォルトで8000番だと思います)

このポートはCNCjsのメニューのView→View in BrowserとしたときのブラウザのURL部に表示されるコロン以降の数字です.
127.0.0.1:◯◯◯◯


この場合だと64956です.

実行するとまず制御基板(CNCxPRO)のCOMポートが聞かれるので,矢印キーで選択

これはCNCjsで選択したポートです。

次にペンダントのCOMポートを聞かれるので矢印キーで選択

connected ws:~~~~~~~
connected COMxxx
のように表示されたらOK.

CNCjs・CNCにハンドルの動作が反映されるかを確認(ペンダントの側面スイッチ(インターロック解除スイッチ・安全スイッチ)を押しながら ハンドルを回す!)

4.4 ペンダントの1クリックでの移動量を変更したい場合

ペンダントの倍率1倍時の1クリック(ぐるぐる回すところの1カチ)での移動量を変更したい場合はbinフォルダのcncjs-real-pendantをテキストエディタで開きます。

var mv_unit_denominator = 1000;

という表記があるので、その数字部分を変更します。
1000の場合は1/1000mm移動(0.001mm)、100の場合は1/100mm移動(0.01mm)、10の場合は1/10mm移動(0.1mm)です。

あくまでこの移動量はペンダントの倍率がx1の時の移動量で、x10やx100では1クリックの移動量は10倍、100倍となります。

1/1000mm=0.001mm移動のときはgrblのログ上0.005mm単位でしか表示されません。なので5クリックするとCNCjs上の座標表示が更新されます。
実際に0.001mm移動しているかどうかは測定機材とCNCの性能の関係上計測できていませんが、10クリックした際に0.01mm動いているのは確認できています。

注意)1クリックの移動量を大きくするとx100にしたときに指令に対して移動が追いつかなくなります。その状態で勢いよくハンドルを動かすと制御基板側で指令の取りこぼしを起こしてしまい誤動作することがあります。

5.Duetで使うための設定

CNCjsで使う人は飛ばしてください

構成としては以下のようになります.

接続等に関してはほぼDuet3D社の説明と同じとなります.

ペンダント基板のTx,GND,VccをDuet3のIO_0に繋いでください.
PanelDueを使用している場合はRxも繋いでください.
ケーブルはだいたい1mほどが限界です。長くするとスムーズに動かなくなることがあります。

image

Duet3 IO_0 ピン 接続用基板 説明
5V VCC 基板・ペンダント用電源
io0.out RX Arduinoの受信側(PanelDueを接続しない場合接続不要)
GND GND
io0.in TX Arduino送信側

IO_0がリミットスイッチで使用している場合はリミットスイッチを別のIOピンへ移動してください.

DuetWebContolにて以下のコマンドを実行すると有効になります.使用して問題がなければconfig.gに下記コマンドを追記しておきます。

M575 P1 S1 B57600

デフォルトのDuet用ファームウェアでは4クリックで1移動となっています。もしこれが多い場合は
https://bbs.avalontech.jp/t/topic/718/5
こちらの下部にある補足を参考にしてファームウェアを修正してください

6.収納

動作確認ができたらケースに収めるか木の板に止めるかなどしてください.
基板のケーブル接続部・USB部に引っ張りの力がかからないように取り出したケーブルを固定したほうがいいと思います

USB側のケーブルクランプ(大きい方)はスカスカなのでゴムシートを巻いてケーブル径をかさ増ししています。

7.ペンダント自体の使い方

側面のスイッチを押し込みながらハンドルを回します。側面のスイッチが押し込まれていない間は動きません。また非常停止ボタンが押し込まれている場合も動かないので、非常停止ボタンをひねって解除してください。

いきなり大きくハンドルを回すのではなく、少しだけ動かし動く方向を確認してから回すようにしましょう。

CNCjsにおいて非常停止ボタンが押し込まれ、ボタンを解除した時に環境によってはアラームが発生してその後動作しないことがあります。CNCjs右上のアンロックやリセットボタンを押して解除してください。

8. わかっていること

  • 1クリックの移動量が大きいときにハンドル早く回すと、正常に移動しないことがあります(一度逆方向に動くことがある)
    • 機械の移動がハンドルの回転に追いつかないため、データを受け取り切れず発生しています
    • 移動量が大きい場合は勢いよくハンドルを回さないよう気をつけてください

AvalonTech株式会社スタッフです。
改良案のキット化に関するご紹介です。

現在、nyaru様発案のCNCペンダントを弊社オンラインストアにてキット化し販売しております。

ぜひ皆様の自作CNCにお役立てください。

弊社ではオープンソースプロジェクト発展のため技術者やユーザによる技術開発を支援しております。

初めまして。
npm install を実行する前までは終わているのですが、npm installで下記のようなエラーが出てしまいます。解決策等あれば教えていただきたいのですが・・・

F:\cncjs-real-pendant-master>npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient…
npm WARN old lockfile
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated core-js@2.6.11: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path F:\cncjs-real-pendant-master\node_modules@serialport\bindings
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.3.0
npm ERR! gyp info using node@17.1.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at “C:\Users\hfyjc\AppData\Local\Programs\Python\Python39\python.exe”
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS unknown version “undefined” found at “C:\Program Files\Microsoft Visual Studio\2022\Professional”
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the “Desktop development with C++” workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1062:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
npm ERR! gyp ERR! cwd F:\cncjs-real-pendant-master\node_modules@serialport\bindings
npm ERR! gyp ERR! node -v v17.1.0
npm ERR! gyp ERR! node-gyp -v v8.3.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hfyjc\AppData\Local\npm-cache_logs\2021-11-11T02_36_34_329Z-debug.log

こんにちは
CNCペンダントを使おうとしていただきありがとうございます。

ログではserialportのライブラリインストール時のビルドでVisual StudioのC++ビルドツールが見つからなかったようでエラーが発生しているようです。
もしVisualStudioを入れている場合は"C++によるデスクトップ開発"の機能を追加で導入しても良いかと思います。

もしくは下記で紹介されているように一度管理者権限でコマンドプロンプトを開きnpm経由でwindows-build-toolsのインストールを試してみてください。

windows-build-toolsのインストールがうまくいった後は、再度ダウンロードしたフォルダを開き、node_modulesフォルダとpackage-lock.jsonファイルを削除後、再度コマンドプロンプトでnpm installを試してみてください。

参考:

追記:
最新のnodejs v17.1.0で動作確認してみましたが、cncjsとペンダント用アプリ間の接続が確認できませんでした。
v12系やv14系、v16.13.0では動作確認できているのでそちらを使用することをおすすめします。

ありがとうございます。
無事インストールが完了し、ペンダントでの動作確認もできました。
倍率がx1で0.1mm、x10で1mmなのは少し使いにくかったのでプログラムを書き換えてx1を0.01mmで使用しております。
また、何かありましたら宜しくお願いします。

「いいね!」 1

nyaru様

ペンダントの初期不良なのか自分の各設定が悪いのかDuet3からCNC PRO V5へ変えてみて確認しております。しかしnpm installにてエラーが出てしまい以下のサイトから解決できれば良かったのですが解決できずまた進めなくなってしまいました。
[Windows10にてNode環境構築によくあるエラー - Qiita ]
toshi0さんの質問と被ってしまうかもしれませんが内容から察せられる事を教えて頂きたく思います。宜しくお願い致します。エラーは以下になります。

:\Users\9V6VZW2\Desktop\cncjs-real-pendant-master>npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\9V6VZW2\Desktop\cncjs-real-pendant-master/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open ‘C:\Users\9V6VZW2\Desktop\cncjs-real-pendant-master\package.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\9V6VZW2\AppData\Local\npm-cache_logs\2023-01-13T09_18_57_101Z-debug-0.log

C:\Users\9V6VZW2\Desktop\cncjs-real-pendant-master>

こんにちは。

エラーログは、package.jsonファイルが見つからないと言っています。

おそらくzipを解凍した際に、同名の2重のフォルダになっていてその上の階層のフォルダでコマンドを実行していることはないでしょうか。

npm installコマンドを実行するのは下記のように各種ファイルが並んでいるフォルダにて行います。

とはいえ、このへんは確かに間違えやすいかもしれないので、Windows用にクリックしたら動く一連の環境構築用のバッチファイルを用意しても良さそうですね。

お世話になります。
上記内容を理解し実行してみました。
今度はエラーメッセージが変わり以下の様になりました。
pythonに関してのエラーだと思いますのでtoshi0さんの解決方法を試してみます。
また進めない場合は度々で誠に申し訳ありませんがご教授お願い致します。

C:\Users\9V6VZW2\Desktop\C-Beam\cncjs-real-pendant-master>npm install
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient…
npm WARN old lockfile
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (ReDos Vulnerability Regression Visibility Notice · Issue #797 · debug-js/debug · GitHub)
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated core-js@2.6.11: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path C:\Users\9V6VZW2\Desktop\C-Beam\cncjs-real-pendant-master\node_modules@serialport\bindings
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@18.13.0 | win32 | x64
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python checking Python explicitly set from command line or npm configuration
npm ERR! gyp ERR! find Python - “–python=” or “npm config get python” is “python2.7”
npm ERR! gyp ERR! find Python - “python2.7” is not in PATH or produced an error
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if “python3” can be used
npm ERR! gyp ERR! find Python - “python3” is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if “python” can be used
npm ERR! gyp ERR! find Python - “python” is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python39\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python39\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python39\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python39-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python39-32\python.exe” could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python39-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files (x86)\Python39-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python38\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python38\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python38\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python38-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python38-32\python.exe” could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python38-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files (x86)\Python38-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python37\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python37\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python37\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python37-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python37-32\python.exe” could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python37-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files (x86)\Python37-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python36\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python36\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python36\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python36-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Users\9V6VZW2\AppData\Local\Programs\Python\Python36-32\python.exe” could not be runnpm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files\Python36-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
npm ERR! gyp ERR! find Python - “C:\Program Files (x86)\Python36-32\python.exe” could not be run
npm ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3
npm ERR! gyp ERR! find Python - “py.exe” is not in PATH or produced an error
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python=“C:\Path\To\python.exe”
npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python npm config set python “C:\Path\To\python.exe”
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python GitHub - nodejs/node-gyp: Node.js native addon build tool
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)
npm ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)
npm ERR! gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:228:18)
npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:294:16)
npm ERR! gyp ERR! stack at exithandler (node:child_process:427:5)
npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:439:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:476:16)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js” “rebuild”
npm ERR! gyp ERR! cwd C:\Users\9V6VZW2\Desktop\C-Beam\cncjs-real-pendant-master\node_modules@serialport\bindings
npm ERR! gyp ERR! node -v v18.13.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\9V6VZW2\AppData\Local\npm-cache_logs\2023-01-14T00_34_38_990Z-debug-0.log

C:\Users\9V6VZW2\Desktop\C-Beam\cncjs-real-pendant-master>

Pythonが見つからないよとエラーが出ているようです。
もしPythonが入っていないようであればPythonをインストールすると解決するかと思います。バージョンはどのバージョンでも良いと思います。
もしすでに入っているようでしたら環境変数にパスを通してやると改善するかと思います。

PC側のソフト内でシリアルポートの通信でserialport/bindingというパッケージが使われているのですが、これがインストール時にビルドするためにPythonを要求しているようです。