Can we read Tags if we run PlcReadRequest in ExecutorService thread? If I run the below readValues() method in Main Thread, it works fine. Am I missing anything? #1920
-
`public class Plc4xConnect2 {
}` |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi Plc4x Team, I got the answer. I was making the mistake of creating a Connection in Main Thread and running the tags reading task in Executor Service thread. Now, reading tags is happening in Executor Service Thread but at the same time the Main Thread reaches End of Line and terminates the Connection. So, now i created the Connection and reading the tags in Executor Service Thread itself which is working fine. |
Beta Was this translation helpful? Give feedback.
Hi Plc4x Team, I got the answer. I was making the mistake of creating a Connection in Main Thread and running the tags reading task in Executor Service thread. Now, reading tags is happening in Executor Service Thread but at the same time the Main Thread reaches End of Line and terminates the Connection. So, now i created the Connection and reading the tags in Executor Service Thread itself which is working fine.