ASP.NET Core Communication

Situation:

I need to create some kind of control piece of communication over Modbus TCP / IP in my ASP.NET Core project.

Communication is working properly with Modbus, but I need to read some Modbus addresses and I need to set the interval. I have a structure like this for this in db.

I now have a singleton called CommunicationRepository, which is such a controller for this protocol and has methods for reading from a module, writing to a module, structures for data from modules, etc. and creating CommunicationRunners.

Communication link diagram

CommunicationRunner is something that can wait to pass the interval and pass a delegate from CommunicationRepository, which then reads a specific Modbus address.

CommunicationRunner diagram

Problem: This is now done with async which slows down everything else - page navigation, responses from the web api, etc. Offcourse this problem is recognized at small intervals (eg 10ms).

How can I make it more stable without distortion? Do I need to use streams? If, how exactly?

I would appreciate some code examples.

Thanks and look at the images.

0
c # asp.net-core asp.net-core-mvc asp.net-core-1.1 modbus-tcp


source to share


No one has answered this question yet

See similar questions:

3
Singleton with DbContext - instantiating in Startup.cs

or similar:

1565
Correct use of the IDisposable interface
1270
Why not inherit from List <T>?
342
How can I create a custom AuthorizeAttribute in ASP.NET Core?
200
Resolving Instances with ASP.NET Core DI
1
Creating a Custom MODBUS Program for a Remote Terminal
0
Reading various items from Modbus-TCP
0
Asp.net core 2.0 web app cannot connect to db2 on System i
0
Java communication with the Festo controller CMMO-ST-C5-1-LKP via MODBUS TCP / IP
0
How do I get the correct values ​​from this Modbus address?
0
Multimaster in Modbus TCP



All Articles
Loading...
X
Show
Funny
Dev
Pics