All Products
Search
Document Center

DataV:Process control

Last Updated:Dec 02, 2024

Process control logic nodes include single path evaluation, condition evaluation, multi-path evaluation, timer, sequential execution, websocket, and websocket-pro. This topic outlines the configuration of process control nodes in the blueprint editor.

Single path evaluation

The condition evaluation node is part of the If condition evaluation node. It triggers the Satisfied event when the predefined condition is met.

Note

Triggering an event means that if the event node is connected to other logic, the system will execute that logic. The term "trigger" is used consistently throughout this topic.

Scenarios

For instance, a scenario might involve triggering the display effect of a layer based on the switch status. The Single Path Evaluation node can assess the current status of the switch. If the switch is on, the layer is displayed.

Usage

Add the Single Path Evaluation node to the blueprint canvas to view the events/actions supported by the Single Path Evaluation node and configure parameters. For the method of adding, see using logic nodes.

Node configuration

image

Condition evaluation can be configured using either a visual interface or code editing.

  • Visual editor: Select the AND mode to satisfy all conditions, or the OR mode to satisfy any condition.

  • Code editor: Add data filters to write filter conditions. The result is a BOOLEAN type. When the result is TRUE, the Condition Satisfied event is triggered. You can add multiple data filters.

Anchor configurationimage

Event/Action Parameter Description

Event/Action

Description

Condition Satisfied

The output result of the ancestor node meets the set condition. The event name can be customized.

Evaluation

Input the output result of the ancestor node for condition evaluation. The action name can be customized.

Condition evaluation

The condition evaluation node is part of the If-Else condition evaluation node. It triggers the Satisfied event when the predefined condition is met, and the Not Satisfied event otherwise.

Scenarios

For example, consider a scenario where the visibility effects of two layers are controlled based on the switch status. The Condition Evaluation node can determine the current status of the switch. If the switch is on, only layer A is displayed; if off, only layer B is displayed.

Usage

Add the Condition Evaluation node to the blueprint canvas to view the events/actions supported by the Condition Evaluation node and configure parameters. For the method of adding, see using logic nodes.

Node configuration

image

Configuration Item Description

Parameter

Description

Evaluation Type

  • All Conditions Satisfied: Triggers the Satisfied event when all set conditions are met by the output result of the ancestor node. If any condition is not met, the Not Satisfied event is triggered.

  • Any Condition Satisfied: Triggers the Satisfied event when any of the set conditions are met by the output result of the ancestor node. If none are met, the Not Satisfied event is triggered.

Condition List

Add data filters to write filter conditions. The result is a BOOLEAN type. When the result is TRUE, the Satisfied event is triggered. When FALSE, the Not Satisfied event is triggered. Multiple data filters can be added.

Anchor configurationimage

Event/Action Parameter Description

Event/Action

Description

Satisfied

The output result of the ancestor node meets the set condition. The event name can be customized.

Not Satisfied

The output result of the ancestor node does not meet the set condition. The event name can be customized.

Evaluation

Input the output result of the ancestor node for condition evaluation. The action name can be customized.

Multi-path evaluation

The Multi-path Evaluation node, part of the Case-When node, evaluates the output result of the ancestor node and triggers the descendant node that meets the first condition to execute the corresponding action.

Scenarios

For instance, set the color of map scatter points based on the current input value in the Numeric Input Box. The Multi-path Evaluation node can determine which range the current input value falls into, thereby triggering the setting of scatter point colors. For example, in the configuration item, set the color to red if the value is greater than 100, yellow if between 50 and 100, and blue if less than 50.

Usage

Add the Multi-path Evaluation node to the blueprint canvas to view the events/actions supported by the Multi-path Evaluation node and configure parameters. For the method of adding, see using logic nodes.

image

Event/Action Parameter Description

Event/Action

Description

When This Condition Is Satisfied

If this condition is satisfied, the event is triggered. Multiple processing methods can be added in the configuration panel. After adding, the Multi-path Evaluation node displays the processing methods you added. Different processing methods can be connected to different descendant nodes to achieve multi-path evaluation.

When The Above Conditions Are Not Satisfied

If the previously set processing methods are not satisfied, this event is triggered.

Evaluation

Input the output result of the ancestor node for multi-path evaluation.

Configuration Item Description

Parameter

Description

Processing Method

Write processing methods by adding data filters. The return result is of BOOLEAN type. When the return result is TRUE, the When This Condition Is Satisfied event is triggered. Once satisfied, the corresponding event is triggered, and subsequent processing methods are not executed. If none of the conditions are met, the When The Above Conditions Are Not Satisfied event is triggered.

Timer

The Timer node supports delayed timing, fixed-point timing, loop delay timing, and loop cycle timing.

Scenarios

The timer is suitable for scenarios that require timing. When the time count reaches the time point set in the configuration item, the timer node triggers the When The Timing Point Is Reached event, outputs the result of the ancestor node, and triggers subsequent actions.

Usage

Add the Timer node to the blueprint canvas to view the events/actions supported by the Timer node and configure parameters. For the method of adding, see using logic nodes.

Node configuration

image

Configuration Item Description

Parameter

Description

Timing Method

Supports Delayed Timing and Fixed-point Timing.

Loop

Whether repeated timing is needed. When the Timing Method is Fixed-point Timing, and Loop is enabled, a Fixed-point Cycle is configured, with custom settings for the start time, interval time, and unit within the Fixed-point Cycle.

Delay/interval Time

Countdown in seconds. Only effective when the Timing Method is Delayed Timing.

Fixed-point Time

Countdown in seconds to a specific standard time point, triggering an event. Only effective when the Timing Method is Fixed-point Timing and Loop Timing is disabled.

Anchor configurationimage

Event/Action Parameter Description

Event/Action

Description

When The Timing Point Is Reached

When the timing point is reached, the event is triggered, causing the descendant node to execute the action. In the case of loop timing, this event will be triggered repeatedly.

Start Timing

Start the timer.

Stop Timing

Stop the timer. The next time Start Timing is triggered, timing will restart. Generally used in loop timing.

Sequential execution

The Sequential Execution node, part of the sequential execution node, filters the current method of the output result of the ancestor node before passing it to the descendant node to execute the corresponding action.

Scenarios

For example, when you need to switch data panels for different scenarios, each scenario has many data panels. First, switch out the data panels related to scenario A, and then switch in the data panels related to scenario B. The sequential execution node can be used to group data panels for different scenarios and then execute them in the order of A first, then B.

Usage

Add the Sequential Execution node to the blueprint canvas to view the events or actions supported by the Sequential Execution node and configure parameters. For the method of adding, see using logic nodes.

image

Event or Action Parameter Description

Event or Action

Description

After Executing This Method

The data processing method of the sequential execution node. Multiple processing methods can be added in the configuration panel. After adding, the sequential execution node displays the processing methods you added. Each method processes data in sequence.

Execute

Input the output result of the ancestor node for the result calculation of this node.

Configuration Item Description

Parameter

Description

Processing Method

Write processing methods by adding data filters. The return result is of BOOLEAN type. When the return result is TRUE, the After Executing This Method event is triggered. Multiple can be stacked. Each processing method calculates independently. The input is the output result of the previous node, and the output is the calculation result of each processing method, without affecting each other.

WebSocket node

The websocket node facilitates screen-to-screen communication. Each message consists of a message name and data. The message name is customized in the configuration item, and the data is the output result of the previous node.

Scenarios

The websocket node is used for command and data transmission between multiple endpoints. For example, data transmission between a large screen and a mobile terminal, or between a large screen and a touch screen terminal.

Usage

To use the websocket node, add it to the blueprint canvas, view the events/actions supported by the websocket node, and configure parameters. For adding methods, see using logic nodes.

Node configuration

image

Configuration Item Description

Parameter

Description

Endpoint

The address of the socket backend service.

Screen ID

The ID number of the screen where the websocket node is located. Custom input.

Screen Name

The name of the screen where the websocket node is located. Custom input.

Group

The websocket node message is broadcast only within the same group under the same socket service. Generally, a group name is agreed upon for the same project.

Anchor configuration

image

Event/Action Parameter Description

Event/Action

Description

When This Message Is Received

When the websocket node receives a message with the same name from another endpoint, this event is triggered. The received message name can be edited in the configuration panel. Click the add event button on the right to add a received message. Click the image icon on the right to delete the received message.

Send This Message

Input the output result of the ancestor node and send it to other endpoints. The sent message name can be edited in the configuration panel. Click the add action button on the right to add a sent message. Click the image icon on the right to delete the sent message.

Configuration example

image

Register message

The websocket node sends messages in the following format.

{
  event: "register",
  data: {
    sid: "407194",                                      // Screen ID
    name: "Data source controlled mode test",           // Screen name
    group: "Default group"                              // Default group
  },
  callback: "callback_15832235175585251131307383912" // Current registration timestamp, automatically generated
}

After the websocket node service receives the registration message, it needs to return the following message to successfully register.

{
  event: "callback_15832235175585251131307383912",   // Return the same registration timestamp as before
  data: {
    isError: false,                                  // Set to false
    data: "ok"
  }
}

Send message

The websocket node sends messages in the following format.

{
  event: 'broadcast',
  data: {
    event: "Sent message 1",                         // Sent message name
    data: {}                                         // Data can be in any format
  }
}

Receive message

The websocket node receives messages in the following format.

{
  event: "broadcast_received message 1",             // broadcast_${received message name}
  data: {}                                           // Data can be in any format
}

Troubleshooting

If you cannot connect to the websocket server normally, you can troubleshoot the issue by following these steps:

  1. The WS service cannot be accessed directly under the HTTPS protocol. You need to use the WSS service. After using your own SSL certificate to proxy the WS service endpoint, you can access it under HTTPS.

  2. Use the F12 function key to open the browser debug page. Check the WS tab under the network tab of the browser to see the connection prompt information. Check if it is due to cross-domain configuration not being set and whether the Sec-WebSocket-Protocol is set to echo-protocol in the response header returned by the connection.

  3. After the connection is successful, pass parameters according to the message format in the document.

