Giter VIP home page Giter VIP logo

mewtocolnet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mewtocolnet's Issues

Serial Port on MAUI(Android)

Well, I am interested in this repo and I found this repo because I'm investigating a way to communicate with a PLC on android device.

Actually, it might work well on MAUI for Android as I made a demo to do some simple operations.

Now I am learning how to implement a serial version for this repo, but for Android it usually use Android USB Host Mode (OTG) to communicate with a device via Serial port.

So my question is, is it possible to implement it with a cross platform way? Cuz for IOS or some other CLR there may be no same API as on Windows or Android.

GetMetadataAsync fails with FP10SH, FP02-C and FP3SH

Describe the bug
While connecting to FP10SH, FP3SH or FP2 the ProgramCapacity returned by the RT command is always zero. Thus the GetMetadataAsync will always throw an exception causing the programm to crash.

To Reproduce
Use the BasicRegisterReadWrite Example to connect to on of the plcs above using the serial port.

Expected behavior
Expect connection to work with these models

Screenshots
programcapacity0

AsArray WriteAsync

Hi!
I have a problem with the library! After inserting a Word array with the WriteAsync function, an error occurs.

Message
object reference not set to an instance of an object

Stack Trace
MewtocolNet.Registers.ArrayRegister 1.<WriteAsync>d__30.MoveNext

Code

Word[] value = new Word[15];
for (; i < value .Length; i++)
{
      value[i] = new Word(8224);
}

await plc.Register.Struct<Word>("DT30390").AsArray(15).WriteAsync(value);

RtsEnable should be set to true by Default

Is your feature request related to a problem? Please describe.
I have noticed during my tests with FP10SH, FP3SH and FP2 that if RtsEnable is not set to true in TryConnectAsyncSingle, All Serial read operations return an empty buffer (Zero bytes read)

Describe the solution you'd like
Add RtsEnable = true, to the serial port initialisation.

serialClient = new SerialPort() { PortName = port, BaudRate = baud, DataBits = dbits, RtsEnable = true, Parity = par, StopBits = sbits, ReadTimeout = 100, Handshake = Handshake.None };

PlcInfo TryFromRT and TryExtendFromEXRT RegEx for parsing RT message have station number hardcoded to (%EE)

Describe the bug

TryRT and TryExtendFromEXRT will fail to parse PlcInfo if a station number other than 0xEE is used.

To Reproduce

In the BasicRegisterReadWrite example program in the ninitialization of the plc instance MewTocol.Ethernet (Or .Serial) use a station number other than the default 238.

The Plc.ConnectAsync call will fail

Expected behavior
Plc.ConnectAsync should work with all station numbers (if existing in the Mewnet network.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.