diff --git a/background_installer.sh b/background_installer.sh index 3c3d682..43d866a 100755 --- a/background_installer.sh +++ b/background_installer.sh @@ -23,15 +23,17 @@ fi function linux_install_deps { $1 apt-get update $1 apt-get install -y build-essential pkg-config bison flex autoconf \ - automake libtool make git python2.7 python-pip \ - sqlite3 cmake git + automake libtool make git python2.7 \ + sqlite3 cmake git curl + curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py + $1 python2.7 get-pip.py } function install_py_deps { - $1 pip install flask - $1 pip install flask-login - $1 pip install pyserial - $1 pip install pymodbus + $1 pip2 install flask + $1 pip2 install flask-login + $1 pip2 install pyserial + $1 pip2 install pymodbus } function install_all_libs { diff --git a/utils/matiec_src/lib/C/iec_std_FB.h b/utils/matiec_src/lib/C/iec_std_FB.h index b4416d2..d6d9614 100644 --- a/utils/matiec_src/lib/C/iec_std_FB.h +++ b/utils/matiec_src/lib/C/iec_std_FB.h @@ -613,8 +613,8 @@ static void F_TRIG_body__(F_TRIG *data__) { } // Initialise TEMP variables - __SET_VAR(data__->,Q,,(!(__GET_VAR(data__->CLK,)) && !(__GET_VAR(data__->M,)))); - __SET_VAR(data__->,M,,!(__GET_VAR(data__->CLK,))); + __SET_VAR(data__->,Q,,(!(__GET_VAR(data__->CLK,)) && (__GET_VAR(data__->M,)))); + __SET_VAR(data__->,M,,__GET_VAR(data__->CLK,)); goto __end; diff --git a/utils/matiec_src/lib/edge_detection.txt b/utils/matiec_src/lib/edge_detection.txt index 69c0dfe..a7ad4d6 100755 --- a/utils/matiec_src/lib/edge_detection.txt +++ b/utils/matiec_src/lib/edge_detection.txt @@ -29,7 +29,7 @@ FUNCTION_BLOCK F_TRIG VAR_INPUT CLK: BOOL; END_VAR VAR_OUTPUT Q: BOOL; END_VAR VAR RETAIN M: BOOL; END_VAR -Q := NOT CLK AND NOT M; -M := NOT CLK; +Q := NOT CLK AND M; +M := CLK; END_FUNCTION_BLOCK diff --git a/webserver/scripts/start_openplc.sh b/webserver/scripts/start_openplc.sh index 6952809..dd276ac 100755 --- a/webserver/scripts/start_openplc.sh +++ b/webserver/scripts/start_openplc.sh @@ -1,3 +1,3 @@ #!/bin/bash cd webserver -python2 webserver.py +python2.7 webserver.py