Two opc server running on the same PC. One can get value, Another not value.

Forum Home Forums Communicating with Devices OPC Two opc server running on the same PC. One can get value, Another not value.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2585
    braveheartjhl
    Participant

    Hello everybody!
    Two opc server running on my PC.One can get value,Another can’t get value.
    there is not error in the log file.
    1. Below can read value.
    Device 71 “OPC Test”
    ——————–
    DLL : KpOpc
    State : normal
    Comm. session : 19/09/2017 15:36:23
    Command : time is undefined

    Comm. sessions (total / errors) : 1465 / 0
    Commands (total / errors) : 0 / 0
    Requests (total / errors) : 0 / 0

    Current device tags data
    +——–+—————–+——–+———+
    | Signal | Name | Value | Channel |
    +——–+—————–+——–+———+
    | ******** Random *************************** |
    +——–+—————–+——–+———+
    | 1 | Random.PsFloat1 | 70.378 | 701 |
    +——–+—————–+——–+———+

    No archive data

    No events

    No commands

    2. Below can’t read value.

    Device 61 “PNS”
    —————
    DLL : KpOpc
    State : normal
    Comm. session : 19/09/2017 15:19:09
    Command : time is undefined

    Comm. sessions (total / errors) : 0 / 0
    Commands (total / errors) : 0 / 0
    Requests (total / errors) : 0 / 0

    Current device tags data
    +——–+——–+——-+———+
    | Signal | Name | Value | Channel |
    +——–+——–+——-+———+
    | ******** test ******************* |
    +——–+——–+——-+———+
    | 1 | test.a | — | 601 |
    +——–+——–+——-+———+

    No archive data

    No events

    No commands

    How to solve this problem?
    Please help me!
    Thanks!

    • This topic was modified 6 years, 7 months ago by braveheartjhl.
    #2587
    Mikhail
    Moderator

    Hello,
    Please provide the log of the communication line where the issue occurs.

    #2590
    braveheartjhl
    Participant

    Hello Mikhail

    Thank you so much!

    Below are screen copy and log contents.
    1. Screen copy
    not value

    not value

    get value

    get value

    2. Log contents
    (1) line006.log
    2017-09-20 08:36:27 Initialize communication line 6 “PNS”
    2017-09-20 08:36:45 Start communication line 6 “PNS”

    2017-09-20 08:36:45 Communication session with the Device 61 “PNS”, type: KpOpc, call number: 127.0.0.1
    Connection to the OPC DA server has been established
    Create data reading subscription. Name: test
    Add tags to the created subscription. Count: 1

    (2) line006.txt
    Line 6 “PNS”
    ————
    State : running
    Action : 20/09/2017 10:13:26 Communication with Device 61 “PNS”

    Custom Parameters
    —————–
    No

    Common Properties
    —————–
    No

    Active Devices
    ————–
    1. Device 61 “PNS” : normal

    • This reply was modified 6 years, 7 months ago by braveheartjhl.
    #2592
    braveheartjhl
    Participant

    Hello Mikhail
    By the way, I developed demo program with “ScadaCommSvc” only,the demo can get value of Device 61 “PNS”.
    1.kp061.txt
    Device 61 “PNS”
    —————
    DLL : KpOpc
    State : normal
    Comm. session : 20/09/2017 10:24:38
    Command : time is undefined

    Comm. sessions (total / errors) : 4938 / 0
    Commands (total / errors) : 0 / 0
    Requests (total / errors) : 0 / 0

    Current device tags data
    +——–+——–+———+———+
    | Signal | Name | Value | Channel |
    +——–+——–+———+———+
    | ******** test ********************* |
    +——–+——–+———+———+
    | 1 | test.a | 343.100 | 601 |
    +——–+——–+———+———+

    No archive data

    No events

    No commands
    2.line006.log
    2017-09-20 10:25:25 Device 61. Handle current data changing. Subscription: test
    Device 61. Process tag. Name: test.a. Value: 144.679992675781. Quality: good

    2017-09-20 10:25:26 Device 61. Handle current data changing. Subscription: test
    Device 61. Process tag. Name: test.a. Value: 136.059997558594. Quality: good

    2017-09-20 10:25:27 Device 61. Handle current data changing. Subscription: test
    Device 61. Process tag. Name: test.a. Value: 131.740005493164. Quality: good

    3.line006.txt
    Line 6 “PNS”
    ————
    State : running
    Action : 20/09/2017 10:26:08 Communication with Device 61 “PNS”

    Custom Parameters
    —————–
    No

    Common Properties
    —————–
    No

    Active Devices
    ————–
    1. Device 61 “PNS” : normal

    4.demo program screen copy
    demo

    5.demo program source
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using Scada.Comm.Svc;

    namespace ScadaCommSvcTest
    {
    public partial class Form1 : Form
    {
    Manager manager;
    public Form1()
    {
    InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
    manager = new Manager();

    }

    private void button1_Click(object sender, EventArgs e)
    {
    manager.StartService();
    }

    private void button2_Click(object sender, EventArgs e)
    {
    manager.StopService();
    }
    }
    }

    Thank you so much for reading!
    Have a nice day!

    #2593
    Mikhail
    Moderator

    Hi,
    You find the right way.
    You can download the distributive for Linux and copy ScadaCommMono.exe to C:\SCADA\ScadaComm
    This is Communicator built as a console application. I think, it will work correctly.
    If yes, that means that the cause is a user of a Windows process. You can see a user by Task Manager. Service usually work as system while application as logged in user.
    Scroll to the bottom the page https://rapidscada.net/doc/content/latest/en/use-cases/opc-standard.html There is a description.

    • This reply was modified 1 year, 7 months ago by Mikhail.
    #2594
    Mikhail
    Moderator

    Thanks to you, we can see how different two OPC servers on the same machine. I’m waiting when OPC UA replaces legacy OPC based on DCOM.

    #2599
    braveheartjhl
    Participant

    Hi Mikhail
    Thank you so much for your information.
    But, ScadaCommMono.exe can’t work correctly. Specify a user account for Component Services and ScadaCommService can’t work correctly either.
    I find the other opc client “Prosys OPC Client”,The OPC Client can get value correctly from two OPC Server.
    prosys opc client
    prosys opc client

    Besides,I developed the demo program by “Scada.Comm.Svc.Manager” Class,the demo can get value of Device 61 “PNS” too.
    I can’t solved the problem.
    Thank you so much for your reading again.

    #2600
    Mikhail
    Moderator

    Hi,

    It’s strange that ScadaCommMono doesn’t work. This is the same as your demo app.

    I think, the possible ways are:
    1. If the demo app works, you can tune it and use instead of Communicator.
    2. I can try to perform my own recommendations by myself via remote connection. To discuss it, contact me by email info@…

    By the way, what communication protocols do you use?

    #2631
    braveheartjhl
    Participant

    Hi Mikhail
    Thank you so much again.
    I use my demo app instead of Communicator,it works correctly.
    What means of the communication protocols,Could you please give me more information.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.