bevins
Does the monitoring work properly? Is it suppose to show the status of inputs and outputs? 

Mine is not. I am trying on PC and raspberry pi and neither show status.
Reply 0 0
thiagoralves
Screenshot?
Reply 0 0
bevins
This should work. Any one of those buttons should turn on that output. You can see in the monitoring, it is not on, I check the pin on mega and it doesn’t change state.
Reply 0 0
thiagoralves
Ah, so the problem is not on monitoring. From your screenshot it seems that monitoring is pulling all the data correctly, as the output remains false both on monitoring and on the arduino pin. It seems that the problem is somewhere else in your program. It is hard to see what it is just from the screenshot. Can you upload your project here as a .zip file?
Reply 0 0
bevins
OK, If you think it is the program, I will redo it and try again. I'll post back
Reply 0 0
bevins
OK, just tried it again and same thing. I don't know whats going on.
Reply 0 0
thiagoralves

Told you... where is your closing power rail?
Capture.png 
You won't get any power flow from your buttons to the lamp if you don't close the circuit. In any case, it is always useful to simulate the program before uploading it to OpenPLC Runtime, just to make sure everything is in the right place. If you don't know how to do that, I strongly recommend you to go check on the REFERENCE page of the OpenPLC website: https://www.openplcproject.com/reference

Also, it is wise to check your wiring and connections, make sure all your buttons have pull-down resistors, otherwise they will fluctuate when not pressed giving you incorrect results.

Reply 0 0
bevins
I have it on my first one. I just did this one real fast so I will add it and test it again.
Reply 0 0
bevins
OK same thing. I added the end rung I forgot, it is still not doing it.
I redid it so fast I forgot the end rung.....
Reply 0 0
thiagoralves
Works for me... check your wiring (and perhaps even move to a different pin to make sure that pin is not burned out)
Capture1.png 
Capture2.png 
Reply 0 0
NWT.Stuff
Something I have done quite a lot is wire the raspberry pi upside down. I tend to wire the rpi with the Ethernet and USB sockets upwards which I prefer as my comms cables go upwards and I do the control wiring below the rpi. Sometimes I forget that this makes the GPIO upside down too.
https://www.raspberrypi.org/documentation/usage/gpio/
Reply 0 0
espressobot

I'm also having problems with the Monitoring page not showing my ST program state. It sees the variable definitions but not the locations for all the pins.
I'm running OpenPLC_v3 on a Raspi4. Two of the VARs are showing up with their fields all filled out, but their VALUEs are static and for the others, the names are listed under "Point Name", but nothing else.

Screenshot of the Monitoring screen attached.
openPLC_Dashboard.png 
I could understand the pins not being listed or recognized at all or all of them showing up, but just two seems kind of weird. I can talk to the Arduino successfully and toggle the relevant pins via Python, so I'm pretty sure it's not a physical wiring issue.
Thanks for any advice you might have.

Reply 0 0
NWT.Stuff
@espressobot can you post a zip file of your plc program.  The most likely problem would be that there is something in the variable table and mapping that is not quite right. Are IN1 IN2 etc. meant to be GPIO on Raspi4 ?  
Reply 0 0
espressobot

NWT.Stuff wrote:
@espressobot can you post a zip file of your plc program.  The most likely problem would be that there is something in the variable table and mapping that is not quite right. Are IN1 IN2 etc. meant to be GPIO on Raspi4 ?  
 

Hi, sure. Please find it attached below. Yes, IN1,IN2, INx map to the %IXn.m GPIOs on the Raspberry Pi.

I'm following this pinout guide:

Raspi_OpenPLC_pinouts.png 

Thanks!

Reply 0 0
NWT.Stuff
@espressobot.

I will need the xml files (not the compiled  .ST file) to exploit (they are in the top folder).  You could try the attached program which has 8IN 8OUT and a PLC Heartbeat or simply compare it with yours.

Regards, Kevin
Reply 0 0
Reply