Forum Replies Created
-
AuthorPosts
-
kumajaya
ParticipantI believe Nginx must be better but since somehow mono-xsp4 available on my Ubuntu system:
PART 1: mono-xsp configuration
1. Copy /etc/init.d/mono-xsp4 as /etc/init.d/scada-xsp4 and modify it:
sudo cp /etc/init.d/mono-xsp4 /etc/init.d/scada-xsp4
sudo nano /etc/init.d/scada-xsp4#! /bin/sh ### BEGIN INIT INFO # Provides: mono-xsp4 # Required-Start: $remote_fs # Required-Stop: $remote_fs # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Mono XSP4 # Description: Debian init script for Mono XSP4. ### END INIT INFO # # Written by Pablo Fischer <pablo@pablo.com.mx> # Dylan R. E. Moonfire <debian@mfgames.com> # Modified for Debian GNU/Linux # # Version: @(#)mono-xsp4 pablo@pablo.com.mx # # Variables PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/xsp4 NAME=scada-xsp4 DESC="XSP 4.0 WebServer" DEFAULT=/etc/default/$NAME CFGDIR=/etc/xsp4 VIRTUALFILE=$CFGDIR/scada.webapp MONO_SHARED_DIR=/var/run/$NAME start_boot=false # Use LSB . /lib/lsb/init-functions # If we don't have the basics, don't bother test -x $DAEMON || exit 0 test -f $DEFAULT && . $DEFAULT if [ "x$start_boot" != "xtrue" ] ; then exit 0 fi if [ ! -e $MONO_SHARED_DIR ]; then mkdir $MONO_SHARED_DIR chown $user:$group $MONO_SHARED_DIR fi should_start() { if [ ! -e $VIRTUALFILE -o <code>cat $VIRTUALFILE | wc -l</code> = "2" ]; then log_action_msg "You have an incomplete $VIRTUALFILE" log_action_msg "To fix it, you need to install at least one package for xsp4 (like asp.net-examples)" return 1 fi if [ -f /var/run/$NAME.pid ]; then # Are we really running xsp4? xsp4_pid=<code>cat /var/run/$NAME.pid</code> xsp4_ps=<code>ps -p $xsp4_pid | wc -l</code> if [ "$xsp4_ps" != "1" ]; then log_action_msg "Sorry, there is already a xsp4 running, stop it first" return 1 fi fi return 0 } case "$1" in start) if should_start ; then log_daemon_msg "Starting $DESC" "$NAME" export MONO_SHARED_DIR start-stop-daemon --start --background --make-pidfile \ --quiet --pidfile /var/run/$NAME.pid \ --user $user --group $group --chuid $user \ --exec $DAEMON -- \ --port $port --address $address --appconfigdir \ $CFGDIR --nonstop log_end_msg $? fi ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" for i in $(ps aux | grep -v grep | grep 'xsp4.exe' | cut -c 10-15) do kill $i > /dev/null 2>&1 done log_end_msg $? ;; restart|force-reload) $0 stop $0 start ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 02. Copy /etc/default/mono-xsp4 as /etc/default/scada-xsp4 and modify it:
sudo cp /etc/default/mono-xsp4 /etc/default/scada-xsp4
sudo nano /etc/default/scada-xsp4# Defaults for mono-xsp4, official version # sourced by /etc/init.d/scada-xsp4 # Should we start it? start_boot=true # User and group by default user=www-data group=www-data # Default port port=8000 address=0.0.0.0 # Directory for config files config_files=/etc/scada-xsp43. Copy /etc/xsp4/debian.webapp as /etc/xsp/scada.webapp and modify it:
sudo cp /etc/xsp4/debian.webapp /etc/xsp4/scada.webapp
sudo nano /etc/xsp4/scada.webapp<apps> <web-application> <name>scada</name> <vpath>/</vpath> <path>/opt/scada/ScadaWeb</path> </web-application> </apps>4. Activate scada-xsp4 service and start it:
cd /etc/init.d/
sudo chmod +x scada-xsp4
sudo update-rc.d scada-xsp4 defaults
sudo service scada-xsp4 start5. Open http://localhost:8000 on your browser for testing
kumajaya
Participanthttps://store.chipkin.com/products/tools/cas-modbus-scanner has a feature to scan available device address.
kumajaya
ParticipantWhy not just set it as a virtual com port using https://www.waveshare.com/wiki/File:USR-VCOM_V3.7.1.520.7z and test the communication using a Modbus tester application first.
kumajaya
ParticipantI just want to confirm GrafanaDataProvider works good so far. Please remember to release official build.
kumajaya
ParticipantUsually I use a Modbus tester application to confirm Modbus RTU/TCP communication. You can try https://store.chipkin.com/products/tools/cas-modbus-scanner or https://github.com/ed-chemnitz/qmodbus
kumajaya
ParticipantLet me try it, I’ll report back later. Big thanks.
kumajaya
ParticipantI found GrafanaDataProvider not maintain the connection to Rapid SCADA server but make a new connection in every Grafana request. Sometime fail to connect to server if request too often, for example, multiple panel in a dashboard will make a multiple requests in every Grafana refresh. Sometime no data response back because fail to connect to RS server.
kumajaya
ParticipantNot found yet but logically incorrect.
kumajaya
Participantkumajaya
ParticipantGreat! Very proud if I could contribute back to Rapid SCADA. BTW, RS need a better logo 😀
kumajaya
ParticipantI just confirmed it. Now I really got five data for last five minutes time range. Thank you.
But I have a different experience on Linux, Ubuntu 20.04 LTS. Sometime Grafana just shown no data. I have to debug it further, installed this modul on both Windows and Linux, RS running on Linux.
October 2, 2020 at 4:43 pm in reply to: BadIdentityTokenInvalid error when accessing Node OPCUA server #7345kumajaya
ParticipantI can connect with every security level supported by the server using above official client.
October 1, 2020 at 5:42 pm in reply to: BadIdentityTokenInvalid error when accessing Node OPCUA server #7342kumajaya
ParticipantI can connect with every 7 combination supported by Node OPCUA from UaExpert dan Prosys including “None and None” but only “Sign & encrypt and Basic256Sha256” with KpOpcUa. No problem, I can connect to Node OPCUA server now without modified source code.
October 1, 2020 at 12:07 pm in reply to: BadIdentityTokenInvalid error when accessing Node OPCUA server #7340kumajaya
ParticipantOh my bad… Sign & encrypt and Basic256Sha256 is the only security mode and policy accepted by my Node OPCUA server. Let me check further what’s exactly the problem.
October 1, 2020 at 10:40 am in reply to: BadIdentityTokenInvalid error when accessing Node OPCUA server #7339kumajaya
ParticipantOK. I’ll check it.
-
AuthorPosts