News CNCnetPDM About us Support  
       
Machine Monitoring | Haas | Support | inventcom
  

MACHINE MONITORING | HAAS

TOP

This highly configurable Haas machine monitoring driver enables to acquire machine-, process- and quality data from machines with Haas Next (NGC) or Standard Generation Controls (SGC) via Ethernet. Acquired data can be output in near real time to various SQL Databases, MTConnect or OPC UA.

For bidirectional communication between machines with Haas controllers connected to CNCnetPDM and your applications you can use our free Open Source Client (C-Sharp)

You can dynamically define your own set of items (up to 35) that can be enabled and disabled on a per machine basis by an INI file that is automatically created with reasonable default values for each machine configured. This INI file also allows to define individual names for every tag.

  • Note: Newer Haas NGC controls (build year > 2016) may be equipped with an MTConnect Adapter. In this case you can alternatively use our MTConnect Agent program to test access to the device and our MTConnect device driver for monitoring.

PREREQUISITES | DOWLOAD DRIVER | SETUP CNCNETPDM | USAGE | ADJUST ITEMS | COMMANDS | TIPS | LICENSING | TROUBLESHOOTING | UPGRADE DRIVER

PREREQUISITES

  • Make sure that you have an Ethernet network connection between your PC and the machine and get data, use our HaasData utility to do so.
  • If you use a Firewall on your PC or corporate network please add an exception for the TCP port used for communication, default 5051.

DOWLOAD DRIVER

SETUP CNCNETPDM

  • Download CNCnetPDM and install it as described in the quick-start-guide.
  • Download the Haas driver and extract haas.dll into the folder where you have CNCnetPDM installed.
  • Edit CNCnetPDM.ini and add a new device as described in the quick start guide point 7. If you already have an entry in section [RS232] for a device you can simply copy and paste this line and change its content. Change the line as follows:

Configure Haas Device Driver

FIG 1:    Configure Haas device driver in CNCnetPDM.ini

For machines with Haas controllers the following 2 parameters are important

  1. Right to the IP Address of the controller (here 192.168.1.152) enter the TCP port number (1) used for communication, default 5051.
  2. Change the driver name to haas.dll (2)

USAGE

  • Start CNCnetPDM, foreground program is sufficient (Start thread)
  • CNCnetPDM automatically copies the original haas.dll and appends the machine number as configured in the INI file, e.g. haas_1000.dll for machine number 1000.
  • In addition an INI file with the same name is automatically created by the device driver, e.g. haas_1000.ini for machine number 1000.
  • Double click CNCnetControl, if your device number is 1000 and the device name is HAAS VF-2 #1 the output should be similar to the one below:

FIG 2:    CNCnetControl (Haas)

Here the machine (1) shows up as connected (2) which is good. On the right side (3) you see the acquired data. With a free license you just get E = OEE machine state output, see Licensing for details.

  • For example the line starting with O contains items defined in the INI file of the device that should be output to section 1. If you didn’t change the INI file you get something like the following:

1000 12/03/2023 11:36:09 AM 10000000268 O STATN| 5| STATT| Error| MODEN| 2| MODET| JOG| PRGSN| 2| PRGST| FAULT| TOOLN| 29|

All acquired items have a tag name followed by its tag value. Names and values are delimited by pipe ‘|’ symbols. This allows CNCnetPDM to create a database record, MTConnect or OPC UA output for every item.

With an unmodified Haas INI file the initial configured and activated tags are:

Id

Name

Description

Active

1

STATN

OEE Device state (numeric)

Yes

2

STATT

OEE Device state (text)

Yes

3

MODEN

Device mode (number)

Yes

4

MODET

Device mode (text)

Yes

5

PRGSN

Program state (number)

Yes

6

PRGST

Program state (text)

Yes

7

PRGCU

Name of the active program (if any)

Yes

8

PARTC

Part counter value

Yes

9

M30P1

M30 part counter #1

No

10

M30P2

M30 part counter #2)

No

11

