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
Answered
by
codekundan
codekundan
asked this question in
Q&A
|
`public class Plc4xConnect2 { }` |
Answered by
codekundan
Nov 30, 2024
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. |
0 replies
Answer selected by
codekundan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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.