Answer

Aug 05, 2025 - 06:31 AM
To check if a VNC Client is connected to the X2 panel using the iX Detect VNC Client Connection script module, follow these steps:
1. Setting Up the Script Module:
- Inside the script module SCM_VNCDetection, you will find the code for checking the VNC Client connection status.
- The cyclic check time interval can be adjusted within the script module. The default interval is set to 2000 milliseconds (2 seconds). You can modify this interval as needed.
2. Activating the VNC Server:
- In the System menu of the X2 panel, activate the VNC/Remote Access Server.
- Optionally, you can specify credentials and enable the "Notify when connection is active" feature.
3. Using the Script Module:
- The script module includes a method called SCM_VNCDetection_Created, which initializes the timer for the cyclic check.
- The OnTimerTick method is responsible for executing the cyclic check by calling the CheckIfVNCPortisOpen function with the default VNC port set to 5900.
4. Checking VNC Port Status:
- The CheckIfVNCPortisOpen function checks if the specified VNC port is open and if a connection is established.
- If a connection is established, the VNCActive tag is set to true. If no connection is found, the tag is set to false.
5. Adding VNC Client Detection:
- Import the script module SCM_VNCDetection into your project.
- Create a Tag named "VNCActive" with the data type BOOL.
- Add the OpenNETCF.Net.dll to your referenced assemblies.
- Optionally import Screen1 from the example project and customize it to your requirements.
- Transfer the application to the X2 panel and run the application.
By following these steps and utilizing the provided script module, you can effectively monitor the connection status of a VNC Client to the X2 panel. Adjust the settings and configurations as needed to meet your specific requirements.
Add New Comment