Introduction
MachineMetrics is able to read data from the HEIDENHAIN iTNC 530 and 640 controls. This article will take you through the steps necessary to configure the iTNC 530 for data collection. Data gathering from TNC 640 controls is performed using an OPC-UA server, covered elsewhere.
Note: Please use this article to ensure initial Heidenhain connectivity setup.
Topics covered in this article:
- Methods of Part Count
Method 1: M30/M02 Control Log Events
By default MachineMetrics counts parts on the iTNC 530 from the control’s logging mechanism to detect M30 or M02 events. The advantage of this method is that no additional programming or configuration is required. A drawback is that log events that occur during times of connectivity loss between the edge device and the machine will be missed, and can never be recovered.
For this reason MachineMetrics also provides two alternative means to count parts.
Method 2: PLC
When the part counts in the HMI (see below) accurately reflects the number of parts produced the part count can be read from the PLC memory.
The location in memory to be read can depend on choices made by the machine manufacturer, and can even be modified locally, and must therefore be conveyed to MachineMetrics when the machine is being integrated.
The following sections describe the process of identifying the appropriate PLC memory address and how to specify this information during the machine integration process.
Prerequisites
The machine Parts Counter must be actively in use and M-codes used appropriate per the machine type. For instance, M53/54 on some Hermle machines increments/clears the counter.
Identifying the Part Count Memory Address
The PLC memory tables are viewable from within the controllers themselves. To look for the part count in the iTNC 530:
Note: The current part count for these steps to identify the PLC memory address of the count to be meaningful, it should best be some unique, non-zero, number.
If necessary, in the HMI close Program Management (END)
Step 1: Select the Programming and Editing operating mode
Step 2: Press the MOD key
Step 3: Enter the key 807667, then ENT
Note: If the default password above does not grant access, enter the proper password to proceed
Step 4: Scroll with the arrow soft-key until the function key “TABLE” appears along the bottom of the screen
Step 5: The Marker table first appears. Scroll with the arrow soft-key until W (WORD) and D (DWORD) appear. Switch to Decimal. Inspect one table (D or W) first, if the part count is not located, look at the other.
Step 6: There are two ways by which the counter may be identified: by matching the current known part count or by description. The description is not always available, for which reason scanning the table(s) for a number corresponding to the current count is more reliable.
In the example shown, the part counter is identified by its description (“werkstueck zaehler” means workpiece counter). Usually, but not always, it is in location 20 in the WORD section, as shown above.
If there is any doubt about whether or not the number identified as the parts counter is the correct one — perhaps it is not unique in the table — it is advisable to note the address, increment the counter by creating another part, then validate by again looking at the same address and ensure that its value has also been incremented.
Determining the PLC address
To determine the parts counter PLC address, use the same method for either of the tables (D/W). The left-most column in the table represents memory base addresses, and the top-most row offsets. The address of any given item in the table is given by (left-most column value) + (offset in the top column)
In the above image, the selected item is found at address 20 + 0 = 20
(In the same image, for comparison purposes, the address that holds the number 4625 is 120 + 16 = 136)
When specifying the address to be read by the adapter, the table used (DWORD or WORD) must also be specified.
Specifying the address to be used in the MachineMetrics Application
After selecting the Heidenhain TNC530 Data Collection Method, specify the configuration script to activate the PLC Part Count reading routines in a section named ”behavior” with keys and values as shown below:
{
"behavior": {
"partCountType": "1",
"plcPartCountMemType": "WORD", (or DWORD)
"plcPartCountMemAddress": "20" (as derived per the above)
}
}
Method 3: Modify Program Parameters
By writing to QR parameters from a program, part counting can be customized to perfectly reflect when parts are produced even when the HMI does not correctly reflect the parts created.
The program will be modified in either the Conversational Format, or in G-Code:
Heidenhain Conversational Format
Prerequisite: FN38 must be enabled on the control for Heidenhain Conversational Format. To check availability of FN38: In Programming and editing mode, hit the Q key, DIVERSE FUNCTION softkey, then scroll horizontally to find the FN38 SEND soft key. If FN38 doesn't appear under DIVERSE FUNCTION, it may need to be enabled on the control via the MOD screen. Per Heidenhain: FN38 is available after entry of the code number 555343.
To add part counting to a Part Program:
Step 1: Select a QR (non-volatile) parameter to hold the part count. Make sure it is not being used for anything else by the part program.
We recommend using a non-volatile counter because this allows our software to correctly track part count across network and software failures and machine restarts.
Let's use QR20 for our example.
Note: NC versions 340 49x-05 and on support QR parameters (released ~Dec. 2008).
Step 2: In the part program, when the program starts or at the start of a part-cycle (whichever is more convenient), add a block:
FN38: SEND /"MM-PART-COUNT %f" / +QR20 ; send initial count
Step 3: In the part program after a part is completed, add these two blocks:
FN 1: QR20 =+QR20 + +1 ;count the part we just made
FN38: SEND /"MM-PART-COUNT %f" / +QR20 ;send MachineMetrics the new count
DIN/ISO (G-code) format
Use NC program command G354 to transmit the part count to MachineMetrics. Send the current part count before starting to make a part, then increment the count and send the new count.
Example:
G354 I1="MM-PART-COUNT" I2=QR20 ; send initial part count to MachineMetrics
...make a part...
D01 QR20 P01 QR20 P02 +1 ;bump part counter
G354 I1="MM-PART-COUNT" I2=QR20 ;send new part count to MachineMetrics
Enter 0 for lChannel if prompted.
Specifying the address to be used in the MachineMetrics Application
After selecting the Heidenhain TNC530 Data Collection Method, specify the configuration script to activate the QR code reading routines in a section named ”behavior” with as shown below:
{
"behavior": {
"partCountType": "0"
}
}
Comments
0 comments
Article is closed for comments.