Hi all,

my PLC4X driver using a combination of Apache Commons SCXML (2.0) and Apache 
Daffodil is doing even better than I imagined, when starting the whole thing.

Right now I’m improving the thing to be more on-par with the existing drivers.

However there are still a few little things bugging me and I’ve spent quite 
some time working on them.


  1.  Is it possible to spawn multiple execution heads (Similar to threads in 
Java)?
The reason is that in my protocol state machine, there is a single-threaded 
connection part (that works fine) … part of this connection process is to 
negotiate the number of parallel requests the client is allowed to send to the 
PLC. In my S7-1200 this is usually 3 or so. So I am allowed to send up to 3 
requests in parallel … after that, I have to wait with sending the next, till 
one of these is acknowledged by receiving a response.
Right now I’m serializing everything … but that’s a simplification that greatly 
impacts the drivers performance. So I know there are parallel executions … but 
how can I enter multiple instances of “sendRequest” and wait for them to pass 
“readResponse” … and the number is dynamic.


  1.  Is there a way to pass data with a transition?
As I mentioned, I have a static part of my state machine which ends in a 
“connected” state. Here is where the driver can branch to process the different 
types of requests by transitioning to a “sendReadRequest”, “sendWriteRequest”, 
“sendDisconnectRequest” state. Now my driver programmatically initiates one of 
these by sending a “read”, “write” or “disconnect” event and I take the 
_event.data and assign it to a data element in the global datamodel … however 
this would prevent me from using and form of parallelism … so I guess this is a 
follow up from question 1: If paralellizm is possible, how can I pass the 
“readRequest” provided to the “read” event to the “sendReadRequest” state 
without using a global variable?


Chris

Reply via email to