PLC Programming - how should I connect it to the OPC server?

Joined
Aug 8, 2020
Messages
7
Programming Experience
1-3
I am new to PLC Programming and I do not know the basics of it.

My task is to write a code in C#-winforms that sends and receive tags from/to their communication server (OPC server) RSLINX which will be connected to the client's PLC. I have found the sample OPC Client code in the C# but I can't find how should I connect it to the OPC server and is there any testing simulation available that could give me the testing data that how I would be receiving tags from client's PLC. I can give you a reference of what the client is demanding. This is what the client said in the email.

"We currently do not have a copy of RSLinx installed in our system onsite. The communications between our PLC and HMI is inherently built into the devices and configured using RSLinx Enterprise which is installed on our programming laptop. We also use RSLinx on our laptop when we want to access the PLC or HMI using the respective programming software. For your system to reach into our PLC data table, the RSLinx Gateway software will need to be installed and configured on your computer which is running your software and that needs to access our PLC. I hope this makes sense."
 
Last edited:
I have found the OPC Client code in the C#
Danger! Danger! Danger, Will Robinson!

Working off "found code" can be dangerous, especially if you don't understand how it works.
 
I am new to PLC Programming and I do not know the basics of it.

My task is to write a code in C#-winforms that sends and receive tags from/to their communication server (OPC server) RSLINX which will be connected to the client's PLC. I have found the sample OPC Client code in the C# but I can't find how should I connect it to the OPC server and is there any testing simulation available that could give me the testing data that how I would be receiving tags from client's PLC. I can give you a reference of what the client is demanding. This is what the client said in the email.

"We currently do not have a copy of RSLinx installed in our system onsite. The communications between our PLC and HMI is inherently built into the devices and configured using RSLinx Enterprise which is installed on our programming laptop. We also use RSLinx on our laptop when we want to access the PLC or HMI using the respective programming software. For your system to reach into our PLC data table, the RSLinx Gateway software will need to be installed and configured on your computer which is running your software and that needs to access our PLC. I hope this makes sense."
Is there anyone who could help me up????
 
This does not look a C# problem, but rather an environment problem.
 
Last edited:
So if I needed to have some C# code running on a brand new planetary probe exploring Venus, it's also a C# problem to get the probe landed safely on Venus?
 
I'm just saying that you are likely asking the wrong forum. This forum is primarily for C#. What you are asking about in not a C# problem, but rather an integration problem with getting your C# code to work in a particular environment. The language is irrelevant here. You would have the same issue with VB.NET, C++, or Python.

Also, I'm surprised that you or your company accepted this project if you didn't have at best the facilities to do the testing, or at worse, a plan on how to do the testing. Right now, taking your original post in a vacuum, it looks like you want to test your program in your clients production environment, and even scarier, your client is willing to let you do it.

I do have to give you kudos for asking:
is there any testing simulation available that could give me the testing data that how I would be receiving tags from client's PLC
At least you are trying to not test in production if you don't have to.
 
I'm just saying that you are likely asking the wrong forum. This forum is primarily for C#. What you are asking about in not a C# problem, but rather an integration problem with getting your C# code to work in a particular environment. The language is irrelevant here. You would have the same issue with VB.NET, C++, or Python.

Also, I'm surprised that you or your company accepted this project if you didn't have at best the facilities to do the testing, or at worse, a plan on how to do the testing. Right now, taking your original post in a vacuum, it looks like you want to test your program in your clients production environment, and even scarier, your client is willing to let you do it.

I do have to give you kudos for asking:

At least you are trying to not test in production if you don't have to.
You didn't understand my whole thread. Nevermind.
 

Latest posts

Back
Top Bottom