Forum Home › Forums › Communicating with Devices › OPC › Two opc server running on the same PC. One can get value, Another not value.
- This topic has 8 replies, 2 voices, and was last updated 6 years, 6 months ago by braveheartjhl.
-
AuthorPosts
-
September 19, 2017 at 8:04 am #2585braveheartjhlParticipant
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 undefinedComm. sessions (total / errors) : 1465 / 0
Commands (total / errors) : 0 / 0
Requests (total / errors) : 0 / 0Current 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 undefinedComm. sessions (total / errors) : 0 / 0
Commands (total / errors) : 0 / 0
Requests (total / errors) : 0 / 0Current 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.
September 19, 2017 at 1:38 pm #2587MikhailModeratorHello,
Please provide the log of the communication line where the issue occurs.September 20, 2017 at 2:06 am #2590braveheartjhlParticipantHello Mikhail
Thank you so much!
Below are screen copy and log contents.
1. Screen copy
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
—————–
NoCommon Properties
—————–
NoActive Devices
————–
1. Device 61 “PNS” : normal- This reply was modified 6 years, 7 months ago by braveheartjhl.
September 20, 2017 at 2:39 am #2592braveheartjhlParticipantHello 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 undefinedComm. sessions (total / errors) : 4938 / 0
Commands (total / errors) : 0 / 0
Requests (total / errors) : 0 / 0Current 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: good2017-09-20 10:25:26 Device 61. Handle current data changing. Subscription: test
Device 61. Process tag. Name: test.a. Value: 136.059997558594. Quality: good2017-09-20 10:25:27 Device 61. Handle current data changing. Subscription: test
Device 61. Process tag. Name: test.a. Value: 131.740005493164. Quality: good3.line006.txt
Line 6 “PNS”
————
State : running
Action : 20/09/2017 10:26:08 Communication with Device 61 “PNS”Custom Parameters
—————–
NoCommon Properties
—————–
NoActive Devices
————–
1. Device 61 “PNS” : normal4.demo program screen copy
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!September 20, 2017 at 8:33 pm #2593MikhailModeratorHi,
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.
September 20, 2017 at 8:36 pm #2594MikhailModeratorThanks 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.
September 25, 2017 at 8:58 am #2599braveheartjhlParticipantHi 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.
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.September 25, 2017 at 4:53 pm #2600MikhailModeratorHi,
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?
September 30, 2017 at 1:31 am #2631braveheartjhlParticipantHi 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. -
AuthorPosts
- You must be logged in to reply to this topic.