Skip to main content

Barcode Scanner (Serial Port)

Getting Started

The barcode scanner module works with any scanner that can emulate a serial port scanner.  Scanners can be used to Load GCode files or setup custom Hook Scripts for other applications.

Program the Scanner for Emulated COM Port

The barcode reader we are using in this example is from NETUM and is Model C750


To configure the C750 as an Emulated COM Port we scanned the following barcode with the scanner and this changed the mode for the scanner from Keyboard to COM.  This needs to be done before we can setup the MachMotion Parameters.


Find the correct COM Port number

First we need to figure out which COM port is being used by the scanner. To do this click on the Window Start button and type in "Device Manager" and select the Device Manager option.  Find Ports (COM & LPT) and see what device is labeled "USB Serial Device" and look for the COM number.  In this example its COM4.


Configure MachMotion Parameters

Goto the MachMotion Parameters and setup the following parameters:

  • Barcode Scanner Enabled: Yes
  • Barcode Scanner Com Port: Select the correct Com Port for your device in the drop down
  • Barcode Scanner Mode: Select Load GCode Files or Generic Reader depending on your application
  • Barcode Scanner Use Selected Instance: Select Yes if you are using one scanner on a Muli Path / Instance Control
  • Barcode Scanner Load GCode Directory: If you want to change where the scanner will look for GCode files change the directory here


Generic Reader

This is used for custom applications where we use Hook Scripts to get the data from the reader.  One of these Hooks can be placed inside the UserGUIModule.mcs file.

Here is one example:

function UserGUIModule.BarcodeScannerData(data)
	return true, true, w.FunctionCompleted()

This will show a MessageBox with the scan data for testing.

The Scanner is setup to only work when the Machine is Idle.