Expected Behavior
Either:
(a) Compiling an ST program with a comment at the end for the OpenPLC Runtime v3 should work
(b) When attempting to compile an ST program without a newline at the end, it is automatically added (For why this might be a solution see below)
Not sure if this is related, but sometimes when saving a ST file trailing whitespace(Newline/space) is trimmed, causing compilation to fail on the second attempt.
Current Behavior
Compiling an ST program ending in a comment fails with the message below. This can be mitigated by adding trailing whitespace (Newline/Space) to the program. Unfortunately this whitespace is removed after compilation, meaning a second compilation attempt will fail. Additionally the whitespace is removed when initially opening a project, meaning it needs to be manually added before each compilation.
[18-05-26 17:58:07]: iec2c process exited with code 1
[18-05-26 17:58:07]: /home/soethe/Documents/min-broken/build/OpenPLC Runtime v3/src/program.st:6-27..13-23: error: invalid variable before ':=' in ST assignment statement.
[18-05-26 17:58:07]: 6 | OUT := TRUE; (* Test *)*)
[18-05-26 17:58:07]: | ^
Steps to Reproduce
- Download the project min-broken.zip
- Attempt to compile it for the OpenPLC Runtime V3
Optional (to see the behaviour listed above)
- Add a trailing whitespace
- Compile it
- Attempt to compile it again
Possible Solution (Not obligatory)
Context
I'm running a lab at our university where the students have to program in OpenPLC to control a small model plant. After adding a comment to the end of the program it no longer compiles.
Your Environment
- Version : 4.1.4
- Operating System and version : Arch Linux
Expected Behavior
Either:
(a) Compiling an ST program with a comment at the end for the OpenPLC Runtime v3 should work
(b) When attempting to compile an ST program without a newline at the end, it is automatically added (For why this might be a solution see below)
Not sure if this is related, but sometimes when saving a ST file trailing whitespace(Newline/space) is trimmed, causing compilation to fail on the second attempt.
Current Behavior
Compiling an ST program ending in a comment fails with the message below. This can be mitigated by adding trailing whitespace (Newline/Space) to the program. Unfortunately this whitespace is removed after compilation, meaning a second compilation attempt will fail. Additionally the whitespace is removed when initially opening a project, meaning it needs to be manually added before each compilation.
Steps to Reproduce
Optional (to see the behaviour listed above)
Possible Solution (Not obligatory)
Context
I'm running a lab at our university where the students have to program in OpenPLC to control a small model plant. After adding a comment to the end of the program it no longer compiles.
Your Environment