Skip to content

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
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by codekundan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant