PLC and .NET programming

moveez

Member
Join Date
Oct 2005
Location
Tallinn
Posts
4
Hi. I just got an assignment to write a graphical user interface for Unitronics Vision 120. I chose to code it in C# because its the language that i'm most familiar with.

GUI should show several values (from PLC) on the CPU screen in realtime. Unitronics has written a software called Remote Access which is quite similar to the solution that I need to write.

For now I have tested KineticaRT and Local IO which are both shareware. It would be very useful if anyone could reccommend me a free library or a good documentation which explains how to write it without library.

I'am a newbie in the world of PLC's so I was wondering if anyone has done anything like that before and could give me some tips.

Henry
 
Hello Henry,

With Remote access you can show contents from the display of the OPLC on a windows PC (Kind of VNC).
On the website www.unitronics.com you can download an ActiveX .dll for communication with the OPLC i don't know if it runs with .NET. There is also a protocol descriptio in the download section.

Henry
 
thanks for a replay, but unfortunately this dll isn't compatible with dotnet.
icon9.gif
although it's the kind of thing i am looking for.

henry
 
Ah, Henry you are exactly right! ::smacks self for not thinking of that::

Unitronics Vision series can be modbus master or slave, serial or TCP/IP. I've used both, works like a charm with Matrikon OPC servers, so you know it has to be standard.
 
Hi Henry.

Welcome to the club. It is nice to see that Iam not the only one from Estonia


PS
I do not (want to?) know much about Unitronics
 
At first, thanks a lot for pointing out modbus. I downloaded and installed Matrikon OPC server. Afterwards I connected to it using Matrikon OPC Explorer. The connection seems fine, but I can't see any items or values from my PLC. Am I doing something wrong or Matrikon OPC Explorer isn't suitable for that purpose at all.

I also searched the web for modbus .NET component and found thing called Sapia. It's unfortunately shareware so I can't use it:( If anyone knows some freeware components, please let me know.

Could you please give me some more instructions. Honestly I don't know how to continue because I simply do not have a slightest idea how Matrikon OPC server communicates with PLC and how do I have to communicate with OPC server so I can get some data from it.

Please excuse me my newbieness:)
greetz hundikoer!
icon26.gif


Henry
 
I also contacted Unitronics and asked if their DLL file (UnCmDrv1.dll) supports .NET and got a simple response.

"As we know, it's possible. It's a matter of knowledge – how to call COM Object DLL from .NET.
Just for now, our programmers have no the know-how to do it."

Any ideas?

Henry
 
I would create your .NET program to communicate with an OPC server. Then you won't be limited to communicating with just this product, since you can get an OPC server for just about any PLC related product.

Here is a link to a .NET OPC component that will allow you to communicate OPC.
http://www.industrialdotnet.com/

Here is the link to the OPC Foundation, if you want to create your own .NET OPC component.
http://www.opcfoundation.org/
 
Attached is a simple program for a V120 that sets up comms on port 2 and makes values available to scan. Very simple and basic. Make note of your comm parameters, and stick with the defaults if possible.

Create a server instance in the OPC server software. Assign your comm setup - if need be, change the PLC to match the server, I think the server may be limited to 32 Kbaud - enable and start.

Open OPC Explorer, connect to the opc server and add a test group. Choose "Add Items", the from the list pick the server instance, followed by the command number, and lastly, type the address you want.

For instance : "5pack.3:00051" returns the integer value in MI 50 for server instance "5pack"

Addressing is a little tricky. Uni addressing starts at 0, Modbus starts at 1, so all addresses are offset. Floats and double-words are readable with the right options: 5pack.3:07701FS returns the value in MF 0 (check the matrikon help files for what F and S do to the data. The help topic "Slave Addresing" in the Unitronics help files are very useful.

I have 8 instances of this setup (running over TCP/IP, not serial) as we speak, so it CAN be done. You'll need to try the different handshaking signals and work at it a bit, but you can pull this off.

If you have more questions, post 'em :D

TM
 
Last edited:

Similar Topics

Just in case others may need or want this information. So you have a Micro820 behind a router/firewall on the plant floor you need to reprogram...
Replies
7
Views
2,415
Hello everyone.. Is it possible to program an AB PLC via ethernet port, using cross cable? Im doing a costing for hardwares for training purposes...
Replies
12
Views
4,050
hi all i have two plc of Allen bradley microlox1762-iq16 and micrologix 1400. i want to develop one software in vb.net for view input value in one...
Replies
1
Views
3,178
I was wondering if it is possible to monitor/program a Q3A processor over Ethernet. I have an Ethernet card in the PLC chassis that is set up to...
Replies
3
Views
4,174
Hi! I have Premium PLC with built-in Ethernet port but I don't have any programming cable. Can I connect to PLC using Unity Pro and download...
Replies
3
Views
7,621
Back
Top Bottom