WebSocket-pro node

The websocket-pro node is a screen-to-screen communication node. Compared to the websocket node, it provides more detailed configuration options, allowing for better control of the details of screen-to-screen communication. Like the websocket node, each message consists of a custom message name and the data output from the previous node.

Scenarios

Similar to the websocket node, the websocket-pro node is used for command and data transmission between multiple endpoints.

How to use the service

Add the websocket-pro node to the blueprint canvas to view the configuration parameters of the websocket-pro node. For the method of adding, see using logic nodes.

Node configuration

imageConfiguration Item Description

Parameter

Description

Endpoint

The address of the socket backend service.

Group

The websocket-pro node message is broadcast only within the same group under the same socket service. Generally, a group name is agreed upon for the same project.

Screen ID

The ID number of the screen where the websocket-pro node is located. Custom input.

Screen Name

The name of the screen where the Websocket-pro node is located. Custom input.

Included Screens

When sending messages, by default, all screens in the same group can receive messages. You can specify the screens that need to receive messages by adding screen IDs in this configuration.

Excluded Screens

When sending messages, by default, all screens in the same group can receive messages. You can add screen IDs to exclude screens from receiving messages. This has a higher priority than included screens.

Receive Message

The message name sent by the websocket-pro node to other endpoints. Click the add event button on the right to add a received message. Click the image icon on the right to delete the received message.

Receive Message Identifier: Equivalent to the event field in the ws message content. Hitting this field allows you to receive the corresponding message.

Receive Message Alias: The name displayed on the anchor point of the blueprint node.

Processing Method: Serial data processing method. Multiple processing methods can be added in the configuration panel. After adding, the serial data processing node displays the processing methods you added. Each method collectively implements data processing, where the input of the method is the message return content, and the output is the input of the descendant node.

Receive Message Alias: The name displayed on the anchor point of the blueprint node.

Processing Method: Serial data processing method. Multiple processing methods can be added in the configuration panel. After adding, the serial data processing node displays the processing methods you added. Each method collectively implements data processing, where the input of the method is the message return content, and the output is the input of the descendant node.

Send Message

The message name sent by the websocket-pro node to other endpoints. Click the add action button on the right to add a sent message. Click the image icon on the right to delete the sent message.

Send Message Identifier: Use the value of this configuration item as the event value of the message body to send messages.

Send Message Alias: The name displayed on the anchor point of the blueprint node.

Processing Method: Serial data processing method. Multiple processing methods can be added in the configuration panel. After adding, the serial data processing node displays the processing methods you added. Each method collectively implements data processing, where the input of the method is the message return content, and the output is the input of the descendant node.

Extended Configuration

Other configurations for the screen where the websocket-pro node is located.

Register Message Broadcast: Register broadcast messages for the current screen to facilitate communication.

Disconnection Duration When Unresponsive: Set the time to automatically disconnect when the network service is unresponsive.

Heartbeat Detection: Set the heartbeat detection for network communication to ensure that communication is always connected.

Heartbeat Detection Interval: Set the time interval for detecting the communication connection status.

Anchor configuration

imageEvent/Action Parameter Description

Event/Action

Description

When This Message Is Received

When this message is received, the event is triggered. By setting the Receive Message Identifier and Post-receive Processing Method, messages from other screens can be received.

Custom Connection

Set the custom connection for network communication.

Send This Message

When sending this message, by setting the Send Message Identifier and Pre-send Processing Method, it can be sent to different screens.

Configuration example

image

Register message

The websocket-pro node sends messages in the following format.

{
	"source":"407194",
	"target":["10000","20000"]
	"data":{
		"name":"Data source controlled mode test",
		"group":"Default group",
		"hasCbMsg":true,
		"disconnectTime":60000
	},
	"event":"register"
}

After the websocket-pro node service receives the registration message, it needs to internally process the registration message. If the registration is successful, the hasCbMsg parameter of the client determines whether it needs to be sent to the accepter. If the client does not register successfully within 10 seconds, disconnect the client connection. The sent message format is as follows:

{
  "event":"register",
  "source":"407194",
  "data":{
    "isError":false,
    "data":"ok"
  }
}

Heartbeat detection

When the websocket-pro node enables heartbeat detection, the required acknowledgement format is as follows.

{
  "event": "heartbeat",
  "data": {
    "group": "Default group",
    "hasCbMsg":true,
    "disconnectTime": 60000
  }
}

Send/Receive message

The websocket-pro node has a consistent send/receive message structure, formatted as follows.

{
  "event":"send_test",
  "source":"407194",
  "target":["10000","20000"],
  "data":{
    "zoom":12
  }
}
Note

The websocket-pro includes configurations for heartbeat, disconnection and reconnection, included/excluded screens. To be effective, the server must customize and meet the structure of the message body sent by the client.