RottenRonnie
Running under Win10 and cygwin64 compiled with driver for Arduino:

I successfully uploaded the start_stop.st file to the OpenPLC Server, but the console shows this error message:

Ron@Hal_9000:~/OpenPLC_v2$ node server.js
Working on port 8081
start_stop.st is starting ...
start_stop.st uploaded to  st_files\start_stop.st
finishing old program...
compiling new program...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Program compiled successfully
moving files...
error moving files



Reply 0 0
thiagoralves
https://openplc.discussion.community/post/error-after-uploading-st-file-8244490?highlight=error+moving&pid=1293418817#post1293418817
Reply 0 0
RottenRonnie
Thanks Thiago, as you mentioned in your post, I did not have the Config0 or Res0 included in the generated .st file which is why it failed.

As a control, I decided to upload your unmodified helloword.st file, and this is the new error message I get:

hello_world.st is starting ...
hello_world.st uploaded to  st_files\hello_world.st
finishing old program...
compiling new program...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
Program compiled successfully
moving files...
compiling OpenPLC...
stdout:
stderr: '.' is not recognized as an internal or external command,
operable program or batch file.
exec error: Error: Command failed: ./build_core.sh
'.' is not recognized as an internal or external command,
operable program or batch file.
error compiling OpenPLC. Please check your program

Reply 0 0
thiagoralves
It seems that you're running OpenPLC on Windows (using Cygwin or any other method), but starting the server.js webserver. If you're on Windows, you need to run server_win.js. Unfortunately, the way M$ Windows decided to handle some stuff is abnormal (everyone else uses the POSIX standard), so I couldn't find a way to manage both worlds and had to create a slightly different version of the server.js file specifically for the Windows platform. Start the webserver with
node server_win.js
 and you'll be good.
Reply 1 0
RottenRonnie
I had to change the port it was working on in server_win.js as per a post by another member:

Quote:
it runs out of the box, only changed port 8080 to 8081 in server.js, something already listening on port 8080.
app.listen(8081,function()
{
console.log("Working on port 8081");
});


Compiling main program

compiled without errors
Starting OpenPLC Software...

Thanks for your help! Now to make a simple "Start Stop" program. [biggrin]
Reply 0 0
Reply