pbear&shagrug
trying to upload my first program onto openPLC runtime local host. i had it started and running already. 
my arduino uno was connected and the lights were blinking as they should 
i mapped plc editor program 

i get this message when trying to instal

Optimizing ST program...
Generating C files...
./st_files/973208.st:5: error: invalid location in global location declaration.

1 error(s) found. Bailing out!
Error generating C files
Compilation finished with errors!
Quote 0 0
pbear&shagrug

Plc runtime message after launching program

 

Optimizing ST program...

Generating C files...

POUS.c

POUS.h

LOCATED_VARIABLES.h

VARIABLES.csv

Config0.c

Config0.h

Res0.c

Moving Files...

Compiling for Linux

Generating object files...

Generating glueVars...

varName: __IX0_0 varType: BOOL

varName: __QX0_0 varType: BOOL

varName: __IX0_1 varType: BOOL

Compiling main program...

Compilation finished successfully!

 

Then i navigate to dashboard as requested

program is then stopped

 

 

 

- I don’t have right-click option to force in editor program while in stimulation and not.

- editor is saving file as a text not an st. This is what text reads:

 

PROGRAM program0

VAR

LocalVar0 AT %IX0.0 : BOOL;

LocalVar1 AT %QX0.0 : BOOL;

LocalVar2 AT %IX0.0 : BOOL;

END_VAR

 

LocalVar1 := LocalVar0;

END_PROGRAM

 

 

CONFIGURATION Config0

 

RESOURCE Res0 ON PLC

TASK task0(INTERVAL := T#20ms,PRIORITY := 0);

PROGRAM instance0 WITH task0 : program0;

END_RESOURCE

END_CONFIGURATION

 

Quote 0 0
pbear&shagrug
ok got it! but some issues are still true.  my addressing was the problem. i had the bits as %IX0.0 , etc. so i added the 100 to now = %IX100.0

But i still can't force in editor. and still the runtime program doesn't show st files when i browse. For now i add option to show all files and it works
Quote 0 0
thiagoralves
You will be able to force things on the editor only after you start debugging. To debug you need to click on the glass icon as directed on the instructions at the website:  https://openplcproject.com/reference/basics/first-project

As for the .st file, it is text readable. When you’re saving the file from the editor, just add the .st at the end of the name and you will be good
Quote 0 0