pischrs
I was going through the start up tutorial to install OpenPLC with Cygwin.

It looks like I got everything to compile but for some reason I cannot get the "node server_win.js" command to execute. After I type in the command i get "-bash: node: command not found". Any one have the same problem?



chris@Cronus ~/OpenPLC_V2
$ ./build_win.sh
Building OpenPLC environment:
[MATIEC COMPILER]
[LADDER]
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
[GLUE GENERATOR]

The OpenPLC needs a driver to be able to control physical or virtual hardware.
Please select the driver you would like to use:
1) Blank                  5) UniPi                 9) Arduino+RaspberryPi
2) Modbus                 6) PiXtend              10) Simulink
3) Fischertechnik         7) Arduino
4) RaspberryPi            8) ESP8266
#? 1
[OPENPLC]
Generating object files...
Generating glueVars.cpp
Compiling main program
chris@Cronus ~/OpenPLC_V2
$ node sever_win.js
-bash: node: command not found

Reply 0 0
thiagoralves
Please make sure you have NodeJS installed (step 2 on the getting started guide). If you have it installed already, maybe your cygwin path is corrupted. One way to fix it is to type

export PATH=$PATH:"/cygdrive/c/Program Files/nodejs/"

Or if you have a 32-bit version of node

export PATH=$PATH:"/cygdrive/c/Program Files (x86)/nodejs/"

before starting OpenPLC.

If you want this change to be permanent, just add this line to your /cygwin/home/{username}/.bashrc file.
Reply 0 0
tripps
Thanks, Thiago,
While the OpenPLC started working with the web interface up and able to upload the compiled code, the hello world program doesn't work after successful compilation. Should I see something on the web browser?

Br,
Pari
Reply 0 0
thiagoralves
You won't see anything on the browser. That interface is only used for you to upload your programs. You must have a physical I/O board (Arduino, ESP8266, etc) attached to your computer to "see" something happening. Also, by using a Modbus Poll software like Radzio Modbus, it is possible for you to play with OpenPLC registers and also see what the program is doing.
Reply 0 0
Reply