commit d740e88ae006815f248671ac4bdb96d1c6c82078 Author: Toby <2287769986@qq.com> Date: Mon Apr 14 19:29:39 2025 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..0c87778 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Start", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["start"], + "skipFiles": ["/**"], + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen" + }, + ] +} \ No newline at end of file diff --git a/config.js b/config.js new file mode 100644 index 0000000..817c67b --- /dev/null +++ b/config.js @@ -0,0 +1,12 @@ +export const config = { + port: "/dev/cu.usbserial-230", + baudRate: 9600, + dataBits: 8, + stopBits: 1, + parity: "none", + flowControl: false, +}; + +export const command = { + measure: '01 04 00 00 00 02 71 CB' +} \ No newline at end of file diff --git a/config.js.tmpl b/config.js.tmpl new file mode 100644 index 0000000..817c67b --- /dev/null +++ b/config.js.tmpl @@ -0,0 +1,12 @@ +export const config = { + port: "/dev/cu.usbserial-230", + baudRate: 9600, + dataBits: 8, + stopBits: 1, + parity: "none", + flowControl: false, +}; + +export const command = { + measure: '01 04 00 00 00 02 71 CB' +} \ No newline at end of file diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.001.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.001.png new file mode 100644 index 0000000..76761e4 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.001.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.002.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.002.png new file mode 100644 index 0000000..e30bc6d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.002.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.003.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.003.png new file mode 100644 index 0000000..8d0258a Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.003.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.004.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.004.png new file mode 100644 index 0000000..e75f28f Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.004.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.005.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.005.png new file mode 100644 index 0000000..3e5f5ee Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.005.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.006.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.006.png new file mode 100644 index 0000000..24b35d0 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.006.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.007.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.007.png new file mode 100644 index 0000000..56675df Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.007.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.008.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.008.png new file mode 100644 index 0000000..bbde90e Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.008.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.009.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.009.png new file mode 100644 index 0000000..9aa5f2d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.009.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.010.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.010.png new file mode 100644 index 0000000..9d6aca6 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.010.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.011.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.011.png new file mode 100644 index 0000000..253e585 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.011.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.012.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.012.png new file mode 100644 index 0000000..c1d0cc0 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.012.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.013.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.013.png new file mode 100644 index 0000000..1508d45 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.013.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.014.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.014.png new file mode 100644 index 0000000..9f0f59e Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.014.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.015.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.015.png new file mode 100644 index 0000000..7d2279d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.015.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.016.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.016.png new file mode 100644 index 0000000..aef3d71 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.016.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.017.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.017.png new file mode 100644 index 0000000..c468c4f Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.017.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.018.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.018.png new file mode 100644 index 0000000..a7c9f9b Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.018.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.019.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.019.png new file mode 100644 index 0000000..f055dc4 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.019.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.020.jpeg b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.020.jpeg new file mode 100644 index 0000000..0d26a5c Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.020.jpeg differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.021.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.021.png new file mode 100644 index 0000000..969270d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.021.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.022.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.022.png new file mode 100644 index 0000000..d2392c6 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.022.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.023.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.023.png new file mode 100644 index 0000000..839091f Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.023.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.024.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.024.png new file mode 100644 index 0000000..0adbe29 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.024.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.025.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.025.png new file mode 100644 index 0000000..7f6d13f Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.025.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.026.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.026.png new file mode 100644 index 0000000..3ec8d0b Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.026.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.027.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.027.png new file mode 100644 index 0000000..b07fbe0 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.027.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.028.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.028.png new file mode 100644 index 0000000..db45bdf Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.028.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.029.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.029.png new file mode 100644 index 0000000..2a340b9 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.029.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.030.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.030.png new file mode 100644 index 0000000..66e7e14 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.030.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.031.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.031.png new file mode 100644 index 0000000..bae2b27 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.031.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.032.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.032.png new file mode 100644 index 0000000..cc05564 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.032.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.033.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.033.png new file mode 100644 index 0000000..1d96218 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.033.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.034.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.034.png new file mode 100644 index 0000000..edf80db Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.034.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.035.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.035.png new file mode 100644 index 0000000..2c19172 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.035.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.036.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.036.png new file mode 100644 index 0000000..91fe9cf Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.036.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.037.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.037.png new file mode 100644 index 0000000..0d982f0 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.037.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.038.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.038.png new file mode 100644 index 0000000..c2ef58c Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.038.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.039.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.039.png new file mode 100644 index 0000000..46d43df Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.039.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.040.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.040.png new file mode 100644 index 0000000..e9cc4c7 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.040.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.041.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.041.png new file mode 100644 index 0000000..94100a5 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.041.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.042.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.042.png new file mode 100644 index 0000000..0cf8cf9 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.042.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.043.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.043.png new file mode 100644 index 0000000..73983a6 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.043.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.044.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.044.png new file mode 100644 index 0000000..c880c34 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.044.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.045.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.045.png new file mode 100644 index 0000000..09f137c Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.045.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.046.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.046.png new file mode 100644 index 0000000..de745c2 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.046.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.047.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.047.png new file mode 100644 index 0000000..270892a Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.047.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.048.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.048.png new file mode 100644 index 0000000..87becda Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.048.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.049.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.049.png new file mode 100644 index 0000000..81cdcb7 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.049.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.050.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.050.png new file mode 100644 index 0000000..ce8ff3d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.050.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.051.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.051.png new file mode 100644 index 0000000..0c2146d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.051.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.052.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.052.png new file mode 100644 index 0000000..241d79b Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.052.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.053.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.053.png new file mode 100644 index 0000000..86dabaa Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.053.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.054.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.054.png new file mode 100644 index 0000000..f52e408 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.054.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.055.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.055.png new file mode 100644 index 0000000..82175ef Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.055.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.056.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.056.png new file mode 100644 index 0000000..7a45314 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.056.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.057.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.057.png new file mode 100644 index 0000000..2940105 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.057.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.058.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.058.png new file mode 100644 index 0000000..4c698c2 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.058.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.059.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.059.png new file mode 100644 index 0000000..3f04166 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.059.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.060.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.060.png new file mode 100644 index 0000000..5b125be Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.060.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.061.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.061.png new file mode 100644 index 0000000..c2b842b Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.061.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.062.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.062.png new file mode 100644 index 0000000..a5642d5 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.062.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.063.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.063.png new file mode 100644 index 0000000..2e58e95 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.063.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.064.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.064.png new file mode 100644 index 0000000..064235a Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.064.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.065.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.065.png new file mode 100644 index 0000000..7565f20 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.065.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.066.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.066.png new file mode 100644 index 0000000..776ac4d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.066.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.067.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.067.png new file mode 100644 index 0000000..d978b94 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.067.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.068.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.068.png new file mode 100644 index 0000000..bc25f43 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.068.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.069.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.069.png new file mode 100644 index 0000000..c611abf Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.069.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.070.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.070.png new file mode 100644 index 0000000..4c3be59 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.070.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.071.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.071.png new file mode 100644 index 0000000..947c88a Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.071.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.072.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.072.png new file mode 100644 index 0000000..c1962f3 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.072.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.073.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.073.png new file mode 100644 index 0000000..71e6eb6 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.073.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.074.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.074.png new file mode 100644 index 0000000..2a7dc6c Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.074.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.075.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.075.png new file mode 100644 index 0000000..9cd6d86 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.075.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.076.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.076.png new file mode 100644 index 0000000..e5ac52e Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.076.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.077.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.077.png new file mode 100644 index 0000000..4692d58 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.077.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.078.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.078.png new file mode 100644 index 0000000..0d13fef Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.078.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.079.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.079.png new file mode 100644 index 0000000..046d815 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.079.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.080.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.080.png new file mode 100644 index 0000000..223f795 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.080.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.081.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.081.png new file mode 100644 index 0000000..a337d23 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.081.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.082.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.082.png new file mode 100644 index 0000000..9cb0341 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.082.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.083.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.083.png new file mode 100644 index 0000000..6518848 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.083.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.084.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.084.png new file mode 100644 index 0000000..fcd7575 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.084.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.085.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.085.png new file mode 100644 index 0000000..8b0e57f Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.085.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.086.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.086.png new file mode 100644 index 0000000..996beec Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.086.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.087.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.087.png new file mode 100644 index 0000000..2248040 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.087.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.088.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.088.png new file mode 100644 index 0000000..1738713 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.088.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.089.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.089.png new file mode 100644 index 0000000..28b2a19 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.089.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.090.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.090.png new file mode 100644 index 0000000..dcb1ad1 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.090.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.091.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.091.png new file mode 100644 index 0000000..198d803 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.091.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.092.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.092.png new file mode 100644 index 0000000..1f81b3d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.092.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.093.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.093.png new file mode 100644 index 0000000..d0f7675 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.093.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.094.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.094.png new file mode 100644 index 0000000..366156e Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.094.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.095.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.095.png new file mode 100644 index 0000000..5cc4178 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.095.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.096.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.096.png new file mode 100644 index 0000000..275116e Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.096.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.097.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.097.png new file mode 100644 index 0000000..bd039ce Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.097.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.098.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.098.png new file mode 100644 index 0000000..1816666 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.098.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.099.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.099.png new file mode 100644 index 0000000..23dd9ee Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.099.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.100.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.100.png new file mode 100644 index 0000000..2610ecc Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.100.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.101.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.101.png new file mode 100644 index 0000000..c8c15e5 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.101.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.102.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.102.png new file mode 100644 index 0000000..63d091e Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.102.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.103.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.103.png new file mode 100644 index 0000000..95c6631 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.103.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.104.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.104.png new file mode 100644 index 0000000..094d1fb Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.104.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.105.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.105.png new file mode 100644 index 0000000..617c81e Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.105.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.106.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.106.png new file mode 100644 index 0000000..4d2d27c Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.106.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.107.jpeg b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.107.jpeg new file mode 100644 index 0000000..78866ec Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.107.jpeg differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.108.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.108.png new file mode 100644 index 0000000..1402e82 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.108.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.109.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.109.png new file mode 100644 index 0000000..a16bb56 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.109.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.110.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.110.png new file mode 100644 index 0000000..705787d Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.110.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.111.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.111.png new file mode 100644 index 0000000..05c69a5 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.111.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.112.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.112.png new file mode 100644 index 0000000..1283790 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.112.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.113.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.113.png new file mode 100644 index 0000000..1c64041 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.113.png differ diff --git a/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.114.png b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.114.png new file mode 100644 index 0000000..3f83df0 Binary files /dev/null and b/doc/protocol/Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.114.png differ diff --git a/doc/protocol/PyroScience Unified Protocol.md b/doc/protocol/PyroScience Unified Protocol.md new file mode 100644 index 0000000..1fe900e --- /dev/null +++ b/doc/protocol/PyroScience Unified Protocol.md @@ -0,0 +1,1875 @@ +![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.001.png) + +PSUP![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.002.png) + +PyroScience Unified Protocol![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.003.png) + +REFERENCE MANUAL + +VALID FOR FIRMWARE REVISIONS 4.00 - 4.09 ![ref1] + +Document Version V1.05 www.pyroscience.com + +![ref2] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +TABLE OF CONTENT + +[Introduction ............................................................................................................................................ 5 ](#_page4_x54.00_y85.92) + +[Supported Interfaces ............................................................................................................................ 6 ](#_page5_x54.00_y85.92) + +1. [Serial Interface (UART) – PyroScience Protocol ................................................................6 ](#_page5_x54.00_y134.92) +1. [USB Interface – PyroScience Protocol ..................................................................................6 ](#_page5_x54.00_y541.92) +1. [RS485 Interface - Modbus Protocol.......................................................................................7 ](#_page6_x54.00_y277.92) +1. [Analog Output ...............................................................................................................................7 ](#_page6_x54.00_y578.92) + +[PyroScience Protocol ............................................................................................................................ 8 ](#_page7_x54.00_y85.92) + +1. [General Structure ..........................................................................................................................8 ](#_page7_x54.00_y134.92) +1. [General Command Structure ........................................................................................9 ](#_page8_x54.00_y390.92) +1. [General Register Structure ........................................................................................ 10 ](#_page9_x54.00_y307.92) +1. [Broadcast Mode ............................................................................................................ 11 ](#_page10_x54.00_y358.92) +1. [Detecting Communication Errors and Optional CRC ........................................ 11 ](#_page10_x54.00_y470.92) +1. [Checklist for Programmers and Available Software Libraries ..................... 11 ](#_page10_x54.00_y655.92) +2. [Device Commands ..................................................................................................................... 12 ](#_page11_x54.00_y520.92) +1. [#VERS – Get Device Information ............................................................................ 12 ](#_page11_x54.00_y644.92) +1. [#IDNR – Get Unique ID Number .............................................................................. 13 ](#_page12_x54.00_y618.92) +1. [#LOGO – Flash Status LED ......................................................................................... 14 ](#_page13_x54.00_y177.92) +1. [#PDWN – Power Down Sensor Circuits ............................................................... 14 ](#_page13_x54.00_y324.92) +1. [#PWUP – Power Up Sensor Circuits ...................................................................... 14 ](#_page13_x54.00_y485.92) +1. [#STOP – Enter Deep Sleep Mode ............................................................................ 14 ](#_page13_x54.00_y604.92) +1. [#RSET – Reset Device ................................................................................................. 15 ](#_page14_x54.00_y99.92) +1. [#RDUM – Read User Memory .................................................................................. 15 ](#_page14_x54.00_y245.92) +1. [#WRUM – Write User Memory ................................................................................ 15 ](#_page14_x54.00_y669.92) +3. [Channel Commands .................................................................................................................. 16 ](#_page15_x54.00_y407.92) +1. [MEA – Trigger Measurement .................................................................................... 16 ](#_page15_x54.00_y531.92) +1. [CHI – Calibrate Oxygen Sensor at ambient air ................................................... 17 ](#_page16_x54.00_y628.92) +1. [CLO – Calibrate Oxygen Sensor at 0% (anoxic) .................................................. 18 ](#_page17_x54.00_y431.92) +1. [COT – Calibrate Optical Temperature Sensor ...................................................... 18 ](#_page17_x54.00_y760.92) +1. [CPH – Calibrate pH Sensor ........................................................................................ 19 ](#_page18_x54.00_y318.92) +1. [BGC – Perform Background Compensation ......................................................... 20 ](#_page19_x54.00_y402.92) +1. [BCL – Clear Background Compensation ............................................................... 21 ](#_page20_x54.00_y141.92)![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +8. [RMR – Read Multiple Registers ................................................................................ 21 ](#_page20_x54.00_y432.92) +8. [WTM – Write Multiple Registers ............................................................................. 22 ](#_page21_x54.00_y147.92) +8. [SVS – Save Registers in Flash Memory ................................................................ 22 ](#_page21_x54.00_y584.92) +8. [LDS –Load Registers from Flash Memory ............................................................ 23 ](#_page22_x54.00_y202.92) +4. [Error Responses ......................................................................................................................... 23 ](#_page22_x54.00_y483.92) +4. [Settings Registers ...................................................................................................................... 25 ](#_page24_x54.00_y85.92) +1. [E Environmental Condition Registers ................................................................. 26 ](#_page25_x54.00_y126.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.006.png) +1. [M Measurement Mode Registers ............................................................................ 26 ](#_page25_x54.00_y574.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.007.png) +1. [S Sensor Code Settings ............................................................................................. 28 ](#_page27_x54.00_y607.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.008.png) +1. [T Sensor Type Specific Constants ......................................................................... 29 ](#_page28_x54.00_y125.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.009.png) +6. [Calibration Registers (Oxygen Sensors)............................................................................. 30 ](#_page29_x54.00_y323.92) +1. [C User Calibration ...................................................................................................... 31 ](#_page30_x54.00_y541.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.010.png) +1. [S Factory Calibration Taken from Sensor Code ............................................... 31 ](#_page30_x54.00_y671.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.011.png) +1. [T Sensor Type Specific Constants ......................................................................... 32 ](#_page31_x54.00_y403.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.012.png) +7. [Calibration Registers (Optical Temperature Sensors) ................................................... 33 ](#_page32_x54.00_y249.92) +1. [C User Calibration ...................................................................................................... 34 ](#_page33_x54.00_y223.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.013.png) +1. [S Sensor Code Constants .......................................................................................... 34 ](#_page33_x54.00_y288.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.014.png) +1. [T Sensor Type Specific Constants ......................................................................... 34 ](#_page33_x54.00_y426.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.015.png) +8. [Calibration Registers (pH Sensors) ...................................................................................... 35 ](#_page34_x54.00_y85.92) +1. [C User Calibration ...................................................................................................... 36 ](#_page35_x54.00_y361.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.016.png) +1. [S Sensor Code Constants .......................................................................................... 36 ](#_page35_x54.00_y426.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.017.png) +1. [T Sensor Type Specific Constants ......................................................................... 36 ](#_page35_x54.00_y761.92)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.018.png) +9. [Results Registers ........................................................................................................................ 37 ](#_page36_x54.00_y519.92) +9. [AnalogOutput Registers .......................................................................................................... 40 ](#_page39_x54.00_y85.92) +9. [Resistive Temperature Sensor Registers .......................................................................... 41 ](#_page40_x54.00_y226.92) + +[Modbus Protocol ................................................................................................................................. 43 ](#_page42_x54.00_y85.92) + +1. [General Structure ....................................................................................................................... 43 ](#_page42_x54.00_y134.92) +1. [Modbus RTU Standard ................................................................................................ 44 ](#_page43_x54.00_y229.92) +1. [Modbus Implementation in PyroScience Devices ............................................. 44 ](#_page43_x54.00_y406.92) +1. [Modbus Slave Address ............................................................................................... 45 ](#_page44_x54.00_y85.92) +1. [Operation Principle of Periodic Measurements ................................................. 45 ](#_page44_x54.00_y133.92) +1. [Operation Principle of Triggered Measurements .............................................. 45 ](#_page44_x54.00_y333.92) +1. [Transparent Mode and Evaluation Software ...................................................... 45 ](#_page44_x54.00_y438.92) +2. [Read-Only Modbus Registers................................................................................................ 46 ](#_page45_x54.00_y85.92) +1. [Results Registers .......................................................................................................... 46 ](#_page45_x54.00_y186.92)![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +2. [Device Info Registers .................................................................................................. 46 ](#_page45_x54.00_y709.92) +3. [Read-Write Modbus Registers .............................................................................................. 48 ](#_page47_x54.00_y85.92) +1. [Making Register Changes Persistent During Power Cycles ............................ 48 ](#_page47_x54.00_y226.92) +1. [Settings Registers ......................................................................................................... 48 ](#_page47_x54.00_y490.92) +1. [Calibration Registers ................................................................................................... 49 ](#_page48_x54.00_y329.92) +1. [Analog Output Registers ............................................................................................. 50 ](#_page49_x54.00_y302.92) +1. [Modbus Slave Address Register .............................................................................. 50 ](#_page49_x54.00_y657.92) +1. [Command Registers ..................................................................................................... 51 ](#_page50_x54.00_y189.92)![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +INTRODUCTION + +PyroScience offers a broad product range of instruments and sensor heads based on its Redflash technology for optical oxygen, pH, and temperature measurements. This document provides details on the communication interface of all devices based on the firmware generation 4, which was introduced in the year 2020. This firmware generation uses the “PyroScience Unified Protocol” (PSUP), which provides cross - platform compatibility between all different devices from PyroScience. So a programmer used to e.g. the laboratory device FireSting-PRO can easily switch to basic OEM modules or even deep-sea devices. + +The following devices are currently covered by this document: + +- FireSting-O2 with firmware version >4.00 (FSO2-C1, FSO2-C2, FSO2-C4) +- FireSting-PRO (FSPRO-1, FSPRO-2, FSPRO-4) +- AquapHOx Logger (APHOX-LX, APHOX-L-O2, APHOX-L-PH) +- AquapHOx Transmitter (APHOX-TX, APHOX-T-O2, APHOX-T-PH) +- PICO-O2, PICO-PH, PICO-T, PICO-EXT +- FD-OEM-O2, FD-OEM-PH, FD-EXT ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +SUPPORTED INTERFACES + +1. Serial Interface (UART) – PyroScience Protocol + +All PyroScience devices possess a central microcontroller which handles all the different task the device has to fulfill. This microcontroller communicates via a UART interface with the outer world. A UART interface is a classical serial interface operated at low voltage levels, which can be directly connected to UART interfaces of other microcontroller boards (e.g. Raspberry Pi). The standard connector of basic OEM modules (e.g. PICO-O2, FD-OEM-PH) provides a UART interface. But also laboratory devices like the FireSting-PRO offer this UART interface at the extension port. + +Note, several PyroScience devices do not provide a UART interface accessible for the user. They offer either a USB interface (1.2) or [a RS485](#_page5_x54.00_y541.92) interface (1.3), which ar[e ](#_page6_x54.00_y277.92)internally converted and connected to the UART interface of the microcontroller. + +The UART interface of PyroScience devices is operated with 3.0 V or 3.3 V levels (3.0– 5.0 V tolerant). The configuration is + +19200 or 115200 baud, 8 data bit, 1 stop bit, no parity, no handshake + +Please refer to the data sheet of the respective module about the actual baud rate. + +Communication via the UART interface is always based on the proprietary PyroScience protocol (refer to 2.1[). ](#_page7_x54.00_y134.92) + +Note: The serial interface of this module is not a RS232 interface. However, the UART ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.019.png)interface can be made compatible to RS232 by third-party UART-RS232-adapters. + +2. USB Interface – PyroScience Protocol + +Many PyroScience devices possess a USB interface for easy operation e.g. at Windows PCs, All laboratory devices (e.g. FireSting-PRO) and several underwater devices (e.g. AquapHOx-LX) provide such a built-in USB port. Further, USB adapter cables are available for most basic OEM modules. These USB adapter cables are especially useful for evaluation purposes at Windows PC. PyroScience offers powerful software packages like the Pyro Workbench or the Pyro DeveloperTool. Please refer to the homepage of PyroScience for more details. Communication via the USB interface is always based on the proprietary PyroScience protocol (refer to 2.1.). + +All USB ports and all USB adapter cables from PyroScience are based on solutions from the company FTDI. using the so called d2xx drivers, which are automatically installed ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +together with the PyroScience software packages. The d2xx driver can be used in two different ways: (a) via generic USB communication, or (b) via virtual COM ports. All PyroScience software uses the generic USB communication. But the virtual COM ports are very useful for custom made software, because most programming languages support virtual COM ports. + +For advanced users: the USB String Descriptors of the FTDI USB interface is coded for all PyroScience devices and adapter cables as follows: + +- FTDI Manufacturer = “Pyro” +- FTDI Product Description = either “Pyro\_115200” or “Pyro\_19200” + +The number in the Product Description gives the default baud rate of the specific device. + +3. RS485 Interface - Modbus Protocol + +PyroScience offers devices with integrated RS485 interface (e.g. AquapHOx-TX), or it offers RS485 adapter modules for the UART interface of OEM modules (e.g. PICO-EXT in combination with PICO-O2). The default configuration is + +19200 baud, 8 data bit, 1 stop bit, even parity, no handshake + +The default communication protocol is the standardized Modbus RTU protocol. Please refer to the chapter 3.1 [and fol](#_page42_x54.00_y134.92)lowing for more details. Note, all RS485 devices can be switched into a so called “transparent mode”, where it is again possible to use the PyroScience protocol (2.1)[. ](#_page7_x54.00_y134.92) + +The advantages of RS485 in combination with the Modbus RTU protocol are: + +- cable lengths up to several 100m are supported +- up to 247 devices can be connected to a 4-wire RS485 bus +- Modbus RTU is a popular communication protocol +4. Analog Output + +There are several solutions available which offer analog outputs. Please refer to the respective data sheets for more details on the analog outputs. The general configuration of the analog outputs is described in sections 2.10 or 3.[3.4. ](#_page39_x54.00_y85.92)![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +PYROSCIENCE PROTOCOL + +1. General Structure + +The following figure shows the general structure of some representative PyroScience devices which use the proprietary PyroScience communication protocol:![ref1] + +![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.020.jpeg) + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +All devices possess a central microcontroller which communicates via its UART interface with the outer world. The UART interface is the standard interface for several OEM devices from PyroScience. There are optional USB adapter cables available, which convert the UART interface into a standard USB port. These adapter cables have integrated FTDI chips, which is a popular chipset for USB solutions. + +Many end-user devices (e.g. laboratory or underwater devices) are equipped with a USB port, which is internally converted by a FTDI chip to a UART interface connected to the central microcontroller. Some end-user devices offer additionally an extension port giving direct access to the UART interface of the central microcontroller, which might be used by OEM applications. + +A USB solution is always needed, if you want to use the powerful Windows software packages Pyro DeveloperTool or Pyro Workbench, provided for free download on the PyroScience homepage. Especially the Pyro DeveloperTool is strongly recommended for OEM developers for initial evaluation purposes. The Labview source code of the Pyro DeveloperTool is also available, providing a general reference how to implement PyroScience devices into other software or firmware projects. + +The basic building blocks of the PyroScience protocol are outlined in the following. + +1. General Command Structure + +The commands provide the communication between the master (e.g. Windows PC) and the device (e.g. FireSting-PRO from PyroScience). Some commands trigger actions in the device, for example acquiring a data point with an optical oxygen sensor. Other commands are used for writing or reading registers within the device. A command comprises always the following sequence: + +- the master sends the command string to the device +- the device executes the command +- the device sends the response string to the master +- the device is immediately ready to receive the next command + +A command string always starts with a specific command header (e.g. MEA, #VERS, #LOGO) optionally followed by several input parameters. Input parameters are given as human readable decimal numbers, separated by spaces from each other. Each command must be terminated by a carriage return. + +The response string starts always with an copy of the original command string including all input parameters, optionally followed by space separated output parameters, and again terminated by a carriage return. + +There are two classes of commands: (a) device commands which affect the complete device ([2.2), and](#_page11_x54.00_y520.92) (b) channel commands which trigger actions related to a specific optical channel ([2.3). ](#_page15_x54.00_y407.92)![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +If the internal processing of the received command causes an error within the module, the response will be the error header #ERRO followed by an error code “#ERRO” (2.4). + + + +|Style Conventions for Commands || +| - | :- | +|**MEA #VERS #LOGO** |Command headers are written in bold. They are transmitted unchanged as ASCII strings. | +|C S R |Single letters represent placeholders for parameters transmitted as human readable ASCII strings of decimal numbers. For example S might be replaced by 47, so the ASCII code for “4” followed by the ASCII code for “7” would be transmitted.| +|˽ |Space (ASCII code 0x20), separator between parameters| +|↵ |Carriage return (ASCII code 0x0D), final character of all messages.| + +2. General Register Structure + +The registers comprise sets of integer numbers stored within the device. They are used for configuring the device, or for read access of the measurement results. A register always contains a 32bit integer number. Each optical channel has its own set of registers. The registers are organized in several “register blocks”: + + + +|Register ||Register |Number |Type ||Comment | +| - | :- | - | - | - | :- | - | +|Block ||Block |of |||| +|||Nr. |Registers |||| +|Settings ||0 |20 |read / write||| +|Calibration ||1 |30 |read / write||register definitions depend on the | +|||||||analyte detected by the sensor| +|Results ||3 |18 |read only||| +|AnalogOutput||4 |12 |read / write||shared by all optical channels| + +Each register block consists of a defined number of registers containing signed 32bit - integer numbers. The first register address is always the number 0. The commands RMR [(2.3.8) ](#_page20_x54.00_y432.92)and WTM (2.[3.9) are](#_page21_x54.00_y147.92) used for reading and writing registers, respectively. + +The content of the read/write registers are kept at two locations: in the volatile RAM memory and in the flash memory of the devices. At power-up of the device, the register values from the flash memory are automatically loaded into the corresponding registers in the RAM memory. All further command actions are then based on the values in the RAM memory. The command SVS (2.3.[10) can be](#_page21_x54.00_y584.92) used for saving the RAM memory content into the flash memory, i.e. the current register configuration is retained even after a power cycle. + +Note, the register block *AnalogOutput* is shared by all optical channels. In this case it does not matter which optical channel is selected e.g. by the first parameter of the RMR - command. ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Details on the register structure and the register definitions are given in chapter 0 and following. + + + +|Style Conventions for |Registers || +| - | - | :- | +|*Settings* ||The name of register blocks are printed in italics with an | +|*Calibration* ||initial capital letter.| +|*Results* ||| +|*AnalogOutput* ||| +|*intensity* ||The name of single register are printed in italics with an | +|*pressure* ||initial lowercase letter.| +|*analyte* ||| +|*tempSample* ||| +|*Settings.intensity*||A single register can be also printed in combination with the | +|*Calibration.pressure*||register block it belongs to. In this case, first the register | +|*Results.tempSample*||block is printed before the register name, separated by a | +|||period character. | + +3. Broadcast Mode + +A special feature is the optional broadcast mode, which can be configured and activated in the *Settings* registers (0). [An e](#_page23_x54.00_y514.92)nabled broadcast mode means, that the master does not need to trigger the measurements. Instead, the device triggers itself periodic measurements, or measurements are triggered by a digital input at the extension port of the device (if available). For more details refer to chapter 0. + +4. Detecting Communication Errors and Optional CRC + +The protocol supports two levels of communication error handling. The first level is realized simply by the fact, that the device always echoes the complete command as it was received from the master. This way the master can compare the echo with the originally sent request. + +However, the echoing of the command does not allow detecting potential communication errors within the output parameters. For this purpose, it is possible to enable a cyclic redundancy check (CRC) for all responses from the device to the master. Refer to chapter 2.5.[2 for mor](#_page25_x54.00_y574.92)e details. The reminder of this document shows only examples with disabled CRC. + +5. Checklist for Programmers and Available Software Libraries + +The following software libraries are available from PyroScience with an implementation of the PyroScience protocol: + +- PyroScience Labview Library +- PyroScience Python Library![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +The following checklist contains the most important issues to be considered for an OEM implementation: + +- Configure sensor specific constants registers marked with T . PyroScience ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.021.png)offers many different sensor types (e.g. microsensors, flow-through cells, sensor spots) which require a specific configuration of many Settings and Calibration registers. It is adviced to configure the device initially with the software package Pyro DeveloperTool or Pyro Workbench. Based on the entered sensor code the software will adjust all sensor specific constants. This must be only done once for a specific sensor type (and not for each individual sensor head). Study for this the sections 0, 2.6, 2.[7, ](#_page23_x54.00_y514.92)[and 2.](#_page29_x54.00_y323.92)[8. ](#_page32_x54.00_y249.92) +- Configure the sensor code registers marked with S . The respective ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.022.png)information is given on the label attached to the sensor head. This must be configured for each individual sensor head. Study for this the sections 2.6, 2.7, and [2.8. ](#_page34_x54.00_y85.92) +- Configure the Settings registers mode, intensity, and amp in order to find the best compromise between low long-term drift and high signal-to-noise ratio [(2.5.2). ](#_page25_x54.00_y574.92) +- Calibrate the sensor with the commands CHI (2.3.2) and[ CLO (](#_page16_x54.00_y628.92)2.3.3) for [oxygen ](#_page17_x54.00_y431.92)sensors, COT ([2.3.4) for](#_page17_x54.00_y760.92) optical temperature sensors, and CPH (2.3.5) for [pH ](#_page18_x54.00_y318.92)sensors. +- Store the configuration permanently in the internal flash memory by using the command SVS (2.[3.10). ](#_page21_x54.00_y584.92) +- Use the command MEA for triggering measurements (2.3.1). +- Optionally, enable the broadcast mode, so the device might trigger itself periodic measurements (2.5.2[). ](#_page25_x54.00_y574.92) +- Optionally, configure the analog outputs in the *analogOutput* registers (2.10). +2. Device Commands + +Device commands affect the complete device (i.e. they are not specific for one of the optical channels). Their command header always start with the character “#” followed by 4 letters. + +1. #VERS – Get Device Information + +This command returns general information about the device. + +Command: **#VERS**↵ + +Response: **#VERS**˽D˽N˽R˽S˽B˽F↵ + +Output Parameters: + +D Device ID, identifies the specific device type.![ref1] + +|Device ID |Description |Item Nrs. | +| - | - | - | + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|0 |FireSting-O2 ||FSO2-C1, FSO2-C2, FSO2-C4 | +| - | - | :- | - | +|1 |FireSting-PRO ||FSPRO-1, FSPRO-2, FSPRO-4 | +|2-3 |reserved ||| +|4 |Pico-x ||PICO-O2, PICO-PH, PICO-T | +|5-7 |Reserved ||| +|8 |FD-OEM-x ||FD-OEM-O2, FD-OEM-PH | +|9-11 |reserved ||| +|12 |AquapHOx Logger||APHOX-LX, APHOX-L-O2, APHOX-L-PH | +|13 |AquapHOx Transmitter||APHOX-TX, APHOX-T-O2, APHOX-T-PH | + +N Number of optical channels. + +R Firmware version, e.g. *R*=405 designates firmware version 4.05 + +S Bit field about available sensor types and supported optical analytes as + +follows: + +|Bit 0-7: Available Sensor Types||Bit 8-15: Supported Optical | +| - | :- | - | +|||Analytes | +|Bit 0: optical channel ||Bit 8: oxygen| +|Bit 1: sample temperature (typ. Pt100)||Bit 9: optical temperature| +|Bit 2: pressure||Bit 10: pH | +|Bit 3: humidity||Bit 11: CO2 | +|Bit 4: analog in||Bit 12: reserved| +|Bit 5: case temperature||Bit 13: reserved| +|Bit 6: reserved ||Bit 14: reserved| +|Bit 7: reserved||Bit 15: reserved| + +Example: *S* = 1 + 2 + 4 + 8 + 32 + 256 = 303 means, that the device supports an optical channel as well as sample and case temperature, pressure, and humidity sensors, and the optical channel supports the analytes oxygen. + +B Firmware build number starting at 1 for each firmware version (reflects + +minor firmware revisions) + +F Bit field about available features as follows: + +|Bit 0: analog out 1|Bit 5: battery| +| - | - | +|Bit 1: analog out 2|Bit 6: stand-alone logging| +|Bit 2: analog out 3|Bit 7: sequence commands| +|Bit 3: analog out 4|Bit 8: user memory| +|Bit 4: user interface (display, buttons) |Bit 9-31: reserved | + +Example: F = 1 + 2 + 4 + 8 + 256 = 271 means that 4 analog outputs are supported and the module possesses a user memory. + +Example Communication: + +Command: #VERS↵ + +Response: #VERS˽1˽4˽403˽1071˽2˽271↵ + +2. #IDNR – Get Unique ID Number + +This command returns the unique identification number of the respective device. + +Command: **#IDNR**↵ + +Response: **#IDNR**˽N↵ + +Output Parameters: + +N Unique ID number. Note, this parameter is given as an unsigned 64 bit + +integer! + +Returns the unique identification number of the device (does NOT correspond to the ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +serial number of the device). + +Example Communication: + +Command: #IDNR↵ + +Response: #IDNR˽2296536137892833272↵ + +3. #LOGO – Flash Status LED + +This command lets the status LED flash for 4 times within ca. 1 s. + +Command: **#LOGO**↵ + +Response: **#LOGO**↵ + +This command can be used to check proper communication with the device. Or it might be helpful in setups with more than one device, in order to identify which port is connected to which device. + +4. #PDWN – Power Down Sensor Circuits + +This command switches off the power supply of the sensor circuits. + +Command: **#PDWN**↵ + +Response: **#PDWN**↵ + +This command can be used for some power saving during idle operation periods. Note, that the sensor circuits are automatically powered up again, if the module receives any command (e.g. MEA) requiring a sensor measurement. This is also the case if a broadcast measurement takes place. + +5. #PWUP – Power Up Sensor Circuits + +This command switches on the power supply of the sensor circuits. + +Command: **#PWUP**↵ + +Response: **#PWUP**↵ + +The wake-up duration is up to 250 ms. + +6. #STOP – Enter Deep Sleep Mode + +This command is only available on dedicated OEM modules (e.g. Pico-x or FD-OEM-x). It puts the device into a deep sleep mode with very low power consumption + +Command: **#STOP**↵ Response: **#STOP**↵ + +During deep sleep mode the device has very low power consumption. No standard communication via USB/UART is possible. The deep sleep mode can be only exit by sending a (0x0D) to the device. The device will respond then also with a single indicating that it is ready to receive new commands. The wake-up duration can be up to 250 ms.![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +7. #RSET – Reset Device + +This command triggers a reset of the device. + +Command: **#RSET**↵ Response: **#RSET**↵ + +Triggers a reset of the device, as if the device experienced a power cycle. All current configurations in the RAM registers are overwritten with the values in the flash memory. This is not a factory reset. + +8. #RDUM – Read User Memory + +This command is only available on dedicated OEM modules (e.g. Pico-x or FD-OEM-x). It reads values from the user memory registers. + +Command: **#RDUM**˽R˽N↵ Response: **#RDUM**˽R˽N˽Y0…YN↵ + +Input Parameters: + +R Address of first register to be read from the user memory (0…63) N Total number of registers to be read (1…64) + +Output Parameters: + +Y0…YN Content of the requested user memory registers (signed 32bit integers). + +The device offers a user memory of altogether 64 signed 32bit integer numbers (range - 2147483648 to 2147483647) which is located in the flash memory and is therefore retained even after power cycles. This read command returns *N* (*N*=1…64) consecutive values *Y1 ... YN* from the user memory starting at the user memory address *R* (*R*=0…63). Note, that *N*+*R* must be <=64. The content of the user memory has no influence on the module itself. It can be used for any user specific purpose. + +Example Communication: + +Command: #RDUM˽12˽4↵ + +Response: #RDUM˽12˽4˽-40323˽23421071˽0˽-555↵* + +This example shows a command which requests the values of 4 consecutive beginning with the user memory address 12. + +9. #WRUM – Write User Memory + +This command is only available on dedicated OEM modules (e.g. Pico-x or FD-OEM-x). It writes values into the user memory registers. + +Command: **#WRUM**˽R˽N˽Y0…YN↵ Response: **#WRUM**˽R˽N˽Y0…YN↵![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Input Parameters: + +R Address of first user memory register to be written (0…63) + +N Total number of registers to be written (1…64) + +Y0…YN Values to be written to the user memory registers (signed 32bit integers). + +This command writes *N* (*N*=1...64) values *Y1 ... YN* consecutively starting at the user memory address *R* (*R*=0...63). Note, that *N*+*R* must be <=64. + +This command must be used economically, because the flash memory is designed for typ. ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.023.png)max. 20,000 flash cycles. Each time this command is executed, it will trigger a flash cycle. + +NOTE, the user memory registers are located in a separate flash memory region than the configuration registers. So calling the command #WRUM will not influence the flash memory of these registers. + +Example Communication: + +Command: #WRUM˽0˽2˽-16˽777↵ Response: #WRUM˽0˽2˽-16˽777↵* + +This example shows a command which writes the value -16 into the memory address 0, and the value 777 into the memory address 1. + +3. Channel Commands + +Channel commands trigger actions related to a specific optical channel. Their command header always consists of 3 letters. The first parameter is always the selected optical channel. + +1. MEA – Trigger Measurement + +This command triggers a measurement and returns the results. + +Command: **MEA**˽C˽S↵ + +Response: **MEA**˽C˽S˽R0˽R1…R17↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +S If in doubt, then set S=47! + +This parameter defines the enabled sensor types, + +given as decimal representation of the following bit field: ![ref1] + +|Bit 0 (add 1): |optical channel | +| - | - | +|Bit 1 (add 2) |sample temperature (typ. the external Pt100-sensor) | +|Bit 2 (add 4)|ambient air pressure| +|Bit 3 (add 8) |relative humidity within the module| +|Bit 4 (add 16) |reserved | +|Bit 5 (add 32) |case temperature (temperature within the module)| + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Example: S = 1 + 2 + 4 + 8 + 32 = 47 means, that the command will trigger the following measurements: optical sensor (oxygen, pH, or temperature), sample temperature, case temperature, ambient air pressure, and relative humidity within the module housing. + +Output Parameters: + +R0…R17 The results of the measurement given as the integer values of the 18 + +*Results* registers (refer to 2.9). + +This command is the essential command for triggering measurements. + +IMPORTANT: If automatic temperature compensation is enabled for the optical sensor, it ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.024.png)is mandatory to enable Bit1 of the input parameter S! + +Example Communication: + +Command: MEA˽1˽3↵ + +Response: MEA˽1˽3˽0˽30120˽270013˽210211˽98007˽20135˽0˽87016˽11788˽0˽0˽123022˽ + +20980˽0˽0˽0˽0˽0↵ + +This example command triggers the measurement of the sample temperature (e.g. external Pt100) and of the optical channel (in this example configured for oxygen sensors). The highlighted output parameters of the response are interpreted as follows: + +*status* = 0 → No error or warning occurred; the measurement is valid! *µmolar* = 270.013 µmol/L (dissolved oxygen concentration) *mbar* = 210.211 mbar = 210.211 hPa (partial pressure oxygen) + +*airSat* = 98.007 % air sat. (% air saturation) + +*tempSample* = 20.135 °C + +*signalIntensity* = 87.016 mV + +*ambientLight* = 11.788 mV + +*percentO2* = 20.980 %O2 (volume fraction oxygen) + +2. CHI – Calibrate Oxygen Sensor at ambient air + +This command is used for calibrating the upper calibration point of the oxygen sensor at ambient air. + +Command: **CHI**˽C˽T˽P˽H↵ + +Response: **CHI**˽C˽T˽P˽H↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices).![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +T Temperature of the calibration standard in units of 10-3 °C (e.g. 20000 + +means 20°C) + +P Ambient air pressure in units of 10-3 mbar (e.g. 1013000 means 1013 + +mbar) + +H Relative humidity of the ambient air in units of 10-3 %RH (e.g. 50000 + +means 50%RH) Set H=100000 (=100%RH) for calibrations in air saturated water. + +This command performs 16 repeated optical measurements, and uses the average for the calibration. The total duration for this procedure varies between ca. 3s and ca. 6s depending on the configuration of the module. + +Optional Factory Calibration: This upper calibration point might be skipped by applying a rough factory calibration given by the sensor code attached to the respective sensor head. Please refer to section 2.6.2 [for more](#_page30_x54.00_y671.92) details. + +For standard range oxygen sensors this command is by default configured for ambient air acting as the calibration gas with 20.95 %O2. Please refer to section 2.6.3 how to adapt the *Calibration* register *percentO2* in order to use other calibration gases with e.g. 15 %O2 or 100 %O2. + +In order to keep the calibration permanently even after a power cycle, the command SVS [(2.3.10) m](#_page21_x54.00_y584.92)ust be executed afterwards. + +3. CLO – Calibrate Oxygen Sensor at 0% (anoxic) + +This command is used for calibrating the oxygen sensor at 0% O2. + +Command: **CLO**˽C˽T↵ + +Response: **CLO**˽C˽T↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +T Temperature of the calibration standard in units of 10-3 °C (e.g. 20000 + +means 20°C) + +This command performs 16 repeated optical measurements, and uses the average for the calibration. The total duration for this procedure varies between ca. 3s and ca. 6s depending on the configuration of the module. + +Optional Factory Calibration: This 0% O2 calibration point might be skipped by applying a rough factory calibration given by the sensor code attached to the respective sensor head. Please refer to section 2.6.2 [for more](#_page30_x54.00_y671.92) details. + +In order to keep the calibration permanently even after a power cycle, the command SVS [(2.3.10) m](#_page21_x54.00_y584.92)ust be executed afterwards. + +4. COT – Calibrate Optical Temperature Sensor![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +This command performs a 1-point calibration of the optical temperature sensor. + +Command: **COT**˽C˽T↵ + +Response: **COT**˽C˽T↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +T Temperature of the calibration standard in units of 10-3 °C (e.g. 20000 + +means 20°C) + +This command performs 16 repeated optical measurements, and uses the average for the calibration. The total duration for this procedure varies between ca. 3s and ca. 6s depending on the configuration of the module. + +In order to keep the calibration permanently even after a power cycle, the command SVS [(2.3.10) ](#_page21_x54.00_y584.92)must be executed afterwards. + +5. CPH – Calibrate pH Sensor + +This command is used for calibrating the pH sensor at up to 3 different calibration points. The sensor should be calibrated at 2 points (“low pH” and “high pH”). In contrast to electrochemical pH sensors, optical pH sensors are calibrated outside of the dynamic range where the pH indicator is either fully protonated or fully deprotonated. The first calibration point is called "low pH calibration" and is performed using a highly acidic buffer (pH 2, item no. PHCAL2). A second calibration point, "high pH calibration" is performed using a highly basic buffer (pH 11.00, item no. PHCAL11). After these two calibration points, the sensor is ready to use. It is advised to read the pH sensor manual for more details how to perform proper pH calibrations regarding equilibration time, salinity, which buffers must not be used, etc. + +Optional Factory Calibration: The “high pH calibration” might be skipped by applying a rough factory calibration given by the sensor code attached to the respective sensor head. Please refer to section 2.8.2 [for more](#_page35_x54.00_y426.92) details. + +The third calibration point ("offset calibration") is optional and only recommended for advanced users. It adds an offset to the pH output. This offset has to be determined using a well-known buffer at a pH value close to the pKa of the sensor (e.g. a buffer with pH 8 could be used for -PK8 sensors). + +Bug in firmware versions <4.10 (at least all devices purchased before 2022)![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.025.png) + +Before performing the optional “offset calibration” (i.e. *N* = 2) the *offset* register in the *calibration* register block must be always adjusted to 0 by using the following command: + +WTM˽*C*˽1˽13˽1˽0↵ + +where *C* is the optical channel number (refer to section 2.3.9). + +Command: **CPH**˽C˽N˽P˽T˽S↵![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Response: **CPH**˽C˽N˽P˽T˽S↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +N Calibration point type. + +N=0: low pH calibration point + +N=1: high pH calibration point + +N=2: offset calibration point (optional calibration point for advanced users) P pH value of calibration standard in units of 10-3 pH (e.g. 3000 means pH 3 T Temperature of the calibration standard in units of 10-3 °C (e.g. 20000 + +means 20°C) + +S Salinity of the calibration standard in units of 10-3 g/L (e.g. 1000 means 1 + +g/L) + +This command performs 16 repeated optical measurements, and uses the average for the calibration. The total duration for this procedure varies between ca. 3s and ca. 6s depending on the configuration of the module. + +In order to keep the calibration permanently even after a power cycle, the command SVS [(2.3.10) m](#_page21_x54.00_y584.92)ust be executed afterwards. + +6. BGC – Perform Background Compensation + +ONLY FOR ADVANCED APPLICATIONS with contactless sensors (e.g. sensor spots, flow - through cells) in order to compensate for possible background luminescence of the fiber - optics. Such a background compensation is recommended for the optical measurements, + +if *Results.signalIntensity* is below ca. 50mV for *Settings.amp* = 400x. + +Command: **BGC**˽C↵ Response: **BGC**˽C↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +Before calling this command, the fiber-optics must be separated from the actual optical sensor spot or flow-through cell. This command performs 16 repeated measurements of the background luminescence of the fiber-optics. It calculates the average and saves the normalized background compensation values in the corresponding *Calibration* registers *bkgdAmpl* and *bkgdDphi*. From this on, all optical measurements are automatically corrected for the background luminescence. The background compensation must always be executed before calibrating the sensor. + +In order to keep the background compensation even after a power cycle, the command SVS [(2.3.10) m](#_page21_x54.00_y584.92)ust be executed afterwards. + +Example Communication: ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Command: BGC˽2↵ + +Response: BGC˽2↵ + +. + +7. BCL – Clear Background Compensation + +ONLY FOR ADVANCED APPLICATIONS with contactless sensors. Clears (disables) the background compensation by writing zero to the *Calibration* registers *bkgdAmpl* and *bkgdDphi*. + +Command: **BCL**˽C↵ + +Response: **BCL**˽C↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +In order to keep the background compensation cleared after a power cycle, the command SVS (2.[3.10) mu](#_page21_x54.00_y584.92)st be executed afterwards. + +Example Communication: Command: BCL˽4↵ Response: BCL˽4↵ + +8. RMR – Read Multiple Registers + +This command is used for reading out configuration registers (refer to 0). + +Command: **RMR**˽C˽T˽R˽N↵ + +Response: **RMR**˽C˽T˽R˽N˽Y1˽Y2˽Y3…˽YN↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +T Register block number: + +T=0: *Settings* registers + +T=1: *Calibration* registers + +T=3: *Results* registers + +T=4: *AnalogOutput* registers + +R Start register number (R=0 for starting with the first register) N Number of registers to read. + +Output Parameters: + +Y1…YN Read register values. + +Example Communication Command: RMR˽1˽0˽2˽3↵![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Response: RMR˽1˽0˽2˽3˽0˽5˽2↵ + +This example reads out the 3rd, 4th, and 5th *Settings* register of the first optical channel, returning *salinity*=0, *duration*=5, and *intensity*=2. + +9. WTM – Write Multiple Registers + +This command is used for writing configuration registers (refer to 0). Note, this [comm](#_page22_x54.00_y178.92)and changes the register values only in the volatile memory of the device. + +In order to keep the changed register valuesn after a power cycle, the command SVS [(2.3.10) ](#_page21_x54.00_y584.92)must be executed afterwards. + +Command: WTM˽C˽T˽R˽N˽Y1˽Y2˽Y3…˽YN↵ + +Response: WTM˽C˽T˽R˽N˽Y1˽Y2˽Y3…˽YN↵ + +Input Parameters: + +C Optical channel number (C=1 for one channel devices). + +T Register block number. + +T=0: *Settings* registers + +T=1: *Calibration* registers + +T=3: *Results* registers + +T=4: *AnalogOutput* registers + +R Start register number (R=0 for starting with the first register) + +N Number of registers to write. + +Y1…YN Register values to be written. + +Example Communication: + +Command: WTM˽2˽1˽2˽4˽-5000˽12000˽976000˽50000↵ Response: WTM˽2˽1˽2˽4˽-5000˽12000˽976000˽50000↵ + +This example writes the 2nd, 3rd, 4th, and 5th *Calibration* register of the second optical channel, adjusting the registers to *temp0*=-5000 (i.e. -5°C), *temp100*=12000 (i.e. 12°C), *pressure*=976000 (i.e. 976 mbar), and *humidity*=50000 (i.e. 50%RH). + +10. SVS – Save Registers in Flash Memory + +Saves the actual RAM register configuration as the new default values into the internal flash memory. These default values are automatically loaded after a power cycle.: + +Command: **SVS**˽C↵ Response: **SVS**˽C↵ + +Input Parameters: + +C Optical channel number (set always C=1). + +Important: This command should be used economically, as the hardware is specified for ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.026.png)up to 20,000 flash cycles.![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Note: This command always stores the register configuration of all optical channels into ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.027.png)the internal flash memory. So the parameter C can be fixed to 1. + +Example Communication: + +Command: SVS˽1↵ + +Response: SVS˽1↵ + +11. LDS –Load Registers from Flash Memory + +Loads all RAM register values from the internal flash memory, i.e. the configuration is restored, which was given when the SVS command was executed last. Note, after a power cycle this action is automatically performed. + +Command: **LDS**˽C↵ + +Response: **LDS**˽C↵ + +Input Parameters: + +C Optical channel number (set always C=1). + +Note: This command always loads the register configuration of all optical channels from ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.028.png)the flash memory into the RAM memory. So the parameter C can be fixed to 1. + +Example Communication: Command: LDS˽1↵ Response: LDS˽1↵ + +4. Error Responses + +If an error occurred while processing a received command, the device will give the following response: + +Command: *any command* Response: **#ERRO**˽C ↵ + +This error response is mostly given, if the master did not send the command with the correct communication syntax. The output parameter C represents the general PyroScience error types as given by the following table. + +Note: Warnings and errors directly related to the sensor measurements (e.g. a broken ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.029.png)Pt100 temperature sensor, or a "worn out" optical oxygen sensor) will not result in such an #ERRO response. Instead, such warning and errors are given in the register *Results.status* (refer to 2.9).[ ](#_page36_x54.00_y519.92)![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +C Error Type Description + +|-1 |*General* |||A non-specific error occurred.| +| - | - | :- | :- | - | +|-2 |*Channel* |||The requested optical channel does not exist.| +|-11 |*Memory Access* |||Memory access violation either caused by a not existing requested | +|||||register, or by an out of range address of the requested value.| +|-12 |*Memory Lock* |||The requested memory is locked (system register) and a write | +|||||access was requested.| +|-13 |*Memory Flash* |||An error occurred while saving the registers permanently. The SVS | +|||||request should be repeated to ensure a correct permanent | +|||||memory. | +|-14 |*Memory Erase* |||An error occurred while erasing the permanent memory region for | +|||||the registers. The SVS request should be repeated.| +|-15 |*Memory Inconsistent*||The registers in RAM are inconsistent with the permanently stored || +||||registers after processing SVS. The SVS request should be repeated.|| +|-21 |*UART Parse* ||An error occurred while parsing the command string. The last || +||||command should be repeated.|| +|-22 |*UART Rx* ||The command string was not received correctly (e.g. device was || +||||not ready, last request was not terminated correctly). Repeat the || +||||last command.|| +|-23 |*UART Header* ||The command header could not be interpreted correctly (must || +||||contain only characters from A-Z). Repeat the last command.|| +|-24 |*UART Overflow* ||The command string could not be processed fast enough to prevent || +||||an overflow of the internal receiving buffer|| +|-26 |*UART Request* ||The command header does not match any of the supported || +||||commands. || +|-28 |*UART Range* ||One or more parameters of the command are out of range.|| +|-30 |*I2C Transfer* ||There was an error transferring data on the I2C bus.|| +|-40 |*Temp Ext* ||The communication with the sample temperature sensor was not || +||||successful. || + +-41 *Periphery No Power* The power supply of the device periphery (sensors, SD card) is not + +switched on.![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +5. Settings Registers + +These read/write registers contain settings for the optical measurement. The register block number is 0. They can be manipulated by using the commands RMR (2.3.8), WTM [(2.3.9), ](#_page21_x54.00_y147.92)and SVS (2.[3.10). ](#_page21_x54.00_y584.92) + +Example Communication (reading the first 13 registers) + +Command: RMR˽1˽0˽0˽13↵ + +Response: RMR˽1˽0˽0˽13˽20000˽1013000˽0˽5˽1˽6˽4000˽0˽0˽3˽0˽1˽2 ↵ + +Example Communication (writing the first 3 registers) Command: WTM˽1˽0˽0˽3˽-30000˽-1˽12↵ Response: WTM˽1˽0˽0˽3˽-30000˽-1˽12 ↵ + +The following table provides an overview. The registers can be grouped into 3 different categories is indicated by the circles in the first column. ![ref1] + + + +|Reg. Nr. |Label |Unit |Range |Description | +| - | - | - | - | - | +|E 0 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.030.png)|*temp* |0\.001 °C |-300096 – 300000 |

Temperature in the sample.

Set to -300000 for automatic temperature compensation using the sample temperature sensor (e.g. Pt100).

Set to -300000 - N for automatic temperature compensation using an optical temperature sensor connected to channel N.

| +|E 1 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.031.png)|*pressure* |0\.001 mbar |-1 – 10000000|

Ambient air pressure in the sample

(set to -1 for automatic pressure compensation)

| +|E 2 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.032.png)|*salinity* |0\.001 g/l |0 – 1000000|Salinity in the sample| +|

M T ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.033.png)

3

|*duration* |- |1 – 8 |Determines the duration of the red flash used for the optical measurement. The values 1-8 correspond to a flash duration of 1, 2, 4, 8, 16, 32, 64, and 128ms, respectively.| +|

M S ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.034.png)

4

|*intensity\** |- |0 – 7 |

Determines the intensity of the red flash use for the optical measurement. The values 0-7 correspond to 10%, 15%, 20%, 30%, 40%, 60%, 80%, and 100% of the maximum intensity

.

| +|

M S ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.035.png)

5

|*amp\** |- |4 – 6 |Determines the amplification level of the optical detector used for reading out the optical sensor. The values 4-6 correspond to 80x, 200x, and 400x amplification.| +|T 6 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.036.png)|*frequency* |Hz |1 – 32000 |Sensor type specific constant| +|M 7 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.037.png)|*crcEnable* |- |0 – 1 |

0: no cyclic redundancy check (CRC)

1: enables CRC of the communication protocol (only used for channel=1, see comment below)

| +|8 |Reserved |||| +|T 9 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.038.png)|*options* |- |0 – 7 |

Sensor type specific constant

bit0 (add 1): automaticFlashDuration is enabled bit1 (add 2): automaticAmpLevel is enabled bit2 (add 4): 1000xOxygen is enabled

| +|M 10 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.039.png)|*broadcast* |- ||See below | +|T 11 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.040.png)|*analyte* |- |0 – 4 |

Sensor type specific constant

Detected analyte by the optical sensor: 0: no sensor, 1: oxygen, 2: temperature, 3:

` `pH

| +|T 12 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.041.png)|*fiberType* |- |0 – 2 |Sensor type specific constant Diameter of the used optical fiber 0 = 230µm, 1 = 430µm, 2 = 1mm| + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|13-19 |Reserved |||| +| - | - | :- | :- | :- | +* Note: When changing these values, a recalibration of the optical sensor is recommended. +1. E Environmental Condition Registers ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.042.png) + +Before triggering an optical measurement, the registers *temp*, *pressure* and *salinity* must be adjusted by the user in order to define the environmental conditions in the sample at the very position where the sensitive part of the optical sensor is located. This is needed by the device for calculating the correct result for the optical sensor measurement. Refer to the table below, which environmental settings are needed for the different analytes. The special setting *temp* = -300000 activates the automatic temperature compensation of the optical measurement, which means that the result of the sample temperature measurement (e.g. external Pt100) is used for calculating the results. + +Devices with more than one optical channel can use optical temperature sensors for compensating optical sensors connected to other channels. For example, if an oxygen, a pH, and an optical temperature sensor are connected to the optical channels 1, 2, and 3, respectively. Then *Settings.temp* should be adjusted to -300003 for the channels 1 and 2. This way, the oxygen and the pH sensor will be automatically temperature compensated by the results of the last optical temperature measurement at channel 3. In this scenario it is important to trigger first the measurement at channel 3, followed by measurements at channels 1 and 2. + +The special setting *pressure* = -1 activates the automatic pressure compensation of the optical measurement, which means that the result of ambient air pressure measurement is used for calculating the results. + + + +|Analyte |Temperature|Pressure |Salinity | +| - | - | - | - | +|Oxygen |Required |Required only for oxygen units: µmolar (mg/L), %air sat., %O2 |Required only for oxygen units: µmolar (mg/L) | +|Optical Temperature|-- |-- |-- | +|pH |Required |-- |Required | + +2. M Measurement Mode Registers ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.043.png) + +Optical Measurement Parameters. All optical sensors from PyroScience are based on proprietary luminescent dyes, which are excited with LED light. The excited dyes emit then light in the near infrared (NIR), which is detected by a light detector. The measured lifetime of the emitted NIR light is then used to calculate the final oxygen, pH, or temperature values (all done within the firmware). The user can adjust (i) the *intensity* of the LED light, (ii) the *duration* of the emitted LED flash, and the (iii) the amplification level *amp* of the detector. + +The registers *intensity* and *amp* should be adjusted together. Suggested procedure: set *amp* = 6 and increase *intensity* stepwise from 0 to 7 until the signal intensity (*Results.signalIntensity*) is within the typical range of 100-400mV. If *Results.signalIntensity* is then still too high, decrease stepwise *amp* to 5 or 4 and choose ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +again the best value for *intensity*. But *amp* must be kept in the range of 4-6. Note that the chosen value of *intensity* is a compromise between lower long-term drift (*intensity*=1) and lower signal-to-noise ratio (*intensity*=8). + +The registers *intensity* and *amp* should be always adjusted properly if a new sensor head ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.044.png)is connected to the device. After the sensor has been calibrated, these two registers should not be changed again. + +Please refer also to section 2.5.3 [describing](#_page27_x54.00_y607.92) an alternative way how to adjust the registers *intensity* and *amp* based on the sensor code provided with each individual sensor head. + +The register *duration* determines the length of the LED flash as indicated in the table. The chosen value is a compromise between lower long-term drift (*duration*=1) and lower signal-to-noise ratio (*duration*=8). If in doubt set *duration*=5. This register has no effect on the calibration, so it can be changed anytime. + +Broadcast Mode. The register *broadcast* can be used to enable and configure the broadcast mode for the specific optical channel. During broadcast mode, the device triggers itself periodic measurements as defined in the *broadcast* register (see details in the table below). Optionally it is also possible to trigger broadcast measurements via the digital input TRIGIN at the extension port of the device (if available). The results can be given at the analog output (if available), and the results can be transmitted via the UART/USB interface. In the latter case, the results are transmitted following the syntax of the MEA command (2.3.[1), with](#_page15_x54.00_y531.92) the only difference, that the message starts with the character “>” (ASCII code 0x3E). + +The broadcast mode of different optical channels can be configured independently. For example, one channel can measure every 10s, the next one every 0.5s. + +Note, the minimum realizable broadcast interval depends on the hardware. For laboratory (e.g. FireSting) and underwater devices (e.g. AquapHOx Transmitter) it can be as low as 25 ms, while for most OEM devices (e.g. PICO-x) the minimum realizable broadcast interval is 1000 ms. The reason is, that these OEM devices are optimized for low energy and not for high speed operation. The maximum possible broadcast interval is 65000 ms = 65 s. + +Note, the master can anytime send standard commands to the device, even if the broadcast mode is enabled. If the device receives a command from the master, while it is executing a broadcast measurement, the device will (1) complete the broadcast measurement, (2) send the broadcast message, (3) thereafter it will immediately execute the requested command, and (4) send then the response to the master. + +Broadcast Mode with Deep Sleep. For devices which support the #STOP command [(2.2.6), ](#_page13_x54.00_y604.92)the broadcast mode does also work in combination with the deep sleep mode in order to reduce the power consumption significantly. This mode is enabled by sending the command #STOP or it is enabled directly after power up if the *enableDeepSleep* bit is set to 1. In this case the device automatically wakes up from deep sleep for each ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +required broadcast measurement. When the measurement is finished it goes back into deep sleep mode. + + + +|broadcast Register|Label ||Description | +| - | - | :- | - | +|Bit 0..15 |*Interval* (ms) ||interval = 0: Interval broadcast mode is disabled| +||||interval = 1-65535: Interval broadcast mode is enabled. The | +||||module triggers itself periodic measurements, whereby interval | +||||defines the broadcast interval in units of ms. The max. possible | +||||interval is 65 s. The minimum is in the range of 25-1000ms | +||||depending on the specific hardware and the configuration of | +||||the measurement mode registers. | +|Bit 16..23 |*enabledSensors* ||Bitfield defining which sensors are enabled during the | +|Bit 16 (add 65536) Bit 17 (add 131072) Bit 18 (add 262144) Bit 19 (add 524288) Bit 20 (add 1048576) Bit 21 (add 2097152)|

optical channel sample temperature ambient air pressure relative humidity reserved

case temperature

||broadcast mode as given by the parameter S in the command MEA. | +|Bit 24 (add 16777216) |*enableUartTransmit*||If set to 1, then the broadcast mode will send after each | +||||measurement via the UART (USB) interface the character ‘>’ | +||||followed by the answer string as given by the command MEA. | +|Bit 25 (add 33554432) |*enableTrigin* ||If set to 1, then a broadcast measurement can be triggered by | +||||the TRIGIN pin at the extension port (if available).| +|Bit 26 (add 67108864) |*enableDeepSleep* ||If set to 1, then the device will go after power up directly into | +||||deep sleep mode (only if device supports the #STOP command). | +||||It will wake up periodically for each required broadcast | +||||measurement, and then go back to deep sleep.| + +Cyclic Redundancy Check (CRC). Setting the register *Settings.crcEnable*=1 will enable a cyclic redundancy check (CRC) for all messages (i.e. command responses and broadcast messages) transmitted from the device to the control hardware (e.g. PC). Now every answer from the device to the master is terminate by the string “:˽C↵” where C is the CRC16/Modbus checksum represented as a decimal ASCII-string (human readable). The CRC is calculated for all ASCII-characters (unsigned bytes) from the very beginning of the returned string until the character just before the “:”. Note, also spaces (ASCII code 32) are included in the CRC calculation. See also 2.1.4. + +Note, crcEnable is only used for channel=1. The value of crcEnable for channel 1 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.045.png)enables/disables the CRC for the whole device! + +3. S Sensor Code Settings ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.046.png) + +Section [2.5.2 de](#_page25_x54.00_y574.92)scribed how to configure the registers *intensity* and *amp.* This procedure can be optionally omitted by utilizing information given by the “sensor code” provided with each individual sensor head from PyroScience. This sensor code contains the factory calibration (see section 2.6.2) [and recomme](#_page30_x54.00_y671.92)nded measurement settings for *intensity* and *amp*. The last two digits of the first block of the sensor code contain the recommended settings. For example, in the sensor-code “XB7-547-213” “B” encodes the *intensity* setting (the letters A to H correspond to 10%, 15%, 20%, 30%, 40%, 60%, 80%, and 100% of the maximum intensity) and “7” encodes the *amp* setting (5, 6 and 7 correspond to 80x, 200x, and 400x amplification). These values are only ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +recommendations for typical applications for the specific sensor head. For optimal performance please follow the instruction given in section 2.5.2. + +4. T Sensor Type Specific Constants ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.047.png) + +These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). For example: if the user intents to use always oxygen microsensor (item nr. OXR50), then these registers need to be configured only one time. It is recommended to adjust the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench”. These software tools will configure these registers based on the sensor code attached to the sensor head. Standard users might skip the following paragraphs of this section, as these registers are adjusted by the mentioned software tools. + +Automatic Flash Duration. Setting bit 0 (*automaticFlashDuration*) of *Settings.options* to 1 will enable the automatic flash duration. Now the flash duration is dynamically adjusted within the range of 1-128 ms depending on the last value of *Results.signalIntensity*. In this case *duration* defines the flash duration if *Results.signalIntensity* equals 400mV. For higher signal intensities the duration is automatically reduced, while for lower ones it is increased. This option is especially useful for oxygen sensors, because their *signalIntensity* depends strongly on the actual oxygen level. This way the *duration* is dynamical adjusted in order to assure a pretty constant signal-to-noise level while ensuring minimal drift (caused by photobleaching). + +Automatic Amplification Level. If bit 1 (*automaticAmpLevel*) of *Settings.options* is set to 1, then the amplification level of the detector is reduced automatically in case of an oversaturation of the detector. It is recommended for precision measurements to adjust *intensity* and *amp* in such a way, that *Results.status* never indicates “sensor signal or ambient light too high”. But an enabled automatic amplification level is anyhow recommended, because the optical sensor will still give reasonable values if e.g. increased ambient light might saturate the amplifier. In this case the optical measurement is automatically repeated with stepwise decreased amplification levels, until the amplifier is not anymore saturated. If such an automatic amplification reduction has taken place, then *Results.status* shows “Warning - automatic amplification level active”. Note, that the content of the register *amp* is not changed by this procedure. + +Trace Oxygen Option. If bit 2 (*1000xOxygen*) of *Settings.options* is set to 1, the integer values given in the *Results* registers *umolar*, *mbar*, *airSat*, and *percentO2* are multiplied by a factor of 1000. This means, that after conversion to floating point values, the user will obtain 3 more digits of precision for oxygen measurements. This option should be only used in combination with special “trace oxygen sensors” intended for measurements close to 0%O2. If the *1000xOxygen* option is enabled, then *Results.status* will always show the warning “WARNING – 1000xOxygen enabled”.![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +In the following table the recommended settings for a few selected sensor types are listed. The values for duration are only suggestions and can be changed as described in section [2.5.2. P](#_page25_x54.00_y574.92)lease contact us if your sensor type is not listed here. + + + +||Register Name (Register Number)||||| +| :- | - | :- | :- | :- | :- | +|Sensor Type(s)|duration (3) |frequency (6)|options (9) |analyte (11)|fiberType (12)| +|X, S |5 |4000 |3 |1 |2 | +|XZ |5 |4000 |3 |1 |2 | +|Z |5 |4000 |3 |1 |0 | +|Y |5 |4000 |3 |1 |1 | +|W |5 |4000 |3 |1 |2 | +|U, T |8 |470 |3 |1 |2 | +|D |8 |970 |3 |2 |2 | +|C |8 |1970 |3 |2 |1 | +|SA, SB, SC, SD, SE, SF, XA, XB, XC, XD, XE, XF |5 |3000 |3 |3 |2 | + +6. Calibration Registers (Oxygen Sensors) + +These read/write registers contain all information about the sensor calibration. The register block number is 1. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) + +Example Communication (reading the first 6 registers) + +Command: RMR˽1˽1˽0˽6↵ + +Response: RMR˽1˽1˽0˽6˽53212˽20123˽20212˽21209˽1024089˽100000 ↵ + +Example Communication (writing the first 2 registers) Command: WTM˽1˽1˽0˽2˽53000˽20000↵ Response: WTM˽1˽1˽0˽2˽53000˽20000 ↵ + +Note, the specific definition of the *Calibration* registers depends on the analyte of the connected sensor head. This chapter describes the definition of the *Calibration* registers, if an optical oxygen sensor is connected. Important, do not forget to adjust the *Settings*.*analyte* to 1 in this case. This ensures, that the device applies the calibration registers accordingly. + +The *Calibration* registers provide all information needed for converting the raw value *Results.dphi* into the final oxygen units in the *Results* registers. The following table provides an overview. The registers can be grouped into 2 different categories as indicated by the circles in the first column.![ref1] + + + +|Reg. Nr. |Label |Unit |Configured by |Description | +| - | - | - | - | - | +|C S 0 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.048.png)|*dphi0* |0\.001° |command CLO (or sensor code) |Phase shift at 0%O2. | +|C S 1 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.049.png)|*dphi100* |0\.001° |command CHI (or sensor code) |Phase shift at upper calibration point.| + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|C S 2 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.050.png)|*temp0* |0\.001°C |command CLO (or sensor code|) |Calibration temperature at 0%O2.| +| - | - | - | - | - | - | +|C S 3 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.051.png)|*temp100* |0\.001°C |command CHI (or sensor code|) |Calibration temperature at upper calibration point.| +|C S 4 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.052.png)|*pressure* |0\.001 mbar |command CHI (or sensor code|) |Ambient air pressure during calibration at upper calibration point.| +|C S 5 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.053.png)|*humidity* |0\.001 %RH |command CHI (or sensor code|) |Relative humidity during calibration at upper calibration point. Set to 100%RH | +||||||for calibrations in liquid samples.| +|T 6 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.054.png)|*f* |0\.001 |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 7 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.055.png)|*m* |0\.001 |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 8 ![ref3]|*calFreq* |Hz |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 9 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.057.png)|*tt* |10-5/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 10 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.058.png)|*kt* |10-5/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 11 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.059.png)|*bkgdAmpl* |0\.001 mV |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 12 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.060.png)|*bkgdDphi* |0\.001° |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 13 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.061.png)|*useKsv* ||software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 14 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.062.png)|*ksv* |10-6/mbar |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 15 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.063.png)|*ft* |10-6/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|T 16 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.064.png)|*mt* |10-6/K |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||Sensor type specific constant| +|17 |Reserved ||||| +|T 18 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.065.png)|*percentO2* |0\.001 %O2 |software tools (or section [2.6.3) ](#_page31_x54.00_y403.92)||

Sensor type specific constant

Oxygen level at upper calibration point

| +|19-29 |Reserved ||||| +1. C User Calibration ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.066.png) + +The calibration data registers contain all information about the last sensor calibration. It is only necessary to write these registers if the factory calibration of a sensor head should be used. During a calibration they are automatically adjusted by the oxygen calibration commands CHI (2.3.[2) and ](#_page16_x54.00_y628.92)CLO (2.3.3).[ The comm](#_page17_x54.00_y431.92)and CHI will adjust the registers *dphi100, temp100, pressure,* and *humidity*. The command CLO will adjust the registers *dphi0* and *temp0*. + +2. S Factory Calibration Taken from Sensor Code![ref4] + +The user calibration is generally advised for highest accuracy. But it is possible to replace either calibration point by a rough factory calibration, which is given by the so called “Sensor Code” attached to each oxygen sensor. This is especially interesting, if the aimed application will not measure oxygen values close to one of the calibration points. For example, a respiration measurement might measure always around oxygen levels of ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +18-21 %O2. Then it is possible to take the factory calibration for the 0 %O2 calibration point, without losing too much accuracy. + +How to deduct the factory calibration from the Sensor Code is best explained by an example, where we assume the following Sensor Code: XB7-547-213 + +A 0 %O2 factory calibration is encoded by the numbers 547 which give *dphi0* = 54,7°. The user has to write the following registers, in order to apply this calibration: + + + +|Register |Value |int32 value| +| - | - | - | +|*dphi0* |54\.7° |54700 | +|*temp0* |20\.0°C |20000 | + +An ambient air factory calibration is encoded by the numbers 213 which give *dphi100* = 21,3°. The user has to write the following registers, in order to apply this calibration: + + + +|Register |Value |int32 value| +| - | - | - | +|*dphi100* |21\.3° |21300 | +|*temp100* |20\.0°C |20000 | +|*pressure* |1013 mbar |1013000| +|*humidity* |0 %RH |0 | + +3. T Sensor Type Specific Constants![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.068.png) + +These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). For example: if the user intents to use always oxygen microsensors (item nr. OXR50), then these registers must be configured only one time. It is recommended to adjust the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench”. These software tools will configure these registers based on the sensor code provided with the sensor head. + +Advanced users might change the register *percentO2*. For most standard range oxygen sensors this register is fixed to 20.95 %O2. This defines, that the command CHI (2.3.2) can be used for calibrations at ambient oxygen levels. If you want to apply a calibration gas of e.g. 15 %O2 or 100 %O2, then you have to write this value into the register *percentO2* before using the command CHI. + +Advanced users applying contactless sensor solutions like sensor spots or flow-through cells might adjust the registers *bkgdAmpl* and *bkdgDphi* additionally by using the commands BGC or BCL. Refer to section 2.3.6 [for mor](#_page19_x54.00_y402.92)e details. Standard users should use the described software tools for configuring these registers. For sensors using a 1 mm plastic fiber *bkgdAmpl* can be estimated as: + +- 0.234 × ℎ( ) + 0.343 ℎ = 0 (eq. 1) + +If the user intends to switch sensor type between measurements and a reconfiguration with the “Pyro DeveloperTool” or “Pyro Workbench” is not possible, the registers can be adjusted manually. The following table lists the type specific calibration registers for a ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +few selected oxygen sensors. The values in this table are in register-units. No conversion is necessary. For all listed sensor types the following registers are constant: bkgdDphi = useKsv = ksv = ft = 0, percentO2 = 20950. + + + +||Register Name (Register Number)||||||| +| :- | - | :- | :- | :- | :- | :- | :- | +|Sensor Type(s)|f (6) |m (7) |calFreq |tt (9) |kt (10) |bkgdAmpl (11)|mt (16) | +||||(8) ||||| +|X, S |804 |122 |4000 |-56 |969 |see eq. 1 |-303 | +|XZ |836 |49 |4000 |-29 |549 |see eq. 1 |-32 | +|Z, Y |817 |106 |4000 |-70 |953 |0 |-301 | +|W |817 |106 |4000 |-43 |799 |see eq. 1 |-301 | +|U, T |827 |75 |470 |-350 |874 |see eq. 1 |-106 | + +7. Calibration Registers (Optical Temperature Sensors) + +These read/write registers contain all information about the sensor calibration. The register block number is 1. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) + +Example Communication (reading the first 2 registers) Command: RMR˽1˽1˽0˽2↵ + +Response: RMR˽1˽1˽0˽2˽343˽223↵ + +Example Communication (writing the 10th register *Tofs*) Command: WTM˽1˽1˽9˽1˽-1023↵ + +Response: WTM˽1˽1˽9˽1˽-1023↵ + +Note, the specific definition of the *Calibration* registers depends on the analyte of the connected sensor head. This chapter describes the definition of the *Calibration* registers, if an optical temperature sensor is connected. Important, do not forget to adjust the *Settings*.*analyte* to 2 in this case. This ensures, that the device applies the calibration registers accordingly. + +These registers provide all information needed for converting the raw value *Results.dphi* into the temperature given in *Results.tempOptical*. The following table provides an overview. The registers can be grouped into 3 different categories as indicated by the circles in the first column.![ref1] + + + +|Reg. Nr. |Label |Unit |Configured by|Description | +| - | - | - | - | - | +|S 0 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.069.png)|*M* |1 |sensor code|Sensor code constant| +|S 1 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.070.png)|*N* |1 |sensor code|Sensor code constant| +|2-5 |Reserved* |||| +|T 6 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.071.png)|*C* |0\.001 |software tools (or section [2.7.3) ](#_page33_x54.00_y426.92)|Sensor type specific constant| +|7-8 |Reserved* |||| +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|C 9 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.072.png)|*Tofs* |0\.001 K |command COT |Offset temperature used for single point calibration (e.g. -1230 corresponds to an offset of -1.23K) | +| - | - | - | - | :- | +|10 |Reserved* |||| +|T 11 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.073.png)|*bkgdAmpl* |0\.001 mV |software tools (or section [2.7.3) ](#_page33_x54.00_y426.92)|Sensor type specific constant| +|T 12 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.074.png)|*bkgdDphi* |0\.001° |software tools (or section [2.7.3) ](#_page33_x54.00_y426.92)|Sensor type specific constant| +|13-29 |Reserved* |||| +1. C User Calibration![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.075.png) + +The register *Tofs* contains a simple offset user calibration. The command COT (2.3.4) will adjust this register. + +2. S Sensor Code Constants![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.076.png) + +These registers comprise constants which must be adjusted for each individual sensor head. These constants are part of the sensor code printed on the label attached to the sensor head. An example explains how to deduct these constants from the sensor code: + +We assume the following Sensor Code: CD6-303-407 Then the register *M* must be adjusted to *M* = 303. And the register *N* must be adjusted to *N* = 407. + +3. T Sensor Type Specific Constants![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.077.png) + +These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). It is recommended to determine the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench” initially as a reference. These software tools will configure these registers based on the sensor code attached to the sensor head. + +Advanced users applying contactless sensor solutions like sensor spots or flow-through cells might adjust the registers *bkgdAmpl* and *bkdgDphi* additionally by using the commands BGC or BCL. Refer to section 2.3.6 [for mor](#_page19_x54.00_y402.92)e details. Standard users should use the described software tools for configuring these registers. For sensors using a 1 mm plastic fiber *bkgdAmpl* and *bkgdDphi* can be estimated with Fehler! Verweisquelle konnte nicht gefunden werden. given in section 2.6.3. + +If the user intends to switch sensor type between measurements and a reconfiguration with the “Pyro DeveloperTool” or “Pyro Workbench” is not possible, the register *C* can be adjusted manually. For the sensor type “D” the value for *C* is 97. For the sensor type “C” the value of C is + +-27. Both values are in register units. No conversion is necessary. ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +8. Calibration Registers (pH Sensors) + +These read/write registers contain all information about the sensor calibration. The register block number is 1. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) + +© PyroScience GmbH 35 +![ref2] + +Example Communication (reading the 14 Command: RMR˽1˽1˽13˽1↵ Response: RMR˽1˽1˽13˽1˽154↵ + +Example Communication (writing the 1 Command: WTM˽1˽1˽0˽1˽7013↵ Response: WTM˽1˽1˽0˽1˽7013↵ + +th register) st register) + +© PyroScience GmbH +![ref2] + +Note, the specific definition of the *Calibration* registers depends on the analyte of the connected sensor head. This chapter describes the definition of the *Calibration* registers, if an optical pH sensor is connected. Important, do not forget to adjust the *Settings*.*analyte* to 3 in this case. This ensures, that the device applies the calibration registers accordingly! + +These read/write registers provide all information needed for converting the raw value *Results.dphi* into the final pH value given in the *Results.ph*. The following table provides an overview on all *calibration* registers. These registers can be grouped into 3 different categories is indicated by the circles in the first column.![ref1] + + + +|Reg. Nr. |Label |Unit |Configured by|Description || +| - | - | - | - | - | :- | +|S 0 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.078.png)|*pka* |0\.001 pH |sensor code|Sensor code constant|| +|T 1 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.079.png)|*slope* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 2 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.080.png)|*dPhi\_ref* |0\.001° |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 3 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.081.png)|*pka\_t* |10-6 delta pH/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 4 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.082.png)|*dyn\_t* |10-6 1/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 5 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.083.png)|*bottom\_t* |10-6 1/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 6 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.084.png)|*slope\_t* |10-6 1/K |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 7 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.085.png)|*f* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 8 ![ref3]|*lambda\_std* |0\.001 nm |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 9 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.086.png)|*pka\_is1* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 10 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.087.png)|*pka\_is2* |10-6|software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 11 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.088.png)|*bkgdAmpl* |0\.001 mV |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|T 12 ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.089.png)|*bkgdDphi* |0\.001° |software tools (or section 2.8.3[) ](#_page35_x54.00_y761.92)|Sensor type specific constant|| +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.090.png)

` `13

|*offset* |0\.001 pH |command CPH ||| +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.091.png)

` `14

|*dPhi1* |0\.001° |command CPH ||| +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.092.png)

` `15

|*pH1* |0\.001 |command CPH ||| +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.093.png)

` `16

|*temp1* |0\.001 °C |command CPH ||| +| - | - | - | - | :- | :- | +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.094.png)

` `17

|*salinity1* |0\.001 g/L |command CPH ||| +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.095.png)

` `18

|*ldev1* |0\.001 nm |command CPH ||| +|

C S ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.096.png)

19

|*dPhi2* |0\.001° |command CPH (or sensor code)||| +|

C S ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.097.png)

20

|*pH2* |0\.001 pH |command CPH (or sensor code)||| +|

C S ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.098.png)

21

|*temp2* |0\.001 °C |command CPH (or sensor code)||| +|

C S ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.099.png)

22

|*salinity2* |0\.001 g/L |command CPH (or sensor code)||| +|

C S ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.100.png)

23

|*ldev2* |0\.001 nm |command CPH (or sensor code)||| +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.101.png)

` `24

|*Aon* |10-6|command CPH ||| +|

C ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.102.png)

` `25

|*Aoff* |10-6|command CPH ||| +|26-29 |Reserved ||||| +1. C User Calibration![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.103.png) + +These registers are adjusted by applying the command CPH (2.3.5). When[ the sen](#_page18_x54.00_y318.92)sor is switched the offset *register* must be reset to 0. + +2. S Sensor Code Constants![ref4] + +The register *pka* is a constant which must be adjusted for each individual sensor head. This constant is printed on the label attached to the sensor head. + +A two-point calibration by the user calibration is generally advised for highest accuracy. However, the label attached to the sensor head contains a factory calibration for the calibration point at high pH (*dPhi2*). In this case only a 1-point calibration at low pH is required by the user. + +On sensor heads produced after 11/2021 the value of *dPhi2* is printed on the label of the sensor. If this value is not printed on your sensor head you can decode it from the last 2 digits of the sensor code with this formula: *dPhi2* = 47 + 10/99\*lastTwoDigits + +For the example sensor code SAC7-387-250 this would result in: *dPhi2* = 47 + 10/99\*50 + +- 52.05°. *dPhi2* is the hypothetical phase angle at *pH2*=14, *temp2*=20°C, *salinity2*=7.5 and *ldev2*=623. For this example the following command would be used to set the registers on the device: + + WTM˽**C**˽1˽19˽5˽52050˽14000˽20000˽7500˽62300↵ where C has to be replaced with the channel number. + + If the sensor will be calibrated with a two-point calibration this step can be omitted. + +3. T Sensor Type Specific Constants![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.104.png)![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +These registers comprise constants which are specific for the used sensor type (and not for each individual sensor head). It is recommended to adjust the proper values by using the Windows software tools “Pyro DeveloperTool” or “Pyro Workbench”. These software tools will configure these registers based on the sensor code attached to the sensor head. + +Advanced users applying contactless sensor solutions like sensor spots or flow-through cells might adjust the registers *bkgdAmpl* and *bkdgDphi* additionally by using the commands BGC or BCL. Refer to section 2.3.6 [for mor](#_page19_x54.00_y402.92)e details. Standard users should use the described software tools for configuring these registers. For sensors using a 1 mm plastic fiber *bkgdAmpl* and *bkgdDphi* can be estimated with Fehler! Verweisquelle konnte nicht gefunden werden. given in section 2.6.3. + +If the user intends to switch sensor type between measurements and a reconfiguration with the “Pyro DeveloperTool” or “Pyro Workbench” is not possible, the registers can be adjusted manually. The following table lists the type specific calibration registers for a few selected pH sensors. The values in this table are in register-units. No conversion is necessary. For all listed sensor types the following registers are constant: *dPhi*\_*ref* = 57800, *slope*\_t = 0, *lambda*\_*std* = 623000, *bkgdDphi* = 0. If the sensor is switched the *offset* register should be reset to 0. + + + +||Register Name (Register Number)|||||||| +| :- | - | :- | :- | :- | :- | :- | :- | :- | +|Sensor Type(s) |slope (1) |pka\_t (3) |dyn\_t (4) |bottom\_t (5) |f (7) |pka\_is1 (9) |pka\_is2 (10) |bkgdAmpl (11) | +|SA, XA |1037000|-9570 |-955 |-676 |39500 |2330000|250000 |see eq. 1 | +|SB, XB |1081000|-11500 |-2090 |199 |32500 |2540000|250000 |see eq. 1 | +|SC, XC |1033000|-16300 |-521 |-1255 |32500 |969700 |126300 |see eq. 1 | +|SD, XD |1034800|-2756 |240 |145 |38710 |0 |250000 |see eq. 1 | +|SE, XE |1000000|-8568 |207 |-4130 |37980 |702000 |250000 |see eq. 1 | +|SF, XF |1000000|-7344 |-645 |-834 |35760 |1358000|250000 |see eq. 1 | + +9. Results Registers + +The read-only *Results* registers provide the status and the results of the last measurement. This register block is not saved within the flash memory, it is only kept in the volatile RAM memory. The register block number is 3. They can be read by using the command RMR (2.[3.8). ](#_page20_x54.00_y432.92) + +Example Communication (reading the first 8 registers) + +Command: RMR˽1˽3˽0˽15↵ + +Response: RMR˽1˽3˽0˽15˽0˽21099˽210837˽203987˽97876˽23656˽21065˽234098↵ + +Interpreted as: status = 0, dphi = 21.099°, umolar = 210.837 µmol/L, mbar = 203.987 hPa, airSat = 97.876 %air sat., tempSample = 23.656°C, tempCase = 21.065°C, signalIntensity = 234.098 mV ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +Note, the MEA command (2.3.[1) returns](#_page15_x54.00_y531.92) by default the content of the *Result* registers in the command response. So in standard applications it is not necessary to use the RMR command. + + + +|Reg. Nr. |Label |Unit |Range |Description | +| - | - | - | - | - | +|0 |*status*||int32 |ERROR / Warning Flags of the last measurement (refer to separate table below)| +|1 |*dphi*|0\.001° |int32 |Phase shift of optical measurement (raw data)| +|2 |*umolar\*\**|0\.001 µmol/L |int32 |Dissolved oxygen concentration (valid only in water) | +|3 |*mbar\*\**|

0\.001 mbar

= 0.001 hPa

|int32 |Partial pressure oxygen (hPa=mbar) (valid in gases and in liquids)| +|4 |*airSat\*\**|0\.001 %air sat. |int32 |Dissolved oxygen given as % air saturation (valid only in liquids) | +|5 |*tempSample*|0\.001°C |int32 |Sample temperature (typ. Pt100 sensor)| +|6 |*tempCase*|0\.001°C |int32 |Case temperature within the device| +|7 |*signalIntensity\**|0\.001 mV |int32 |Signal intensity of optical measurement| +|8 |*ambientLight*|0\.001 mV |int32 |Ambient light entering the sensor| +|9 |*pressure*|0\.001 mbar |int32 |Ambient air pressure| +|10 |*humidity*|0\.001 %RH |int32 |Relative humidity within the device| +|11 |*resistorTemp*|0\.001 Ohm |int32 |Resistance of the sample temperature sensor | +|12 |*percentO2\*\**|0\.001 %O2 |int32 |Oxygen volume fraction (valid only in gases)| +|13 |*tempOptical*|0\.001 °C |int32 |Temperature measured with optical temperature sensor| +|14 |*ph*|0\.001 |int32 |pH value measured by optical pH sensors| +|15 |*ldev*|0\.001 nm |int32 |Only for internal usage| +|16-17 |Reserved* |||| +* If *automaticAmpLevel* is enabled in *settings.options*, then *signalIntensity* is given as it would be for the actual amplification level adjusted in *settings.amp*! For example if *settings.amp*=7 (=400x) and the measurement was due to *automaticAmpLevel* performed with 80x amplification and a real photodetector signal intensity of 800mV, then *signalIntensity* will have the value 800mV x 400 / 80 = 4000mV. + + \*\* If *1000xOxygen* is enabled in *settings.options*, then these registers are internally multiplied by 1000, giving 3 more digits of precision after conversion to floating point values. + +Status Register. The *status* register contains several bit flags indicating errors or warnings of the last measured data point. + +It is on the users authority to check the *status* register after each measurement for ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.105.png)possible Warnings or ERRORS. Especially in case of ERRORS, the given results might be not valid. + +The user has to distinguish between warnings and errors. A warning indicates, that the measurement results are in principle still valid, but their precision and/or accuracy might be deteriorated. An error means, that the respective measurement result is not at all valid. ![ref1] + + + +|status Bit |ERROR / Warning Description| +| - | - | +|Bit 0 (add 1)|Warning - automatic amplification level active| +|Bit 1 (add 2)|Warning - sensor signal intensity low | +|Bit 2 (add 4)|ERROR - optical detector saturated| +|Bit 3 (add 8)|Warning - reference signal intensity too low | + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|Bit 4 (add 16)||ERROR - reference signal too high| +| - | :- | - | +|Bit 5 (add 32)||ERROR - failure of sample temperature sensor (e.g. Pt100) | +|Bit 6 (add 64)||Warning – 1000xOxygen enabled| +|Bit 7 (add 128)||Warning - high humidity (>90%RH) within the module| +|Bit 8 (add 256)||ERROR - failure of case temperature sensor| +|Bit 9 (add 512) ||ERROR - failure of pressure sensor| +|Bit 10 (add 1024)||ERROR - failure of humidity sensor| + +Example: *status* = 34 = 2 + 32 means, that there is a warning about low signal intensity of the optical sensor, and that the external temperature sensor (Pt100) had a failure. + +Results of optical oxygen sensors are given in the registers *umolar*, *mbar*, *airSat*, and *percentO2*. Refer to the table above for the details on the different oxygen units. These registers show only results if *Settings.analyte* = 1. Otherwise they are set to 0. + +Results of optical temperature sensors are given in the register *tempOptical*. This register shows only a result if *Settings.analyte* = 2. Otherwise it is set to 0. + +Results of optical pH sensors are given in the register *ph*. This register shows only a result if *Settings.analyte* = 3. Otherwise it is set to 0. + +Results of sample temperature sensors (typ. Pt100), case temperature sensors, internal pressure sensors and internal humidity sensors are given in *tempSample*, *tempCase*, *resistorTemp*, *pressure* and *humidity*, respectively. + +Invalid Results. If for any reason the measurement produces an invalid results (e.g. the signal intensity of an optical sensor is much too low, or the reference LED measurement had a failure etc.), then the result register contains the integer value -300000. Any higher programming language should interpret this as “not a number” (NaN). + +Raw data of the optical measurement. The raw data given by the optical phase-shift measurement are the “phase shift” *dphi*, the *signalIntensity*, and *ambientLight*.The phase shift *dphi* is the essential value used for calculating the value of the sensor analyte (see below). *signalIntensity* represents the measured luminescent signal intensity of the optical sensor. *signalIntensity* can be also used for checking the quality of the sensor (e.g. a broken sensor tip will result in a rapid decrease of the intensity). Please note, that the signal intensity is highly dependent e.g. on the actual oxygen concentration and/or on the temperature. Therefore, measured signal intensities can be only compared with each other, if they have been measured at similar analyte levels and temperatures. Immediately before each optical measurement, the device measures also the ambient light entering the optical detector and stores it in *ambientLight*. Considerable amounts of ambient light might enter the optoelectronics, if the sensor is exposed e.g. to direct sun light. This might lead to a saturation of the optical detector and to an invalid optical measurement. As a thumb of rule the sum of *ambientLight* and *signalIntensity* should not exceed 2000mV. If it exceeds this value, the amplification level in the *settings.amp* should be lowered. Or the sensor tip should be shaded from the external light source. Or *automaticAmpLevel* should be enabled in *settings.options*. ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +10. AnalogOutput Registers + +These read/write registers contain the configuration of the analog outputs (if available). The register block number is 4. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) + +Example Communication (reading the first 4 registers) Command: RMR˽1˽4˽0˽4↵ + +Response: RMR˽1˽4˽0˽4˽260˽516˽1028˽2052↵ Example Communication (writing the 5th register) + +Command: WTM˽1˽4˽4˽0↵ + +Response: WTM˽1˽4˽4˽0 ↵ + +The maximum number of supported analog outputs is 4. Any result register from any optical channel can be mapped on the analog outputs, whereby the linear scaling can be freely adjusted by min and max values. If the corresponding result register contains an invalid result (i.e. register value is -300000), then the analog output is set to 0.0V or 0mA. + +Note, these registers can be comfortably configured with the Windows software tools Pyro DeveloperTool or Pyro Woekbench.![ref1] + + + +|Reg. Nr. |Label |Unit ||Range |Description | +| - | - | - | :- | - | - | +|0 |*aoSelectA* |bits 0-6: regNr bit 7: alarm\*\* bits 8-15: C ||regNr: 0..17 alarm: 0..1 C: 1..4 |regNr is the register number of the *results*-register and C the optical channel number which is used for the analog | +||||||output A. | +||||||Use alarm=0 for standard analog output.| +||||||Use alarm=1 for alarm output, see below | +||||||\*| +|1 |*aoSelectB* |as above ||see above|As *aoSelectA* but given for analog output | +||||||B.| +|2 |*aoSelectC* |as above ||see above|As *aoSelectA* but given for analog output | +||||||C.| +|3 |*aoSelectD* |as above ||see above|As *aoSelectA* but given for analog output | +||||||D.| +|4 |*aoMinA* |unit identical to the unit of the register number regNr in the *results*-registers ||int32 |Defines the *results*-register value (selected by *aoSelectA*), which corresponds to the minimum output level (0.0V or 4mA).| +|5 |*aoMinB* |as above ||int32 |As *aoMinA* but given for analog output | +||||||B.| +|6 |*aoMinC* |as above ||int32 |As *aoMinA* but given for analog output | +||||||C.| +|7 |*aoMinD* |as above ||int32 |As *aoMinA* but given for analog output | +||||||D.| +|8 |*aoMaxA* |unit identical to the unit of the register ||int32 |Defines the *results*-register value (selected by *aoSelectA*), which | + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|||number regNr in the *results*-registers |||corresponds to the maximum output level (Umax or 20mA)| +| :- | :- | :- | :- | :- | :- | +|9 |*aoMaxB* |as above ||int32 |As *aoMaxA* but given for analog output | +||||||B.| +|10 |*aoMaxC* |as above ||int32 |As *aoMaxA* but given for analog output | +||||||C.| +|11 |*aoMaxD* |as above ||int32 |As *aoMaxA* but given for analog output | +||||||D.| + +* If alarm=1 then the analog output acts as a digital alarm output, giving 0.0V (or 4mA for current outputs) if the selected register is within the range defined by aoMinA and aoMaxA. If outside that range, the output is set to Umax (or 20mA). For invalid results (i.e. register value is -300000) it is set to Umax (or 0mA). +11. Resistive Temperature Sensor Registers + +These read/write registers contain the configuration of the resistive temperature measurement (e.g. Pt100 temperature sensor connected to the sample temperature port. The register block number is 20. They can be manipulated by using the commands RMR [(2.3.8), ](#_page20_x54.00_y432.92)WTM ([2.3.9), a](#_page21_x54.00_y147.92)nd SVS (2.[3.10). ](#_page21_x54.00_y584.92) + +This register block contains 8 registers, but only the register *tempOffset* is interesting for developers. This register can be used to perform a simple offset user calibration of the attached sample temperature sensor. The following example communication show how to read and write this single register: + +Example Communication for reading *tempOffset* + +Command: RMR˽1˽20˽6˽1↵ + +Response: RMR˽1˽20˽6˽1˽1200↵ + +In this example the current temperature offset is +1.2 K. Example Communication for writing *tempOffset* + +Command: WTM˽1˽20˽6˽-3340↵ + +Response: WTM˽1˽20˽6˽-3340↵ + +This example adjusts the temperature offset to -3.34 K. + +Note: The default value of *tempOffset* is 0. Resistive temperature sensors are generally ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.106.png)quite precise and long-term stable. In many typical applications it is not required to adjust this offset. + +Important: Changing the *tempOffset* register will have immediate impact on the calibration of any optical sensor, which is using the sample temperature sensor for automatic temperature compensation. Therefore, it is generally recommended to adjust *tempOffset* before the optical sensors are calibrated. + +Warning: Never change any of the registers *reg0-reg5* and *reg7*. They contain the factory configuration of the internal circuits used for reading out the sample temperature sensors. Please contact PyroScience if you have changed some of these registers accidentally.![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual![ref1] + + + +|Reg. Nr. |Label |Unit |Range |Description | +| - | - | - | - | - | +|0 |*reg0* |||Never change! | +|1 |*reg1* |||Never change! | +|2 |*reg2* |||Never change! | +|3 |*reg3* |||Never change! | +|4 |*reg4* |||Never change! | +|5 |*reg5* |||Never change! | +|6 |*tempOffset* |0\.001 K |int32 |Offset added to measured temperature| +|7 |*reg7* |||Never change! | + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +MODBUS PROTOCOL + +1. General Structure![ref1] + +![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.107.jpeg) + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +The figure above shows the general structure of some representative solutions from PyroScience offering a Modbus interface. + +All PyroScience devices possess a central microcontroller which is communicating via a UART interface based on the proprietary PyroScience protocol (2.1). Devices[ with](#_page7_x54.00_y134.92) a RS485/Modbus interface possess a second “Modbus microcontroller” which acts as a translator: it communicates with the outer world via the RS485 interface based on the Modbus protocol, while it is internally communicating with the central microcontroller based on the PyroScience protocol. + +1. Modbus RTU Standard + +PyroScience devices offering a Modbus interface are compatible with the Modbus RTU protocol as described in the official documentation “Modbus over serial line specification and implementation guide V1.02” and “Modbus application protocol specification V1.1b” provided by the Modbus Organization inc. ( https://[modbus.org ). ](https://modbus.org/) + +The advantages of RS485 in combination with the Modbus RTU protocol are: + +- cable lengths up to several 100m are supported +- up to 247 devices can be connected to a 4-wire RS485 bus +- Modbus RTU is a popular communication protocol +2. Modbus Implementation in PyroScience Devices + +The PyroScience protocol is based on (1) registers and on (2) commands. In contrast, the Modbus protocol is solely based on registers. It is the task of the Modbus microcontroller to map the functionality of the PyroScience registers and commands onto the Modbus register structure. PyroScience registers are simply mapped onto corresponding Modbus registers as outlined in the following chapters. The implementation of PyroScience commands into the Modbus protocol is a little bit more complex, it is realized by the special command register block as described in 3.3.6. + +Note: If the content of Modbus registers is changed by standard Modbus write accesses, ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.108.png)these changes are only kept until the next power cycle. Please refer to section 3.3.6 how to make such changes persistent after power cycles. + +The enumeration of Modbus registers is always based on 16bit registers. PyroScience devices use by default always 32bit registers (signed integer), so two Modbus registers are always coupled to a 32bit register. Within this document a 32bit register is therefore indicated for example like “40001/40002”, which refers to a signed 32bit integer located in the two 16bit Modbus registers 40001 and 40002. The used byte order is “CDAB” , so in this example the register 40001 contains the least significant 16bit of the 32bit integer, and the register 40002 contains the most significant ones. This is also known as little-endian byte swap.![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +3. Modbus Slave Address + +The default Modbus slave address is 1. Refer to 3.3.5 how[ to change](#_page49_x54.00_y657.92) this slave address. + +4. Operation Principle of Periodic Measurements + +The periodic measurements mode is activated by writing the desired sample interval in units of ms into the Modbus register *broadcast* located at the address 40021/40022 [(3.3.2). ](#_page47_x54.00_y490.92)The minimum realizable sample interval depends on the hardware. For underwater devices (e.g. AquapHOx) it can be as low as 50 ms, while for most OEM devices (e.g. PICO-x) the minimum realizable sample interval is 1000 ms. The reason is, that these OEM devices are optimized for low energy and not for high speed operation. The maximum possible broadcast interval is 65000 ms = 65 s. Writing a 0 to this register will disable periodic measurements. + +The results of the latest periodic measurement can read from the *Results* registers [(3.2.1). ](#_page45_x54.00_y186.92)Or it can be read from the analog output. + +5. Operation Principle of Triggered Measurements + +Individual measurements can be triggered by applying the MEA command by using the special command registers. Please refer to 3.3.6 for [more de](#_page50_x54.00_y189.92)tails. + +The results of the measurement can read from the *Results* registers (3.2.1). Or it ca[n be ](#_page45_x54.00_y186.92)read from the analog output. + +6. Transparent Mode and Evaluation Software + +The Modbus microcontroller can be optionally switched into a transparent mode, where the RS485 communication is again based on the PyroScience protocol (i.e. the Modbus microcontroller is simply transmitting any received message without any changes). By using the optional RS485-USB adapter cables all PyroScience Modbus devices can be operated with the Windows software Pyro DeveloperTool (some devices also with the software Pyro Workbench). These software packages use the transparent mode for operating the devices. + +IMPORTANT: During the transparent mode, the analog output is not operational! But the ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.109.png)analog output can be configured. + +The Modbus protocol can be used with up to 247 devices connected to the same RS485 bus. However, the transparent mode does not work with a bus system. During the transparent mode only a single device can be connected e.g. by a RS485-USB adapter cable to a computer. ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +2. Read-Only Modbus Registers + +Read-only Modbus registers, also known as “input registers” are used for information which is readable, but not writeable by the Modbus master. Their entity numbers begin with 3 and they can be read from using function code 4. + +1. Results Registers + +The register block *Results* (2.9) [of the](#_page36_x54.00_y519.92) PyroScience protocol is mapped to the following Modbus registers: + + + +|Modbus protocol|||PyroScience protocol|||||| +| - | :- | :- | - | :- | :- | :- | :- | :- | +|Entity Nr. ||Input register |Label ||Range |Reg. Block |Reg. Nr. || +|||address ||||||| +|30001/30002||0000/0001|*status* ||int32 |3 |0 || +|30003/30004||0002/0003|*dphi* ||int32 |3 |1 || +|30005/30006||0004/0005|*umolar* ||int32 |3 |2 || +|30007/30008||0006/0007|*mbar* ||int32 |3 |3 || +|30009/30010||0008/0009|*airSat* ||int32 |3 |4 || +|30011/30012||0010/0011|*tempSample* ||int32 |3 |5 || +|30013/30014||0012/0013|*tempCase* ||int32 |3 |6 || +|30015/30016||0014/0015|*signalIntensity* ||int32 |3 |7 || +|30017/30018||0016/0017|*ambientLight* ||int32 |3 |8 || +|30019/30020||0018/0019|*pressure* ||int32 |3 |9 || +|30021/30022||0020/0021|*humidity* ||int32 |3 |10 || +|30023/30024||0022/0023|*resistorTemp* ||int32 |3 |11 || +|30025/30026||0024/0025|*percentO2* ||int32 |3 |12 || +|30027/30028||0026/0027|*tempOptical* ||int32 |3 |13 || +|30029/30030||0028/0029|*ph* ||int32 |3 |14 || +|30031/30032||0030/0031|*ldev* ||int32 |3 |15 || +|30033/30034||0032/0033|-- reserved -- ||- |- |- || +|30035/30036||0034/0035|-- reserved -- ||- |- |- || +|30037/30038||0036/0037|data point counter||uint32 |- |- || + +The registers 30001/30002 up to 30035/30036 are mapped onto the corresponding *Results* registers. Refer to 2.9 [for de](#_page36_x54.00_y519.92)tails on the definitions of each register. + +The registers 30037/30038 contain a 32 bit data point counter, which is incremented by one for each performed measurement. After a reset or a power cycle this counter starts at 0. This register has no counterpart within the PyroScience registers. + +2. Device Info Registers + +The device info registers have no counterpart within the PyroScience registers. Instead, they contain the information returned by the PyroScience commands #VERS and #IDNR ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +of the PyroScience protocol, and some specific information on the Modbus microcontroller. + + + +|Modbus protocol|||PyroScience protocol||||| +| - | :- | :- | - | :- | :- | :- | :- | +|Entity Nr. |Input ||Label ||Range |Command |Parameter | +||register ||||||Nr. | +||address ||||||| +|36001/36002 |6000/6001||*PyroScience device ID* ||uint32 |#VERS |1 | +|36003/36004 |6002/6003||*Number of optical channels*||uint32 |#VERS |2 | +|36005/36006 |6004/6005||*Firmware version of the* ||uint32 |#VERS |3 | +||||*central microcontroller*||||| +|36007/36008 |6006/6007||*Available sensor types and* ||uint32 |#VERS |4 | +||||*supported analytes*||||| +|36009/36010 |6008/6009||*Firmware build number*||uint32 |#VERS |5 | +|36011/36012 |6010/6011||*Features* ||uint32 |#VERS |6 | +|36013/36014 |6012/6013||*MSW Unique ID number*||uint32 |#IDNR |1 (MSW) | +||||*(most significant 32bit of* ||||| +||||*64bit UID)* ||||| +|36015/36016 |6014/6015||*LSW Unique ID number*||uint32 |#IDNR |1 (LSW) | +||||*(least significant 32bit of* ||||| +||||*64bit UID)* ||||| +|36017/36018 |6016/6017||*Firmware version of the* ||uint32 |- |- | +||||*Modbus microcontroller.* ||||| +|36019/36020 |6018/6019||*Internal baud rate between* ||uint32 |- |- | +||||*the central and the Modbus* ||||| +||||*microcontroller* ||||| +After power-up the Modbus microcontroller automatically sends the commands #VERS and #IDNR to the central microcontroller and writes the returned parameters into the following Modbus registers. + +The registers 36001/36002 up to 36011/36012 contain the information returned by the PyroScience command #VERS. Please refer to 2.2.1 for[ more d](#_page11_x54.00_y644.92)etails. + +The registers 36013/36014 up to 36015/36016 contain the information returned by the PyroScience command #IDNR. Note, that the 64bit unique ID is splitted into two 32bit registers. Please refer to 2.2.2 [for mor](#_page12_x54.00_y618.92)e details. + +The register 36017/36018 contains the firmware version of the Modbus microcontroller. For example, a value of 114 corresponds to firmware version 1.14. + +The register 36019/36020 contains baud rate used for the internal communication between the central microcontroller and the Modbus microcontroller (e.g. 19200 or 115200). ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +3. Read-Write Modbus Registers + +Read-write Modbus registers are called “holding registers” are used for data which can be read or written. They use the address space 4xxxx starting with address 40001. + +Read-Write Modbus registers, also known as “holding registers”, are used for data which can be both read and written by the Modbus master. Their entity numbers begin with 4 and they can be read using function code 3 or written by using function codes 6 and 16. + +1. Making Register Changes Persistent During Power Cycles + +The values in the different Modbus registers can be changed by the standard Modbus write commands. It is important to understand, that such changes are only kept until the next power cycle. + +In order to make any changes persistent even after a power cycle, the user has to trigger ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.110.png)the special command SVS by writing the value 16 to the Modbus register 49001/49002 (refer also to 3.[3.6. and](#_page50_x54.00_y189.92) 2.3.[10). ](#_page21_x54.00_y584.92) + +Background: A Modbus write access will trigger a write to the corresponding PyroScience registers in the central microcontroller, which are kept in the volatile memory. If the special command SVS is triggered, the Modbus controller will send the PyroScience command SVS to the central microcontroller. This will save the current register configuration in the flash memory. After a power cycle, register configuration is automatically read from this flash memory and transferred into the corresponding Modbus registers. + +2. Settings Registers + +The register block *Settings* (0) of[ the](#_page23_x54.00_y514.92) PyroScience protocol is mapped to the following Modbus registers:![ref1] + + + +|Modbus protocol||PyroScience protocol||||| +| - | :- | - | :- | :- | :- | :- | +|Entity Nr. ||Holding register |Label |Range |Reg. Block |Reg. Nr. | +|||address ||||| +|40001/40002 ||0000/0001|*temp* |int32 |0 |0 | +|40003/40004 ||0002/0003|*pressure* |int32 |0 |1 | +|40005/40006 ||0004/0005|*salinity* |int32 |0 |2 | +|40007/40008 ||0006/0007|*duration* |int32 |0 |3 | +|40009/40010 ||0008/0009|*intensity* |int32 |0 |4 | +|40011/40012 ||0010/0011|*amp* |int32 |0 |5 | +|40013/40014 ||0012/0013|*frequency* |int32 |0 |6 | +|40015/40016 ||0014/0015|*crcEnable* |int32 |0 |7 | +|40017/40018||0016/0017|Reserved |int32 |0 |8 | +|40019/40020 ||0018/0019|*options* |int32 |0 |9 | +|40021/40022 ||0020/0021|*broadcast* |int32 |0 |10 | + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|40023/40024 |0022/0023|*analyte* |int32 |0 |11 | +| - | - | - | - | - | - | +|40025/40026 |0024/0025|*fiberType* |int32 |0 |12 | +|

40027/40028

- 40039/40040

|0026/0027 – 0038/0039|-- reserved -- |int32 |0 |13 - 19 | + +Most of these Modbus registers are defined exactly as their corresponding PyroScience registers. Refer to section 2.5 for more details. + +The only exception is the register *broadcast* (40021/40022) which is only mapped onto the lower 16 bit of the PyroScience register *Settings.broadcast*. These 16bit contain the broadcast interval giving a range of 0-60000ms (0-60s). The upper 16 bit of the PyroScience register *Settings.broadcast* are automatically configured by the Modbus microcontroller. + +This *broadcast* register is very essential for operating the device in the periodic sampling mode. Refer for details to 3.1.4. + +3. Calibration Registers + +The register block *Calibration* of the PyroScience protocol is mapped to the following Modbus registers:![ref1] + + + +|Modbus protocol||PyroScience protocol||||||| +| - | :- | - | :- | :- | :- | :- | :- | :- | +|Entity Nr. |Holding ||Label |Label |Label |Range |Reg. |Reg. Nr. | +||register ||(Oxygen) |(Temperature)|(pH) ||Block || +||address |||||||| +|40101/40102 |0100/0101||*dphi0* |*M* |*pka* |int32 |1 |0 | +|40103/40104 |0102/0103||*dphi100* |*N* |*slope* |int32 |1 |1 | +|40105/40106 |0104/0105||*temp0* |-- reserved -- |*dPhi\_ref* |int32 |1 |2 | +|40107/40108 |0106/0107||*temp100* |-- reserved -- |*pka\_t* |int32 |1 |3 | +|40109/40110 |0108/0109||*pressure* |-- reserved -- |*dyn\_t* |int32 |1 |4 | +|40111/40112 |0110/0111||*humidity* |-- reserved -- |*bottom\_t* |int32 |1 |5 | +|40113/40114 |0112/0113||*f* |*C* |*slope\_t* |int32 |1 |6 | +|40115/40116 |0114/0115||*m* |-- reserved -- |*f* |int32 |1 |7 | +|40117/40118 |0116/0117||*calFreq* |-- reserved -- |*lambda\_std* |int32 |1 |8 | +|40119/40120 |0118/0119||*tt* |*Tofs* |*pka\_is1* |int32 |1 |9 | +|40121/40122 |0120/0121||*kt* |-- reserved -- |*pka\_is2* |int32 |1 |10 | +|40123/40124 |0122/0123||*bkgdAmpl* |*bkgdAmpl* |*bkgdAmpl* |int32 |1 |11 | +|40125/40126 |0124/0125||*bkgdDphi* |*bkgdDphi* |*bkgdDphi* |int32 |1 |12 | +|40127/40128 |0126/0127||*useKsv* |-- reserved -- |*offset* |int32 |1 |13 | +|40129/40130 |0128/0129||*ksv* |-- reserved -- |*dPhi1* |int32 |1 |14 | +|40131/40132 |0130/0131||*ft* |-- reserved -- |*pH1* |int32 |1 |15 | +|40133/40134 |0132/0133||*mt* |-- reserved -- |*temp1* |int32 |1 |16 | +|40135/40136 |0134/0135||-reserved- |-- reserved -- |*salinity1* |int32 |1 |17 | +|40137/40138 |0136/0137||*percentO2* |-- reserved -- |*ldev1* |int32 |1 |18 | +|40139/40140 |0138/0139|||-- reserved -- |*dPhi2* |int32 |1 |19 | +|40141/40142 |0140/0141|||-- reserved -- |*pH2* |int32 |1 |20 | + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|40143/40|144 |0142/0143||-reserved- |-- reserved -- |*temp2* |int32 |1 |21 | +| - | - | - | :- | - | - | - | - | - | - | +|40145/40|146 |0144/0145||-reserved- |-- reserved -- |*salinity2* |int32 |1 |22 | +|40147/40|148 |0146/0147||-reserved- |-- reserved -- |*ldev2* |int32 |1 |23 | +|40149/40|150 |0148/0149||-reserved- |-- reserved -- |*Aon* |int32 |1 |24 | +|40151/40|152 |0150/0151||-reserved- |-- reserved -- |*Aoff* |int32 |1 |25 | +|40153/40|154 |0152/0153 ||-reserved- |-- reserved -- |-reserved-* |int32 |1 |26-29 | +|- 40159/40|160 |– 0158/0159|||||||| +Note, the register definitions depend on the analyte of the connected sensor head. All these Modbus registers are exactly mapped onto the corresponding PyroScience register. Refer to the sections 2.6, [2.7, ](#_page29_x54.00_y323.92)[and 2.](#_page32_x54.00_y249.92)8 for[ more](#_page34_x54.00_y85.92) details. + +4. Analog Output Registers + +The register block *AnalogOutput* of the PyroScience protocol is mapped to the following Modbus registers: + + + +|Modbus protocol||PyroScience protocol||||| +| - | :- | - | :- | :- | :- | :- | +|Entity Nr. ||Holding register |Label |Range |Reg. Block |Reg. Nr. | +|||address ||||| +|40401/40402 ||0400/0401|*aoSelectA* |int32 |4 |0 | +|40403/40404 ||0402/0403|*aoSelectB* |int32 |4 |1 | +|40405/40406 ||0404/0405|*aoSelectC* |int32 |4 |2 | +|40407/40408 ||0406/0407|*aoSelectD* |int32 |4 |3 | +|40409/40410 ||0408/0409|*aoMinA* |int32 |4 |4 | +|40411/40412 ||0410/0411|*aoMinB* |int32 |4 |5 | +|40413/40414 ||0412/0413|*aoMinC* |int32 |4 |6 | +|40415/40416 ||0414/0415|*aoMinD* |int32 |4 |7 | +|40417/40418 ||0416/0417|*aoMaxA* |int32 |4 |8 | +|40419/40420 ||0418/0419|*aoMaxB* |int32 |4 |9 | +|40421/40422 ||0420/0421|*aoMaxC* |int32 |4 |10 | +|40423/40424 ||0422/0423|*aoMaxD* |int32 |4 |11 | + +All these Modbus registers are exactly mapped onto the corresponding PyroScience register. Refer to the sections 2.10 [for more](#_page39_x54.00_y85.92) details. + +5. Modbus Slave Address Register + +A special Modbus register is used for defining the Modbus slave address:![ref1] + + + +|Modbus protocol|PyroScience protocol||||| +| - | - | :- | :- | :- | :- | +|Entity Nr. |Holding register address |Label |Range |Reg. Block |Reg. Nr. | +|43421/43422 |3420/3421|*slaveAddress* |1-247 |34 |10 | + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +This register is mapped to a hidden PyroScience register, which is not documented within this document. The default value is 1. Note, that changes to this register come effective after the next power cycle. After writing a new slave address to this register it is required to store the register configuration in the flash memory as described in section [3.3.1. ](#_page47_x54.00_y226.92) + +6. Command Registers + +The command registers are used for executing special commands. Some commands affect the Modbus microcontroller directly; other commands are forwarded to the central microcontroller.![ref1] + + + +|Entity Nr. |Holding ||Description || +| - | - | :- | - | :- | +||register |||| +||address |||| +|49001/49002|9000/9001||Command Register|| +||||If any of the following numbers are written to this register, the module || +||||will first send the Modbus response confirming the writing of this module. || +||||Then one of the following actions is executed.|| +|||||| +||||Register |Performed Action| +||||Content || +|||||| +||||0 |Sensor module is ready, the command register block can be | +|||||written and a new command can be triggered by writing a | +|||||number to this register here.| +|||||| +||||1 |Sensor module is busy. The command registers cannot be | +|||||written. A write access will give the Modbus error “Slave | +|||||Busy”. | +|||||| +||||10 |Flash status LED of the device. | +|||||(sends the #LOGO command to the central microcontroller) | +|||||| +||||11 |Trigger a single oxygen measurement.| +|||||(sends the MEA command to the central microcontroller) | +|||||| +||||12 |Calibrate an oxygen sensor at zero oxygen level.| +|||||(sends a CLO command to the central microcontroller) | +|||||| +||||13 |Calibrate an oxygen sensor at air oxygen level.| +|||||(sends a CHI command to the central microcontroller) | +|||||| +||||14 |Calibrate an optical temperature sensor.| +|||||(sends a COT command to the central microcontroller) | +|||||| +||||15 |Calibrate a pH sensor.| +|||||(sends a CPH command to the central microcontroller) | +|||||| +||||16 |Store all registers in flash memory as new default values | +|||||after a power cycle. (sends a SVS command to the central | +|||||microcontroller) | +|||||| +||||7777 |Triggers a firmware reset. | +|||||| +||||8888 |Switch into a transparent mode.| +|49003/49004|9002/9003||Parameter Register 1 required by some commands.|| +|49005/49006 |9004/9005||Parameter Register 2 required by some commands.|| + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + + + +|49007/49008 |9006/9007||Parameter Register|` `3 required by some commands.|| +| - | - | :- | - | - | :- | +|49009/49010 |9008/9009||Parameter Register|` `4 required by some commands.|| +|49011/49012 |9010/9011||Parameter Register|` `5 required by some commands.|| +|49013/49014 |9012/9013||Parameter Register|` `6 required by some commands.|| +|49015/49016 |9014/9015||Parameter Register|` `7 required by some commands.|| +|49017/49018 |9016/9017||Parameter Register|` `8 required by some commands.|| +If a command requires parameters, it is necessary to write these into the parameter ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.111.png)registers, before triggering the command by writing the corresponding number into 49001/49002. + +Since PyroScience Modbus devices only support one optical channel, the first parameter register (49003/49004) refers to the first actual parameter necessary for each command, not the channel number. + +Example to execute the MEA command, the “enabled sensor types” parameter s has to be written into registers 49003/49004 and then 11 has to be written into registers 49001/49002. + +Writing 10 to the Command Register will trigger, that the Modbus controller sends the PyroScience command #LOGO to the central microcontroller. Please refer to 2.2.3 for more details on this command. + +Writing 11 to the Command Register will trigger, that the Modbus controller sends the PyroScience command MEA to the central microcontroller. The required parameter must be written to Parameter Register 1. Please refer to 2.3.1 for [more detai](#_page15_x54.00_y531.92)ls on this command. + +Writing 12 to the Command Register will trigger, that the Modbus controller sends the PyroScience command CLO to the central microcontroller. The required parameters must be written to the Parameter Registers. Please refer to 2.3.3 for mo[re detai](#_page17_x54.00_y431.92)ls on this command. + +Writing 13 to the Command Register will trigger, that the Modbus controller sends the PyroScience command CHI to the central microcontroller. The required parameters must be written to the Parameter Registers. Please refer to 2.3.2 for mo[re detai](#_page16_x54.00_y628.92)ls on this command. + +Writing 14 to the Command Register will trigger, that the Modbus controller sends the PyroScience command COT to the central microcontroller. The required parameters must be written to the Parameter Registers. Please refer to 2.3.4 for mo[re detai](#_page17_x54.00_y760.92)ls on this command. + +Writing 15 to the Command Register will trigger, that the Modbus controller sends the PyroScience command CPH to the central microcontroller. The required parameters must ![ref1] + +PyroScience Unified Protocol FW4.10-4.19 | Reference Manual + +be written to the Parameter Registers. Please refer to 2.3.5 for mo[re detai](#_page18_x54.00_y318.92)ls on this command. + +Writing 16 to the Command Register will trigger, that the Modbus controller sends the PyroScience command SVS to the central microcontroller. Please refer to 2.3.10 for mor[e ](#_page21_x54.00_y584.92)details on this command. + +Writing 7777 to the Command Register will trigger a firmware reset, equivalent to a power cycle of the complete device. + +Writing 8888 to the Command Register will switch the Modbus microcontroller into a so called “transparent mode”, in which the Modbus microcontroller will passively forward any message in either direction. This way the user can communicate directly with the central microcontroller based on the PyroScience protocol as given in section 2.1. The transparent mode is terminated by sending the following 3 chars: ## + +IMPORTANT: During the transparent mode, the analog output is not operational! But the ![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.112.png)analog output can be configured. + +The Modbus protocol can be used with up to 247 devices connected to the same RS485 bus. However, the transparent mode does not work with a bus system. During the transparent mode must be only a single device connected e.g. by a RS485-USB adapter cable to a computer.![ref1] + +© PyroScience GmbH 53 + +![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.113.png) + +PyroScience Unified Protocol | Reference Manual + +CONTACT + +PyroScience GmbH Tel.: +49 (0)241 5183 2210 Kackertstr. 11![](Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.114.png) Fax: +49 (0)241 5183 2299 52072 Aachen info@pyroscience.com Deutschland www.pyroscience.com + +` `www.pyroscience.com + + +[ref1]: Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.004.png +[ref2]: Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.005.png +[ref3]: Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.056.png +[ref4]: Aspose.Words.00c05416-12bf-4790-98a5-09ba194fad73.067.png diff --git a/package.json b/package.json new file mode 100644 index 0000000..1507977 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "serial-debug", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "tsc", + "start": "ts-node src/index.ts" + }, + "dependencies": { + "serialport": "^10.5.0" + }, + "devDependencies": { + "typescript": "^5.8.2", + "ts-node": "^10.9.2" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..aaa79e6 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,325 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + serialport: + specifier: ^10.5.0 + version: 10.5.0 + devDependencies: + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@22.13.14)(typescript@5.8.2) + typescript: + specifier: ^5.8.2 + version: 5.8.2 + +packages: + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@serialport/binding-mock@10.2.2': + resolution: {integrity: sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==} + engines: {node: '>=12.0.0'} + + '@serialport/bindings-cpp@10.8.0': + resolution: {integrity: sha512-OMQNJz5kJblbmZN5UgJXLwi2XNtVLxSKmq5VyWuXQVsUIJD4l9UGHnLPqM5LD9u3HPZgDI5w7iYN7gxkQNZJUw==} + engines: {node: '>=12.17.0 <13.0 || >=14.0.0'} + + '@serialport/bindings-interface@1.2.2': + resolution: {integrity: sha512-CJaUd5bLvtM9c5dmO9rPBHPXTa9R2UwpkJ0wdh9JCYcbrPWsKz+ErvR0hBLeo7NPeiFdjFO4sonRljiw4d2XiA==} + engines: {node: ^12.22 || ^14.13 || >=16} + + '@serialport/parser-byte-length@10.5.0': + resolution: {integrity: sha512-eHhr4lHKboq1OagyaXAqkemQ1XyoqbLQC8XJbvccm95o476TmEdW5d7AElwZV28kWprPW68ZXdGF2VXCkJgS2w==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-cctalk@10.5.0': + resolution: {integrity: sha512-Iwsdr03xmCKAiibLSr7b3w6ZUTBNiS+PwbDQXdKU/clutXjuoex83XvsOtYVcNZmwJlVNhAUbkG+FJzWwIa4DA==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-delimiter@10.5.0': + resolution: {integrity: sha512-/uR/yT3jmrcwnl2FJU/2ySvwgo5+XpksDUR4NF/nwTS5i3CcuKS+FKi/tLzy1k8F+rCx5JzpiK+koqPqOUWArA==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-inter-byte-timeout@10.5.0': + resolution: {integrity: sha512-WPvVlSx98HmmUF9jjK6y9mMp3Wnv6JQA0cUxLeZBgS74TibOuYG3fuUxUWGJALgAXotOYMxfXSezJ/vSnQrkhQ==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-packet-length@10.5.0': + resolution: {integrity: sha512-jkpC/8w4/gUBRa2Teyn7URv1D7T//0lGj27/4u9AojpDVXsR6dtdcTG7b7dNirXDlOrSLvvN7aS5/GNaRlEByw==} + engines: {node: '>=8.6.0'} + + '@serialport/parser-readline@10.5.0': + resolution: {integrity: sha512-0aXJknodcl94W9zSjvU+sLdXiyEG2rqjQmvBWZCr8wJZjWEtv3RgrnYiWq4i2OTOyC8C/oPK8ZjpBjQptRsoJQ==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-ready@10.5.0': + resolution: {integrity: sha512-QIf65LTvUoxqWWHBpgYOL+soldLIIyD1bwuWelukem2yDZVWwEjR288cLQ558BgYxH4U+jLAQahhqoyN1I7BaA==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-regex@10.5.0': + resolution: {integrity: sha512-9jnr9+PCxRoLjtGs7uxwsFqvho+rxuJlW6ZWSB7oqfzshEZWXtTJgJRgac/RuLft4hRlrmRz5XU40i3uoL4HKw==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-slip-encoder@10.5.0': + resolution: {integrity: sha512-wP8m+uXQdkWSa//3n+VvfjLthlabwd9NiG6kegf0fYweLWio8j4pJRL7t9eTh2Lbc7zdxuO0r8ducFzO0m8CQw==} + engines: {node: '>=12.0.0'} + + '@serialport/parser-spacepacket@10.5.0': + resolution: {integrity: sha512-BEZ/HAEMwOd8xfuJSeI/823IR/jtnThovh7ils90rXD4DPL1ZmrP4abAIEktwe42RobZjIPfA4PaVfyO0Fjfhg==} + engines: {node: '>=12.0.0'} + + '@serialport/stream@10.5.0': + resolution: {integrity: sha512-gbcUdvq9Kyv2HsnywS7QjnEB28g+6OGB5Z8TLP7X+UPpoMIWoUsoQIq5Kt0ZTgMoWn3JGM2lqwTsSHF+1qhniA==} + engines: {node: '>=12.0.0'} + + '@tsconfig/node10@1.0.11': + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + + '@types/node@22.13.14': + resolution: {integrity: sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==} + + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + + acorn@8.14.1: + resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} + engines: {node: '>=0.4.0'} + hasBin: true + + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + node-addon-api@5.1.0: + resolution: {integrity: sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==} + + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} + hasBin: true + + serialport@10.5.0: + resolution: {integrity: sha512-7OYLDsu5i6bbv3lU81pGy076xe0JwpK6b49G6RjNvGibstUqQkI+I3/X491yBGtf4gaqUdOgoU1/5KZ/XxL4dw==} + engines: {node: '>=12.0.0'} + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + typescript@5.8.2: + resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + +snapshots: + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + + '@serialport/binding-mock@10.2.2': + dependencies: + '@serialport/bindings-interface': 1.2.2 + debug: 4.4.0 + transitivePeerDependencies: + - supports-color + + '@serialport/bindings-cpp@10.8.0': + dependencies: + '@serialport/bindings-interface': 1.2.2 + '@serialport/parser-readline': 10.5.0 + debug: 4.4.0 + node-addon-api: 5.1.0 + node-gyp-build: 4.8.4 + transitivePeerDependencies: + - supports-color + + '@serialport/bindings-interface@1.2.2': {} + + '@serialport/parser-byte-length@10.5.0': {} + + '@serialport/parser-cctalk@10.5.0': {} + + '@serialport/parser-delimiter@10.5.0': {} + + '@serialport/parser-inter-byte-timeout@10.5.0': {} + + '@serialport/parser-packet-length@10.5.0': {} + + '@serialport/parser-readline@10.5.0': + dependencies: + '@serialport/parser-delimiter': 10.5.0 + + '@serialport/parser-ready@10.5.0': {} + + '@serialport/parser-regex@10.5.0': {} + + '@serialport/parser-slip-encoder@10.5.0': {} + + '@serialport/parser-spacepacket@10.5.0': {} + + '@serialport/stream@10.5.0': + dependencies: + '@serialport/bindings-interface': 1.2.2 + debug: 4.4.0 + transitivePeerDependencies: + - supports-color + + '@tsconfig/node10@1.0.11': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + + '@types/node@22.13.14': + dependencies: + undici-types: 6.20.0 + + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.1 + + acorn@8.14.1: {} + + arg@4.1.3: {} + + create-require@1.1.1: {} + + debug@4.4.0: + dependencies: + ms: 2.1.3 + + diff@4.0.2: {} + + make-error@1.3.6: {} + + ms@2.1.3: {} + + node-addon-api@5.1.0: {} + + node-gyp-build@4.8.4: {} + + serialport@10.5.0: + dependencies: + '@serialport/binding-mock': 10.2.2 + '@serialport/bindings-cpp': 10.8.0 + '@serialport/parser-byte-length': 10.5.0 + '@serialport/parser-cctalk': 10.5.0 + '@serialport/parser-delimiter': 10.5.0 + '@serialport/parser-inter-byte-timeout': 10.5.0 + '@serialport/parser-packet-length': 10.5.0 + '@serialport/parser-readline': 10.5.0 + '@serialport/parser-ready': 10.5.0 + '@serialport/parser-regex': 10.5.0 + '@serialport/parser-slip-encoder': 10.5.0 + '@serialport/parser-spacepacket': 10.5.0 + '@serialport/stream': 10.5.0 + debug: 4.4.0 + transitivePeerDependencies: + - supports-color + + ts-node@10.9.2(@types/node@22.13.14)(typescript@5.8.2): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 22.13.14 + acorn: 8.14.1 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.8.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + typescript@5.8.2: {} + + undici-types@6.20.0: {} + + v8-compile-cache-lib@3.0.1: {} + + yn@3.1.1: {} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..c3b6a9a --- /dev/null +++ b/src/index.ts @@ -0,0 +1,5 @@ +import { sendCommand } from "./serial"; + +sendCommand(); + + diff --git a/src/serial.ts b/src/serial.ts new file mode 100644 index 0000000..c9e87a9 --- /dev/null +++ b/src/serial.ts @@ -0,0 +1,112 @@ +import { SerialPort } from "serialport"; +import fs from 'fs'; + +import * as readline from "readline"; + +const config = fs.readFile(); + +// 开启命令行用户发送mea命令会发送command.measure + +export function sendCommand() { + const port = new SerialPort({ + path: config.port, + baudRate: config.baudRate, + }); + + // 创建readline接口 + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + prompt: "串口命令> " + }); + + // 监听串口数据 + port.on("data", (data) => { + const hexData = data.toString('hex').match(/.{1,2}/g)?.join(' ') || ''; + console.log(`收到原始数据: ${hexData}`); + + // 解析数据 + try { + parseResponse(data); + } catch (err: any) { + console.error(`解析数据错误: ${err.message}`); + } + }); + + // 解析响应数据 + function parseResponse(data: Buffer) { + // 检查数据长度是否足够 + if (data.length < 9) { + console.log("数据长度不足,无法解析温湿度信息"); + return; + } + + // 从响应中提取温度和湿度 + // 假设格式为: 01 04 04 XX XX XX XX XX XX + // 其中第4-5个字节是温度,第6-7个字节是湿度 + const responseHex = data.toString('hex').match(/.{1,2}/g) || []; + + // 检查响应格式 + if (responseHex.length >= 9 && responseHex[0] === '01' && responseHex[1] === '04') { + // 提取温度值(第4-5个字节) + const tempHex = `${responseHex[3]}${responseHex[4]}`; + // 提取湿度值(第6-7个字节) + const humidityHex = `${responseHex[5]}${responseHex[6]}`; + + // 转换成十进制 + const tempDecimal = parseInt(tempHex, 16) / 10; + const humidityDecimal = parseInt(humidityHex, 16) / 10; + + console.log(`🌡️ 温度: ${tempDecimal.toFixed(1)}°C`); + console.log(`💧 湿度: ${humidityDecimal.toFixed(1)}%`); + } else { + console.log("响应格式不符合预期,无法解析温湿度"); + } + } + + // 监听串口错误 + port.on("error", (err) => { + console.error(`串口错误: ${err.message}`); + }); + + // 串口打开成功 + port.on("open", () => { + console.log(`成功打开串口 ${config.port}`); + console.log("输入 'mea' 发送测量命令"); + console.log("输入 'exit' 退出程序"); + + rl.prompt(); + + // 处理用户输入 + rl.on("line", (line) => { + const input = line.trim().toLowerCase(); + + if (input === "mea") { + console.log("发送测量命令..."); + port.write(Buffer.from(command.measure.split(' ').map(hex => parseInt(hex, 16))), (err) => { + if (err) { + console.error(`发送命令错误: ${err.message}`); + } else { + console.log("测量命令已发送"); + } + }); + } else if (input === "exit") { + console.log("关闭串口并退出..."); + port.close(); + rl.close(); + process.exit(0); + } else if (input) { + console.log(`未知命令: ${input}`); + } + + rl.prompt(); + }); + + // 处理退出 + rl.on("close", () => { + console.log("再见!"); + port.close(); + process.exit(0); + }); + }); +} diff --git a/src/test/config.ts b/src/test/config.ts new file mode 100644 index 0000000..817c67b --- /dev/null +++ b/src/test/config.ts @@ -0,0 +1,12 @@ +export const config = { + port: "/dev/cu.usbserial-230", + baudRate: 9600, + dataBits: 8, + stopBits: 1, + parity: "none", + flowControl: false, +}; + +export const command = { + measure: '01 04 00 00 00 02 71 CB' +} \ No newline at end of file diff --git a/src/test/index.ts b/src/test/index.ts new file mode 100644 index 0000000..8b8fcee --- /dev/null +++ b/src/test/index.ts @@ -0,0 +1,3 @@ +import { sendCommand } from "./serial"; + +sendCommand(); diff --git a/src/test/serial.ts b/src/test/serial.ts new file mode 100644 index 0000000..cedb49e --- /dev/null +++ b/src/test/serial.ts @@ -0,0 +1,109 @@ +import { SerialPort } from "serialport"; +import { config, command } from "./config"; +import * as readline from "readline"; + +// 开启命令行用户发送mea命令会发送command.measure + +export function sendCommand() { + const port = new SerialPort({ + path: config.port, + baudRate: config.baudRate, + }); + + // 创建readline接口 + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, + prompt: "串口命令> " + }); + + // 监听串口数据 + port.on("data", (data) => { + const hexData = data.toString('hex').match(/.{1,2}/g)?.join(' ') || ''; + console.log(`收到原始数据: ${hexData}`); + + // 解析数据 + try { + parseResponse(data); + } catch (err: any) { + console.error(`解析数据错误: ${err.message}`); + } + }); + + // 解析响应数据 + function parseResponse(data: Buffer) { + // 检查数据长度是否足够 + if (data.length < 9) { + console.log("数据长度不足,无法解析温湿度信息"); + return; + } + + // 从响应中提取温度和湿度 + // 假设格式为: 01 04 04 XX XX XX XX XX XX + // 其中第4-5个字节是温度,第6-7个字节是湿度 + const responseHex = data.toString('hex').match(/.{1,2}/g) || []; + + // 检查响应格式 + if (responseHex.length >= 9 && responseHex[0] === '01' && responseHex[1] === '04') { + // 提取温度值(第4-5个字节) + const tempHex = `${responseHex[3]}${responseHex[4]}`; + // 提取湿度值(第6-7个字节) + const humidityHex = `${responseHex[5]}${responseHex[6]}`; + + // 转换成十进制 + const tempDecimal = parseInt(tempHex, 16) / 10; + const humidityDecimal = parseInt(humidityHex, 16) / 10; + + console.log(`🌡️ 温度: ${tempDecimal.toFixed(1)}°C`); + console.log(`💧 湿度: ${humidityDecimal.toFixed(1)}%`); + } else { + console.log("响应格式不符合预期,无法解析温湿度"); + } + } + + // 监听串口错误 + port.on("error", (err) => { + console.error(`串口错误: ${err.message}`); + }); + + // 串口打开成功 + port.on("open", () => { + console.log(`成功打开串口 ${config.port}`); + console.log("输入 'mea' 发送测量命令"); + console.log("输入 'exit' 退出程序"); + + rl.prompt(); + + // 处理用户输入 + rl.on("line", (line) => { + const input = line.trim().toLowerCase(); + + if (input === "mea") { + console.log("发送测量命令..."); + port.write(Buffer.from(command.measure.split(' ').map(hex => parseInt(hex, 16))), (err) => { + if (err) { + console.error(`发送命令错误: ${err.message}`); + } else { + console.log("测量命令已发送"); + } + }); + } else if (input === "exit") { + console.log("关闭串口并退出..."); + port.close(); + rl.close(); + process.exit(0); + } else if (input) { + console.log(`未知命令: ${input}`); + } + + rl.prompt(); + }); + + // 处理退出 + rl.on("close", () => { + console.log("再见!"); + port.close(); + process.exit(0); + }); + }); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..904d43f --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,113 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "libReplacement": true, /* Enable lib replacement. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "noUncheckedSideEffectImports": true, /* Check side effect imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ + // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +}