RHerschel123
I'm stumped, I am new to open plc, the name is Ryan Herschel

I don't want to give too many details about the exact nature of the eco-project

but,
I have a raspberry pi 3 B+ hooked up to a relay board here is the log of the program
The pins are true when they shouldn't be, My PI OS is jessie.

How can I make sure my pins work the way the program should.
I just want to get the start rung to work for now so I have confirmation of a working program.


PS

My PI OS is Rasbian jessie.
installed with open plc
Editor OS :Windows

LOG:

OpenPLC Runtime starting...
Interactive Server: Listening on port 43628
Error opening mbconfig.cfg file
Issued start_modbus() command to start on port: 502
Modbus Server: Listening on port 502
Modbus Server: waiting for new client...
Issued stop_dnp3() command

(
Is it a problem with my code in the editor, or is it my connection to the pi or something else all together? My code says it is working but it isn't?
Please help me find out what I can do to fix it
)
Reply 0 0
BillA
As far as I’m aware you can’t view live code on the OpenPLC editor.

if it’s for a capstone power generation project I would recommend something a bit more main stream, M340 Modicon.

what are you trying to achieve? open PLC is great if everything is working but I’ve found debugging hard because you don’t know where things are getting stuck in the code..
Reply 0 0
thiagoralves
BillA wrote:

what are you trying to achieve? open PLC is great if everything is working but I’ve found debugging hard because you don’t know where things are getting stuck in the code..


Debugging will get a lot better once the Monitoring page is functional. For now, you can debug using a Modbus tool, like Radzio Modubs (  http://en.radzio.dxp.pl/modbus-master-simulator/ ). I ran your program and it seems to work just fine. I don't know exactly what you want to accomplish with that, but OpenPLC does whatever is written in there for it to do. Since I don't have the proper hardware set up with all the sensors and buttons attached to my device inputs, I first converted all the inputs of your program into outputs (%IX into %QX) so that I could manually change the state of the "inputs" using Radzio:
Capture2.png 
Then I opened Radzio, connected to my device using Modbus/TCP, and then opened a new Coil window. I set the size to 20 and put all the variable names in there so that I can easily see what is what. You can see that on steady state all the outputs are off:

Capture.png 
When I press PB1, the Start_Light goes on:
Capture.png 

You can use Radzio to test the inputs of your sensors. It could be that some of your sensors are giving you wrong readings and making your program do something else.
Reply 0 0
RHerschel123
Thanks for the support 🙂 .

I am making ground.
Reply 0 0
Reply