Forum Home › Forums › Communicating with Devices › OPC › OPC write value issue-IBH opc server
Tagged: OPC write data
- This topic has 97 replies, 3 voices, and was last updated 4 years, 1 month ago by
Mikhail.
-
AuthorPosts
-
November 6, 2018 at 1:22 pm #4555
mariodavid
ParticipantHi
Searching the implementation of da.server.write:
You used this method
And please take a look closely to this screenshots. There is a implementation of da.write
https://imgur.com/a/idmZjhe
this is a pubic override method
How can this override writeVQT methods?-
This reply was modified 4 years, 10 months ago by
mariodavid.
November 6, 2018 at 2:28 pm #4557Mikhail
ModeratorHi,
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?November 6, 2018 at 4:27 pm #4559mariodavid
ParticipantHi,
Yes. I can try. But I open kpOpc project in visual studio and shown 6 error and 82 warnings.
November 6, 2018 at 4:30 pm #4560mariodavid
ParticipantHi,
Yes. I can try. But I open kpOpc project in visual studio and shown 6 error and 82 warnings.
November 6, 2018 at 7:43 pm #4561mariodavid
ParticipantI managed to open without errors. only shows warningsI 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?
-
This reply was modified 4 years, 10 months ago by
mariodavid.
November 6, 2018 at 9:12 pm #4563mariodavid
ParticipantSorry 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.
November 7, 2018 at 2:24 pm #4565Mikhail
ModeratorHi,
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.
November 7, 2018 at 2:27 pm #4566Mikhail
ModeratorThe 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.exeNovember 8, 2018 at 3:54 pm #4567mariodavid
ParticipantHi
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
November 9, 2018 at 2:07 pm #4571Mikhail
ModeratorI use VS 2017 Community Edition.
I have trouble loading the symbols
DLL must be compiled in Debug configuration. It’s located in bin\Debug
November 10, 2018 at 2:18 pm #4573mariodavid
ParticipantHi,
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?
-
This reply was modified 4 years, 10 months ago by
mariodavid.
November 11, 2018 at 6:28 am #4576Mikhail
ModeratorHi,
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.November 11, 2018 at 6:32 am #4579Mikhail
ModeratorSet a breakpoint in the beggining of the SendCmd method.
Why you did not compile the source of KpOpc which I shared?
November 11, 2018 at 5:27 pm #4580mariodavid
ParticipantHi, 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?
November 12, 2018 at 2:12 pm #4583Mikhail
Moderatorbecause 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.
-
This reply was modified 4 years, 10 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.