Haas NetShare is a feature we use a ton in the shop. The ability to post gcode from any computer to any of our Haas machines saves time and effort, and while it may not seem necessary to set up NetShare once you do there really is no going back. In this tutorial we’ll set up a network drive on a Windows PC. This will act as a server that communicates between the computer you run your CAM software on and the Haas control.
This tutorial walks through how to set up NetShare on a Windows 10 PC (although setup on any version of Windows is similar) and even covers some of the “network configuration failed” or similar errors you may see. We’ll also cover a few steps that make your Windows computer running NetShare more like a server and add increased reliability.
1. Source a host computer
The first thing you’ll need is a computer to host the NetShare server. If you’re a larger shop, we recommend a dedicated computer for this (we use this small Windows PC). It doesn’t need to be anything special – we recommend wired internet, but other than that even the most basic PC will work. Not much storage is needed due to the relatively small size of gcode files, and more can always be added via a USB drive. Windows is recommended as setup is the simplest, however Mac is not much more difficult. Using a Linux based operating system is doable, but not recommended as setup is much more complicated. Small, inexpensive Windows PCs are plentiful and work great, which is why we recommend this option.
It’s also okay to use the computer you already have! Especially for smaller shops, setting up NetShare on yours or another employee’s computer is the exact same process. We prefer a standalone server just to avoid any possible network slowdowns, restarts, or other use of the computers resources that may hinder server performance due to the PC being used for something else.
2. PC Setup & Configuration
We’re going to assume you have a brand new Windows 10 machine – if not, that’s okay! These settings can still be changed on an already setup PC, and some of them are not completely necessary.
- Bypass login on startup: This is just a preference – and if you’re setting your personal computer up as a network drive then you can skip this step as you more than likely want a password on your machine. For our dedicated server we prefer to automatically login to Windows when it restarts. This allows everything on the computer to load into Windows and while not totally necessary for NetShare can be important for other programs to run if using the PC as a full-fledged server. Take a look at this tutorial to bypass the login screen in Windows 10.
- Power & Sleep Settings: It’s important that the PC you’re using does not go to sleep. This will periodically take down or cause issues with NetShare, so to disable it go to Settings > System > Power & Sleep and make sure that both of your sleep settings on the page are set to Never. We also set our screen settings to never as the monitor for our server is typically turned off.
- Auto Reboot: Another step that isn’t totally necessary, but setting your server up to automatically reboot can save you from unwanted crashes or unreliability down the road. Especially with a small Windows PC resources can be used up quickly, and the longer a computer is left on the more chance there is that it will slow down, crash, or cause other issues. Setting up an automatic restart task avoids needing to manually reboot the computer because something went wrong.
- Open Task Scheduler – this is an app on your Windows PC, and you can find it just by searching in the Taskbar.
- On the right pane, click Create Task. This will open up a new window with all the task settings
- The Title and Description here can be whatever you want. Check “Run whether user is logged in or not” and “Run with highest privileges” to ensure nothing stops the reboot process from happening, and then navigate to the Triggers tab and click New in the bottom left. This will open up a new dialogue box:
- Set the task to begin on a schedule. This will be when and how often the computer reboots. Make sure the time you set is during downtime and not when you need to use NetShare! We set our server to reboot every night at midnight as you can see in the right above.
- Click OK and then navigate to the Actions tab. From here click New again to open up another dialogue box.
- The Action here needs to be “Start a Program”, and the program name needs to be “shutdown”. In the Arguments (optional) box, type “/r”. This tells Windows to run shutdown.exe (this is the same thing that happens when you press the power button!) while the argument /r tells it to turn back on and restart. Click OK, and then click OK again in the Create Task window to save your new task. You shouldn’t need to change any settings in the last tabs.
- To test your task you can click on “Task Scheduler Library” in the left pane and select the task you just created in the center. Now in the right pane click run, and if done correctly your PC should restart. If you followed step one, your computer should automatically log in once it’s done as well.
3. Network Configuration
A few things are necessary to make sure your server will connect to other computers on the network as well as your Haas machines:
- Setting a static IP: Computers have IP addresses that essentially are an identification number that tells the network which computer to communicate with. For example, on your computer if you want to open your documents you may go to C://Users/Your Username/Documents. But if you want to access another computer’s documents on your network the filepath looks like this: IP Address//Users/Their Username/Documents. Keep in mind this doesn’t work right away as we need to enable some permissions first, so you can’t just access any files on any computer on the network right away.
- Before you can set a static IP, you need to know your current IP. Most of the time you will want to set your current IP as the static IP – all this does is make sure that when your computer reconnects to the internet it doesn’t get a different IP. Setting your current IP as static is a good idea because it ensures you don’t pick an address that is already in use. Open the Command Prompt on the server computer and type in “ipconfig” and press enter. You are looking for your IPv4 address, gateway, and subnet mask. It will look something like this:
- Write these down. Usually your computer’s IP will look something like 192.168.1.x, the Subnet Mask will be 255.255.255.0, and the default gateway is the same as the IP address but the last digit is usually 1 (so 192.168.1.1).
- Now open the Control Panel on the server computer, navigate to Network and Internet, and click Network and Sharing Center. From here you will see the names of your internet connections, and you want to click on the network the server will be hosted on. This will open an additional dialogue box:
- Clicking Properties in the bottom left opens up yet another dialogue box. From here select “Internet Protocol Version 4 (TCP/IPv4)” and again click properties. This final dialogue box allows you to set a static IP for your PC.
- Check the box to manually set an IP, and fill each box with the info you wrote down from ipconfig. We like to use Google’s DNS servers (220.127.116.11 and 18.104.22.168) but many DNS servers can be found with a quick Google search.
- Note that this sets a static IP from your computer, but you can also reserve this IP address in your router for additional protection. All routers handle this differently, so if this becomes an issue consult your routers manual for instructions on how to do this.
- Creating a Network Drive folder: you will need to designate a folder for NetShare. We like to create a folder directly in the C:// drive called NetShare, which makes the filepath as easy as IP//NetShare.
- Once you create the folder that will act as NetShare, it will need to be shared. Even if you aren’t sharing the folder with other computers and only using it on your own you will still need to share it to communicate with the Haas control.
- Right click on the folder you want to use and click Properties. The first tab of this dialogue box will tell you the exact location (filepath) of the folder which you will need later. Notice that this is just C:\ because the folder is directly in the C drive and it’s filepath is C:\NetShare.
- Jump to the Sharing tab and click Advanced Sharing. Check the “Share this Folder” box in the new window, and then click Permissions. Make sure that “Everyone” has full control to read AND change.
- Finally we need to disable the password on the folder, or else you need to log into the folder each time. To do this navigate back to the Network and Sharing Center where we created the Static IP. If you keep the NetShare Properties window open to the Sharing tab you will see a link to the Network and Sharing Center at the bottom. Using this link opens up the Advanced Sharing Settings, where you need to turn off Password Protected Sharing under All Networks. Now your folder is shared!
4. Connecting to NetShare
If your computer is the only one posting code to the Haas machine and you aren’t using a dedicated server you can skip this step. In that case all you need to do is post to the NetShare folder you created and shared in the last steps.
If you are using a dedicated server you will need to connect the server to your computer as a Network Drive. A network drive acts just like any other folder or USB drive! You can post code to the NetShare folder on the server instead of a folder on your computer or flash drive. To set up a network drive:
- Open File Explorer and go to This PC. You may need to click on Computer in the toolbar along the top once you get there, but you should see a button to “Map network drive”:
- Clicking Map network drive will open up another dialogue box. Here you need to input the file location of the NetShare server you created. This will look something like \\Server IP\filepath or in this case \\192.168.2.201\NetShare. Mapping the network drive will allow you to connect to the folder on your PC, and use it to post gcode to like any other folder on your PC. The only difference is that this folder is on another computer! You will need to do this process and add the network drive for each PC you want to connect to the server.
5. Connecting your Haas Machine to NetShare
Connecting your machine is the easy part! Navigate to Settings > Network > Netshare and double check all your settings. Workgroup is WORKGROUP by default, but if the server has a different workgroup then these should match. The IP needs to be the server’s IP address, the path needs to be the filepath minus the IP (e.g. \\192.168.2.201\NetShare is just NetShare in the control). We’ve found that the Remote Username and Remote Password aren’t needed if you turned off Password Protected Sharing before, but these are the username and password you would use to login to the computer and it doesn’t hurt to enter them regardless.
One uncommon issue you may run into if your Haas won’t connect to the NetShare drive but your PCs can is that the SMB services are not active. The below graphic from this Autodesk forum explains how to activate all SMB services from Contol Panel > Programs and Features. Make sure all SMB services are checked.