News CNCnetPDM About us Support  
         
  

PMC_RDALMMSG | PMC

Description

Reads the alarm messages from PMC.

MTConnect Fanuc Adapter

Universal Fanuc Driver

Fanuc Focas Library CD

Declaration

#include "fwlib32.h" or "fwlib64.h"

FWLIBAPI short WINAPI pmc_rdalmmsg(unsigned short FlibHndl, short s_number, short *read_num, short *exist, ODBPMCALM *pmcalm);

Arguments

FlibHndl   [ in ]

Specify the library handle.
See "Library handle" for details.

s_number   [ in ]
Specify the starting number(=1,2,3..) from which PMC alarm messages is read.
read_num   [ in/out ]
Pointer to the number of alarm messages to be read.
Specify the number of alarm messages to be read before function call and actual number of alarm messages being read is stored after the function call.
exist   [ out ]
When 'read_num' is specified less than the actual number of PMC alarms occurred on PMC side, '1' is returned.
-1 : There is no alarm.
0 : All alarms were read.
1 : Alarm still exists.

If the alarm still exists, it is possible to read the remained PMC alarms by setting "s_number = s_number + read_num" and calling this function again.
pmcalm   [ out ]
Pointer to the array of ODBPMCALM structure where returned data are stored.
The number of array must be required so as to store the PMC alarms specified by 'read_num'.
The ODBPMCALM structure is as follows.
Type MyODBPMCALM
    nOdb_pmcalm(0 To 9) As ODBPMCALM
End Type ' In case that the read_num is 10.
almmsg
Alarm message character string is set.
The message is terminated with NULL('\0').
The alarm messages are described in "fwpmcalm.ini".(except 30i, 0i-D/F, PMi-A)
Customized alarm messages can be acquired by modifying the messages in "fwpmcalm.ini" file.

Please copy "fwpmcalm.ini" onto the application folder or Windows system folder.
When this file does not exist there, this function outputs the internal default messages.
Series 30i, 0i-D/F and PMi-A does not use "fwpmcalm.ini" file.
"fwpmcalm.ini" file format is as follows.
[Section]
Key = "Alarm message strings"

Section
PMC-NA : indicates the following messages are for PMC-NA.
OTHERS : indicates the following messages are for other PMCs than PMC-NA.
Key
Key is defined as the next format.
In case of error message: ERxx (xx is error number)
In case of warning message : WNxx (xx is warning number)
When the same message numbers exist, '_x' (x=1,2,...) is attached to the key.
Alarm message strings
An arbitrary character string can be specified up to 128 characters (NULL as the terminator is included).
The ';' cannot be used in the character string.
Moreover, the '%02d'(For the decimal number) and the '%02x'(For the hexadecimal number) are described into the messages which show the group number, etc..

Example :
[OTHERS]
ER01 = "ER01 PROGRAM DATA ERROR"
ER35_1 = "ER35 TOO MUCH OUTPUT DATA IN GROUP(%02d)"
WN01 = "WN01 LADDER MAX SIZE ERROR"

Notes for modifying "fwpmcalm.ini" file
1)Please do not modify the Section, PMC-NA, OTHERS, and the Key themselves.
2)A Key and corresponding message can be deleted.
When a Key and corresponding message are deleted, the fixed message which this function holds internally is acquired.
3)The modifying of alarm messages is possible, but the new Key cannot be added.

Return

EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.

The major error codes are as follows.

Return code Meaning/Error handling
EW_NOPMC
(1)
There is no PMC.
EW_NUMBER
(3)
data number error
The specification of the starting number (s_number) is wrong.
EW_DATA
(5)
data error
data(read_num) is out of range.

As for the other return codes or the details, see "Return status of Data window function"

CNC option

For HSSB connection,

    The extended driver/library function is necessary.

For Ethernet connection,

    The Ethernet function and the extended driver/library function are necessary.

    However, in case of Series 16i/18i/21i-B, 0i-B/C/D/F, Series 30i and PMi-A, the required CNC option is as follows.

    When Embedded Ethernet is used,

      above two optional functions are not required.

    When Ethernet board is used,

      only Ethernet function is required.

CNC parameter

This function is not related to CNC parameter.

CNC mode

This function can be used in any CNC mode.

Available CNC

0i-A 0i-B/C(Note) 0i-D 0i-F 15 15i 16 18 21 16i-A 18i-A 21i-A 16i-B 18i-B 21i-B 30i-A 30i-B
M (Machining)H O O O H O H H H O O O O O O O O
T (Turning) H O O O H - H H H O O O O O O O O
LC (Loader) - - - - - - X X X X X X X X X - -

0i-D0i-F16i18i30i-A30i-B
P (Punch press)O O O O - O
L (Laser) - - O - - O
W (Wire) - - O O O O


Power Mate i-DO
Power Mate i-HO
Power Motion i-AO

"O" : Both Ethernet and HSSB
"E" : Ethernet
"H" : HSSB
"X" : Cannot be used
"-" : None

Note) 0i-C does not support the HSSB function.

Privacy notice

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