TOOLN

Tool number in use

Yes

12

TOOLC

Tool changes (total)

No

13

MOTME

Motion time (total)

No

14

LCYTM

Last cycle time

Yes

15

PCYTM

Previous cycle time

Yes

16

SPSPD

Spindle speed RPM

Yes

17

ACYTM

Actual cycle time

Yes

18

CYCST

Cycle start time

Yes

FIG 3:    Ids, names, description and initial activation state of acquired items

ADJUST ITEMS

This device driver enables to dynamically add, group, enable or disable items and change their names. The INI file automatically created by the device driver for every machine contains sections that allow you to control its behavior.

Section [GENERAL]

  • Commands defines the number of commands you’d like to use for reading, maximum value = 35, default 18

Items for reading are organized in numeric sections e.g. [2]. Every section contains entries where you can define names and parameters for a specific item.

Description of the numeric sections:

Entry

Description

[1]

Section identifier, numbers from 1 to 35 are queried when reading

Active

If you set this to 0 the command is not executed to read data from the control.

Name

A short tag name (max 5 characters) to describe the item e.g. STATN for status number

Comment

A comment that describes the command (optional)

Command

Command to be executed e.g. cnc_oeestatus for the command group that contains running status. To change a command you can select an available command, copy it and paste it into the INI file section

Input parameter 1

For reading System and Macro Variables this parameter has to be set to the number of the variable. For command Q500 this parameter has to be set to 1,2 or 3

Input parameter 2

Optional, not used by the current driver (default = -1)

Output item

Some commands have sub-commands that allow to define a specific item to be output by the driver e.g. statenumber from cnc_oeestate outputs the device state

Output section

You can output data to 3 sections that may contain up to 256 characters. 1 goes to section ‘O’, 2 to ‘A’ and 3 to ‘F’. If data in one section exceeds the maximum length you can send items to a different section. Make sure you have entries CollectOrders, CollectFeeder and CollectQuality enabled (=1) in CNCnetPDM.ini

FIG 4:    Description of a device INI file section
  • Note: To change commands, switch items on or off or alter its name while CNCnetPDM is running open the device INI file with a text editor, make the desired changes and save the file. To apply the changes immediately you can click on the machine in CNCnetControl on the left side followed by clicking buttons ‘Close’ and ‘Open’ above the section ‘Devices’.

COMMANDS

Below you can find commands that require an output item:

Command

Output Item

Notes

cnc_oeestate

statenumber

Numeric OEE state of the machine (2 = producing, 3 = manual, 4 = interrupted, 5 = error)

cnc_oeestate

statetext

State of the device as text (producing, manual, interrupted, error)

cnc_oeestate

modenumber

Numeric running mode of the controller (0 = MDI, 1 = MEM, 2 = JOG, 3 = LIST PROG, 4 = DNC, 5 = ZERO, 6 = UNDEFINED)

cnc_oeestate

modetext

Running mode of the controller (text output)

cnc_oeestate

prgstatenumber

Machine running state (numeric) (0 = IDLE, 1 = ACTIVE, 2 = FAULT, 3 = BUSY, 4 = ALARM ON)

cnc_oeestate

prgstatetext

Machine running state (text)

FIG 5:    Description of available commands that require an output item

Commands that do not require an output item:

Command

Description

Notes

Q100

Machine Serial Number

 

Q101

Control Software Version

 

Q102

Machine Model Number

 

Q104

Machine Mode (LIST PROG, MDI, etc.)

 

Q200

Tool Changes (total)

 

Q201

Tool Number in use

 

Q300

Power-on Time (total)

 

Q301

Motion Time (total)

 

Q303

Last Cycle Time

 

Q304

Previous Cycle Time

 

Q402

M30 Parts Counter #1

 

Q403

M30 Parts Counter #2

 

Q500

NC Program, input parameter 1 = 1

Q500 requires input parameter 1 to be set to 1,2 or 3 otherwise the command is not executed and you get an error output!

Q500

