[!NOTE] CSM Working Modes
- Stand-alone: Independent working mode. If no module name is provided, a random ID will be generated to identify the module.
- CSM: Regular CSM module.
- Action Worker: Worker mode. Add "#" after the module name to mark this module as a worker, sharing the same message queue with other workers of the same name.
- Chain Node: Chain node. Add "$" after the module name to mark this module as a chain node. Messages on the same chain will be passed sequentially until a node processes the message.
VI snippet for asynchronous call template code
VI snippet for synchronous call template code
Query and obtain the VI reference of the CSM module by sending a "VI Reference" synchronous message.
-- Controls --
- CSM Name: CSM module name
- Current Module("" to generate an ID): Identifier of the CSM module to query. If empty, a unique ID will be generated.
- Response Timeout(5000ms): Timeout for synchronous messages, default is 5000 ms
-- Indicators --
- CSM Module VIRef: VI reference of the CSM module
Check if the CSM module exists
-- Controls --
- CSM Name: CSM module name
-- Indicators --
- Exist?: Returns whether the module exists
- CSM Name(dup): Returns CSM Name
List all active CSM modules.
Ref: CSM Working Modes
-- Controls --
- Exclude Standalone CSM(T): Whether to include modules in standalone working mode
-- Indicators --
- Module Names: List of CSM module names
Get the status of the CSM module, including: working mode, number of workers, and the number of pending messages in the message queue.
Ref: CSM Working Modes
-- Controls --
- CSM Name: CSM module name
-- Indicators --
- Mode: Returns the working mode of the module
- #As Worker: Number of workers in worker mode for this module
- #msg to be processed: Number of pending messages in the CSM message queue
- CSM Name(dup): Returns CSM Name