Hello Guest it is May 25, 2019, 07:33:59 AM

Author Topic: Ethernet Communication From CB?  (Read 1781 times)

0 Members and 1 Guest are viewing this topic.

Ethernet Communication From CB?
« on: December 19, 2014, 11:45:16 AM »
Is it possible to do Ethernet communications from within a CB macro?  I've built a new toolchanger that uses Ethernet to communicate with the host PC.  If I could communicate with it using a CB macro, it would save me the hassle of writing a plug-in.  Can it be done?  Even a simple telnet connection would do it.

Regards,
Ray L.
Regards,
Ray L.

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Ethernet Communication From CB?
« Reply #1 on: December 19, 2014, 12:48:21 PM »
HIYA Ray, I believe you can use these to do simple talking across the ethernet

GetPortByte()
PutPortByte()


(;-) TP
Re: Ethernet Communication From CB?
« Reply #2 on: December 19, 2014, 12:57:30 PM »
Terry,

GetPortByte/PutPortByte read raw PC I/O port data.  They know nothing about Ethernet.

What I suspect I really need is something more like WinSock access.

Regards,
Ray L.
Regards,
Ray L.

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Ethernet Communication From CB?
« Reply #3 on: December 19, 2014, 01:16:18 PM »
HIYA RAy I thought the ethernet cards handle the protical ??? Have you tried it with GetPort Byte to see what comes over???

Just a thought, (;-) TP
Re: Ethernet Communication From CB?
« Reply #4 on: December 19, 2014, 01:19:36 PM »
Terry,

No point.  GetPortByte would read a single register within the Ethernet chip - useless.  The protocol is handled in large part by the Ethernet drivers in Windows.  My macro needs to communicate with those drivers, not with the chip itself.  It would be like trying to do 3D graphics by reading/writing directly to registers in the Graphics controller.

Regards,
Ray L.
Regards,
Ray L.

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Ethernet Communication From CB?
« Reply #5 on: December 19, 2014, 01:46:07 PM »
It was jsut a thought (;-) Looks like a WinSock APP is in your future.

HAVE you thought about RS232 or 485 ?? It does not seem like a LARGE data transfer application.

Just another thought< (;-) TP

Offline BR549

*
  •  6,865 6,865
    • View Profile
Re: Ethernet Communication From CB?
« Reply #6 on: December 19, 2014, 01:47:50 PM »
OK HOW about using a Serial to ethernet adapter on the PC side then talk to the serial port ??

(;-) TP

H NOPE that won't work either.

OH well, (;-0 TP
« Last Edit: December 19, 2014, 01:53:09 PM by BR549 »