eduardo.viana
Hi Everyone,

Currently I am working to carry on a implementation of a Moleculer Simple Client for Python (in my case PSM).
Scrutinizing over internet I notice the documentation is not rich enought to supply some questionings of mine.
I wonder if anyone could assistme on it providing me out further detailed info or pointing me the right direction.
My best wishes!
Eduardo
Reply 0 0
thiagoralves
What exactly do you want to do with that?
Reply 1 0
eduardo.viana
Hi Thiago,

Thru microservices architeture I aiming to call a service, for instance: math service 1+2, in a shape of a and b variables, this service would access python variables, moving then inside the OpenPLC logic, via python submodule, PLC logic would solve this and provide me the result inside a third variable c, which would provide me the result back.
This is done on microservices because this architeture could be descentralized and widely used for IT environment.

Well, this said, at this stage I've a Moleculer client  (https://pypi.org/project/moleculer-client/) running in our raspberry PI inside PSM, but  I still can get no data exchange.

Being a believer this can be caused by a version conflict, in order to make it sorted I wonder you how can I check psm version? Guess this would be the first step to make things back on track.

Many thanks for your reply.
Eduardo Viana
Reply 0 0
thiagoralves
This is a weird thing to do on a PLC, but ok. There is no versioning on PSM, it comes bundled with the runtime and that's it. If you have the latest version of the Runtime, you have the latest version of PSM.

PSM is not a data transfer mechanism between PLC and the outside world. SCADA protocols (like Modbus or DNP3) are better suited for this task. PSM is a low-level driver for the PLC IOs. Its job is to provide accurate real-time (best effort) data for inputs and also write to outputs according to the PLC logic. It only provides simple mechanisms that allows you to access those inputs and outputs directly (psm.set_var and psm.get_var). Therefore, PSM has absolutely no visibility to the PLC logic. It can only see the IOs. If you want to use this Molecule architecture to call a specific function inside the PLC logic, then you're out of luck. There is no mechanism on OpenPLC that will allow you to do that. PSM will only allow you to change variable values.
Reply 0 0
Reply