![]() ![]()
You can of course use multiple timers, with different Interval value, to better manage the network resources. The timer callback is responsible to refresh the tags and to calculate the time passed after every read. Inside the class there is a multi-threaded timer that will poll the plc once every 100 ms (see constructor). Public void Write(string name, object value) The class exposes the properties and methods that are used in all application to communicate with the PLC: You can find the plc class inside PlcConnectivity folder. You can read more about it in this article: In the main project I usually define the class that contains the PLC values and communication thread in a singleton. Creation of PLC class inside the main project This is familiar if you already used OPC Servers and Clients, but here it is much more simple and basic. I use the concept of Tags inside my wrapper, where a Tag is an object containing an address and a value. Void WriteItems(List itemList) Īs you can see this methods are less and differents from the ones named inside the IPlc interface of the driver, and the reason is because I handle the communication errors by throwing exceptions, so the returned values can be just the objects that i need.Īlso I just use the highest level features of the driver, and handle all the complexity inside the wrapper.Void ReadClass(object sourceClass, int db) Public byte ReadBytes(DataType dataType, int DB, int startByteAdr, int count) S7.Net exposes a class called Plc that contains all the methods that we can use to communicate with the plc: ![]() #SIEMENS STEP 7 STRUCT EXTRA BYTE DRIVER#Lack of a function that permit to read/write multiple non-connected variables with a single request to the plc.Äocumentation on the driver and S7 protocol.What itâs not good about S7.Net, roadmap for future upgrades: Äid I already say that itâs written in C#, no interop at all?. ![]() #SIEMENS STEP 7 STRUCT EXTRA BYTE LICENSE#
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |