hjbleier
any idea what would cause this error?
Reply 0 0
hjbleier
I fixed it, I had a error in the Resources that was causing the problem with the compile.
Reply 0 0
thiagoralves
If you're creating your PLC program from scratch, this error might happen if you don't add the correct configuration and resources at the project tree. Please take a look at the example provided at the OpenPLC website (hello world example), specifically at the configurations and resources. If you want to create your program from scratch, you need to copy exactly that same configuration, even with the same names (case sensitive).

The compilation process expects some specific files at the output of iec2c. These files are generated with names based on your program's configuration and resources. These files get moved to the /core folder to continue the compilation process. If you change the names, the compiler will not be able to find the files and the move operation will fail. 

Reply 1 0
hjbleier
thiagoralves wrote:
Please take a look at the example provided at the OpenPLC website (hello world example)

that's exactly what I did, I found your "hello world example" after I made that original post. Once I took a look at that project I found my error and corrected it and my project compile and worked perfect. Thanks keep up the awesome work on this project. I was using the unipi and a rpi3, it is running just amazing. I will complete my point to point check out tomorrow and start building my hmi now. Using myScada for the first time, it looks like it is loaded with some good features. This stuff blows the bacnet and lonworks stuff away. I plan to start using this more for small commercial building automation on custom project [wink]
Reply 0 0
Jade7272
I'm having trouble uploading the hello world sketch to the program any thought s gives me some errors
Reply 0 0
Jade7272
Never mind figured it out
Reply 0 0
tinp1
How did you upload the Hello World after compiling successfully?
Reply 0 0
thiagoralves
You don't. When you get the message "compiled successfully without errors" from the OpenPLC webserver, it is already uploaded, compiled and running on your platform.
Reply 0 0
ainfirdaus
Hello Mr thiagoralves, I got an error while I uploaded to raspberry. I used Hello World example and I installed open plc as web instructions. 
My Raspberry is Raspberry 3 version and Jessie OS

2017-09-21-160112_1366x768_scrot.png 
Reply 0 0
thiagoralves
This is a small glitch from the git commit of yesterday that has already been fixed. Please reinstall OpenPLC and you should not have the problem anymore.

To reinstall OpenPLC on your RaspberryPi, just remove the OpenPLC_v2 folder and then clone and build the project it again:

rm -Rf OpenPLC_v2
git clone https://github.com/thiagoralves/OpenPLC_v2.git
cd OpenPLC_v2
./build.sh
Reply 0 0
kasbesh
newbie here

What could be causing these errors?

            optimizing ST code...
            Program optimized successfully
            compiling new program...
            ./st_files/RAS.st:39:error:')' missing after parameter list of function block invocation in ST statement.
            ./st_files/RAS.st:39:error:';' missing at the end of statement in ST statement.
            ./st_files/RAS.st:39:error: invalid statement in ST statement.

i have a feeling its an improper LD. I've built it from 'Hello World' and all resources remain. Am running on debian scratch and it compiles successfully.
Reply 0 0
thiagoralves
It's hard to know without your code. Please attach here your .xml project file (you will need to compress it to .zip before attaching here)
Reply 0 0
kasbesh
thiagoralves wrote:
It's hard to know without your code. Please attach here your .xml project file (you will need to compress it to .zip before attaching here)

Reply 0 0
thiagoralves
Your project is full of errors. PLCopen Editor follows strictly the ladder language defined in IEC 61131-3 (pretty much like Siemens, Codesys and a few others). It seems that you're programming it according to some Allen-Bradley ladder logic style. You can refer to a good IEC 61131-3 book to learn how to program in that standard. If you need help with the available blocks, you can download LPCManager manual here:  http://www.beremiz.org/LpcManager_UserManual.pdf. They are also using PLCOpen Editor as the core for their software, so the interface is almost the same.

Being specific about your mistakes:
1) There is no constant type V#10 like you inserted on your CTU0. The available IEC constant types are:

Type Ex
INT 3
REAL 3.0
BOOL 1
TIME T#1000ms
DATE D#2017-09-27
TIME_OF_DAY TOD#12:05:14
DATE_AND_TIME DT#2017-09-27-12:05:14

If you want to insert the value 10, just type 10 in the box and it will be identified as INT.

2) TON is a timer function block, you cannot assign it to a contact. If you want to access the output of the timer block, use the Q pin instead.

3) Same thing for counters, bistables, edge detectors, and all other function blocks. If you want to use the output of a block, use the Q pin instead.

4) Please avoid finishing a ladder line without having a coil or some block to activate. Ex: The output of TON0 (TON0.Q) is connected to the left power rail, while it should connect to something else, like a coil, or another block.
Reply 0 0
kasbesh
Wasn't familiar with IEC 61131-3, now I am. Corrected the errors and now works like a charm. Thank you!
Now on to tinkering....
[thumb]
Reply 0 0
Reply