diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..738430f --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,10 @@ +{ + "MD033": false, + "MD013": false, + "MD032": false, + "MD028": false, + "MD024": false, + "MD007": false, + "MD022": false, + "MD040": false +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8d8964e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,21 @@ +{ + "cSpell.words": [ + "Cacher", + "csmdoc", + "csmlog", + "CSMLS", + "CSMP", + "CSMQ", + "Evnt", + "Gevt", + "HEXSTR", + "lvclass", + "Massdata", + "ogtk", + "Refnum", + "Splite", + "Struct", + "usecase" + ], + "files.autoGuessEncoding": true +} \ No newline at end of file diff --git a/CSM Tool/CSM-MassData Cache Status Viewer.vi b/CSM Tool/CSM-MassData Cache Status Viewer.vi index d0b1819..86df66a 100644 Binary files a/CSM Tool/CSM-MassData Cache Status Viewer.vi and b/CSM Tool/CSM-MassData Cache Status Viewer.vi differ diff --git a/CSM-MassData-Parameter-Support.lvproj b/CSM-MassData-Parameter-Support.lvproj index 93e68ef..c5ad548 100644 --- a/CSM-MassData-Parameter-Support.lvproj +++ b/CSM-MassData-Parameter-Support.lvproj @@ -36,6 +36,9 @@ true + + true + diff --git a/CSM-MassData-Parameter-Support.vipb b/CSM-MassData-Parameter-Support.vipb index d6db97b..affa3a0 100644 --- a/CSM-MassData-Parameter-Support.vipb +++ b/CSM-MassData-Parameter-Support.vipb @@ -1,7 +1,7 @@ - + NEVSTOP_lib_CSM_MassData_Parameter_Support - 2025.10.0.1 + 2025.11.0.1 false . vip @@ -134,6 +134,12 @@ In LabVIEW test and measurement applications, handling large data types such as true <user.lib>\_NEVSTOP\Communicable State Machine(CSM) + + LabVIEW + false + true + <application> + @@ -166,6 +172,12 @@ In LabVIEW test and measurement applications, handling large data types such as true 1 + + help + 0 + true + 2 + . @@ -197,6 +209,15 @@ In LabVIEW test and measurement applications, handling large data types such as LICENSE + + .vscode + + + .markdownlint.json + + + README(zh-cn).md + diff --git a/_test/obsolete_examples/Main.vi b/_test/obsolete_examples/Main.vi index dcac386..f8f4268 100644 Binary files a/_test/obsolete_examples/Main.vi and b/_test/obsolete_examples/Main.vi differ diff --git a/addons/MassData-Parameter/CSM - Config MassData Parameter Cache Size.vi b/addons/MassData-Parameter/CSM - Config MassData Parameter Cache Size.vi index 20e4e77..3b3c84b 100644 Binary files a/addons/MassData-Parameter/CSM - Config MassData Parameter Cache Size.vi and b/addons/MassData-Parameter/CSM - Config MassData Parameter Cache Size.vi differ diff --git a/addons/MassData-Parameter/CSM - Convert Argument to MassData.vim b/addons/MassData-Parameter/CSM - Convert Argument to MassData.vim index bf3b0e0..5218cca 100644 Binary files a/addons/MassData-Parameter/CSM - Convert Argument to MassData.vim and b/addons/MassData-Parameter/CSM - Convert Argument to MassData.vim differ diff --git a/addons/MassData-Parameter/CSM - Convert MassData to Argument With DataType.vim b/addons/MassData-Parameter/CSM - Convert MassData to Argument With DataType.vim index 74f4e9a..3c59416 100644 Binary files a/addons/MassData-Parameter/CSM - Convert MassData to Argument With DataType.vim and b/addons/MassData-Parameter/CSM - Convert MassData to Argument With DataType.vim differ diff --git a/addons/MassData-Parameter/CSM - Convert MassData to Argument.vim b/addons/MassData-Parameter/CSM - Convert MassData to Argument.vim index fec92bc..30f334e 100644 Binary files a/addons/MassData-Parameter/CSM - Convert MassData to Argument.vim and b/addons/MassData-Parameter/CSM - Convert MassData to Argument.vim differ diff --git a/addons/MassData-Parameter/CSM - MassData Data Type String.vi b/addons/MassData-Parameter/CSM - MassData Data Type String.vi index 123745e..87161db 100644 Binary files a/addons/MassData-Parameter/CSM - MassData Data Type String.vi and b/addons/MassData-Parameter/CSM - MassData Data Type String.vi differ diff --git a/addons/MassData-Parameter/CSM - MassData Parameter Status.vi b/addons/MassData-Parameter/CSM - MassData Parameter Status.vi index f39753a..bba85a6 100644 Binary files a/addons/MassData-Parameter/CSM - MassData Parameter Status.vi and b/addons/MassData-Parameter/CSM - MassData Parameter Status.vi differ diff --git a/addons/MassData-Parameter/Utility/CSM - MassData Update Status Indicator.vi b/addons/MassData-Parameter/Utility/CSM - MassData Update Status Indicator.vi index d7c7246..2fe4046 100644 Binary files a/addons/MassData-Parameter/Utility/CSM - MassData Update Status Indicator.vi and b/addons/MassData-Parameter/Utility/CSM - MassData Update Status Indicator.vi differ diff --git a/addons/MassData-Parameter/dir.mnu b/addons/MassData-Parameter/dir.mnu index 3e4c396..ae17ae9 100644 Binary files a/addons/MassData-Parameter/dir.mnu and b/addons/MassData-Parameter/dir.mnu differ diff --git a/example/1. MassData Argument Format.vi b/example/1. MassData Argument Format.vi index ac96835..8c29b2a 100644 Binary files a/example/1. MassData Argument Format.vi and b/example/1. MassData Argument Format.vi differ diff --git a/example/2. Show MassData Cache Status in FP.vi b/example/2. Show MassData Cache Status in FP.vi index ad4a033..0af2bd0 100644 Binary files a/example/2. Show MassData Cache Status in FP.vi and b/example/2. Show MassData Cache Status in FP.vi differ diff --git a/example/3. MassData in Non-CSM Framework.vi b/example/3. MassData in Non-CSM Framework.vi index ea43e7a..87550ac 100644 Binary files a/example/3. MassData in Non-CSM Framework.vi and b/example/3. MassData in Non-CSM Framework.vi differ diff --git a/example/4. MassData in CSM.vi b/example/4. MassData in CSM.vi index 8bad25a..bed2bdf 100644 Binary files a/example/4. MassData in CSM.vi and b/example/4. MassData in CSM.vi differ diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/Examples/Addons - MassData Support(en-us).md b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/Addons - MassData Support(en-us).md new file mode 100644 index 0000000..3598b42 --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/Addons - MassData Support(en-us).md @@ -0,0 +1,111 @@ +# CSM MassData Support Addon + +## MassData Argument Format (1. MassData Argument Format.vi) + +### Overview + +MassData arguments are used within the CSM framework to transfer large amounts of data, such as arrays and waveform data. MassData arguments are also used for lossless transfer of complex data types. This example demonstrates the MassData argument formats supported by the CSM API. + +### Introduction + +This example simulates the generation of two sets of data: a set of I32 array data and a set of waveform data. Both sets are converted into MassData arguments. + +CSM supports the following MassData argument format: + +``` +Start:8057;Size:4004;DataType:1D I32 +``` + +The meaning of each part is as follows: + +- ``: Indicates that this is a MassData argument. +- `Start`: The starting address of the MassData in memory. +- `Size`: The size of the MassData (in bytes). +- `DataType`: (Optional) The data type of the MassData. Depending on the conversion function selected, this part may not be included. + +### Steps + +- Step 1: I32 array data. The conversion function selected for this step is `CSM - Convert MassData to Argument With DataType.vim`, so it includes the `DataType` section. + - Step 1.1: Construct raw data, which in a real-world program comes from hardware acquisition, data reception, etc. + - Step 1.2: Call `CSM - Convert MassData to Argument With DataType.vim` to convert the raw data into a MassData argument. You can view the converted argument format on the front panel. + - Step 1.3: Use `CSM - MassData Data Type String.vi` to retrieve the data type from the MassData argument string. + - Step 1.4: Use `CSM - Argument Type.vi` to retrieve the CSM argument tag, which in this case is ``. + - Step 1.5: Convert the MassData argument back to raw data. You can view the converted data on the front panel. The converted data should match the original data exactly. +- Step 2: Waveform Data. The conversion function selected for this section is `CSM - Convert MassData to Argument.vim`, so it does not include the `DataType` section. + - Step 2.1: Construct raw data, which in a real-world program comes from hardware acquisition, data reception, etc. + - Step 2.2: Call `CSM - Convert MassData to Argument.vim` to convert the raw data into a MassData argument. You can view the converted argument format on the front panel. The `DataType` section is not included. + - Step 2.3: Use `CSM - Argument Type.vi` to retrieve the CSM argument tag, which in this case is ``. + - Step 2.4: Convert the MassData argument back to raw data. You can view the converted data on the front panel. The converted data should match the original data exactly. + + + +## View MassData Cache Status (2. Show MassData Cache Status in FP.vi) + +### Overview + +MassData uses a background circular queue to cache data. You can configure the size of the queue via the CSM API parameters. This example demonstrates how to view the MassData cache status. + +### Introduction + +MassData provides a helper function, `CSM - MassData Update Status Indicator.vi`, for viewing the status of the cache. This example illustrates how to use this function. + +### Steps + +- Step 1: Use `CSM - Config MassData Parameter Cache Size.vi` to set the cache size. You can visually verify on the interface that this setting takes effect. +- Step 2: In every loop iteration, construct a new set of data. +- Step 3: Use the CSM MassData API to pack and unpack the data, simulating usage in an actual program. +- Step 4: Use `CSM - MassData Update Status Indicator.vi` to update the vertical cache status indicator on the UI. +- Step 5: Use `CSM - MassData Update Status Indicator.vi` to update the horizontal cache status indicator on the UI. +- Step 6: Loop interval. Steps 3 through 4 are repeated in each iteration. +- Step 7: (Optional) You can use the CSM Tool provided by this addon to view the MassData cache status more quickly. + + + +## Using MassData in a Non-CSM Framework (3. MassData in Non-CSM Framework.vi) + +### Overview + +You can use MassData in non-CSM framework. This example demonstrates how to utilize MassData in a non-CSM framework. + +### Introduction + +Using a Producer/Consumer design pattern example, this VI demonstrates how to use MassData in a non-CSM framework. The data producer is responsible for generating data, packing data into a MassData argument, and transmitting data to the data consumer via a queue. The data consumer is responsible for consuming the data, unpacking the MassData format back into raw data, and processing the raw data. This example illustrates the entire process. + +### Steps + +- Step 1: Use `CSM - Config MassData Parameter Cache Size.vi` to set the cache size. +- Step 2: Data producer loop + - Step 2.1: Construct raw data, which in a real-world program comes from hardware acquisition, data reception, etc. + - Step 2.2: Call `CSM - Convert MassData to Argument.vim` to convert the raw data into a MassData argument. + - Step 2.3: Transmit the converted MassData argument to the data consumer via a queue. +- Step 3: Data consumer loop + - Step 3.1: Receive the MassData argument from the queue. + - Step 3.2: Call `CSM - Convert Argument to MassData.vim` to convert the MassData argument back into raw data. + - Step 3.3: (Optional) Use `CSM - MassData Update Status Indicator.vi` to update the cache status indicator on the UI. + + + +## Using MassData in the CSM Framework (4. MassData in CSM.vi) + +### Overview + +Demonstrates how to use MassData within the CSM framework. + +### Introduction + +This example uses a Producer/Consumer scenario to show how MassData operates within the CSM context. + +A non-CSM loop acts as the data producer, responsible for generating data, packing the data into a MassData argument, and sending the data via a synchronous message to the CSM module, which acts as the data consumer. This example demonstrates this process. + +### Steps + +- Step 1: Use `CSM - Config MassData Parameter Cache Size.vi` to set the cache size. +- Step 2: Data producer loop. This loop is not a CSM module. + - Step 2.1: Construct raw data, which in a real-world program comes from hardware acquisition, data reception, etc. Call `CSM - Convert MassData to Argument.vim` to convert the raw data into a MassData argument. + - Step 2.2: Use `CSM - Wait and Send Message for Reply.vi` to send the data as an argument for `API: Update Waveform` to the CSM module, marking the sender as data producer. + - Step 2.3: Data is sent only when the Generate button is pressed. + - Step 2.4: (Optional) Use `CSM - MassData Update Status Indicator.vi` to update the cache status indicator on the UI. +- Step 3: Data consumer loop. This loop is a CSM module named "CSM". + - Step 3.1: In the `API: Update Waveform` case, take the received argument and use `CSM - Convert Argument to MassData.vim` to convert the MassData argument back to raw data and display the data. + - Step 3.3: (Optional) Other cases remain consistent with the template and are unmodified. +- Step 4: During the program exit process, use `CSM - Wait and Send Message for Reply.vi` to send the synchronous message "Macro: Exit" to the CSM module, causing the CSM module to shut down. \ No newline at end of file diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/Examples/Addons - MassData Support(zh-cn).md b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/Addons - MassData Support(zh-cn).md new file mode 100644 index 0000000..27c06b4 --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/Examples/Addons - MassData Support(zh-cn).md @@ -0,0 +1,108 @@ +# CSM MassData Support Addon + +## MassData参数格式 (1. MassData Argument Format.vi) + +### Overview + +Massdata 参数用于在 CSM 框架中传递大量数据,例如:数组、波形数据等。也用于无损的传递复杂数据类型数据等场景。本范例用于展示CSM API参数中支持的MassData参数格式。 + +### Introduction + +本范例中模拟产生了两组数据:一组是I32数组数据,一组是波形数据,并将这两组数据转换为massdata 参数。 + +CSM的参数中支持的MassData参数格式如下: + +``` +Start:8057;Size:4004;DataType:1D I32 +``` + +每个部分的含义如下: + +- : 表示这是一个 MassData 参数。 +- Start:MassData 数据在内存中的起始地址。 +- Size:MassData 数据的大小(字节数)。 +- DataType:(optional) MassData 数据的类型, 选择的打包函数不同,可以不包含该部分。 + +### Steps + +- Step1: I32数组数据, 此部分选择的打包函数为`CSM - Convert MassData to Argument With DataType.vim`,因此包含DataType部分。 + - step1.1: 构造原始数据,在实际程序中来源与硬件采集、数据接收等情况。 + - step1.2: 调用`CSM - Convert MassData to Argument With DataType.vim`,将原始数据转换为massdata 参数。可以在前面板查看转换后的参数格式。 + - step1.3: 使用CSM - MassData Data Type String.vi 获取MassData 参数字符串中的数据类型。 + - step1.4: 使用CSM - Argument Type.vi 获取CSM参数标签,在这里是 。 + - step1.5: 将 CSM massdata 参数转换回原始数据,可以在前面板查看转换后的数据,应该与原始数据完全匹配。 + +- Step2: 波形数据, 此部分选择的打包函数为`CSM - Convert MassData to Argument.vim`,因此不包含DataType部分。 + - step2.1: 构造原始数据,在实际程序中来源与硬件采集、数据接收等情况。 + - step2.2: 调用`CSM - Convert MassData to Argument.vim`,将原始数据转换为massdata 参数。可以在前面板查看转换后的参数格式,选择这个打包函数,不包含DataType部分。 + - step2.3: 使用CSM - Argument Type.vi 获取CSM参数标签,在这里是 。 + - step2.4: 将 CSM massdata 参数转换回原始数据,可以在前面板查看转换后的数据,应该与原始数据完全匹配。 + + +## 查看massdata缓存状态 (2. Show MassData Cache Status in FP.vi) + +### Overview + +Massdata 使用一个后台环形队列来缓存数据,队列的大小可以在CSM API参数中配置。本范例用于展示如何查看MassData缓存状态。 + +### Introduction + +MassData 提供了一个帮助函数 CSM - MassData Update Status Indicator.vi,用于查看MassData缓存状态。本范例展示了如何使用这个函数。 + +### Steps + +- step1: 使用 CSM - Config MassData Parameter Cache Size.vi 设置缓存大小,可以在界面直观的看到这个设置是生效的。 +- step2: 每次循环中,构造一组新的数据。 +- step3: 使用 CSM MassData 的API对数据进行打包解包,模拟实际程序中的使用情况。 +- step4: 使用 CSM - MassData Update Status Indicator.vi 更新垂直方向的UI界面缓存状态控件刷新。 +- step5: 使用 CSM - MassData Update Status Indicator.vi 更新水平方向的UI界面缓存状态控件刷新。 +- Step6:循环间隔,每个循环会重复 step3~step4。 +- Step7:(optional) 可以通过本插件提供的 CSM-Tool 更加快捷的查看MassData缓存状态。 + +## 在非CSM框架中使用MassData(3. MassData in Non-CSM Framework.vi) + +### Overview + +MassData 也可以在非CSM框架中使用。本范例用于展示如何在非CSM框架中使用MassData。 + +### Introduction + +通过一个生产者消费者框架的范例,展示了如何在非CSM框架中使用MassData。数据生产者负责生产数据,将数据打包为MassData 参数,并通过队列传输给数据消费者,数据消费者负责消费数据,将MassData格式的数据解包为原始数据,并进行处理。本范例展示了这个过程。 + +### Steps + +- step1: 使用 CSM - Config MassData Parameter Cache Size.vi 设置缓存大小。 +- step2: 数据生产者循环 + - step2.1: 构造原始数据,在实际程序中来源与硬件采集、数据接收等情况。 + - step2.2: 调用 CSM - Convert MassData to Argument.vim 将原始数据转换为MassData参数。 + - step2.3: 将转换后的MassData参数通过队列传输给数据消费者。 +- step3: 数据消费者循环 + - step3.1: 从队列中接收MassData 参数。 + - step3.2: 调用 CSM - Convert Argument to MassData.vim 将massdata 参数转换为原始数据。 + - step3.3: (optional) 使用 CSM - MassData Update Status Indicator.vi 更新UI界面缓存状态控件刷新。 + + +## 在CSM框架中使用MassData(4. MassData in CSM.vi) + +### Overview + +本范例用于展示如何在CSM框架中使用MassData。 + +### Introduction + +本范例通过一个生产者消费者的场景,展示了如何在CSM框架中使用MassData。 + +使用一个非CSM循环生成数据生产者负责生产数据,将数据打包为MassData 参数,并通过同步消息发送给作为数据消费者的CSM模块。本范例展示了这个过程。 + +### Steps + +- step1: 使用 CSM - Config MassData Parameter Cache Size.vi 设置缓存大小。 +- step2: 数据生产者循环,这个循环不是CSM模块。 + - step2.1: 构造原始数据,在实际程序中来源与硬件采集、数据接收等情况, 调用 CSM - Convert MassData to Argument.vim 将原始数据转换为MassData 参数。 + - step2.2: 使用 CSM - Wait and Send Message for Reply.vi 将数据作为 API: Update Waveform 的参数,发送给CSM模块,并标记发送者为Producer。 + - step2.3: 在 Generate 按钮为按下状态时,才发送数据。 + - step2.4: (optional) 使用 CSM - MassData Update Status Indicator.vi 更新UI界面缓存状态控件刷新。 +- step3: 数据消费者循环,这个循环是CSM模块,名称为"CSM"。 + - step3.1: 在 API: Update Waveform 分支中,将收到的参数使用 CSM - Convert Argument to MassData.vim 将MassData 参数转换为原始数据并显示。 + - step3.3: (Optional) 其他分支和 template 一致,没有修改。 +- step4: 程序退出过程中,使用 CSM - Wait and Send Message for Reply.vi 发送同步消息“Macro: Exit” 给 CSM 模块,使CSM模块退出。 \ No newline at end of file diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(en-us)/VI Description(en-us) - Addon Massdata.md b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(en-us)/VI Description(en-us) - Addon Massdata.md new file mode 100644 index 0000000..0d4a4e8 --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(en-us)/VI Description(en-us) - Addon Massdata.md @@ -0,0 +1,100 @@ +# CSM Massdata Addon + +## API + +> [!NOTE] +> CSM Massdata Argument Support +> +> CSM Massdata argument support provides an efficient argument passing mechanism for transferring large amounts of data within CSM. By using a memory-efficient reference mechanism instead of direct data transfer, CSM Massdata improves the efficiency and performance of argument passing. +> - The argument type defined by CSM Massdata is ``, which can be obtained using the CSM - Argument Type VI. +> - Data transmission of CSM Massdata is completely lossless. However, it is not suitable for storing data that requires indefinite persistence. +> +> Note: CSM Massdata internally uses a circular buffer mechanism. All CSM modules within the same application share the same Massdata buffer space. When the buffer is full, new data will overwrite old data starting from the beginning. Therefore, you need to set a reasonable buffer size to ensure that data is not overwritten before use, avoiding data loss. + +> [!NOTE] +> CSM Massdata Argument Format +> +> A typical Massdata data format is: `Start:8057;Size:4004;DataType:1D I32`. +> +> where: +> - `Start`: The starting address of the data in memory. +> - `Size`: The size of the data in bytes. +> - `DataType(optional)`: The type of the data, defined by the CSM Data Type String VI. + +### CSM - Config MassData Parameter Cache Size.vi +Configures the Massdata background cache size. The default value is 1 MB. + +It is recommended to configure an appropriate cache size that is not too large to avoid wasting memory and not too small to prevent frequent overwrites. You can use the provided debugging tools to monitor cache usage and determine the optimal configuration. + +> - Ref: CSM Massdata Argument Support + +-- Controls -- +- Size (1M): Cache size in bytes. The default is 1 MB. + +### CSM - Convert Argument to MassData.vim +Converts a Massdata argument back to raw data. + +> - Ref: CSM Massdata Argument Format + +-- Controls -- +- MassData Argument: Input Massdata argument. +- Type: Data type. + +-- Indicators -- +- Data: The restored raw data. + +### CSM - Convert MassData to Argument.vim +Converts data into a Massdata argument. The Massdata argument obtained from this conversion does not contain data type information. + +> - Ref: CSM Massdata Argument Format + +-- Controls -- +- Data: Input data. + +-- Indicators -- +- MassData Argument: The converted Massdata argument. + +### CSM - Convert MassData to Argument With DataType.vim +Converts data into a Massdata argument. The Massdata argument obtained from this conversion contains data type information. + +> - Ref: CSM Massdata Argument Format + +-- Controls -- +- Data: Input data. + +-- Indicators -- +- MassData Argument: The converted Massdata argument. + +### CSM - MassData Data Type String.vi +Extracts the data type string from a Massdata argument. + +> - Ref: CSM Massdata Argument Format + +-- Controls -- +- MassData Argument: Input Massdata argument. + +-- Indicators -- +- MassData Argument(dup): A copy of the input Massdata argument. +- Data Type String: The parsed data type string. + +### CSM - MassData Parameter Status.vi +Reads the status information of the Massdata background cache. + +-- Indicators -- +- Active Read Operation: Information about the last read operation, including start address and length. +- Active Write Operation: Information about the last write operation, including start address and length. +- Cache Size: Background cache size in bytes. + +### CSM - MassData Update Status Indicator.vi +Helper VI to update the specified Massdata cache display control on the UI based on the cache status, allowing for a more intuitive visualization of cache usage. + +-- Controls -- +- MassData Status Indicator: Reference to the Massdata cache display control. + +## Debugging Tools + +### CSM-MassData Cache Status Viewer.vi +CSM Massdata cache status viewing tool that allows for an intuitive view of Massdata cache usage, helping to debug and optimize cache configuration. + +> - Ref: CSM Massdata Argument Support + diff --git a/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(zh-cn)/VI Description(zh-cn) - Addon Massdata.md b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(zh-cn)/VI Description(zh-cn) - Addon Massdata.md new file mode 100644 index 0000000..eb61c10 --- /dev/null +++ b/help/NEVSTOP/Communicable State Machine(CSM)/VI Description/VI Description(zh-cn)/VI Description(zh-cn) - Addon Massdata.md @@ -0,0 +1,97 @@ +# CSM Massdata Addon + +## API + +> [!NOTE] +> CSM Massdata参数支持 +> +> CSM Massdata参数支持提供了一种高效的参数传递机制,用于在CSM中传递大量数据。通过使用内存高效的引用机制而非直接传输数据,从而提高了参数传递的效率和性能。 +> - CSM Massdata定义的参数类型为``,可以通过CSM - Argument Type VI获取。 +> - CSM Massdata数据传输是完全无损的,但不适合存储需要无限期持久化的数据。 +> +> 注意: Massdata Support内部使用循环缓冲区机制,同一应用程序内的所有CSM模块共享相同的Massdata缓冲区空间。当缓冲区满时,新数据将从开始位置覆盖旧数据。因此需要设置合理的缓冲区大小,确保数据在使用完毕前未被覆盖,避免数据丢失。 + +> [!NOTE] +> CSM Massdata参数格式 +> +> 典型的Massdata数据格式为: `Start:8057;Size:4004;DataType:1D I32`。其中: +> - `Start`: 数据在内存中的起始地址 +> - `Size`: 数据的大小(字节数) +> - `DataType(optional)`: 数据的类型,由CSM Data Type String VI定义 + +### CSM - Config MassData Parameter Cache Size.vi +配置Massdata后台缓存大小,默认值为1 MB。 + +建议配置适当的缓存大小: 不要太大(避免浪费内存),也不要太小(防止频繁覆盖)。可以利用提供的调试工具监控缓存使用情况,确定最佳配置。 + +> - Ref: CSM Massdata参数支持 + +-- 输入控件(Controls) -- +- Size (1M): 缓存大小,单位为字节(Byte)。 + +### CSM - Convert Argument to MassData.vim +将Massdata参数转换为原始数据。 + +> - Ref: CSM Massdata参数格式 + +-- 输入控件(Controls) -- +- MassData Argument: 输入的Massdata参数。 +- Type: 数据类型。 + +-- 输出控件(Indicators) -- +- Data: 恢复出的原始数据。 + +### CSM - Convert MassData to Argument.vim +将数据转换为Massdata参数,此转换得到的Massdata参数不包含数据类型信息。 + +> - Ref: CSM Massdata参数格式 + +-- 输入控件(Controls) -- +- Data: 输入数据。 + +-- 输出控件(Indicators) -- +- MassData Argument: 转换后的Massdata参数。 + +### CSM - Convert MassData to Argument With DataType.vim +将数据转换为Massdata参数,此转换得到的Massdata参数包含数据类型信息。 + +> - Ref: CSM Massdata参数格式 + +-- 输入控件(Controls) -- +- Data: 输入数据。 + +-- 输出控件(Indicators) -- +- MassData Argument: 转换后的Massdata参数。 + +### CSM - MassData Data Type String.vi +从Massdata参数中提取数据类型字符串。 + +> - Ref: CSM Massdata参数格式 + +-- 输入控件(Controls) -- +- MassData Argument: 输入的Massdata参数。 + +-- 输出控件(Indicators) -- +- MassData Argument(dup): 输入的 massdata 参数副本。 +- Data Type String: 解析出的数据类型字符串。 + +### CSM - MassData Parameter Status.vi +读取Massdata后台缓存的状态信息。 + +-- 输出控件(Indicators) -- +- Active Read Operation: 上次读操作的信息,包括起始地址与长度。 +- Active Write Operation: 上次写操作的信息,包括起始地址与长度。 +- Cache Size: 后台缓存大小,单位为字节(Byte)。 + +### CSM - MassData Update Status Indicator.vi +辅助VI,用于根据缓存状态更新界面指定的Massdata缓存显示控件,可更加直观地展示缓存的使用情况。 + +-- 输入控件(Controls) -- +- MassData Status Indicator: Massdata缓存显示控件引用。 + +## 调试工具 + +### 查看CSM Massdata缓存状态(CSM-MassData Cache Status Viewer.vi) +CSM Massdata 缓存状态查看工具,可以直观地查看Massdata缓存的使用情况,帮助调试和优化缓存配置。 + +> - Ref: CSM Massdata参数支持