FELIX2025
I am the newer for the openplc. Currently I use the raspberry pi3 for the openplc verification.
  1. I use the template adding the button and LED, and then download the PLC program to raspberry and I can start the PLC correctly and the function is good, the LED is lit when push the button. It is great.
  2. Then I revised the CCP following the UNI, just add the MCP4321 related code and the program can be complied successfully. I upload the program(to be clear, the PI didn't interface with the MCP4321 boards, since it is not in my hand) , and then I go to the dashboard to push the "STTART PLC" button, the runtime can not be started and there is no any logs.
Could some expert meet the same status and give me some clue to fix it ?
 
My guess,
  1. All the necessary must be employed? Because I have the MCP4321 in the CCP, so the PI must interface with the actual hardware
  2. Is there any file need to be modified accordingly when we modify the CCP.
Hope get the feedback soon. Thanks a lot, guys.!
Reply 0 0
FELIX2025
Or the I2C and GPIO pins is conflicted?
Reply 0 0
thiagoralves
Most likely your code is broken and it is causing a segmentation fault on the runtime, so it crashes right after starting
Reply 0 0
FELIX2025
Hello Thiagoralves., thanks for the quick response. I figure out the issue, the root cause is I didn't enable the I2C in PI, and the runtime can run correctly.
 
Unfortunately, I meet another issue, just check if it is correct.
Connect the MCP4321 I2C to PI3 PIN2&PIN3, I can detect the device, address is 0x68 if I didn't run the PLC. The device will be not detected if I RUN the PLC.
Could you please help to check.
 
Next step, I plan to verify the MCP4321 function based on PI3 firstly, and then go forward.
 
Thanks,
Felix
Reply 0 0
FELIX2025
It works now.. Thank a lot.
 
Next step, I would like to add the DSC8830 to the CCP. Any reference? Thanks a lot.
Reply 0 0
FELIX2025
All of the functions are done. The topic can be close. Thanks thiagoralves, and thanks the OPENPLC forum.
Reply 1 0
Mange
the root cause is I didn't enable the I2C in PI,
I made a fresh install now and ofcourse forgot that, shouldnt it be mentioned that you must enable I2C in this manual?: https://autonomylogic.com/docs/installing-openplc-runtime-on-linux-systems/
Reply 0 0
Reply