Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I need to connect to a server over TCP/IP that uses RFC1006.
I'm not familiarized with it so I was hopping that someone coulld enlighten me.

By using RFC1006 means that my connection and data exchange method will be different than other TCP/IP approaches? Since I am a client I'm using this sequence:
C#
//[...]
MySocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream , ProtocolType.Tcp);
//[...]
MySocket.Connect(MyIPAddress, MyPort);
//[...]
lData = MySocket.Receive(MyDataBuffer, MyDataBuffer.Length, 0);
//[...]

Will this work, or by using RFC1006 I need a more elaborate approach?

Updated info:

For what I could read RFC1006 uses TSAPs to create different channels over one socket through port 102. (I will need two channels and the communication is over ethernet)

So basically, what i need is to figure out:

the connection sequence (request, confirmation, if any data is exchanged during this process...)

the specific stucture used in the encapsulation of my "main message" (field order and its size) so I can append all the data to make my telegram suitalbe for RFC1006.

Thanks in advance.
Posted
Updated 1-Feb-11 6:06am
v4

You can use this framework:
http://libnodave.sourceforge.net/[^]

Good luck!
 
Share this answer
 
Comments
jbravofaria 25-Jan-11 6:20am    
Thank you for your help.. But i will need to use the application with an equipment and after reading the "README" file i dont feel very confortable with it. I need indeed to exchange data with a PLC but i'm not supposed to access memory positions, just exchange messages over TCP/IP.
What I need to know if the fact that it's used RFC1006 brings any changes to what i'm used to. And if afirmative, what would be those changes.
E.F. Nijboer 25-Jan-11 7:12am    
How do you mean access memory positions? I'm not completely in to this but with tcp/ip you are not communicating with a memory controller. There is an example in /libnodave-0.8.4.5/Dot.NET/CS/simpleISO_TCP that you can simply use as a starting point. Just try some stuff out, I'm sure that's possible in a development environment.
jbravofaria 1-Feb-11 11:49am    
Unfortunately i dont have a PLC available for testing. I think I need a client/server example so I can try to adapt the client to my scenario and do some tests on the way. Tried to contact the developer through sourceforge but no reply untill now!
I'll continue searching for a solution.
E.F. Nijboer 2-Feb-11 5:13am    
It would then be best not to focus on that to much because you cannot really develop and test it at this point. I would suggest making a proxy for it and fill in the missing gaps for RFC1006 when you do have a plc to test it. It is just the last step of communication. You can implement it for tcp/serial or whatever is most effective for testing now and do RFC1006 later.
http://en.wikipedia.org/wiki/Proxy_pattern
There is a very good solution out there that takes out this burden see http://www.adontec.com/s7-library.htm. It does not matter if you need one or many connections.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900