[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Ethernet communication

Posted on 2012-08-28
9
Medium Priority
?
1,625 Views
Last Modified: 2012-09-24
Hi, I am doing interfacing to machinery using through Ethernet port. On hardware part, I do have all the commands send and receive.

Can anyone help how to send command using ethernet port and read in C#. Is that similiar as com port?
0
Comment
  • 3
  • 3
7 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 total points
ID: 38343837
You need to learn about Socket Client programming:
http://msdn.microsoft.com/en-us/library/bew39x2a.aspx

connect to your machine's IP address and port and use the read and write operations provided in the example.
0
 

Author Comment

by:Ramanathan Tito Titan Nadar
ID: 38348681
Hi, thank you for the link given,

I am looking for basic way to develop it. the links make me a bit confuse. Basically in comm port communication

Set the parameters (baudrate, parity, etc)
then open port
send something
receive something
close port.

i looking for simplest method to develop it, can some one guide me.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38352165
If it is really an Ethernet network connection, you need to use the info in the link above.  The Ethernet Network port belong to Windows and you have to use their drivers to communicate thru them.  If it is really a 'serial port' on an 8 position RJ45 connector, then you got the info in your previous questions.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 38353083
I don't think it can be easier. The socket programming model is event-driven, so it won't be as linear as serial port programming could be. btw, serial port programming can be event-driven as well.
0
 

Author Comment

by:Ramanathan Tito Titan Nadar
ID: 38357314
Hi, thank you for the advice. I did try out to send command using C# form. I did insert command in textbox1 and by clicking send should receive result in textbox2. Please do guide me up here.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 38357795
Are you trying with two machines?
0
 

Author Comment

by:Ramanathan Tito Titan Nadar
ID: 38358669
Hi, i am trying between pc and machine.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question