已檢測組件 > 使用感應器 > 將感應器連線至 ThingWorx 伺服器
將感應器連線至 ThingWorx 伺服器
欲將模型連線至 ThingWorx 伺服器,ThingWorx 中必須擁有一個與 Creo Parametric 中的模型相對應的模型。
請遵循下列步驟:
1. ThingWorx 配置 Creo Parametric
2. 配置 ThingWorx
3. ThingWorx 發布感應器資訊
4. 連線ThingWorx 伺服器。
為 ThingWorx 配置 Creo
1. 將組態選項 thingworx_connector_config_file 設為 ThingWorx 組態內容檔案 (config.properties) 的精確路徑。
2. 請確保您在安裝 Creo Parametric 時已安裝 JRE 或已根據需要設定 jlink_java_command 組態選項。
ThingWorx 伺服器的設定
在開始之前,請注意以下事項:
ThingWorx 伺服器變更了其在 URL 中使用 AppKey 進行驗證的方式。https://community.thingworx.com/community/developers/blog/2017/06/08/new-technical-changes-in-thingworx-800.
依預設,從 8.0.0 新安裝 ThingWorx 時會禁用「允許應用程式金鑰作為 URL 參數」(Allow Application Key as URL Parameter) 選項。
「允許應用程式金鑰作為 URL 參數」(Allow Application Key as URL Parameter) 選項可在 ThingWorx 平台子系統的組態頁上啟用或禁用。若要存取組態頁,請按一下「系統」(System) > 「子系統」(Subsystem) > 「平台子系統」(Platform Subsystem) > 「組態」(Configuration)
配置 ThingWorx
Creo Product Insight 9.0.1.0 連缐至 ThingWorx 9.3.0。ThingWorxThingWorx Analytics 和 Creo Product Insight for ThingWorx Extension 需為相同版本。如需已匯入封裝之相容性一覽表,請參閱此處。下列程序假設您已安裝 ThingWorx
1. PTC 軟體下載頁中,下載 ThingWorx Analytics Extension。
3. PTC 軟體下載頁下載 Creo Product Insight for ThingWorx Extension
a. 按一下 Creo Parametric 發行版本旁邊的
b. 按一下 Creo Product Insight ThinkWorx Extension 旁邊的
c. 按一下 前往「最新的日期代碼」(Most Recent Datecode)。在「立即下載」(Download now) 旁邊,按一下 HTTPS。會將一個 zip 檔案下載至您的電腦。
4. 從下載的 zip 檔案中解壓縮檔案。Creo Product Insight for ThingWorx Extension 所有版本的 Zip 檔案與使用者指南都包括在此資料夾中。
5. ThingWorx Composer 中,按一下「匯入/匯出」(Import/Export),然後按一下「匯入」(Import)「匯入」(Import) 對話方塊開啟。
6. 「匯入選項」(Import Option) 清單中選取「延伸」(Extension)
7. 按一下「選擇檔案」(Choose File)「開啟」(Open) 對話方塊即會開啟。
8. 瀏覽至您所需 Creo Product Insight for ThingWorx Extension 版本的位置。選取 zip 檔案,然後按一下「開啟」(Open)
9. 按一下「匯入」(Import)。當「匯入延伸功能」(Import Extensions) 對話方塊中顯示的驗證結果與安裝結果帶有綠色核取標記時,表示安裝完成。
10. 按一下「關閉」(Close)
11. 出現提示時,請重新整理 Composer。在重新整理的 Composer 中,您現在應該會看到 PTC.Creo.HelperThing、PTC.Analysis.CreoConnector、TW.Creo.Thing.ReplayHelper、TW.Creo.Mashup.ReplayEventPickeer、PTC.Creo.ReplayManager 以及 PTC.Creo。
12. 欲核對擴充是否安裝,請按一下「匯入/匯出」(Import/Export) > 「管理」(Manage)。「已安裝的延伸功能封裝」頁即會開啟。尋找 CreoProductInsightThingworx 延伸功能。
13. 選取 Creo Product Insight for ThingWorx Extension。隨擴充安裝之項目的詳細資訊會出現在所安裝擴充之清單下方的「封裝詳細資訊」表格中。
14. 執行 Analytics Manager 後續安裝組態時,請遵循 ThingWorx Analytics 說明中心中的指示。
15. 透過開啓 TW.Analytics.ConsoleMainMashup 來存取 ThingWorx Analytics Manager。在 ThingWorx Analytics 說明中心中,請遵循設定首頁混搭中的步驟進行操作。
ThingWorx Composer 中,請確保已選取「全部」(All),在搜尋方塊中鍵入或貼上 TW.Analytics.ConsoleMainMashup 並按 ENTER 鍵。檢視混搭。ThingWorx Analytics 標籤會在您的瀏覽器中開啟。
16. 按一下此標籤,然後按一下 Analytics Manager。ThingWorx Analytics Manager 即會開啟。
17. 欲配置提供者,請按一下「新建」(New)。「新建分析提供者」頁即會開啟。
18. 鍵入由「提供者名稱」(Provider Name) 方塊中 config.properties 檔案之 AnalysisProvider 內容設定的名稱。
19. 「連接器」(Connector) 清單中選取 PTC.Analysis.CreoConnector。
20. 按一下「儲存」(Save)
向 ThingWorx 發布感應器資訊
1. 在您的 Creo Parametric 設計中,按一下 「感應器資訊與設定」(Sensor Info and Setup)「工具」(Tools) > 「感應器資訊與設定」(Sensor Info and Setup)「感應器資訊與設定」(Sensor Info and Setup) 對話方塊隨即開啟。
2. 選取「包括」(Include) 核取方塊以包括要發佈至 ThingWorx 的感應器。
3. 按一下「檔案」(File) > 「發佈感應器」(Publish Sensors),然後按一下確認對話方塊中的「確定」(OK)
* 
發布操作需要花費一些時間。
4. 在 Analytics Manager 中,使用建立的模型建立分析事件。
5. 對應分析事件中的輸入參數。
連線至 ThingWorx 伺服器
1. 按一下已檢測組件中的「模型」(Model) > 「連線至伺服器」(Con ect to Server),或「工具」(Tools) > 「連線至伺服器」(Connect to Server)「輸入認證」(Enter Credentials) 對話方塊隨即開啟。
2. 輸入您的認證並按一下「確定」(OK)ThingWorx 「選取 ThingWorx 伺服器中的重播資料」(Select Replay Data from ThingWorx Server) 頁即會開啟。
3. 若要變更重播資料的預設來源,請從「資料來源」(Data Source) 清單中選取來源。
4. 「重播持續時間」(Replay Duration) 方塊中選取開始、結束日期與時間。按一下「完成」(Done)
5. 欲將資料傳送至 Creo Parametric,請按一下「傳送至 Creo」(Send to Creo) 即會出現在訊息區域中。資料傳輸完成之後, 會顯示在訊息區域並會顯示「通知」(Notifications) 訊息。
這是否有幫助?