Sign in to follow this  
Followers 0
Uwe_A

Connect KV-7500(Keyence) to PC

1 post in this topic

Hello!

I want my KV-7500 to talk to a Windows PC via ethernet. My setup is: A KV-7500 (without end unit) and a Windows PC running KV-Studio 10.0.

I checked the USB and the Ethernet ports; both are working.

My idea is: Create a socket on the KV-7500 and send some data. Something like this (in C):

------------------------------------------------------------------------------------------

int socket_desc;
struct sockaddr_in server;
char *message;

//Create socket
socket_desc = socket(AF_INET , SOCK_STREAM , 0);

server.sin_addr.s_addr = inet_addr("123.123.123.123");
server.sin_family = AF_INET;
server.sin_port = htons( 80 );

//Connect to remote server
connect(socket_desc , (struct sockaddr *)&server , sizeof(server));

//Send some data
message = "GET / HTTP/1.1\r\n\r\n";
send(socket_desc , message , strlen(message) , 0);

------------------------------------------------------------------------------------------

Is that possible at all?

Where can I put my code in the KV-Studio?

I must admit that I'm an absolute newbie so please do not hesitate to give me even obvious hints.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0