koosjr
First of all, I need to curse the inventor of this awesome software as I can see it will cause me many sleepless nights - but that is the story of my life though. A new skill to learn and I highly appreciate it being brought to Arduino.
 
Anyway. I am trying to upload the basic Blink Program.
 
OpenPLC does see my Nano on COM4 and when I press the upload button compiling starts etc.
 
However, when the uploading message appears, it takes quite a while for any activity on the port - and one can see there is something going on but it bogs down and eventually when it says upload is complete, nothing in the program changed.
 
I tested it by uploading a test program for other outputs from ArduinoIDE so I can see the previous program has not been replaced.
 
OpenPLC did download all the things and installed it on the first press of upload.
 
The Nano I use is a Robotdyn Clone and on the ArduinoIDE I always have to select (old bootloader). Could that perhaps have an effect on OpenPLC?

Also, when I a in OpenPLC and I do a simulation, the simulation for the ladder diagram stops as soo as I put in a location. If I leave the value open, the simulation on the ladder works again.
Reply 0 0
thiagoralves
Yes, you need to reflash your board with the newest bootloader. On your simulation question, what location are you talking about?
Reply 0 0
koosjr
Thanks for the reply!

Just for interest sake: I never had a need to program PLC's per sé as I only used HVAC controllers.
 
I recently developed a CPD course for consulting engineers and technicians who have to work with HVAC controllers. The architecture is a bit different. They are quite a bit more functional on the software side (due to things like phychrometric functions etc) , but not as capable as PLC in terms of hardware expansion. They almost exclusively use Functional Blocks as programming, although I doubt any of it is IEC compliant. It is all propriety.
 
I knew they all originated from PLC's and as I went deeper down the rabbithole I eventually found your software. This is going to open up a very new world for me regarding the education side.
 
What I find most interesting, is how PLC's use Modbus and all of a sudden the light went up why it works so well in PLC architecture - and why it survived over 40 years of use with no end in sight. With HVAC controllers it can be a nightmare to make Modbus work as it can't refer to the I/O's in the same direct way as a PLC's does. 
 
I have developed a small training board, basically with tactiles, dips, LEDS's , some PODs, a temperature sensor bound to a fat resistor (for teaching PID control), as well as a relay and a photo sensor. Just to have something compact with many toys on board.
 
I am now testing it on OpenPLC but I see you have to be a lot ore rigid on the use of your I/O's (which is understandable considering the PLC architecture) and I will have go make minor modifications on this side to have a training board that will work.
 
One simple thing is that the Input Pullup would not be available through he PLC side as far as I can see so I may need to design new training board for PLC teaching, but in that case I will also make it so that one can easily chain two or three boards together specifically to teach how I/O modules are attached for PLC's.
 
Reason for the training boards is that one do not want to waste time in class wiring up bread boards - especially not if one wants to teach lessons that requires a large number of I/O's.
 

OK I will wire up today and see if I can transfer a new bootloader.

So when I fill in the location as shown, the simulation of the ladder diagram stops, but it does show output on the oscilloscope window.
 
First problem first. I will get the new bootloader on and see what happens.

[203128%2F8132388%2Fmceclip0]
Reply 0 0
thiagoralves
This is weird… any errors when you try to start simulation with locations filled in?
Reply 0 0
koosjr
Yes, with a location filled in the ladder logic simulation stops working. If I remove it, it works again. But that is not a crisis for now. Perhaps I pressed a wrong button or something. Will play some more and revert back.
 
Reply 0 0
thiagoralves
But what do you mean by “it stops working”? Any error messages?
Reply 0 0
koosjr
No error messages I can see, but the color animation is not there.
Reply 0 0
thiagoralves
You need to click on the debug symbol (glasses) to open a debug instance 
Reply 0 0
Reply