JeffH
Clean install of OpenPLC on one Rpi and 2 comfile Pi's working very well except psm will not connect to the interactive server. All 3 test systems behave similarly.

Running ../psm/main.py, psm.py shows no errors. Webserver dashboard reports 'interactive server: listening on port 43628' but never shows 'Interactive server: Client accepted!' or 'Error accepting client'. top -H -p nnnn (where nnnn is task number) reports 3 threads active for openplc task and and 2 threads active for psm task. Changes in the plc state visible on web page 'monitoring' are not reflected in the python test program and vice versa.

I have studied psm.py and below but it is not that easy to follow. The code in interactive_server.cpp appears to serve this function at the plc end but only for the webserver's own text commands. telnet localhost 43628 connects and responds to text commands as if they were coming from the webserver. I would like to dig down further to resolve this and need help with a) where is the port address 43628 specified in psm.py etc b) where does the server recognise requests for data transfer from psm.py. Any advice appreciated.
Reply 0 0
thiagoralves
Why do you want PSM to connect to the Interactive server?
Reply 0 0
JeffH
Because I thought PSM was an IO channel that could coexist with direct access (raspberrypi.cpp).  Your q prompted further digging. Now clear that it's an alternative. Thank you.
Reply 0 0
thiagoralves
Yes, if the PSM hardware layer is not active, PSM will not run at all. You must implement all IO access in PSM if you want to use it instead of the Raspberry Pi original hardware layer. The reason for that is because, since PSM is a driver, it would be very easy to cause conflicting readings/writings if more than one driver is active at the same time.
Reply 0 0
Reply