locked
How to get M0 value form PLC in c#.net RRS feed

  • Question

  • DotUtlType objDotUtlType = new DotUtlType();

    int iReturnCode;
    string label = "M0";
    int data = 0;
    objDotUtlType.ActLogicalStationNumber = 1;

    //The Open method is executed.
    iReturnCode = objDotUtlType.Open();

    int ret = objDotUtlType.GetDevice(ref label, ref data)
    string BitValue = data.tostring();


    I want to get M0 value but BitValue shows zero only not showing as 1,
    if PLC M0 as 1
    How to get PLC M0 value as 1 -> PLC is on M0 as 1

    • Moved by CoolDadTx Monday, December 17, 2018 3:00 PM Third party product
    Monday, December 17, 2018 11:05 AM

All replies

  • This forum is for C#-specific questions. You're asking a question about a third party library (from the manufacturer it looks like) we don't have any knowledge of. Please post your question in their forums. They should be able to help you use their API to get the data you are after.

    Michael Taylor http://www.michaeltaylorp3.net

    Monday, December 17, 2018 3:00 PM
  • Something here might help.

    https://www.codeproject.com/Articles/1135/OPC-and-NET-with-COM-Interoperability

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Tuesday, December 18, 2018 3:12 AM