thiagoralves
They say a picture is worth a thousand words. Well, a video then might be worth more...
 
Reply 16 0
thiagoralves
@damoney27 I made some changes to the builder that fixes your particular error. Update the editor and try again please. Or if you're in a hurry, just replace your editor/arduino/builder.py file with the new one from the repository:  https://github.com/thiagoralves/OpenPLC_Editor/blob/master/editor/arduino/builder.py
Reply 0 0
damoney27
Thanks. That worked to get it to the next screen, then another set of errors in compiling.   I do not know why it is looking for users\\clarkeg, i have no folder in users with that name, its "My Predator",  but the fact that clarkeg is my name. I am confused as to why it is looking for that. 
 
 
Support for arduino:avr:mega is not installed on OpenPLC Editor. Please be patient and wait while arduino:avr:mega is being installed...
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:50-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:50-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:50-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:50-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:50-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:50-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:51-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
Compiling .st file...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
Generating binary file...
COMPILATION START: arduino:avr:mega
Error: invalid path creating config dir: C:\Users\clarkeg\AppData\Local\Arduino15 error: mkdir C:\Users\clarkeg: Access is denied.
time="2023-10-24T10:46:53-04:00" level=error msg="Error: invalid path creating config dir: C:\\Users\\clarkeg\\AppData\\Local\\Arduino15 error: mkdir C:\\Users\\clarkeg: Access is denied."
COMPILATION FAILED!
Reply 0 0
thiagoralves
It looks like your arduino-cli environment is messed up for some reason. I don't know exactly what could be the cause for this as it is totally on the arduino side. I will look to see if there is a clear environment command for arduino-cli to start fresh
Reply 0 0
damoney27
It looks like your arduino-cli environment is messed up for some reason. I don't know exactly what could be the cause for this as it is totally on the arduino side. I will look to see if there is a clear environment command for arduino-cli to start fresh
I deleted the Arduino15 folder and reinstalled the Arduino IDE. So somehow its working now.
Thanks for your help.  Will be joining Paetreon right at this moment.
Reply 0 0
damoney27
So one other problem when I am trying the serial debug

Start build in C:\Users\My Predator\Documents\OpenPLCPrograms\build
Generating SoftPLC IEC-61131 ST/IL/SFC code...
Collecting data types
Collecting POUs
Generate POU program0
Generate Config(s)
Compiling IEC Program into C code...
Extracting Located Variables...
C code generated successfully.
PLC :
[CC] plc_main.c -> plc_main.o
[CC] plc_debugger.c -> plc_debugger.o
py_ext :
[CC] py_ext.c -> py_ext.o
PLC :
[CC] Config0.c -> Config0.o
[CC] Res0.c -> Res0.o
Linking :
[CC] plc_main.o plc_debugger.o py_ext.o Config0.o Res0.o -> OpenPLCPrograms.dll
Successfully built.
PYRO connecting to URI : PYROLOC://127.0.0.1:61601
PLC did not provide identity and security infomation.
Latest build does not match with connected target.
Invalid parameters
Stopping debugger...
Couldn't stop PLC !
This project does not match the program running on target. Upload the project to target and try again.
Couldn't stop PLC !
 
 
 
But I uploaded the project
Reply 0 0
thiagoralves
Ah, that's something I noticed yesterday. The dialog tries to save the parameters so you don't have to set them every time when you click on the serial debug, but for some reason the port name is coming wrong. Just double check your com port is selected from the options of the drop down menu, and that the other items are also configured properly (slave id and baud rate). These settings should match whatever you configured on the upload dialog when you were uploading your code.
Reply 1 0
thiagoralves
Also, make sure you've enabled Modbus on the communications pane in the upload dialog. The serial debug won't work without modbus enabled. Obviously if you want to use the serial debug you want to enable modbus serial, if you want to use the ethernet debugger then you will enable modbus tcp.
Reply 1 0
thiagoralves
damoney27 wrote:
I deleted the Arduino15 folder and reinstalled the Arduino IDE. So somehow its working now.
Thanks for your help.  Will be joining Paetreon right at this moment.
Thanks for the Patreon support 🙂
Reply 0 0
damoney27
Also, make sure you've enabled Modbus on the communications pane in the upload dialog. The serial debug won't work without modbus enabled. Obviously if you want to use the serial debug you want to enable modbus serial, if you want to use the ethernet debugger then you will enable modbus tcp.
Ok we are good to go! The class is this evening so I  just had to make sure I didnt have to stall a bit lol.  Thanks so much!
Reply 0 0
thiagoralves
Awesome! I hope your class goes well, keep us posted. 
 
Another update and you are good to go 🙂
Reply 1 0
Ph1lj
Great stuff, works well with the D1 mini - will try with Pico W, soon
Reply 0 0
GMK.Soft
Longtime awaiting of this feature at last here come true, just sharing my test https://www.youtube.com/watch?v=uckKkTSdKXE
Reply 0 0
thiagoralves
Awesome! Great video!! I'm glad it is working for you guys. I've been waiting a long time for this as well. If it weren't for @kinsa 's push on this it would have never happened. So you guys gotta thank him first 😉
Reply 0 0
GMK.Soft
Oh thanks to @kinsa
 
Anway, please allow me to share this that OpenPLC works great
 
Reply 1 0
yeti-diver
very impressive!
Reply 0 0
Reply