https://www.inventcom.net/fanuc-focas-library/pmc/pmc_rdalmmsg
Fanuc Focas Library | Pmc | flist_Pmc
PMC: Function related to PMC... [read more]
flist_Pmc
Fanuc Focas Library | Pmc | pmc_crdmsg
Description Reads the data of 32 bytes transmitted from the PMC. It is necessary to transmit the data on the PMC side to read the... [read more]
pmc_crdmsg
Fanuc Focas Library | Pmc | pmc_cwrmsg
Description Writes the data of 32 bytes transmitted to the PMC. It is necessary to receive the data on the PMC side to write the... [read more]
pmc_cwrmsg
Fanuc Focas Library | Pmc | pmc_getdtailerr
Description Gets the detailed error information after the function has been executed. The detailed error information is stored in "err_no", "err_dtno" of... [read more]
pmc_getdtailerr
Fanuc Focas Library | Pmc | pmc_get_current_pmc_unit
Description Get the current PMC unit type.... [read more]
pmc_get_current_pmc_unit
Fanuc Focas Library | Pmc | pmc_get_number_of_pmc
Description Reads the number of existing PMC paths (i.e. number of unit).... [read more]
pmc_get_number_of_pmc
Fanuc Focas Library | Pmc | pmc_get_pmc_unit_types
Description Reads the PMC system information that shows what kind of PMC units compose the multi-path PMC system.... [read more]
pmc_get_pmc_unit_types
Fanuc Focas Library | Pmc | pmc_get_timer_type
Description Reads the PMC timer type of the specified timer number.... [read more]
pmc_get_timer_type
Fanuc Focas Library | Pmc | pmc_kpmsiz
Description Reads the maximum size of the extended backup memory.... [read more]
pmc_kpmsiz
Fanuc Focas Library | Pmc | pmc_rdcntldata
Description Reads the control data to manage PMC data table (address D). This function is not available at PMC-NA. Refer to the programming... [read more]
pmc_rdcntldata
Fanuc Focas Library | Pmc | pmc_rdcntlgrp
Description Reads the total number of groups of the control data to manage PMC data table(address D). This function is not available at PMC-NA.... [read more]
pmc_rdcntlgrp
Fanuc Focas Library | Pmc | pmc_rdkpm
Description Reads the contents of the extended backup memory of PMC specified by "offset", "length". The data are stored in "data"... [read more]
pmc_rdkpm
Fanuc Focas Library | Pmc | pmc_rdkpm2
Description Reads the contents of the extended backup memory of PMC specified by "offset", "length". The data are stored in "data"... [read more]
pmc_rdkpm2
Fanuc Focas Library | Pmc | pmc_rdmsg
Description Reads the data of 32 bytes transmitted from the PMC. It is necessary to transmit the data on the PMC side to read the... [read more]
pmc_rdmsg
Fanuc Focas Library | Pmc | pmc_rdpmcinfo
Description Reads the data information about the attribute of each kind of PMC, the effective range of PMC address, etc.... [read more]
pmc_rdpmcinfo
Fanuc Focas Library | Pmc | pmc_rdpmcparam
Description The PMC parameter(timer, counter, keep relay, and data) is uploaded by the tape format. When you execute this function, change to... [read more]
pmc_rdpmcparam
Fanuc Focas Library | Pmc | pmc_rdpmcrng
Description Reads the PMC data of the specified PMC address/range. This function is used to exchange the data between the... [read more]
pmc_rdpmcrng
Fanuc Focas Library | Pmc | pmc_rdpmctitle
Description Reads the PMC title data from PMC. When this function is executed while editing the title data with PMC, the return value... [read more]
pmc_rdpmctitle
Fanuc Focas Library | Pmc | pmc_rdprmend
Description End of upload of the PMC parameter(timer, counter, keep relay, and data) by the tape format. This function is executable other... [read more]
pmc_rdprmend
Fanuc Focas Library | Pmc | pmc_rdprmstart
Description Starts uploading the PMC parameter(timer, counter, keep relay, and data) of the tape format. To uploading of PMC parameter, this... [read more]
pmc_rdprmstart
Fanuc Focas Library | Pmc | pmc_select_pmc_unit
Description Selects PMC that will be the target of other PMC FOCAS2 function by the unit type.... [read more]
pmc_select_pmc_unit
Fanuc Focas Library | Pmc | pmc_set_timer_type
Description Writes the PMC timer type of the specified timer number.... [read more]
pmc_set_timer_type
Fanuc Focas Library | Pmc | pmc_wrcntldata
Description Writes the control data to manage PMC data table (address D). This function is not available at PMC-NA. Refer to the programming... [read more]
pmc_wrcntldata
Fanuc Focas Library | Pmc | pmc_wrcntlgrp
Description Writes the total number of groups of the control data to manage PMC data table(address D). This function is not available at PMC-NA.... [read more]
pmc_wrcntlgrp
Fanuc Focas Library | Pmc | pmc_wrkpm
Description Writes the data to the extended backup memory of PMC specified by "offset", "length". The data must be stored in "data" as... [read more]
pmc_wrkpm
Fanuc Focas Library | Pmc | pmc_wrkpm2
Description Writes the data to the extended backup memory of PMC specified by "offset", "length". The data must be stored in "data" as... [read more]
pmc_wrkpm2
Fanuc Focas Library | Pmc | pmc_wrmsg
Description Writes the data of 32 bytes transmitted to the PMC. It is necessary to receive the data on the PMC side to write the... [read more]
pmc_wrmsg
Fanuc Focas Library | Pmc | pmc_wrpmcparam
Description The PMC parameter(timer, counter, keep relay, and data) is downloaded by the tape format. When you execute this function, set... [read more]
pmc_wrpmcparam
Fanuc Focas Library | Pmc | pmc_wrpmcrng
Description Writes the PMC data of the specified PMC address/range. This function is used to exchange the data between the... [read more]
pmc_wrpmcrng
Fanuc Focas Library | Pmc | pmc_wrprmend
Description End of download of the PMC parameter(timer, counter, keep relay, and data) by the tape format. Even if the PWE of CNC parameter is... [read more]
pmc_wrprmend
Fanuc Focas Library | Pmc | pmc_wrprmstart
Description Starts downloading the PMC parameter(timer, counter, keep relay, and data) of the tape format. To downloading of PMC parameter,... [read more]
pmc_wrprmstart
Modified: 2018-06-11