發表文章

[第29期]結合LabVIEW的Python Node與Anaconda程式/Developing Program by Connecting LabVIEW Python Node and Anaconda

圖片
這段影片展示了如何連接 LabVIEW 的 Python Node 與 Anaconda 的虛擬環境,以開發程式。內容包括: 1. 安裝 Anaconda3(Python 3.11) 2. 建立虛擬環境(Python 3.10 用於 LabVIEW 2023Q1) 3. 將 Python Node 連接至虛擬環境 This video shows how to connect LabVIEW Python Node and Anaconda's virtual environment to develop program. The content includes: 1. Install Anaconda3 (Python 3.11) 2. Build Virtual Environment (Python 3.10 for LabVIEW 2023Q1) 3. Connect Python Node with Virtual Environment

[第28期] LabVIEW Queued Message Handler tutorial/LabVIEW佇列訊息處理器教學

圖片
This video shows how to use the design pattern of Queued Message Handler for programming in LabVIEW, including: 1. Use QMH Template when create project 2. Use Refnum (point) to read/write data transfer 3. Use dynamic event to send data 這個視頻說明如何在LabVIEW使用佇列訊息處理器的設計模式來撰寫程式,包含: 1. 建立專案時使用QMH模板 2. 使用參考(指標)讀寫數據 3. 使用動態事件傳遞數據

[第27期]使用ChatGPT實現建立C++的FreeRTOS task在Arduino中/Use ChatGPT to create C++ FreeRTOS task in Arduino

圖片
本影片分享如何使用ChatGPT實現建立C++類別的FreeRTOS task在Arduino中。 內容包含:  1. 在Arduino中使用C++來建立FreeRTOS Task  2. 以LED閃爍為範例 本影片分享如何使用ChatGPT實現建立C++類別的FreeRTOS task在Arduino中。  This video shows how use ChatGPT to create C++ class based FreeRTOS task in Arduino.  1. Create FreeRTOS Task with C++ in Arduino   2. Take LED flashing for example  freertos forum website address: https://www.freertos.org/FreeRTOS_Support_Forum_Archive/July_2010/freertos_Is_it_possible_create_freertos_task_in_c_3778071.html

[第26期]使用ChatGPT在Arduino實現觀察者模式的程式碼/Use ChatGPT to implement Observer Pattern code in Arduino

圖片
This video shows how to use ChatGPT to implement Observer Pattern code in Arduino. The content includes: 1. Install C++ STL for Arduino 2. Use ChatGPT to implement Observer Pattern C++code with Arduino 3. Verify the generated code in Arduino IDE 本視頻在說明如何使用ChatGPT在Arduino中實現觀察者模式的程式碼。 內容如下 1. 安裝Arduino的C++標準函式庫 2. 使用ChatGPT實現觀察者模式的Arduino C++程式碼 3. 使用Arduino IDE驗證程式碼是否可執行

[第25期] 使用ChatGPT實現C++實現觀察者模式的程式碼/Use ChatGPT to implement Observer Pattern C++ code

圖片
本視頻分享如何使用ChatGPT生成觀察者模式C++程式碼的過程。 內容有: 1. 使用ChatGPT實現觀察者模式的C++程式碼 2. 使用VS Code驗證程式碼是否可執行 This video share the process of implementing the observer pattern with ChatGPT. The content includes: 1. Use ChatGPT to implement Observer Pattern C++ code 2. Verify the generated code in VS code IDE 當使用觀察者模式時,主題物件(Subject)和觀察者物件(Observer)之間存在著一對多的關係。主題物件負責維護一個或多個觀察者物件,並在自身狀態改變時通知所有的觀察者進行更新。 #include <iostream> #include <vector> #include <algorithm> // 主題 (Subject) 類別 class Subject { public:   virtual void setState(int state) = 0;   virtual int getState() const = 0;   virtual void attach(Observer* observer) = 0;   virtual void detach(Observer* observer) = 0;   virtual void notify() = 0; }; // 具體主題 (Concrete Subject) 類別 class ConcreteSubject : public Subject { public:   void setState(int state) override {     this->state = state;     notify(); // 當狀態改變時,通知所有觀察者   }   int getState() const override {     return state;   }   void attach(Observer* observer) override {     observers.

[Note 6]使用NI VI Package Manager來安裝Modbus函式庫/Install NI Modbus library with VI ...

圖片
這應該是目前能下載的最新LabVIEW Modbus函式庫了。

[Note 5] 使用NI package manager安裝Vision Development Module(VDM) 2021/Install Vision Development Module with NI package manager

圖片
由於在更新LabVIEW 2021後,Vision Development Module (VDM)也要更新到2021年版,在NI的網站無法下載到軟體,因此我使用NI Package Manager來安裝VDM軟體。 安裝的過程如下:

[第24期] Calculate KD value of the stock by using yfinance and PyQt/使用yfinance與PyQt計算股票的KD值

