Skip to main content
Submitted by Jim Dawson on Mon, 12/12/2016 - 10:40

I am using a laptop to run a CNC milling machine. What I want to do is signal the laptop to power on using the Wake on LAN functionality on LAN activity from the DMC 4080.

The wake on LAN works fine on the bench when connecting to my office network. Just plugging in the Ethernet cable causes the laptop to power up so I know that function works. It does not require a ''Magic Packet'' to be sent, at least I don't think my network is sending that.

The Ethernet connection between the laptop and the DMC-4080 is connected directly on the machine and is not connected to a network.

I have an #AUTO routine in thread 0 programmed in the DMC software that initializes the DMC-4080 to the desired power up condition. The DMC-4080 is powered up with the main power switch, as is the laptop power supply. There should be some LAN activity on power up because the unsolicited E-Stop message is sent every 100 ms until the E-Stop condition is cleared by the operator.

So far I have not been able to make it work on the machine. Any suggestions?

Thanks, Jim

Comments 4

MattK on 12/13/2016 - 17:42

Hello Jim,

From my brief research on Wake on LAN and magic packets, there appear to be a couple of potential causes.

Unsolicited messages from the Galil are sent from the Galil over a UDP handle that is opened from the host side. This port is always opened on port 60007 on the controller and whatever port your OS deems suitable on the PC.

In your case, you are looking to open a UDP connection from the controller side. This can be done using the IH command. I've included a small snippet of dmc code that should reside in your #AUTO routine that will open a UDP connection, send a packet then close the connection:
#AUTO
WT 2000
IHH = 192,168,1,1 <5000 >1; 'Open UDP handle to PC NIC
WT 100; 'Wait for handle to open
MG {EF} TIME; 'Send traffic down the connection just established
WT 100; 'Wait
IHH = >-3; 'Close Handle
EN

Jim Dawson on 12/13/2016 - 22:16

Awesome, I'll give it a try in the morning. Thank you!

Jim Dawson on 12/14/2016 - 23:13

MattK, the code snippet you provided worked, but.... I think there is a problem with the laptop and/or Windows. It would only boot up about 1 time out of 3. I added a loop to send more traffic over the network and still no joy. Also tried playing with the WT times.

I'll play with it a bit more tomorrow. My inclination at this point is to just allow it to hibernate, and wake up on a key press.

Thanks for your help!

MattK on 12/16/2016 - 09:28

Hi Jim,

You can change the content of the message sent, I chose the TIME operand out of convenience. Also, you don't necessarily have to route traffic to port 5000, again I chose it for convenience.

Keep in mind that a '\n' is automatically appended to any message sent with MG, it can be suppressed with the {N} modifier. There are a few other tricks that can be played with the MG command using the {} modifiers as well. Full detail on the MG command can be found in the DMC-40x0 command reference here:

http://www.galil.com/download/comref/com40x0/index.html#message.html+DM…