OPC write value issue-IBH opc server

Forum Home Forums Communicating with Devices OPC OPC write value issue-IBH opc server

Viewing 15 posts - 61 through 75 (of 98 total)
  • Author
    Posts
  • #4555
    mariodavid
    Participant

    Hi

    Searching the implementation of da.server.write:

    You used this method

    https://imgur.com/a/LrHcSac

    And please take a look closely to this screenshots. There is a implementation of da.write

    https://imgur.com/a/tVte9KD

    https://imgur.com/a/idmZjhe
    this is a pubic override method
    How can this override writeVQT methods?

    • This reply was modified 5 years, 4 months ago by mariodavid.
    #4557
    Mikhail
    Moderator

    Hi,

    How can this override writeVQT methods?

    Create a new class that is derived from the Server class and override Write method.
    Can you try this?

    #4559
    mariodavid
    Participant

    Hi,

    Yes. I can try. But I open kpOpc project in visual studio and shown 6 error and 82 warnings.

    https://imgur.com/a/n1586Bu

    #4560
    mariodavid
    Participant

    Hi,

    Yes. I can try. But I open kpOpc project in visual studio and shown 6 error and 82 warnings.

    https://imgur.com/a/n1586Bu

    #4561
    mariodavid
    Participant

    I managed to open without errors. only shows warnings

    I am tryng to create a class called “serverNew” from OpcCom.Da20.Server class. I know that serverNew inherits all the methods of OpcCom.Da20.Server class. So that, that include IOsyncIO:write method. So, What is inside new class?

    https://imgur.com/a/9qG905q

    • This reply was modified 5 years, 4 months ago by mariodavid.
    #4563
    mariodavid
    Participant

    Sorry sorry. The idea is create a class derived from Server (include writeVQT) and add “public override write(IOsyncIO:write)” to the new class. Right?

    But, how do I include public override write?

    I am trying this

    namespace OpcCom.Da
    {

    public class serverNew : OpcCom.Da.Server
    {
    public IdentifiedResult[] Write(ItemValue[] items)
    {
    if (this.m_server == null)
    throw new NotConnectedException();
    return ((????)this.m_group).Write(items);
    }
    }
    }
    m_group execute public override write but is private object. So i can use it in another class. I am stop here.

    How can i debugg librarys in visual studio?. It ask me to reference the library to an aplication that uses that library.

    #4565
    Mikhail
    Moderator

    Hi,

    At the moment, can you successfully compile KpOpc? First of all, you need to fix build errors if they still exist. Possible cause is broken references.

    #4566
    Mikhail
    Moderator

    The idea is create a class derived from Server (include writeVQT) and add “public override write(IOsyncIO:write)” to the new class. Right?

    The idea to override a method is right. Details depend on you.

    How can i debugg librarys in visual studio?

    1. Build a library in Debug configuration.
    2. Copy DLL to Communicator and Run Communicator as usual.
    3. In VS go to Debug – Attach to Process and choose ScadaCommSvc.exe

    #4567
    mariodavid
    Participant

    Hi

    What version of VIsual STUDIO should I use? I have trouble loading the symbols in VISUAL STUDO 2017. So I can not establish breakpoints or debugging step by step

    #4571
    Mikhail
    Moderator

    I use VS 2017 Community Edition.

    I have trouble loading the symbols

    DLL must be compiled in Debug configuration. It’s located in bin\Debug

    #4573
    mariodavid
    Participant

    Hi,
    How do I stop opening a KpOpc project with VS? I only open the dll with DOTPEEK and export to VS. I open the project, compile, without errors. Copy the KpOpc.dll generated in bin / debug and paste it into SCADAcomm / KP. break point in:

    this.daServer.Write(new ItemValue[1]
    {
    itemValue
    });

    Attach to Process and choose ScadaCommSvc.exe. But whe I use SCADA.Communicator to write matrikon tags, does not stop in

    this.daServer.Write(new ItemValue[1]
    {
    itemValue
    });

    What am i doing wrong?

    https://imgur.com/a/Y6HZ9cH

    • This reply was modified 5 years, 4 months ago by mariodavid.
    #4576
    Mikhail
    Moderator

    Hi,

    How do I stop opening a KpOpc project with VS? I only open the dll with DOTPEEK and export to VS. I open the project, compile, without errors. Copy the KpOpc.dll generated in bin / debug and paste it into SCADAcomm / KP. break point in:

    1. After compile KpOpc you should find KpOpc.dll in bin\Debug. Not put it here, but the compiler creates it.
    2. Copy KpOpc.dll from bin\Debug to C:\SCADA\ScadaComm\KP
    3. Start Communicator service.
    4. Attach to ScadaCommSvc.exe process in VS.
    Then breakpoints should work.

    #4579
    Mikhail
    Moderator

    Set a breakpoint in the beggining of the SendCmd method.

    Why you did not compile the source of KpOpc which I shared?

    #4580
    mariodavid
    Participant

    Hi, because i do not how to use it. I do not how to open a proyecto with that file. I justo use jetbrains dotpeek, open a DLL and export to visual studio proyecto. Can you tell me how can i use the source kpopc that you shared?

    #4583
    Mikhail
    Moderator

    because i do not how to use it.

    I’ll try to help you. Open the project KpOpc.csproj in VS2017. Check references node in Solution Explorer to make sure that all assemblies are found. Run Build and make a screenshot if there are errors.

Viewing 15 posts - 61 through 75 (of 98 total)
  • You must be logged in to reply to this topic.