圖片
This video shows how to use yfinance and PyQt to calculate  KD value of the stock . The content includes:  Input Taiwan stock ticker Calculate K and D valuse with yfinance  本視頻說明如何使用yfinance與PyQt計算股票的KD值。 內容包含:  輸入台灣股票代號 使用yfinance計算KD值 程式碼:  def calculate_kd(self):         stock_code = self.stock_code_lineEdit.text()         if not stock_code:             return         # 從Yahoo Finance獲取股票歷史價格資料         stock = yf.Ticker(stock_code + ".TW")         history = stock.history(period="max")         # 計算KD值         low_min = history["Low"].rolling(window=9).min()         high_max = history["High"].rolling(window=9).max()         rsv = (history["Close"] - low_min) / (high_max - low_min)         k = rsv.ewm(com=2).mean() * 100         d = k.ewm(com=2).mean()        # 顯示結果         kd_result = "最新K值:{:.2f},最新D值:{:.2f}".format(k[-1], d[-1])         self.result_label.setText(kd_result)   

[ChatGPT]Python的影像處理進行自動光學檢查(AOI)需要學習的內容

圖片
  這是ChatGPT建議用Python學習AOI的內容,有時間再來寫一些範例試試看。 以下是使用Python進行AOI影像處理需要學習的課程內容: Python基礎語法:需要熟悉Python基本語法和控制結構,包括變量、數組、函數、流程控制和錯誤處理等。 NumPy和Pandas:NumPy和Pandas是Python中非常常用的數據處理庫,尤其是在處理數組和表格數據方面。需要熟悉其基本用法和操作方式。 Matplotlib和Seaborn:Matplotlib和Seaborn是Python中常用的繪圖庫,可以用於數據可視化,例如畫出影像、直方圖、散點圖等。 OpenCV:OpenCV是一個開源的計算機視覺庫,提供了許多影像處理和分析的工具。需要熟悉OpenCV的基本操作方式,例如讀取、顯示、繪製、變換和過濾影像等。 影像分割:影像分割是AOI影像處理中的一個重要步驟,其目的是從影像中分離出感興趣的區域。可以學習使用OpenCV的分水嶺、閾值分割、區域生長等方法。 特徵提取:特徵提取是AOI影像處理中另一個重要步驟,其目的是提取影像中的關鍵信息,例如邊緣、角點、紋理等。可以學習使用OpenCV的SIFT、SURF、ORB等算法。 深度學習:深度學習是近年來非常熱門的人工智能技術,可以應用於AOI影像處理中。需要學習深度學習的基本原理和常用的深度學習框架,例如TensorFlow、PyTorch等。可以學習使用深度學習進行影像分類、目標檢測、物體追蹤等任務。 以上課程內容已經可以讓您掌握基本的影像處理技能,並開始應用於實際場景中。進一步學習影像增強、去噪、校正等進階技術,可以提高影像處理的準確性和效率,使您能夠更好地應對實際應用中的挑戰。此外,隨著深度學習等技術的發展,影像處理領域的發展也在不斷推進,建議您保持學習和更新知識。 Here are the course contents for learning AOI image processing with Python: Python Basics: Familiarity with Python basic syntax and control structures is required, including variables, arrays, functions, flow control, and e

[ChatGPT]使用Labview影像處理進行自動光學檢查(AOI)需要學習的內容

圖片
以下是ChatGPT的建議,我覺得都是LabVIEW Vision有提供的功能,後續有時間我將錄製一些影片來介紹。 如果您要學習使用LabVIEW進行影像的自動光學檢查(AOI),以下是您需要學習的一些主要課程內容: 影像處理基礎:學習影像處理的基本概念,如色彩空間、影像增強、濾波、二值化等等。 影像採集:了解如何使用LabVIEW擷取影像並且將其儲存至電腦。 [第4期]使用LabVIEW視覺模組擷取Webcam影像與存檔/Use LabVIEW Vsion Module to grab and save the image of the camera( https://labview-tech.blogspot.com/2021/04/labviewwebcamuse-labview-vsion-module.html ) 影像分析:學習如何使用LabVIEW進行影像分析,例如邊緣檢測、形態學處理、二值化、膨脹和侵蝕等。 物體偵測:學習如何使用LabVIEW檢測物體,以及檢測其位置、大小、形狀和顏色等。 模板匹配:學習如何使用模板匹配算法,將影像中的特定物體與預定義的模板進行比對。 AOI應用:學習如何將影像處理和物體偵測技術應用於AOI系統中,以檢測製造中的缺陷或錯誤。 實作專案:進行實作專案,以實際應用以上學習的技術,並進行AOI的應用,如自動化檢測印刷電路板。 綜上所述,這些是學習LabVIEW影像進行AOI需要掌握的基本課程內容。 If you want to learn how to use LabVIEW for automatic optical inspection (AOI) of images, here are some of the main course contents that you need to learn: Image processing basics: Learn the basic concepts of image processing, such as color space, image enhancement, filtering, thresholding, and more. Image acquisition: Understand how to use LabVIEW to capture images