Machine State, input parameter 1 = 2

 

Q500

Parts Count, input parameter 1 = 3

 

Q600

System or Macro Variable value

Q600 requires input parameter 1 to be set to the variable number to be queried. Valid numbers are 1 to 9031 (SGC) or 1 to 52800 (NGC). For details see Haas System and Macro Variables

FIG 6:    Description of Haas Q commands

TIPS

If you want to add additional items (up to 35 in total) first adjust the number of commands in section [GENERAL]. Then, copy and paste a complete INI file section and adjust the section number and its content.

LICENSING

This device driver requires the most recent version of CNCnetPDM and also works with a free license. However, in this mode output is limited to the OEE machine state of your device. With a valid license you are able to output the result of up to 35 queries per reading cycle, see licensing for details.

TROUBLESHOOTING

  • The device driver writes a log file entry for any communication issue to the log file of the device. The file can be found in subdirectory \log of your CNCnetPDM program folder. The file format for the log file is log_ + device number + _ + date.txt. Please check this file first if you observe an issue. Deactivate commands with issues by setting them to ‘Active = 0’.

  • If the machine shows a red icon, state disconnected and you get just output E = 0 the machine is not reachable at all. This has nothing to do with CNCnetPDM, it’s a network issue, DNS Hostname or IP Address is wrong.

  • If the machine also shows a red icon, state disconnected but you just get output E = 1 the machine is reachable (can be ‘pinged’) but the controller does not respond to commands, check your controller setup and the parameters used in CNCnetPDM.ini (esp. port number).Please use the tool HaasData to check if the machine replies to commands.

  • If you get numeric device states but not any of the preconfigured items please make sure that entries CollectOrders, CollectQuality and CollectFeeder are set to 1 in section [General] of CNCnetPDM.ini.

  • If specific items are not acquired check first with HaasData that you get output. Also make sure that the numeric section of the item in the device drivers INI file is activated and has an entry for ‘Name’, inactive or items with empty names are not acquired. Also check that you didn’t misspell entries for command and output item in your device driver INI file.

UPGRADE DRIVER

If you already have a previous version of the driver installed and would like to upgrade to the most recent version proceed as follows:

  1. Stop any CNCnetPDM background service or foreground program that uses the device driver.
  2. Extract haas.dll from haas_dll.zip into the folder where you have CNCnetPDM installed, overwrite the existing file.
  3. Delete ALL haas_XXXX.dll (NNNN = machine number) files.
  4. If you already have created adapted INI files for specific devices do NOT delete the haas_NNNN.ini files.
  5. After restarting CNCnetPDM upgraded device driver versions for all machines are automatically created.

Privacy notice

This website uses cookies. By continuing to use it you agree to our privacy policy. 

https://www.inventcom.net/support/haas/machine-monitoring

Support | Haas | Overview

For machines with Haas Standard and Next Generation (NGC) Controls CNCnetPDM enables you to acquire and monitor machine-, process-, part-counter and quality-data in near real... [read more]
Support | Haas | Overview

Support | Haas | Release Notes

(11/19/2023) We released an updated version of our CNCnetPDM IIoT Adapter for Haas machines that adds new features and enhances compatibility with MS Windows 11 and Server 2022... [read more]
Support | Haas | Release Notes

Support | Haas | Machine Data

This document describes setup and test of machine data acquisition from Haas machines with Standard- (SGC) or Next-Generation-Controllers (NGC) and Ethernet connection. Writing... [read more]
Support | Haas | Machine Data

Support | Haas | System & Macro Variables

List of system and macro variables that can be read or written to Haas NGC controllers. Variable addresses of older controllers can be found in column ‘Legacy... [read more]
Support | Haas | System & Macro Variables

Support | Haas | MTConnect Tags

CNCnetPDM MTConnect Adapter Tag for Haas VF-2 with Next Generation Control (NGC): Axes : base Condition Type Sub Type... [read more]
Support | Haas | MTConnect Tags
Modified: 2023-12-03