system monitoring library - interface · system monitoring library . w indows driver software for...

132
IFCPMGR.WIN www.interface.co.jp System Monitoring Library Windows Driver Software for Industrial Controllers Help for Windows

Upload: others

Post on 14-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

IFCPMGR.WIN

www.interface.co.jp

System Monitoring Library W indows Driver Software for Industrial Controllers

Help for Windows

Page 2: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Contents

Copyright 2010, 2015 Interface Corporation. All rights reserved.

2

Chapter 1 Introduction.......................................................................................................4 1.1 Overview............................................................................................................................................................... 4 1.2 Features................................................................................................................................................................ 4

Chapter 2 Product Specifications ......................................................................................5 2.1 Functional Specifications ...................................................................................................................................... 5 2.2 Product Composition ............................................................................................................................................ 6

Chapter 3 Programming Guide .........................................................................................7 3.1 Installation............................................................................................................................................................. 7 3.2 Class Library......................................................................................................................................................... 7

3.2.1 Using DLL Functions for Atom and Core i7 Models ............................................................................... 7 3.2.2 Using the Compatible DLL Functions for Pentium M and Celeron M Models......................................... 8

3.3 Programming Guide for DLL Functions for Atom and Core i7 Models .................................................................. 8 3.3.1 WDT....................................................................................................................................................... 9 3.3.2 Temperature Monitoring......................................................................................................................... 9 3.3.3 Power Supply Voltage Monitoring ........................................................................................................ 10 3.3.4 Slot-in Power Supply Module Monitoring ............................................................................................. 10 3.3.5 Battery Monitoring................................................................................................................................ 10 3.3.6 Interrupt Event Handling ...................................................................................................................... 12

3.4 Programming Guide for Compatible DLL Functions for Pentium M/Celeron M Model ........................................ 13 Chapter 4 Reference for Atom/Core i7 Model .................................................................14

4.1 List of DLL Function............................................................................................................................................ 14 4.1.1 CmSetWDTConfig ............................................................................................................................... 15 4.1.2 CmGetWDTConfig ............................................................................................................................... 17 4.1.3 CmStartWDT........................................................................................................................................ 19 4.1.4 CmStopWDT........................................................................................................................................ 20 4.1.5 CmClearWDT....................................................................................................................................... 21 4.1.6 CmGetTemp ........................................................................................................................................ 22 4.1.7 CmSetTempLimit ................................................................................................................................. 24 4.1.8 CmGetTempLimit ................................................................................................................................. 26 4.1.9 CmGetPower ....................................................................................................................................... 28 4.1.10 CmSetEvent....................................................................................................................................... 30 4.1.11 CmKillEvent ....................................................................................................................................... 32 4.1.12 CmSetEventMask .............................................................................................................................. 33 4.1.13 CmGetEventMask.............................................................................................................................. 36 4.1.14 CmGetEventFactor ............................................................................................................................ 38 4.1.15 CmGetSpecifiedStatus....................................................................................................................... 42 4.1.16 CmSetPowerButtonFilter.................................................................................................................... 44 4.1.17 CmGetPowerButtonFilter ................................................................................................................... 46 4.1.18 CmSetLedConfig................................................................................................................................ 48 4.1.19 CmGetLedConfig ............................................................................................................................... 50 4.1.20 CmGetUnitFanStatus......................................................................................................................... 52 4.1.21 CmGetPsmId ..................................................................................................................................... 54 4.1.22 CmGetPsmStatus .............................................................................................................................. 56 4.1.23 CmGetBatInfo .................................................................................................................................... 58 4.1.24 CmGetBatHistory ............................................................................................................................... 60 4.1.25 CmGetBatStatus ................................................................................................................................ 62 4.1.26 CmGetBatDiagStatus......................................................................................................................... 64 4.1.27 CmSetBatOsOffConfig ....................................................................................................................... 66 4.1.28 CmGetBatOsOffConfig....................................................................................................................... 68 4.1.29 CmSetBatOffTime.............................................................................................................................. 70 4.1.30 CmGetBatOffTime ............................................................................................................................. 72

4.2 Callback Functions ............................................................................................................................................. 74 4.3 Structure ............................................................................................................................................................. 75

4.3.1 CM_EVENT_REQ................................................................................................................................ 75 4.3.2 CM_BAT_INFO.................................................................................................................................... 77 4.3.3 CM_BAT_HISTORY ............................................................................................................................ 79

4.4 Return Values ..................................................................................................................................................... 81 Chapter 5 Reference for Pentium M/Celeron M Model....................................................82

5.1 List of DLL Function............................................................................................................................................ 82 5.1.1 IfCpuSetCpuClock ............................................................................................................................... 83 5.1.2 IfCpuGetCpuClock ............................................................................................................................... 85 5.1.3 IfCpuSetCpuClkDuty............................................................................................................................ 87 5.1.4 IfCpuGetCpuClkDuty ........................................................................................................................... 89 5.1.5 IfRasGetCpuTmp ................................................................................................................................. 91 5.1.6 IfRasGetVolt3....................................................................................................................................... 93 5.1.7 IfRasGetVolt5....................................................................................................................................... 95 5.1.8 IfRasGetVolt12..................................................................................................................................... 97 5.1.9 IfRasWdtEnable ................................................................................................................................... 99 5.1.10 IfRasWdtClear.................................................................................................................................. 100

Page 3: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

3

5.1.11 IfRasWdtDisable .............................................................................................................................. 101 5.1.12 IfChipGetCounterICH4..................................................................................................................... 102 5.1.13 IfPsmGetModuleId ........................................................................................................................... 103 5.1.14 IfPsmGetStatus................................................................................................................................ 105

Chapter 6 Sample Programs.........................................................................................107 6.1 Execution Procedure ........................................................................................................................................ 107 6.2 List of Sample Programs................................................................................................................................... 108

Chapter 7 Utility Program..............................................................................................109 7.1 Interface Utility .................................................................................................................................................. 109

7.1.1 Starting the Utility............................................................................................................................... 110 7.1.2 Commands......................................................................................................................................... 110 7.1.3 Functions ........................................................................................................................................... 110

Chapter 8 Terms of Use ................................................................................................132 8.1 Limited Warranty............................................................................................................................................... 132 8.2 Copyrights and Intellectual Property Rights ...................................................................................................... 132 8.3 Warning Regarding Medical and Clinical Use of Our Products .................................................................................... 132 8.4 Prohibition of Reproduction............................................................................................................................... 132 8.5 Limitation of Liability ......................................................................................................................................... 132 8.6 Trademark ........................................................................................................................................................ 132

Page 4: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

4

Chapter 1 Introduction 1.1 Overview

System monitoring library monitors Interface Slot-in Industrial Controller and Long-Term Supply Industrial Controller by an application program running on Windows. The application program links a provided dynamic link library (DLL) and monitors the system through the application programming interface (API).

1.2 Features

- Starting, stopping, and time-out time of the watchdog timer (WDT) are freely configurable by software. - If the WDT is not cleared within the specified time-out time, either a CPU reset or an interrupt event can be generated.

- Temperatures of the CPU, printed circuit board (PCB), and memory chip can be retrieved. - An interrupt event is generated when the temperature of CPU or PCB exceeds the specified upper or lower limit.

- A voltage of a power supply can be retrieved. - An interrupt event is generated when abnormal voltage of the power supply is detected. - Statuses of the fans attached to CPU can be monitored. An interrupt event is generated when an error on the fans is detected.

- The power button can be applied with a filter of duration of one second to protect from erroneous operations.

- The power LED blinks when the system has an error. - Statuses of the fans mounted on the chassis can be monitored. - Insertion statuses of slot-in power supply modules and statuses of alarm and fail signals can be retrieved. - An interrupt event is generated when an error is detected on the slot-in power supply module. - Status and information of the battery can be retrieved. - The operating system is automatically shut down after the battery module detects power failure. The delay time from the detection of power failure to shutdown of operating system can be configured.

- To protect the battery module from over-discharge, the time from the detection of power failure to forced turn-off of battery discharge can be configured.

- Multi-process processing is supported. One or more programs can simultaneously monitor the system. - Sample programs for WDT, temperature monitoring, power supply voltage monitoring, interrupt event notification, CPU fan monitoring, power supply switch filter, error LED settings, slot-in power supply module monitoring, and battery information retrieval are included. - Ready-to-use utilities for WDT control, temperature monitoring, power voltage monitoring, fan monitoring, power button filter, and error LED settings, slot-in power supply module monitoring, and battery module monitoring are included. The utilities save logs for purposes of failure analysis and prediction. - The product provides some APIs that controls the CPUs and RAS functions of the existing Slot-in Industrial Controllers, Long-Term Supply Industrial Controllers (Pentium M/Celeron M models). The APIs help you easily migrate your existing system monitoring program to a new system.

Page 5: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

5

Chapter 2 Product Specifications 2.1 Functional Specifications

Long-Term Supply Industrial Controller Slot-in Industrial Controller

Core i7/Celeron

Atom N2800

Atom (N2800

excluded)PCI bus PCI/PCI

Express Hybrid

Atom N2800

Atom (N2800

excluded)

Core i7/Celeron

WDT (watchdog timer) ○ ○ ○ ○ ○ ○ ○ CPU ○ ○ ○ ○ ○ ○ ○ PCB ○ ○ ○ ○ ○ ○ ○

Temperature monitoring

Around memory chip - - ○ ○ - - ○ 5 Vdc ○ ○ - - ○ ○ - 3.3 Vdc ○ ○ - - ○ ○ - 12 Vdc ○ ○ - - ○ - -

Power supply voltage monitoring

5 Vdc standby ○ - - - ○ - - WDT time-out ○ ○ ○ ○ ○ ○ ○ CPU temperature is over the upper limit.

○ ○ - - ○ ○ -

CPU temperature is under the lower limit.

○ ○ - - ○ ○ -

PCB temperature is over the upper limit.

○ ○ ○ ○ ○ ○ ○

PCB temperature is under the lower limit.

○ ○ ○ ○ ○ ○ ○

5 Vdc power supply is abnormal.

○ ○ - - ○ ○ -

3.3 Vdc power supply is abnormal.

○ ○ - - ○ ○ -

12 Vdc power supply is abnormal.

○ ○ - - ○ - -

Slot-in power supply module alarm/abnormal

○ - ○ ○ ○ - ○

Interrupt event

CPU fan error - - ○*1 ○*1 - - ○*1 CPU fan monitoring - - ○*1 ○*1 - - ○*1 Chassis fan monitoring ○*3 - ○*3 ○*2 - - - Slot-in power supply module monitoring

○ - ○ ○ ○ - ○

Battery module monitoring ○ - ○ ○ ○ - ○ Power button filter - - ○ ○ - - ○ Error LED indication - - ○ ○ - - ○ ○: Supported -: Not supported Note: *1 These functions are supported only on Core i7/Celeron (1st) models with a CPU fan. Check the hardware manual if your controller has a CPU fan or not. *2 This function monitors the following types of fan. - Exhaust fan in 7-slot unit (short-size/full-size) - Exhaust fan 1 and exhaust fan 2 in 9-slot/13-slot unit (short-size/full-size) - Fan in 4-slot unit (short-size) *3 This function monitors the following types of fan. - Exhaust fan 1 and exhaust fan2 in 9-slot unit (short-size/full-size) - Exhaust fan in 7-slot unit (short-size/full-size)

Page 6: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

6

2.2 Product Composition Item File Name Description

Latest information README.HTM Latest information Installer SETUP.EXE Installation program

wdt Watchdog timer temperature Temperature monitoring power Power supply voltage monitoring event WDT interrupt event notification pbfilter Power button filter led Error LED settings fan Fan status retrieval psm Slot-in power supply module monitoring bat Battery information retrieval

Sample programs

IFCCPMGR Class library source for Visual C# .NET and Visual Basic .NET.

Utilities IFUtil.EXE Interface Utility Service SMAN.EXE Interface System Manager

IFCPMGR.DLL Dynamic link library file IFCPMGR.LIB Import library file IFWINCRP.DLL Dynamic link library file

DLL

IFWINCRP.LIB Import library file Device drivers IFCPMGR.SYS Driver for Windows

IFCPMGR.H Header file for Visual C++ IFCPMGR.BAS Header file for Visual Basic IFWINCRP.H Header file for Visual C++

Header files

IFWINCRP.BAS Header file for Visual Basic Help HELP.PDF Help (PDF file)

Note: * Sample programs for Visual C# .NET and Visual Basic .NET are built with Visual C# .NET 2003

and Visual Basic .NET 2003, respectively.

Page 7: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

7

Chapter 3 Programming Guide 3.1 Installation

Refer to README.HTM for installation.

3.2 Class Library This product includes the source files of the class library. Creating the class library from the source files makes it easier to define DLL functions. (To customize DLL function call, refer to the class library sources.)

3.2.1 Using DLL Functions for Atom and Core i7 Models 1. Creating a Class Library

Prepare class library first to call DLL functions on .NET. Visual C# .NET 1. Start Visual Studio. 2. Open the following project file.

<installation destination> \interface\IFCPMGR\samples\CS_NET\IFCCPMGR\IFCCPMGR.csproj

After building the project file, IFCCPMGR.DLL is created in the bin folder. Visual Basic .NET 1. Start Visual Studio. 2. Open the following project file.

<installation destination> \interface\IFCPMGR\samples\VB_NET\IFCCPMGR\IFCCPMGR.vbproj

After building the project file, IFCCPMGR.DLL is created in the bin folder.

2. Adding Class Library Reference Visual C# .NET and Visual Basic .NET 1. Start Visual Studio. 2. Select Project > Add Reference. 3. Click the Browse button. 4. Specify the class library DLL to refer.

<installation destination> \interface\IFCPMGR\samples\CS_NET\IFCCPMGR\bin\Release\ifccpmgr.dll <installation destination> \interface\IFCPMGR\samples\VB_NET\IFCCPMGR\bin\Relaase\ifccpmgr.dll

5. The DLL file will be displayed in Selected Components. 6. Click OK. 7. Add the namespace of InterfaceCorpDllWrap as below at the header of your source file to call the DLL functions. Visual C# .NET using InterfaceCorpDllWrap; Visual Basic .NET Imports InterfaceCorpDllWrap

Page 8: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

8

3.2.2 Using the Compatible DLL Functions for Pentium M and Celeron M Models 1. Creating a Class Library

Prepare class library first to call DLL functions on .NET. Visual C# .NET 1. Start Visual Studio. 2. Open the following project file.

<installation destination> \interface\IFCPMGR\samples\CS_NET\IFCWINCRP\IFCWINCRP.csproj

After building the project file, IFCWINCRP.DLL is created in the bin folder. Visual Basic .NET 1. Start Visual Studio. 2. Open the following project file.

<installation destination> \interface\IFCPMGR\samples\VB_NET\IFCWINCRP\IFCWINCRP.vbproj

After building the project file, IFCWINCRP.DLL is created in the bin folder.

2. Adding Class Library Reference Visual C# .NET and Visual Basic .NET 1. Start Visual Studio. 2. Select Project > Add Reference. 3. Click the Browse button. 4. Specify the class library DLL to refer.

<installation destination> \interface\IFCPMGR\samples\CS_NET\IFCWINCRP\bin\Release\ifcwincrp.dll <installation destination> \interface\IFCPMGR\ samples\VB_NET\IFCWINCRP\bin\Relaase\ifcwincrp.dll

5. The DLL file will be displayed in Selected Components. 6. Click OK. 7. Add the namespace of InterfaceCorpDllWrap as below at the header of your source file to call the DLL functions. Visual C# .NET using InterfaceCorpDllWrap; Visual Basic .NET Imports InterfaceCorpDllWrap

3.3 Programming Guide for DLL Functions for Atom and Core i7 Models C, C++, or Visual Basic Function declaration is required to use DLL functions in C, C++, or Visual Basic. The definition file for each language is stored in the include folder. For C and C++, include the IFCPMGR.H file in the source program. For Visual Basic, add the IFCPMGR.BAS file in the project. For C and C++, link the IFCPMGR.lib file in the lib folder. Visual Basic .NET, Visual C# Add the class library reference. Refer to “3.2.1 Using DLL Functions for Atom and Core i7 Models” for details. This section explains basic control instructions. The examples are written in C.

Page 9: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

9

3.3.1 WDT Follow the instructions below to use the WDT. 1. Configure a time-out time of the WDT and an action at the time-out error (CPU reset or interrupt event notification). 2. Start the WDT. 3. Clear the WDT before it reaches the time-out time. Use the CmSetWDTConfig function to configure a time-out time of the WDT and an action at the time-out error. UINT Ret; // CPU is reset if the value is not cleared for 50 s. Ret = CmSetWDTConfig(50, CM_WDT_ACT_RESET); Use the CmStartWDT function to start the WDT. Ret = CmStartWDT(); Use the CmClearWDT function to clear the WDT. Ret = CmClearWDT(); Use the CmStopWDT function to stop the WDT. Ret = CmStopWDT(); An interrupt event is generated as well as CPU reset. Refer to “3.3.6 Interrupt Event” for details. The table below describes the difference between interrupt event and CPU reset. WDT Processes Applications Interrupt event The purpose of using interrupt event is to detect that a user program stops due to

failure of the user program. Create a monitoring process separately from the user program that periodically clears the WDT. Register a WDT interrupt event in the monitoring process. When the user program can not clear the WDT within the time-out time, the WDT interrupt event is generated in the monitoring process. So the monitoring process can detect that a failure occurred in the user program

CPU reset The purpose of using CPU reset is to automatically recover the system from a fatal error like freeze.

3.3.2 Temperature Monitoring The CmGetTemp function retrieves a temperature of the CPU or PCB. For Core i7/Celeron models, the function retrieves a temperature around memory chips in addition. UINT Ret; int CpuTemp; int BrdTemp; // CPU temperature is retrieved Ret = CmGetTemp(CM_TEMP_TARGET_CPU, &CpuTemp); // Board temperature is retrieved Ret = CmGetTemp(CM_TEMP_TARGET_BRD, &BrdTemp); The retrieved temperatures may be negative. The unit is degree Celsius. By configuring the upper and lower limits of temperature, the function generates an interrupt event when the temperature becomes out of the range. Refer to “3.3.6 Interrupt Event” for details. The Atom N2800 and Atom D525 models generate an interrupt event when a temperature of CPU1 or CPU2 exceeds the CPU temperature limit.

Page 10: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

10

3.3.3 Power Supply Voltage Monitoring The CmGetPower function retrieves a voltage of the 5 Vdc, 3.3 Vdc, or 12 Vdc power supply. For Atom N2800 model, a voltage of 5 Vdc standby power supply can also be retrieved. UINT Ret; float Power; // 5 Vdc Power supply voltage is retrieved Ret = CmGetPower(CM_POWER_TARGET_5V, &Power); The function generates an interrupt event when the power supply voltage is abnormal. Refer to “3.3.6 Interrupt Event” for details.

3.3.4 Slot-in Power Supply Module Monitoring * Read this section when you use a slot-in power supply module. * The slot positions for the slot-in power supply modules are defined as P1, P2… from the left The CmGetPsmId function retrieves IDs of slot-in power supply modules. UINT Ret; UINT ModuleId[4]; // ID is retrieved Ret = CmGetPsmId(&ModuleId[0], 4); The CmGetPsmStatus function retrieves statuses of slot-in power supply modules. UINT Ret; UINT Status[4]; // Power supply status is confirmed Ret = CmGetPsmStatus(&Status[0], 4); An interrupt event can be generated when an alarm/abnormal status of a slot-in power supply module is detected. Refer to “3.3.6 Interrupt Event” for details.

3.3.5 Battery Monitoring * Read this section when you use a battery module. The CmGetBatStatus function retrieves a status of the battery module. UINT Ret; UINT Status; Ret = CmGetBatStatus(&Status); When a self-diagnostic error of the battery module is detected, use the CmGetBatDiagStatus function to check the details of the error. UINT Ret; UINT DiagStatus; Ret = CmGetBatDiagStatus(&DiagStatus); Self-diagnostic errors can be caused by the battery life including increase of internal resistance, unbalance, or decrease of capacity. Replace the battery module when a self-diagnostic error occurs.

Page 11: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

11

The CmSetBatOsOffConfig function configures an interval time from occurrence of power failure to shutdown or hibernation of the system. UINT Ret; // Shutdown of the operating system is requested in 60 seconds after a // power failure Ret = CmSetBatOsOffConfig(60, 0); Note: If the operating system disables hibernation, the operating system will be shut down when the hibernation is requested. The CmSetBatOffTime function configures an interval time from when a power failure occurs to when the battery is forcibly turned off to protect the battery from over-discharge. UINT Ret; // Battery discharge is forcibly turned off in 180 seconds after an occurrence // of power failure Ret = CmSetBatOffTime(180);

Note: Measurement of an interval time to turning off the battery module starts when a power failure occurs The start timing is NOT when the time shutting down (hibernating) the system configured by the CmSetBatOsOffConfig function elapsed After a power failure occurs, system configuration information or files may be corrupted if discharge of the battery module stops before post-processings of programs are successfully completed or the system is properly shut down.

Page 12: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

12

3.3.6 Interrupt Event Handling Follow the instructions below to use interrupt events. 1. Configure conditions of each interrupt event (WDT time-out error, and upper-limit/lower-limit temperatures). 2. Register handling methods of the interrupt events including signal event, message, and callback function by the CmSetEvent function. 3. Configure an interrupt event mask by the CmSetEventMask function to enable the events. When the condition of the interrupt event source is satisfied, the interrupt event will be generated. The following example shows a setting that a callback function is called at event occurrence. (Enabling WDT time-out error, CPU temperature upper/lower limit, and power supply voltage error) // Callback function void CALLBACK UserCallback(PVOID User) { UINT Ret; UINT Factor; // Event source is retrieved Ret = CmGetEventFactor(&Factor); // Processing each event … } int main(void) { UINT Ret; CM_EVENT_REQ EventReq; // 0 degrees C for lower limit and 50 degrees C for upper limit of CPU temperature //are configured Ret = CmSetTempLimit(CM_TEMP_TARGET_CPU, 0, 50); // Event registration ZeroMemory(&EventReq, sizeof(CM_EVENT_REQ)); EventReq.CallBackProc = (LPCMCALLBACK)UserCallback; Ret = CmSetEvent(&EventReq); // Event mask configuration (WDT, Upper/lower limit of CPU temperature, // power supply voltage) Mask = CM_EVENT_WDS | CM_EVENT_CPTHS | CM_EVENT_CPTLS | CM_EVENT_V27VA; Ret = CmSetEventMask(&Mask, 1); … }

Page 13: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

After the events are used, mask the events by the SetEventMask function, clear the event sources by the CmGetEventFactor function, and then release the interrupt events by the CmKillEvent function. UINT Ret; UINT Factor; UINT Mask = 0; // All interrupts are disabled Ret = CmSetEventMask(&Mask, 1); // Event source is cleared Ret = CmGetEventFactor(&Factor, 1); // Interrupts are released Ret = CmKillEvent();

Refer to “Chapter 6 Sample Programs” to use functions other than the callback function.

3.4 Programming Guide for Compatible DLL Functions for Pentium M/Celeron M Model

C, C++, or Visual Basic Function declaration is required to use DLL functions in C, C++, or Visual Basic. The definition file for each language is stored in the include folder. For C and C++, include the IFWINCRP.H file in the source program. For Visual Basic, add the IFWINCRP.BAS file in the project. For C and C++, link the IFWINCRP.lib file in the lib folder. Visual Basic .NET, Visual C# Add the class library reference. Refer to “3.2.2 Using the Compatible DLL Functions for Pentium M and Celeron M Models” for details.

Caution!

The compatible DLL functions for Pentium M/Celeron M model are compatible in the point of their function names and arguments. However, the parameters or behavior may be different. Refer to “Chapter 5 Reference for Pentium M/Celeron M Model”.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

13

Page 14: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

14

Chapter 4 Reference for Atom/Core i7 Model 4.1 List of DLL Function

No. Function Description <WDT> 1 CmSetWDTConfig Configures a time-out time and an action at the time-out error. 2 CmGetWDTConfig Retrieves a time-out time and an action at the time-out error. 3 CmStartWDT Starts the WDT. 4 CmStopWDT Stops the WDT. 5 CmClearWDT Clears the WDT. <Temperature monitoring>

6 CmGetTemp Retrieves the current temperature of a specified target. 7 CmSetTempLimit Configures upper and lower limits of monitoring temperature

of a specified target. 8 CmGetTempLimit Retrieves upper and lower limits of monitoring temperature of

a specified target. <Power supply voltage monitoring>

9 CmGetPower Retrieves a voltage of a power supply. <Interrupt event> 10 CmSetEvent Registers interrupt events. 11 CmKillEvent Deletes interrupt events. 12 CmSetEventMask Configures an event mask. 13 CmGetEventMask Retrieves an event mask. 14 CmGetEventFactor Retrieves an event source.

<Status> 15 CmGetSpecifiedStatus Retrieves statuses of specified targets.

<Power button filter> 16 CmSetPowerButtonFilter Applies one second filter to the power button to protect from

erroneous operations 17 CmGetPowerButtonFilter Retrieves the filter setting of the power button.

<Error LED> 18 CmSetLedConfig Configures blinking conditions of the LED. 19 CmGetLedConfig Retrieves blinking conditions of the LED.

<Chassis fan> 20 CmGetUnitFanStatus Retrieves statuses of the chassis fans.

<Slot-in power supply module> 21 CmGetPsmId Retrieves IDs of slot-in power supply modules. 22 CmGetPsmStatus Retrieves statuses of slot-in power supply modules.

<Battery module> 23 CmGetBatInfo Retrieves information of the battery module. 24 CmGetBatHistory Retrieves a history of the battery module. 25 CmGetBatStatus Retrieves statuses of the battery module. 26 CmGetBatDiagStatus Retrieves statuses of self diagnostic of the battery module. 27 CmSetBatOsOffConfig Configures a condition of termination of the operating system. 28 CmGetBatOsOffConfig Retrieves a condition of termination of the operating system. 29 CmSetBatOffTime Configures a discharge condition of the battery module 30 CmGetBatOffTime Retrieves a discharge condition of the battery module

Page 15: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

15

4.1.1 CmSetWDTConfig Description

The CmSetWDTConfig function configures a time-out time of the WDT and an action at the time-out error.

Syntax C UINT CmSetWDTConfig( UINT Cycle, UINT Action

); Visual Basic Declare Function CmSetWDTConfig Lib "ifcpmgr.dll"( _ByVal Cycle As Long, _ ByVal Action As Long _

)As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetWDTConfig( uint Cycle, uint Action

); Visual Basic .NET Declare Function CmSetWDTConfig Lib "ifcpmgr.dll"(_ ByVal Cycle As Integer, _ ByVal Action As Integer _

)As Integer

Parameters Cycle The parameter configures a time-out time of the WDT. The time-out time

ranges 1 through 255 in second. The default value is 30. When the WDT is enabled by BIOS, the default value is set by BIOS.

Action The parameter specifies an action at the time-out error. Specify a value in the following table. The default setting is CM_WDT_ACT_INTERRUPT. When the WDT is enabled by BIOS, the value is CM_WDT_ACT_RESET.

Code Value Description

CM_WDT_ACT_INTERRUPT 0 Generates an interrupt event at the time-out error CM_WDT_ACT_RESET 1 Generates a CPU reset at the time-out error

Page 16: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

16

Return Values

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comments - When this function is called while the WDT is running, the WDT restarts with the new time-out time. - When this function is called in a different process, the latest settings are effective. - The product uses the setting of the WDT by BIOS when BIOS enables the WDT.

Example Setting the time-out time to 50 seconds and the action to CPU reset C UINT Ret; Ret = CmSetWDTConfig(50, CM_WDT_ACT_RESET);

Visual Basic Dim Ret As Long

Ret = CmSetWDTConfig(50, CM_WDT_ACT_RESET) Visual C# .NET uint Ret;

Ret = IFCCPMGR.CmSetWDTConfig(50, IFCCPMGR.CM_WDT_ACT_RESET); Visual Basic .NET Dim Ret As Integer

Ret = IFCCPMGR.CmSetWDTConfig(50, IFCCPMGR.CM_WDT_ACT_RESET)

Page 17: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

17

4.1.2 CmGetWDTConfig Description

The CmGetWDTConfig function retrieves a time-out time of the WDT and an action at the time-out error.

Syntax C UINT CmGetWDTConfig( UINT* pCycle, UINT* pAction

); Visual Basic Declare Function CmGetWDTConfig Lib "ifcpmgr.dll"( _ByRef pCycle As Long, _ ByRef pAction As Long _

)As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetWDTConfig( out uint pCycle, out uint pAction

); Visual Basic .NET Declare Function CmGetWDTConfig Lib "ifcpmgr.dll"(__ByRef pCycle As Integer, _ ByRef pAction As Integer _

)As Integer

Parameters pCycle The parameter points to a variable to receive a time-out time of the WDT. pAction The parameter points to a variable to receive an action at the time-out error

The parameter can retrieve the same values as the CmSetWDTConfig function can configure.

Return Values

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Page 18: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

18

Example

Retrieving a time-out time of the WDT and action at the time-out error C UINT Ret; UINT Cycle; UINT Action; Ret = CmGetWDTConfig(&Cycle, &Action);

Visual Basic Dim Ret As Long Dim Cycle As Long Dim Action As Long Ret = CmGetWDTConfig(Cycle, Action)

Visual C# .NET uint Ret; uint Cycle; uint Action Ret = IFCCPMGR.CmGetWDTConfig(out Cycle, out Action);

Visual Basic .NET Dim Ret As Integer Dim Cycle As Integer Dim Action As Integer Ret = IFCCPMGR.CmGetWDTConfig(Cycle, Action)

Page 19: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

19

4.1.3 CmStartWDT The CmStartWDT function starts the WDT.

Syntax C UINT CmStartWDT(void);

Visual Basic Declare Function CmStartWDT Lib "ifcpmgr.dll"() As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmStartWDT();

Visual Basic .NET Declare Function CmStartWDT Lib "ifcpmgr.dll"() As Integer

Parameter

None

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_ALREADY C0000003h Already in progress IFCM_ERROR_INVALID_HANDLE C0000007h Internal error Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comment When this function is called after the WDT stops, the WDT starts from the beginning.

Example Starting WDT C UINT Ret; Ret = CmStartWDT();

Visual Basic Dim Ret As Long Ret = CmStartWDT()

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmStartWDT();

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmStartWDT()

Page 20: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

20

4.1.4 CmStopWDT Description

The CmStopWDT function stops the WDT.

Syntax C UINT CmStopWDT(void);

Visual Basic Declare Function CmStopWDT Lib "ifcpmgr.dll"() As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmStopWDT();

Visual Basic Declare Function CmStopWDT Lib "ifcpmgr.dll"() As Integer

Parameter

None

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NOT_YET C0000004h Not in progress yet IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Stopping WDT

C UINT Ret; Ret = CmStopWDT();

Visual Basic Dim Ret As Long Ret = CmStopWDT()

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmStopWDT();

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmStopWDT()

Page 21: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

21

4.1.5 CmClearWDT Description

The CmClearWDT function clears the WDT. The WDT restarts with the current time-out time.

Syntax C UINT CmClearWDT(void);

Visual Basic Declare Function CmClearWDT Lib "ifcpmgr.dll"() As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmClearWDT();

Visual Basic .NET Declare Function CmClearWDT Lib "ifcpmgr.dll"() As Integer

Parameters

None

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NOT_YET C0000004h Not in progress yet IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Clearing WDT C UINT Ret; Ret = CmClearWDT();

Visual Basic Dim Ret As Long Ret = CmClearWDT()

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmClearWDT();

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmClearWDT()

Page 22: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

22

4.1.6 CmGetTemp The CmGetTemp function retrieves a temperature of a specified target.

Syntax C UINT CmGetTemp( UINT Target, INT* pTemp );

Visual Basic Declare Function CmGetTemp Lib "ifcpmgr.dll"( _ ByVal Target As Long, _ ByRef pTemp As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetTemp( uint Target, out int pTemp )As Long

Visual Basic .NET Declare Function CmGetTemp Lib "ifcpmgr.dll"(_ ByVal Target As Integer, _ ByRef pTemp As Integer _ )As Integer

Parameters

Target The parameter specifies a target to retrieve its temperature. Specify a value from the following table.

Code Value Description CM_TEMP_TARGET_CPU 0 Retrieves a temperature of the CPU.

For Atom N2800, Atom D525, and Core i7/Celeron models, the value shows CPU1 temperature.

CM_TEMP_TARGET_BRD 1 Retrieves a temperature of the PCB.CM_TEMP_TARGET_MEM 2 Retrieves a temperature around the

memory chips. CM_TEMP_TARGET_CPU2 3 Retrieves a temperature of the

CPU2. (Only for Atom N2800, Atom D525, and Core i7/Celeron models)

pTemp This parameter points to a variable to receive a temperature. The retrieved temperature may be negative. The unit is degree C.

Page 23: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

23

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving a current temperature of CPU C UINT Ret; INT CpuTemp; Ret = CmGetTemp(CM_TEMP_TARGET_CPU, &CpuTemp);

Visual Basic Dim Ret As Long Dim CpuTemp As Long Ret = CmGetTemp(CM_TEMP_TARGET_CPU, CpuTemp)

Visual C# .NET uint Ret; int CpuTemp; Ret = IFCCPMGR.CmGetTemp(IFCCPMGR.CM_TEMP_TARGET_CPU, out CpuTemp);

Visual Basic .NET Dim Ret As Integer Dim CpuTemp As Integer Ret = IFCCPMGR.CmGetTemp(IFCCPMGR.CM_TEMP_TARGET_CPU, CpuTemp)

Page 24: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

24

4.1.7 CmSetTempLimit Description

The CmSetTempLimit function configures upper and lower-limits of monitoring temperature of a specified target. When the temperature becomes out of the specified range, an interrupt event is generated.

Syntax C UINT CmSetTempLimit( UINT Target, INT LowerLimit, INT UpperLimit );

Visual Basic Declare Function CmSetTempLimit Lib "ifcpmgr.dll"( _ ByVal Target As Long, _ ByVal LowerLimit As Long, _ ByVal UpperLimit As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetTempLimit ( uint Target, int LowerLimit, int UpperLimit );

Visual Basic .NET Declare Function CmSetTempLimit Lib "ifcpmgr.dll"(_ ByVal Target As Integer, _ ByVal LowerLimit As Integer, _ ByVal UpperLimit As Integer _ )As Integer

Parameters

Target The parameter specifies a target to monitor the temperature. Specify a value from the table below.

Code Value Description CM_TEMP_TARGET_CPU 0 Configures a monitoring temperature of

the CPU. The value is applicable only to the Atom models.

CM_TEMP_TARGET_BRD 1 Configures a monitoring temperature of the PCB

LowerLimit The parameter specifies a lower limit of the monitoring temperature: -60 ≤ LowerLimit < UpperLimit The default value for the CPU and PCB is -60 (degrees C).

UpperLimit The parameter specifies an upper limit of the monitoring temperature: LowerLimit

< UpperLimit ≤ 125 The default value for the CPU and PCB is 125 (degrees C).

Page 25: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comment - When this function is called in a different process, the latest settings are effective. - For the Atom N2800 and Atom D525 models, an error detected when a temperature of either CPU1 or CPU2 becomes out of the range. (In other words, no error is detected when the temperatures of both CPU1 and CPU2 are within the range)

Caution!

The values that can be specified here are values that this software can monitor. The specified values are not guaranteed temperature of the hardware.

Example

Setting lower and upper limit temperatures of PCB to 0 degrees C and 50 degrees C, respectively C UINT Ret; Ret = CmSetTempLimit(CM_TEMP_TARGET_BRD, 0, 50);

Visual Basic Dim Ret As Long Ret = CmSetTempLimit(CM_TEMP_TARGET_BRD, 0, 50)

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmSetTempLimit(IFCCPMGR.CM_TEMP_TARGET_BRD, 0, 50) ;

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmSetTempLimit(IFCCPMGR.CM_TEMP_TARGET_BRD, 0, 50)

Copyright 2010, 2015 Interface Corporation. All rights reserved.

25

Page 26: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

26

4.1.8 CmGetTempLimit Description

The CmGetTempLimit function retrieves upper and lower limits of monitoring temperatures of a specified target.

Syntax C UINT CmGetTempLimit( UINT Target, INT* pLowerLimit, INT* pUpperLimit );

Visual Basic Declare Function CmGetTempLimit Lib "ifcpmgr.dll"( _ ByVal Target As Long, _ ByRef pLowerLimit As Long, _ ByRef pUpperLimit As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetTempLimit ( uint Target, out int pLowerLimit, out int pUpperLimit );

Visual Basic .NET Declare Function CmGetTempLimit Lib "ifcpmgr.dll"(_ ByVal Target As Integer, _ ByRef pLowerLimit As Integer, _ ByRef pUpperLimit As Integer _ )As Integer

Parameters

Target The parameter specifies a target to retrieve its monitoring temperatures. Code Value Description

CM_TEMP_TARGET_CPU 0 Retrieves a monitoring temperature of the CPU.

CM_TEMP_TARGET_BRD 1 Retrieves a monitoring temperature of the PCB.

pLowerLimit The parameter points to variable to receive the lower limit of the monitoring

temperature. Lower-limit temperature: -60 ≤ retrieved value < UpperLimit (degrees C) pUpperLimit The parameter points to variable to receive the upper limit of the monitoring

temperature. Upper-limit temperature: LowerLimit < retrieved value ≤ 125 (degrees C)

Page 27: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

27

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving upper and lower limit temperatures of the PCB C UINT Ret; INT LowerLimit; INT UpperLimit; Ret = CmGetTempLimit(CM_TEMP_TARGET_BRD, &LowerLimit, &UpperLimit);

Visual Basic Dim Ret As Long Dim LowerLimit As Long Dim UpperLimit As Long Ret = CmGetTempLimit(CM_TEMP_TARGET_BRD, LowerLimit, UpperLimit)

Visual C# .NET uint Ret; int LowerLimit; int UpperLimit; Ret = IFCCPMGR.CmGetTempLimit(IFCCPMGR.CM_TEMP_TARGET_BRD, out LowerLimit, out UpperLimit);

Visual Basic .NET Dim Ret As Integer Dim LowerLimit As Integer; Dim UpperLimit As Integer Ret = IFCCPMGR.CmGetTempLimit(IFCCPMGR.CM_TEMP_TARGET_BRD, LowerLimit, UpperLimit)

Page 28: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

28

4.1.9 CmGetPower The CmGetPower function retrieves a power supply voltage. The function is applicable only to the Atom models.

Syntax C UINT CmGetPower( UINT Target, float* pPower );

Visual Basic Declare Function CmGetPower Lib "ifcpmgr.dll"( _ ByVal Target As Long, _ ByRef pPower As Single _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetPower( uint Target, out float pPower );

Visual Basic .NET Declare Function CmGetPower Lib "ifcpmgr.dll"(_ ByVal Target As Integer, _ ByRef pPower As Single _ )As Integer

Parameters

Target The parameter specifies a target to retrieve a voltage. Only the following values are applicable.

Code Value Description CM_POWER_TARGET_5V 1 Retrieves a voltage of 5 Vdc power supply.CM_POWER_TARGET_3_3V 2 Retrieves a voltage of 3.3 Vdc power

supply. CM_POWER_TARGET_12V 3 Retrieves a voltage of 12 Vdc power

supply. This code is applicable only to the Long-Term Supply Industrial Controller Atom models.

CM_POWER_TARGET_5VSB 5 Retrieves a voltage of 5 Vdc standby power supply. This code is applicable only to the Atom N2800 models.

pPower This parameter points to a variable to receive the voltage value. The unit is Vdc.

Page 29: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

29

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving a voltage of 5 Vdc power supply C UINT Ret; float Power; Ret = CmGetPower(CM_POWER_TARGET_5V, &Power);

Visual Basic Dim Ret As Long Dim Power As Single Ret = CmGetPower(CM_POWER_TARGET_5V, Power)

Visual C# .NET uint Ret; float Power; Ret = IFCCPMGR.CmGetPower(IFCCPMGR.CM_POWER_TARGET_5V, out Power);

Visual Basic .NET Dim Ret As Integer Dim Power As Single Ret = IFCCPMGR.CmGetPower(IFCCPMGR.CM_POWER_TARGET_5V, Power)

Page 30: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

4.1.10 CmSetEvent Description

The CmSetEvent function registers notification methods of interrupt event: event signal, message, and function callback.

Syntax C UINT CmSetEvent( PCM_EVENT_REQ pEvent );

Visual Basic Declare Function CmSetEvent Lib "ifcpmgr.dll"( _ ByRef pEvent As CM_EVENT_REQ _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetEvent( ref CM_EVENT_REQ pEvent );

Visual Basic .NET Declare Function CmSetEvent Lib "ifcpmgr.dll"(_ ByRef pEvent As CM_EVENT_REQ _ )As Integer

Parameters

pEvent The parameter points to a variable that contains a setting of event handling. Refer to “4.3.1 CM_EVENT_REQ” for details.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_ALREADY C0000003h Event is already registered IFCM_ERROR_NULL_POINTER C0000005h Null pointer detection IFCM_ERROR_NOT_ALLOCATE C0000006h Memory allocation error IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comment An event can be registered per program. Refer to "4.2 Callback Functions" for more details on the callback functions.

Caution!

Callback functions can be handled only in C. Use event signal or message for other languages.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

30

Page 31: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

31

Example

Registering a signal event C UINT Ret; CM_EVENT_REQ EventReq; EventReq.Signal = CreateEvent(NULL, TRUE, FALSE, NULL); EventReq.Wnd = NULL; EventReq.Msg = WM_NULL; EventReq.CallBackProc = NULL; EventReq.User = NULL; Ret = CmSetEvent(&EventReq);

Visual Basic Dim Ret As Long Dim EventReq As CM_EVENT_REQ EventReq.Signal = CreateEvent(0, True, False, 0) EventReq.Wnd = 0 EventReq.Msg = 0 EventReq.CallBackProc = 0 EventReq.User = 0 Ret = CmSetEvent(EventReq)

Visual C# .NET uint Ret; IFCCPMGR.CM_EVENT_REQ EventReq = new IFCCPMGR.CM_EVENT_REQ(); EventReq.Signal = IFCCPMGR.CreateEvent(IntPtr.Zero, true, false, null);EventReq.Wnd = IntPtr.Zero; EventReq.Msg = 0; EventReq.CallBackProc = IntPtr.Zero; EventReq.User = IntPtr.Zero; Ret = IFCCPMGR.CmSetEvent(ref EventReq);

Visual Basic .NET Dim Ret As Integer Dim EventReq As IFCCPMGR.CM_EVENT_REQ = New IFCCPMGR.CM_EVENT_REQ EventReq.Signal = IFCCPMGR.CreateEvent(IntPtr.Zero, True, False, Nothing)EventReq.Wnd = IntPtr.Zero EventReq.Msg = 0 EventReq.CallBackProc = IntPtr.Zero EventReq.User = IntPtr.Zero Ret = IFCCPMGR.CmSetEvent(EventReq)

Page 32: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

32

4.1.11 CmKillEvent Description

The CmKillEvent function releases registered interrupt events.

Syntax C UINT CmKillEvent(void);

Visual Basic Declare Function CmKillEvent Lib "ifcpmgr.dll"() As Long _

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmKillEvent();

Visual Basic .NET Declare Function CmKillEvent Lib "ifcpmgr.dll"() As Integer

Parameters

None

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_NOT_YET C0000004h Not in progress yet IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Releasing registered interrupt events C UINT Ret; Ret = CmKillEvent();

Visual Basic Dim Ret As Long Ret = CmKillEvent()

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmKillEvent();

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmKillEvent()

Page 33: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

33

4.1.12 CmSetEventMask Description

The CmSetEventMask function configures a mask of interrupt events to enable or disable each event.

Syntax C UINT CmSetEventMask( UINT* pMask, UINT Count );

Visual Basic Declare Function CmSetEventMask Lib "ifcpmgr.dll"( _ ByRef pMask As Long, _ ByVal Count As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetEventMask( ref uint pMask, uint Count );

Visual Basic .NET Declare Function CmSetEventMask Lib "ifcpmgr.dll"(_ ByRef pMask As Integer, _ ByVal Count As Integer _ )As Integer

Parameters

pMask The parameter points to a variable that contains a mask of interrupt events A value of 0 disables all events. The default value is 0. One or more values can be ORed. Depending on the model, the supported values are different. Do not use unsupported functions.

Availability*1 Code Value Description A B C D E

CM_EVENT_WDS 1h Enables an event that the WDT is timed-out. ○ ○ ○ ○ ○

CM_EVENT_CPTHS 2h Enables an event that a temperature of the CPU goes over the upper limit.

○ ○ - ○ -

CM_EVENT_CPTLS 4h Enables an event that a temperature of the CPU goes below the lower limit.

○ ○ - ○ -

CM_EVENT_LCTHS 8h Enables an event that a temperature of the PCB goes over the upper limit.

○ ○ ○ ○ ○

CM_EVENT_LCTLS 10h Enables an event that a temperature the PCB goes below the lower limit.

○ ○ ○ ○ ○

CM_EVENT_V5VSR 20h Enables an event that a voltage of 5 Vdc power supply is abnormal.

○ ○ - ○ -

CM_EVENT_V3VSR 40h Enables an event that a voltage of 3.3 Vdc power supply is abnormal.

○ ○ - ○ -

CM_EVENT_V12VSR 80h Enables an event that a voltage of 12 Vdc power supply is abnormal.

○ ○ - - -

Page 34: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

34

(Continued)

Availability*1 Code Value Description A B C D E

CM_EVENT_PSMP1_FAL 100h Enables an event that the slot-in power module installed in the P1 slot is failed (The FAIL signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP2_FAL 200h Enables an event that the slot-in power module installed in the P2 slot is failed (The FAIL signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP3_FAL 400h Enables an event that the slot-in power module installed in the P3 slot is failed (The FAIL signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP4_FAL 800h Enables an event that the slot-in power module installed in the P4 slot is failed (The FAIL signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP5_FAL 1000h Enables an event that the slot-in power module installed in the P5 slot is failed (The FAIL signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP6_FAL 2000h Enables an event that the slot-in power module installed in the P6 slot is failed (The FAIL signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP1_DEG 4000h Enables an event that the slot-in power module installed in the P1 slot is alarmed (The ALM signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP2_DEG 8000h Enables an event that the slot-in power module installed in the P2 slot is alarmed (The ALM signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP3_DEG 10000h Enables an event that the slot-in power module installed in the P3 slot is alarmed (The ALM signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP4_DEG 20000h Enables the P4 slot-in power module alarm (ALM signal detection) event.

○ - ○ - ○

CM_EVENT_PSMP5_DEG 40000h Enables an event that the slot-in power module installed in the P5 slot is alarmed (The ALM signal is detected.)

○ - ○ - ○

CM_EVENT_PSMP6_DEG 80000h Enables an event that the slot-in power module installed in the P6 slot is alarmed (The ALM signal is detected.)

○ - ○ - ○

CM_EVENT_CFANST 10000000h Enables an event that of a CPU fan is failed. - - ○*2 - ○*2

*1 ○: supported -: not supported A: Long Term Supply Industrial Controller Atom N2800 model B: Long Term Supply Industrial Controller (Atom N2800 model excluded) C: Long Term Supply Industrial Controller Core i7/Celeron models D: Slot-in Industrial Controller Atom model E: Slot-in Industrial Controller Core i7/Celeron models * The code is applicable only to Core i7/Celeron (1st) models with a CPU fan. Check the hardware manual if your controller has a CPU fan or not.

Page 35: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

35

Count Reserved. Specify 1.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comments - An event mask can be independently configured per program. - When the same event is enabled in one or more programs and the event is generated, the event is notified to the programs.

Example

Enabling WDT event and abnormal 12 Vdc power supply voltage event C UINT Ret; UINT Mask; Mask = CM_EVENT_WDS | CM_EVENT_V12VSR; Ret = CmSetEventMask(&Mask, 1);

Visual Basic Dim Ret As Long Dim Mask As Long Mask = CM_EVENT_WDS Or CM_EVENT_V12VSR Ret = CmSetEventMask(Mask, 1)

Visual C# .NET uint Ret; uint Mask; Mask = IFCCPMGR.CM_EVENT_WDS | IFCCPMGR.CM_EVENT_V12VSR; Ret = IFCCPMGR.CmSetEventMask(ref Mask, 1);

Visual Basic .NET Dim Ret As Integer Dim Mask As Integer Mask = IFCCPMGR.CM_EVENT_WDS Or IFCCPMGR.CM_EVENT_V12VSR Ret = IFCCPMGR.CmSetEventMask(Mask, 1))

Page 36: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

36

4.1.13 CmGetEventMask Description

The CmGetEventMask function retrieves a mask of interrupt events.

Syntax C UINT CmGetEventMask( UINT* pMask, UINT Count );

Visual Basic Declare Function CmGetEventMask Lib "ifcpmgr.dll"( _ ByRef pMask As Long, _ ByVal Count As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetEventMask( out uint pMask, uint Count );

Visual Basic .NET Declare Function CmGetEventMask Lib "ifcpmgr.dll"(_ ByRef pMask As Integer, _ ByVal Count As Integer _ )As Integer

Parameter

pMask The parameter points to a variable to receive an event mask value. The parameter retrieves a value configured by the CmSetEventMask function.

Count Reserved. Specify 1.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Page 37: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

37

Example

Retrieving the current interrupt mask value C UINT Ret; UINT Mask; Ret = CmGetEventMask(&Mask, 1);

Visual Basic Dim Ret As Long Dim Mask As Long Ret = CmGetEventMask(Mask, 1)

Visual C# .NET uint Ret; uint Mask; Ret = IFCCPMGR.CmGetEventMask(out Mask, 1);

Visual C# .NET Dim Ret As Integer Dim Mask As Integer Ret = IFCCPMGR.CmGetEventMask(Mask, 1)

Page 38: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

38

4.1.14 CmGetEventFactor Description

The CmGetEventFactor function retrieves sources of interrupt events .

Syntax C UINT CmGetEventFactor( UINT* pFactor, UINT Count );

Visual Basic Declare Function CmGetEventFactor Lib "ifcpmgr.dll"( _ ByRef pFactor As Long, _ ByVal Count As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetEventFactor( out uint pFactor, uint Count );

Visual Basic .NET Declare Function CmGetEventFactor Lib "ifcpmgr.dll"(_ ByRef pFactor As Integer, _ ByVal Count As Integer _ )As Integer

Page 39: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Parameters

pFactor This parameter points to a variable to receive event sources. The parameter retrieves values in the table below. One or more sources may be detected.

Code Value Description CM_EVENT_WDS 1h WDT time-out error occurs CM_EVENT_CPTHS 2h CPU temperature goes over the upper limit CM_EVENT_CPTLS 4h CPU temperature goes below the lower limit CM_EVENT_LCTHS 8h PCB temperature goes over the upper limit CM_EVENT_LCTLS 10h PCB temperature goes under the lower limit CM_EVENT_V5VSR 20h A voltage of 5 Vdc power supply is abnormal CM_EVENT_V3VSR 40h A voltage of 3.3 Vdc power supply is abnormal CM_EVENT_V12VSR 80h A voltage of 12 Vdc power supply is abnormal CM_EVENT_PSMP1_FAL 100h The slot-in power module installed in the P1 slot is failed (The

FAIL signal is detected.) CM_EVENT_PSMP2_FAL 200h The slot-in power module installed in the P2 slot is failed (The

FAIL signal is detected.) CM_EVENT_PSMP3_FAL 400h The slot-in power module installed in the P3 slot is failed (The

FAIL signal is detected.) CM_EVENT_PSMP4_FAL 800h The slot-in power module installed in the P4 slot is failed (The

FAIL signal is detected.) CM_EVENT_PSMP5_FAL 1000h The slot-in power module installed in the P5 slot is failed (The

FAIL signal is detected.) CM_EVENT_PSMP6_FAL 2000h The slot-in power module installed in the P6 slot is failed (The

FAIL signal is detected.) CM_EVENT_PSMP1_DEG 4000h The slot-in power module installed in the P1 slot is alarmed

(The ALM signal is detected.) CM_EVENT_PSMP2_DEG 8000h The slot-in power module installed in the P2 slot is alarmed

(The ALM signal is detected.) CM_EVENT_PSMP3_DEG 10000h The slot-in power module installed in the P3 slot is alarmed

(The ALM signal is detected.) CM_EVENT_PSMP4_DEG 20000h The slot-in power module installed in the P4 slot is alarmed

(The ALM signal is detected.) CM_EVENT_PSMP5_DEG 40000h The slot-in power module installed in the P5 slot is alarmed

(The ALM signal is detected.) CM_EVENT_PSMP6_DEG 80000h The slot-in power module installed in the P6 slot is alarmed

(The ALM signal is detected.) CM_EVENT_CFASNST 10000000h A CPU fan is failed.

Count Reserved. Specify 1.

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Caution!

Retrieve the event source by using this function after the interrupt event is notified by the following methods

- signal event - message and/or - callback function.

If a source of the interrupt event is not retrieved by using this function, the next interrupt event of the same source will not be notified.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

39

Page 40: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

40

Comment

- After the function retrieves the sources of interrupt events, the sources are cleared. When no source is left, the function returns 0 as the source (0 is stored in the variable pointed by pFactor.) - When the same source of interrupt event is satisfied several times before retrieving the interrupt source, the satisfied sources are consolidated into one event. Example) Assume that the CPU temperature goes over the upper limit, and the CPU temperature goes over the upper limit again before the function retrieves the source of the first event. In case, this function returns CM_EVENT_CPTHS for the source. When this function is called again, the function returns 0 as the source. The interrupt event will occur only once. - Each event source on every program is independent. Assume that two programs (program A and program B) enable WDT event. When WDT is timed out, the event is notified to both programs. Program A retrieves the source of the event. The event source for program A is cleared. However, the event source for program B is still remained because program B does not retrieve the source. The next WDT event will be notified to program A, but not be notified to program B.

Page 41: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

41

Example

Retrieving event sources in the message handler C LRESULT CEventDlg::OnMessage(WPARAM wParam, LPARAM lParam) { unsigned int Ret; unsigned int Factor; Ret = CmGetEventFactor(&Factor, 1); …

} Visual Basic Public Sub OnMessage() Dim Ret As Long Dim Factor As Long Ret = CmGetEventFactor(Factor, 1) …

End Sub Visual C# .NET private void OnMessage(IntPtr WParam, IntPtr LParam) { uint Ret; uint Factor; Ret = IFCCPMGR.CmGetEventFactor(out Factor, 1); … }

Visual Basic .NET Public Sub OnMessage(ByVal WParam As IntPtr, ByVal LParam As IntPtr) Dim Ret As Integer Dim Factor As Integer Ret = IFCCPMGR.CmGetEventFactor(Factor, 1) … End Sub

Page 42: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

42

4.1.15 CmGetSpecifiedStatus Description

The CmGetSpecifiedStatus function retrieves the specified status.

Syntax C UINT CmGetSpecifiedStatus( UINT* pStatus );

Visual Basic Declare Function CmGetSpecifiedStatus Lib "ifcpmgr.dll"( _ ByRef pStatus As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetSpecifiedStatus( ref uint pStatus );

Visual Basic .NET Declare Function CmGetSpecifiedStatus Lib "ifcpmgr.dll"(_ ByRef pStatus As Integer _ )As Integer

Parameter

pStatus This parameter points to a variable to receive statuses. Specify 1 to the following bits to receive statuses corresponding to the bits. The function returns a status in each bit. Specify 0 for the reserved bits. When the function is successfully completed, the specified bit contains the status. A bit not specified contains 0.

bit31 to bit12 bit11 bit9, bit10 bit8 bit7 to bit0 Reserved CFAN Reserved WDTE Reserved

WDTE: Status of WDT. 0: WDT is enabled 1: WDT is disabled

CFAN: Status of CPU fan 0: Fan stops 1: Fan is in operation CFAN is applicable only to Core i7/Celeron (1st) models with a CPU fan.

Page 43: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

43

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving current WDT status C UINT Ret; UINT Status; Status = 0x00000100; Ret = CmGetSpecifiedStatus(&Status);

Visual Basic Dim Ret As Long Dim Status As Long Status = &H100 Ret = CmGetSpecifiedStatus(Status)

Visual C# .NET uint Ret; uint Status; Status = 0x00000100; Ret = IFCCPMGR.CmGetSpecifiedStatus(ref Status);

Visual Basic .NET Dim Ret As Integer Dim Status As Integer Status = &H100 Ret = IFCCPMGR.CmGetSpecifiedStatus(Status)

Page 44: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

44

4.1.16 CmSetPowerButtonFilter Description

The CmSetPowerButtonFilter function sets the power button to ignore any operation for 1 second to protect from erroneous operations on the button. The function is applicable only to Core i7/Celeron models.

Syntax

C UINT CmSetPowerButtonFilter ( UINT Enable ); Visual Basic Declare Function CmSetPowerButtonFilter Lib "ifcpmgr.dll"( _ ByVal Enable As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetPowerButtonFilter ( uint Enable ); Visual Basic .NET Declare Function CmSetPowerButtonFilter Lib "ifcpmgr.dll"(_ ByVal Enable As Integer _ )As Integer

Parameter Enable The parameter enables/disables the error protection filter of 1 second.

Specify either one of the values. Code Value Description

CM_FILTER_ENABLE 1h Enables the filter. CM_FILTER_DISABLE 0h Disables the filter.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comment The setting is stored in the internal non-volatile memory and retained while the system is turned off. The setting is applied when the system starts the next time

Page 45: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

45

Example

Enabling 1 second error protection filter C UINT Ret; Ret = CmSetPowerButtonFilter(CM_FILTER_ENABLE);

Visual Basic Dim Ret As Long Ret = CmSetPowerButtonFilter(CM_FILTER_ENABLE)

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmSetPowerButtonFilter(IFCCPMGR.CM_FILTER_ENABLE);

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmSetPowerButtonFilter(IFCCPMGR.CM_FILTER_ENABLE)

Page 46: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

46

4.1.17 CmGetPowerButtonFilter Description

The CmGetPowerButtonFilter function retrieves the settings of 1 second error protection filter of the power button. The function is applicable only to the Core i7/Celeron models.

Syntax C UINT CmGetPowerButtonFilter ( UINT* pEnable ); Visual Basic Declare Function CmGetPowerButtonFilter Lib "ifcpmgr.dll"( _ ByRef pEnable As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetPowerButtonFilter ( ref uint pEnable ); Visual Basic .NET Declare Function CmGetPowerButtonFilter Lib "ifcpmgr.dll"(_ ByRef pEnable As Integer _ )As Integer

Parameter pEnable The parameter points to a variable to receive the status (enable/disable) of the 1 second error

protection filter. A value set by the CmSetPowerButtonFilter is retrieved.

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Page 47: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

47

Example

Retrieving the status of 1 second error protection filter C UINT Ret; UINT Enable; Ret = CmGetPowerButtonFilter(&Enable);

Visual Basic Dim Ret As Long Dim Enable As Long Ret = CmGetPowerButtonFilter(Enable)

Visual C# .NET uint Ret; uint Enable; Ret = IFCCPMGR.CmGetPowerButtonFilter(out Enable);

Visual Basic .NET Dim Ret As Integer Dim Enable As Integer Ret = IFCCPMGR.CmGetPowerButtonFilter(Enable)

Page 48: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

48

4.1.18 CmSetLedConfig Description

The CmGetLedConfig function configures blinking conditions of the LED for error indication. The function is applicable only to Core i7/Celeron models.

Syntax C UINT CmSetLedConfig ( UINT* Enable ); Visual Basic Declare Function CmSetLedConfig Lib "ifcpmgr.dll"( _ ByVal Enable As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetLedConfig ( Uint Enable ); Visual Basic .NET Declare Function CmSetLedConfig Lib "ifcpmgr.dll"(_ ByVal Enable As Integer _ )As Integer

Parameter Enable The parameter specifies blinking conditions of the LED .

Specify values from the following table. One or more values can be ORed. Code Value Description

CM_EVENT_LCTHS 8h A temperature of the PCB goes over the upper limit.

CM_EVENT_LCTLS 10h A temperature of the PCB goes below the lower limit.

CM_EVENT_CFANST 10000000h The CPU fan has an error.* * The code is applicable only to the products with a CPU fan.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comment The setting is stored in the internal non-volatile memory and retained while the system is turned off. The setting is applied when the system starts the next time

Page 49: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

49

Example

Setting the LED to blink when a temperature of the PCB goes over the upper-limit temperature C UINT Ret; Ret = CmSetLedConfig(CM_EVENT_LCTHS);

Visual Basic Dim Ret As Long Ret = CmSetLedConfig(CM_EVENT_LCTHS)

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmSetLedConfig(IFCCPMGR.CM_EVENT_LCTHS);

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmSetLedConfig(IFCCPMGR.CM_EVENT_LCTHS)

Page 50: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

50

4.1.19 CmGetLedConfig Description

The CmGetLedConfig function retrieves blinking conditions of the LED. The function is applicable only to Core i7/Celeron model.

Syntax C UINT CmGetLedConfig ( UINT* pEnable ); Visual Basic Declare Function CmGetLedConfig Lib "ifcpmgr.dll"( _ ByRef pEnable As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetLedConfig ( ref uint pEnable ); Visual Basic .NET Declare Function CmGetLedConfig Lib "ifcpmgr.dll"(_ ByRef pEnable As Integer _ )As Integer

Parameter pEnable The parameter points to a variable to receive blinking conditions of the LED. A value

specified by the CmSetLedConfig function is retrieved.

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Page 51: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

51

Example

Retrieving blinking conditions of the LED C UINT Ret; UINT Enable; Ret = CmGetLedConfig(&Enable);

Visual Basic Dim Ret As Long Dim Enable As Long Ret = CmGetLedConfig(Enable)

Visual C# .NET uint Ret; uint Enable; Ret = IFCCPMGR.CmGetLedConfig(out Enable);

Visual Basic .NET Dim Ret As Integer Dim Enable As Integer Ret = IFCCPMGR.CmGetLedConfig(Enable)

Page 52: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

52

4.1.20 CmGetUnitFanStatus Description

The CmGetUnitFanStatus function retrieves statuses of the chassis fans. The function is applicable only to Long-Term Supply Industrial Controller Atom N2800 and Core i7/Celeron models. Refer to “2.1 Functional Specifications” for details.

Syntax

C UINT CmGetUnitFanStatus ( UINT* pStatus, UINT Count );

Visual Basic Declare Function CmGetUnitFanStatus Lib "ifcpmgr.dll" ( _ ByRef pStatus As Long, _ ByVal Count As Long _ )As Long

Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetUnitFanStatus( uint[] pStatus, uint Count );

Visual Basic .NET Declare Function CmGetUnitFanStatus Lib "ifcpmgr.dll" (_ ByVal pStatus() As Integer, _ ByVal Count As Integer _ )As Integer

Parameter

pStatus The parameter points to an array to receive statuses of the chassis fans. Array Description

pStatus[0] Exhaust fan in a 7-slot unit (short-size/full size) or exhaust fan 1 in a 9-slot unit (short-size/full size)

pStatus[1] Exhaust fan 2 in a 9-slot unit (short-size/full-size) or exhaust fan 1 in a 13-slot unit (short-size/full-size)

pStatus[2] Exhaust fan 2 in a 13-slot unit (short-size/full-size) pStatus[3] Fan in a 4-slot unit (short-size)

Each element is 1 while the fan is in operation and 0 when the fan stops or is not connected.

Count Reserved. Specify 4.

Page 53: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

53

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID PARAMETER C0000002h Input invalid parameter IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Comment Use appropriate elements of the array according to your system. For example, if you use a 13-slot unit, monitor only element 1 (exhaust fan 1) and element 2 (exhaust fan 2) of the array.

Example

Retrieving the current status of chassis fan C UINT Ret; UINT Status[4]; Ret = CmGetUnitFanStatus(&Status[0], 4);

Visual Basic Dim Ret As Long Dim Status(3) As Long Ret = CmGetUnitFanStatus(Status(0), 4)

Visual C# .NET uint Ret; uint[] Status = new uint[4]; Ret = IFCCPMGR.CmGetUnitFanStatus(Status, 4);

Visual Basic .NET Dim Ret As Integer Dim Status(3) As Integer Ret = IFCCPMGR.CmGetUnitFanStatus(Status(0), 4)

Page 54: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

54

4.1.21 CmGetPsmId Description

The CmGetPsmId function retrieves IDs of slot-in power supply modules. The function is applicable only when the slot-in power supply modules are used.

Syntax C UINT CmGetPsmId ( UINT* pModuleId, UINT Count ); Visual Basic Declare Function CmGetPsmId Lib "ifcpmgr.dll" ( _ ByRef pModuleId As Long, _ ByVal Count As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetPsmId( uint[] pModuleId, uint Count ); Visual Basic .NET Declare Function CmGetPsmId Lib "ifcpmgr.dll" ( _ ByVal pModuleId() As Integer, _ ByVal Count As Integer _ )As Integer

Parameter pModuleId The parameter points to an array to receive IDs of slot-in power supply modules. IDs

of the number specified by Count are retrieved. Array element Description

pModuleId[0] ID of the slot-in power supply module installed in the P1 slotpModuleId[1] ID of the slot-in power supply module installed in the P2 slotpModuleId[2] ID of the slot-in power supply module installed in the P3 slotpModuleId[3] ID of the slot-in power supply module installed in the P4 slotpModuleId[4] ID of the slot-in power supply module installed in the P5 slotpModuleId[5] ID of the slot-in power supply module installed in the P6 slot

The slot positions for the slot-in power supply modules are defined as P1, P2… from the left.

Page 55: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

55

The IDs are defined as follows

ID Model Description 05h JPS-2057 +12 Vdc input module (isolated, 80 W) 06h JPS-2055 + 24 Vdc input module (isolated, 80 W) 08h JPS-2101 ATX output module (100 W) 09h JPS-2001 100 Vac/200 Vac input module (isolated, 130 W) 0Ah JPS-2053 +100 Vdc input module (isolated, 130 W) 0Bh JPS-2051 +48 Vdc input module (isolated, 130 W) 0Ch JPS-1059 +12~ +24 Vdc input module (non-isolated, 130 W) 0Dh JPS-105701 +12 Vdc input module for +12 Vdc power supply bus

(non-isolated, 50 W) 0Eh JPS-105501

JPS-205501

+24 Vdc input module (non-isolated, 150 W) +24 Vdc input module (isolated,150 W) * JPS-105501 and JPS-205501 have the same ID.

0Fh Uninstalled No slot-in power supply module is installed. Count The parameter specifies the number of IDs to retrieve. The maximum value is 6. For

example, if you specify 4, 4 IDs are stored in pModuleId[0] through pModuleId[3]. Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID PARAMETER C0000002h Input invalid parameter IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving IDs of slot-in power supply modules C UINT Ret; UINT ModuleId[4]; Ret = CmGetPsmId(&ModuleId[0], 4);

Visual Basic Dim Ret As Long Dim ModuleId(3) As Long Ret = CmGetPsmId(ModuleId(0), 4)

Visual C# .NET uint Ret; uint[] ModuleId = new uint[4]; Ret = IFCCPMGR.CmGetPsmId(ModuleId, 4);

Visual Basic .NET Dim Ret As Integer Dim ModuleId(3) As Integer Ret = IFCCPMGR.CmGetPsmId(ModuleId(0), 4)

Page 56: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

56

4.1.22 CmGetPsmStatus Description

The CmGetPsmStatus function retrieves statuses of slot-in power supply modules. The function is applicable only when the slot-in power supply modules are used.

Syntax C UINT CmGetPsmStatus ( UINT* pStatus, UINT Count ); Visual Basic Declare Function CmGetPsmStatus Lib "ifcpmgr.dll" ( _ ByRef pStatus As Long, _ ByVal Count As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetPsmStatus( uint[] pStatus, uint Count ); Visual Basic .NET Declare Function CmGetPsmStatus Lib "ifcpmgr.dll" (_ ByVal pStatus() As Integer, _ ByVal Count As Integer _ )As Integer

Parameter pStatus The parameter points to an array to receive statuses of slot-in power supply modules.

IDs whose count is specified by Count are retrieved. Array element Description pStatus[0] Status of a slot-in power supply module installed in the P1 slot pStatus[1] Status of a slot-in power supply module installed in the P2 slot pStatus[2] Status of a slot-in power supply module installed in the P3 slot pStatus[3] Status of a slot-in power supply module installed in the P4 slot pStatus[4] Status of a slot-in power supply module installed in the P5 slot pStatus[5] Status of a slot-in power supply module installed in the P6 slot

The slot positions for the slot-in power supply modules are defined as P1, P2… from the left

The following values are stored in each element when an error is detected. When no errors are detected, 0 is stored in each element. One or more values may be ORed.

Code Value Description CM_PSM_STATUS_DEG 01h Alarm (The ALM signal is detected.) CM_PSM_STATUS_FAL 02h Fail (The FAIL signal is detected)

Page 57: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

57

Count The parameter specifies the number of statuses to retrieve. The maximum value is 6.

For example, if you specify 4, 4 statuses are stored in pStatus[0] through pStatus[3]. Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID PARAMETER C0000002h Input invalid parameter IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving statuses of slot-in power supply modules. C UINT Ret; UINT Status[4]; Ret = CmGetPsmStatus(&Status[0], 4);

Visual Basic Dim Ret As Long Dim Status(3) As Long Ret = CmGetPsmStatus(Status(0), 4)

Visual C# .NET uint Ret; uint[] Status = new uint[4]; Ret = IFCCPMGR.CmGetPsmStatus(Status, 4);

Visual Basic .NET Dim Ret As Integer Dim Status(3) As Integer Ret = IFCCPMGR.CmGetPsmStatus(Status(0), 4)

Page 58: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

58

4.1.23 CmGetBatInfo Description

The CmGetBatInfo function retrieves information of the battery module. The function is applicable only when the battery module is used.

Syntax C UINT CmGetBatInfo ( PCM_BAT_INFO pInfo ); Visual Basic Declare Function CmGetBatInfo Lib "ifcpmgr.dll" ( _ ByRef pInfo As CM_BAT_INFO _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetBatInfo( out CM_BAT_INFO pInfo ); Visual Basic .NET Declare Function CmGetBatInfo Lib "ifcpmgr.dll" (_ ByRef pInfo As CM_BAT_INFO _ )As Integer

Parameter pInfo The parameter points to a variable to receive information of the battery module.

Refer to “4.3.2 CM_BAT_INFO”.

Return Values This function returns the following return values.

Code Value Description IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Page 59: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

59

Example

Retrieving information of the battery module C UINT Ret; CM_BAT_INFO Info; Ret = CmGetBatInfo(&Info);

Visual Basic Dim Ret As Long Dim Info As CM_BAT_INFO Ret = CmGetBatInfo(Info)

Visual C# .NET uint Ret; IFCCPMGR.CM_BAT_INFO Info = new IFCCPMGR.CM_BAT_INFO(); Ret = IFCCPMGR.CmGetBatInfo(out Info);

Visual Basic .NET Dim Ret As Integer Dim Info As IFCCPMGR.CM_BAT_INFO = New IFCCPMGR.CM_BAT_INFO() Ret = IFCCPMGR.CmGetBatInfo(Info)

Page 60: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

60

4.1.24 CmGetBatHistory Description

The CmGetBatHistory function retrieves a history of the battery module. The function is applicable only when the battery module is used.

Syntax C UINT CmGetBatHistory ( PCM_BAT_HISTORY pHistory ); Visual Basic Declare Function CmGetBatHistory Lib "ifcpmgr.dll" ( _ ByRef pHistory As CM_BAT_HISTORY _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetBatHistory( out CM_BAT_HISTORY pHistory ); Visual Basic .NET Declare Function CmGetBatHistory Lib "ifcpmgr.dll" (_ ByRef pHistory As CM_BAT_HISTORY _ )As Integer

Parameter

pHistory The parameter points to a variable to receive a history of the battery module. Refer to “4.3.3 CM_BAT_HISTORY”.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Page 61: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

61

Example

Retrieving a history of the battery module C UINT Ret; CM_BAT_HISTORY History; Ret = CmGetBatHistory(&History);

Visual Basic Dim Ret As Long Dim History As CM_BAT_HISTORY Ret = CmGetBatHistory(History)

Visual C# .NET uint Ret; IFCCPMGR.CM_BAT_HISTORY History = new IFCCPMGR.CM_BAT_HISTORY(); Ret = IFCCPMGR.CmGetBatHistory(out History);

Visual Basic .NET Dim Ret As Integer Dim Info As IFCCPMGR.CM_BAT_HISTORY = New IFCCPMGR.CM_BAT_HISTORY() Ret = IFCCPMGR.CmGetBatHistory(History)

Page 62: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

62

4.1.25 CmGetBatStatus Description

The CmGetBatStatus function retrieves statuses of the battery module. The function is applicable only when the battery module is used.

Syntax C UINT CmGetBatStatus ( UINT* pStatus ); Visual Basic Declare Function CmGetBatStatus Lib "ifcpmgr.dll" ( _ ByRef pStatus As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetBatStatus( out uint pStatus ); Visual Basic .NET Declare Function CmGetBatStatus Lib "ifcpmgr.dll" (_ ByRef pStatus As Integer _ )As Integer

Parameter pStatus The parameter points to a variable to receive statuses of the battery module.

When the content of a bit is 1, the corresponding status is detected. Ignore the reserved bits.

Bit Description 0 Reserved 1 Reserved 2 Reserved 3 Reserved 4 The battery is charging. 5 The battery is fully charged 6 It is during power failure 7 Reserved 8 Reserved 9 Reserved

10 An error occurred during self-diagnostics 11 Discharge error occurred. 12 Battery temperature error occurred. 13 Reserved 14 Charge error occurred. 15 Reserved

16~23 Reserved 24~31 Reserved

Page 63: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

63

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving statuses of the battery module C UINT Ret; UINT Status; Ret = CmGetBatStatus(&Status);

Visual Basic Dim Ret As Long Dim Status As Long Ret = CmGetBatStatus(Status)

Visual C# .NET uint Ret; uint Status; Ret = IFCCPMGR.CmGetBatStatus(out Status);

Visual Basic .NET Dim Ret As Integer Dim Status As Integer Ret = IFCCPMGR.CmGetBatStatus(Status)

Page 64: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

64

4.1.26 CmGetBatDiagStatus Description

The CmGetBatDiagStatus function retrieves statuses of self-diagnostics of the battery module. The function is applicable only to a battery module.

Syntax

C UINT CmGetBatDiagStatus ( UINT* pStatus ); Visual Basic Declare Function CmGetBatDiagStatus Lib "ifcpmgr.dll" ( _ ByRef pStatus As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetBatDiagStatus( out uint pStatus ); Visual Basic .NET Declare Function CmGetBatDiagStatus Lib "ifcpmgr.dll" (_ ByRef pStatus As Integer _ )As Integer

Parameter pStatus The parameter points to a variable to receive statuses of self-diagnostics of the battery

module. When the content of a bit is 1, the corresponding status is detected. Ignore the reserved bits.

Bit Description 0 Increase of internal resistance is detected. 1 Reserved 2 Unbalance is detected during charge 3 Cell-unbalance is detected during discharge. 4 Reserved 5 The battery capacity at full charge decreases to less than 50 % of the

initial capacity. 6 Reserved 7 Reserved 8 Reserved 9 Reserved

10 An internal error is detected. 11 Reserved 12 An internal error is detected. 13 An internal error is detected. 14 Reserved 15 Reserved

16~23 Reserved 24~31 Reserved

Page 65: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

65

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Example Retrieving statuses of self-diagnostics of the battery module C UINT Ret; UINT Status; Ret = CmGetBatDiagStatus(&Status);

Visual Basic Dim Ret As Long Dim Status As Long Ret = CmGetBatDiagStatus(Status)

Visual C# .NET uint Ret; uint Status; Ret = IFCCPMGR.CmGetBatDiagStatus(out Status);

Visual Basic .NET Dim Ret As Integer Dim Status As Integer Ret = IFCCPMGR.CmGetBatDiagStatus(Status)

Page 66: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

66

4.1.27 CmSetBatOsOffConfig Description

The CmSetBatOSOffConfig function configures a condition how the battery module terminates the operating system. The function is applicable only when the battery module is used.

Syntax

C UINT CmSetBatOsOffConfig ( UINT OsOff, UINT OffType ); Visual Basic Declare Function CmSetBatOsOffConfig Lib "ifcpmgr.dll" ( _ ByVal OsOff As Long, _ ByVal OffType As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetBatOsOffConfig( uint OsOff, uint OffType ); Visual Basic .NET Declare Function CmSetBatOsOffConfig Lib "ifcpmgr.dll" (_ ByVal OsOff As Integer, _ ByVal OffType As Integer _ )As Integer

Parameter

OsOff The parameter specifies an interval time from when power failure begins to when the battery module requests termination of the operating system. The unit of time is second. Specify a type of termination in OffType. The interval time ranges from 0 through 3600. When 0 is specified, the operating system is not terminated. The default value is 0.

OffType The parameter specifies a type of termination that is performed when the interval time

elapses after the power failure begins. Value Description

0 Shuts down the operating system 1 Hibernates the operating system. (hibernation must be enabled )

The default value is 0.

Page 67: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Caution!

If the operating system disables hibernation, the operating system will be shut down when the hibernation is requested.

Example

Shutting down the operating system in 60 seconds after power failure. C UINT Ret; Ret = CmSetBatOsOffConfig(60, 0);

Visual Basic Dim Ret As Long Ret = CmSetBatOsOffConfig(60, 0)

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmSetBatOsOffConfig(60, 0);

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmSetBatOsOffConfig(60, 0)

Copyright 2010, 2015 Interface Corporation. All rights reserved.

67

Page 68: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

68

4.1.28 CmGetBatOsOffConfig Description

The CmGetBatOsOffConfig function retrieves a condition how the battery module terminates the operating system. The function is applicable only to the battery module.

Syntax

C UINT CmGetBatOsOffConfig ( UINT* pOsOff, UINT* pOffType ); Visual Basic Declare Function CmGetBatOsOffConfig Lib "ifcpmgr.dll" ( _ ByRef pOsOff As Long, _ ByRef pOffType As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetBatOsOffConfig( out uint pOsOff, out uint pOffType ); Visual Basic .NET Declare Function CmGetBatOsOffConfig Lib "ifcpmgr.dll" (_ ByRef pOsOff As Integer, _ ByRef pOffType As Integer _ )As Integer

Parameter pOsOff The parameter points to variable to receive an interval time from when power failure

occurs to when the battery module requests termination of the operating system. The unit of the time is second.

pOffType The parameter points to a variable to receive a type of termination that is performed

when the interval time elapses after the power failure begins The value configured by the CmSetBatOsOffConfig function can be retrieved.

Page 69: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

69

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0. Example

Retrieving the duration time and the method of termination of the operating system C UINT Ret; UINT OsOff; UINT OffType; Ret = CmGetBatOsOffConfig(&OsOff, &OffType);

Visual Basic Dim Ret As Long Dim OsOff As Long Dim OffType As Long Ret = CmGetBatOsOffConfig(OsOff, OffType)

Visual C# .NET uint Ret; uint OsOff; uint OffType; Ret = IFCCPMGR.CmGetBatOsOffConfig(out OsOff, out OffType);

Visual Basic .NET Dim Ret As Integer Dim OsOff As Integer Dim OffType As Integer Ret = IFCCPMGR.CmGetBatOsOffConfig(OsOff, OffType)

Page 70: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

4.1.29 CmSetBatOffTime Description

The CmSetBatOffTime function configures a condition to stop discharge of the battery module. The function is applicable only when the battery module is used.

Syntax

C UINT CmSetBatOffTime ( UINT BatOff ); Visual Basic Declare Function CmSetBatOffTime Lib "ifcpmgr.dll" ( _ ByVal BatOff As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmSetBatOffTime( uint BatOff ); Visual Basic .NET Declare Function CmSetBatOffTime Lib "ifcpmgr.dll" (_ ByVal BatOff As Integer _ )As Integer

Parameter

BatOff The parameter specifies an interval time from when a power failure occurs (discharge of the battery module starts) to when discharge of the battery module forcibly turned off. The unit of the interval time is second. The interval time ranges from 0 to 3600. When 0 is specified, battery discharge is immediately stopped.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_INVALID_PARAMETER C0000002h Invalid input parameter IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Caution!

After power failure occurs, system configuration information or files may be corrupted if discharge of the battery stops before post-processings of programs are successfully completed or the system is properly shut down.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

70

Page 71: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

71

Example

Stopping discharge of the battery module in 120 seconds after a power failure. C UINT Ret; Ret = CmSetBatOffTime(120);

Visual Basic Dim Ret As Long Ret = CmSetBatOffTime(120)

Visual C# .NET uint Ret; Ret = IFCCPMGR.CmSetBatOffTime(120);

Visual Basic .NET Dim Ret As Integer Ret = IFCCPMGR.CmSetBatOffTime(120)

Page 72: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

72

4.1.30 CmGetBatOffTime Description

The CmGetBatOffTime function retrieves a condition to stop discharge of the battery module. The function is applicable only when the battery module is used.

Syntax

C UINT CmGetBatOffTime ( UINT* pBatOff ); Visual Basic Declare Function CmGetBatOffTime Lib "ifcpmgr.dll" ( _ ByRef pBatOff As Long _ )As Long Visual C# .NET [DllImport("ifcpmgr.dll")] public static extern uint CmGetBatOffTime( out uint pBatOff ); Visual Basic .NET Declare Function CmGetBatOffTime Lib "ifcpmgr.dll" (_ ByRef pBatOff As Integer _ )As Integer

Parameter

pBatOff The parameter points to a variable to receive an interval time from when a power failure occurs (discharge of the battery module starts) to when discharge of the battery module forcibly turned off. The unit of the time is second.

Return Values

This function returns the following return values. Code Value Description

IFCM_ERROR_SUCCESS 0 Successful completion IFCM_ERROR_INTERNAL C0000001h Internal error IFCM_ERROR_NULL_POINTER C0000005h NULL pointer detection IFCM_ERROR_INVALID_HANDLE C0000007h Internal error IFCM_ERROR_NOT_SUPPORT C0000008h Not supported

Refer to “4.4 Return Values” for details if the function returns a value other than 0.

Page 73: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

73

Example

Retrieving an interval time between a power failure and stopping discharge of the battery module. C UINT Ret; UINT OffTime; Ret = CmGetBatOffTime(&OffTime);

Visual Basic Dim Ret As Long Dim OffTime As Long Ret = CmGetBatOffTime(OffTime)

Visual C# .NET uint Ret; uint OffTime; Ret = IFCCPMGR.CmGetBatOffTime(out OffTime);

Visual Basic .NET Dim Ret As Integer Dim OffTime As Integer Ret = IFCCPMGR.CmGetBatOffTime(OffTime)

Page 74: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

74

4.2 Callback Functions Description

The callback function is supported only in C.

Syntax C void CALLBACK UserCallBack( PVOID User );

Parameter

User The parameter specifies a user parameter The value specified by the User member of the CM_EVENT_REQ structure is passed to this parameter. Refer to “4.3.1 CM_EVENT_REQ” for details.

Example

Refer to “3.3.6 Interrupt Event” for details.

Page 75: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

75

4.3 Structure 4.3.1 CM_EVENT_REQ

The CM_EVENT_REQ structure is used to register interrupt events.

C typedef struct _CM_EVENT_REQ{

HANDLE Signal; HWND Wnd; UINT Msg; LPCMCALLBACK CallBackProc;

PVOID User; } CM_EVENT_REQ, *PCM_EVENT_REQ;

Visual Basic Type CM_EVENT_REQ

Signal As Long Wnd As Long Msg As Long CallBackProc As Long

User As Long End Type

Visual C# .NET [StructLayout(LayoutKind.Sequential)] public struct CM_EVENT_REQ {

public IntPtr Signal; putlic IntPtr Wnd; public int Msg; public IntPtr CallBackProc;

putlib IntPtr User; }

Visual Basic .NET <StructLayout(LayoutKind.Sequential)> Structure CM_EVENT_REQ

Dim Signal As IntPtr Dim Wnd As IntPtr Dim Msg As Integer Dim CallBackProc As IntPtr

Dim User As IntPtr End Structure

Page 76: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

76

Member Description

Signal The member specifies a handle of an event object that is signaled when an interrupt event is generated. If you do not use any event objects, specify NULL for C, 0 for Visual Basic, and IntPtr.Zero for Visual C# .NET and Visual Basic .NET.

Wnd The member specifies a handle of a window to which a message specified by the

Msg member is posted. If you do not use messaging, specify NULL for C, 0 for Visual Basic, and IntPtr.Zero for Visual C# .NET and Visual Basic .NET.

Msg The member specifies a message code to be sent when an interrupt event is

generated. If you do not use message post, specify WM_NULL for C, and 0 for Visual Basic, Visual C# .NET, and Visual Basic .NET.

CallBackProc The member points to a callback function to be called when an interrupt event is

generated. The callback function is supported only in C. Specify 0 for Visual Basic, and IntPtr.Zero for Visual C# .NET and Visual Basic .NET. When you do not use the callback function in C, specify NULL.

User Specifies a user data to be passed to the callback function. The specified data is the

first argument of the callback function. Specify 0 for Visual Basic, and IntPtr.Zero for Visual C# .NET and Visual Basic .NET.

Page 77: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

77

4.3.2 CM_BAT_INFO The CM_BAT_INFO structure is used to retrieve information of the battery module.

C typedef struct _CM_BAT_INFO{ float Temp; float Voltage; int Current; int AvgCurrent; UINT RelCharge; UINT FullCapacity; UINT DesignCapacity; float PowerTemp;

UINT RelPower; } CM_BAT_INFO, *PCM_BAT_INFO;

Visual Basic Type CM_BAT_INFO Temp As Single Voltage As Single Current As Long AvgCurrent As Long RelCharge As Long FullCapacity As Long DesignCapacity As Long PowerTemp As Single

RelPower As Long End Type

Visual C# .NET [StructLayout(LayoutKind.Sequential)] public struct CM_BAT_INFO { public float Temp; public float Voltage; public int Current; public int AvgCurrent; public uint RelCharge; public uint FullCapacity; public uint DesignCapacity; public float PowerTemp;

public uint RelPower; }

Visual Basic .NET <StructLayout(LayoutKind.Sequential)> Structure CM_BAT_INFO Dim Temp As Single Dim Voltage As Single Dim Current As Integer Dim AvgCurrent As Integer Dim RelCharge As Integer Dim FullCapacity As Integer Dim DesignCapacity As Integer Dim PowerTemp As Single

Dim RelPower As Integer End Structure

Page 78: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

78

Member Description

Temp The member specifies the battery temperature. The unit is degrees C. Voltage The member specifies a measured voltage of the battery module.

The unit is V. Current The member specifies a measured current of the battery module. The unit is mA.

When the battery module discharges, the sign of current is negative. AvgCurrent The member specifies an average of measured current of the battery module.

The unit is mA. When the battery module discharges, the sign of current is negative.

RelCharge The member specifies a charge level of the battery module. The unit is %. It is a

relative value to FullCapacity. FullCapacity The member specifies a learning capacity of the battery module. The unit is

mAh. The value is the maximum capacity that the battery module can have at this time in consideration of the learning result of discharge, lifetime, and so on.

DesignCapacity The member specifies the nominal capacity of the battery module. The unit is

mAh. PowerTemp Reserved. Ignore the value. RelPower Reserved. Ignore the value.

Page 79: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

79

4.3.3 CM_BAT_HISTORY The CM_BAT_HISTORY structure is used to retrieve a history of the battery module.

C typedef struct _CM_BAT_HISTORY{ UINT TotalRunTime; UINT DisCount; UINT DisCapacity; UINT Temp_10; UINT Temp10_19; UINT Temp20_29; UINT Temp30_39; UINT Temp40_49; UINT Temp50_59; UINT Temp60_69;

UINT Temp70_; } CM_BAT_HISTORY, *PCM_BAT_HISTORY; Visual Basic Type CM_BAT_HISTORY TotalRunTime As Long DisCount As Long DisCapacity As Long Temp_10 As Long Temp10_19 As Long Temp20_29 As Long Temp30_39 As Long Temp40_49 As Long Temp50_59 As Long Temp60_69 As Long

Temp70_ As Long End Type

Visual C# .NET [StructLayout(LayoutKind.Sequential)] public struct CM_BAT_HISTORY { public uint TotalRunTime; public uint DisCount; public uint DisCapacity; public uint Temp_10; public uint Temp10_19; public uint Temp20_29; public uint Temp30_39; public uint Temp40_49; public uint Temp50_59; public uint Temp60_69;

public uint Temp70_; }

Page 80: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

80

Visual Basic .NET <StructLayout(LayoutKind.Sequential)> Structure CM_BAT_HISTORY Dim TotalRunTime As Integer Dim DisCount As Integer Dim DisCapacity As Integer Dim Temp_10 As Integer Dim Temp10_19 As Integer Dim Temp20_29 As Integer Dim Temp30_39 As Integer Dim Temp40_49 As Integer Dim Temp50_59 As Integer Dim Temp60_69 As Integer

Dim Temp70_ As Integer End Structure

Member Description

TotalRunTime The member shows the total operating time of the battery module. The unit is hour (h).

DisCount The member shows the number of power failures. The count increases when the battery recovers from power failure.

DisCapacity The member shows discharging capacity when power failure occurs. The unit is mAh. The value increases while the battery is discharging. When the battery becomes charged status, the value shows a total discharge capacity of the last power failure.

Temp_10 The member shows the accumulated time while a temperature T of the battery module satisfies that T < 10 degrees C. The unit is hour (h).

Temp10_19 The member shows the accumulated time while a temperature T of the battery module satisfies that 10 <= T <20 degrees C. The unit is hour (h).

Temp20_29 The member shows the accumulated time while a temperature T of the battery module satisfies that 20 <= T <30 degrees C. The unit is hour (h).

Temp30_39 The member shows the accumulated time while a temperature T of the battery module satisfies that 30 <= T <40 degrees C. The unit is hour (h).

Temp40_49 The member shows the accumulated time while a temperature T of the battery module satisfies that 40 <= T <50 degrees C. The unit is hour (h).

Temp50_59 The member shows the accumulated time while a temperature T of the battery module satisfies that 50 <= T <60 degrees C. The unit is hour (h).

Temp60_69 The member shows the accumulated time while a temperature T of the battery module satisfies that 60 <= T <70 degrees C. The unit is hour (h).

Temp70_ The member shows the accumulated time while a temperature T of the battery module satisfies that 70 degrees C <= T. The unit is hour (h).

Page 81: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

81

4.4 Return Values Error Code Value Description Comments/Solutions

IFCM_ERROR_SUCCESS 0 Successful completion - IFCM_ERROR_INTERNAL C0000001h

(-1073741823)Internal error Internal error during hardware

control. Contact and tell us how the error occurred.

IFCM_ERROR_INVALID _PARAMETER

C0000002h (-1073741822)

Invalid input parameter Check the configurable range to configure parameters.

IFCM_ERROR_ALREADY C0000003h (-1073741821)

- WDT has already been in operation.

- Events have already been registered.

- Execute while WDT stops. - Execute under the condition

that any events are not registered.

IFCM_ERROR_NOT_YET C0000004h (-1073741820)

- WDT has not been in operation yet.

- Any events have not registered yet.

- Execute while WDT is working.

- Execute under the condition that events are registered.

IFCM_ERROR_NULL_POINTER C0000005h (-1073741819)

NULL pointer detection

NULL is passed to the argument. Specify a valid variable.

IFCM_ERROR_NOT_ALLOCATE C0000006h (-1073741818)

Memory allocation failed.

Refrain from consuming memory space.

IFCM_ERROR_INVALID _HANDLE

C0000007h (-1073741817)

Internal error Internal error during initializing DLL. Check that IFCPMGR is running normally with Device Manager.

IFCM_ERROR_NOT_SUPPORT C0000008h (-1073741816)

Not supported The function is not supported. Refer to the manual to check the function is supported or “2.1 Functional Specifications”.

Page 82: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

82

Chapter 5 Reference for Pentium M/Celeron M Model 5.1 List of DLL Function

This software contains the following functions. Available functions differ depending on product models.

No. Function Description A *1 B *1 C *1 D *1 E *1 <CPU control > 1 IfCpuSetCpuClock Configures an operating

frequency of the CPU. ○ ○*2 ○ ○ ○

2 IfCpuGetCpuClock Retrieves an operating frequency of the CPU. ○ ○*2 ○ ○ ○

3 IfCpuSetCpuClkDuty Configures a clock duty ratio of the CPU ○ ○ ○ ○ ○

4 IfCpuGetCpuClkDuty Retrieves a clock duty ratio of the CPU ○ ○ ○ ○ ○

<RAS control> 5 IfRasGetCpuTmp Measures a temperature of the

CPU. ○ ○ ○ ○ ○

6 IfRasGetVolt3 Measures a voltage of the bus (+3.3 Vdc). ○ ○ - ○ -

7 IfRasGetVolt5 Measures a voltage of the bus (+5 Vdc). ○ ○ - ○ -

8 IfRasGetVolt12 Measures a voltage of the bus (+12 Vdc). ○ ○ - - -

9 IfRasWdtEnable Enables the WDT ○ ○ ○ ○ ○ 10 IfRasWdtClear Clears the WDT ○ ○ ○ ○ ○ 11 IfRasWdtDisable Disables the WDT ○ ○ ○ ○ ○ 12 IfChipGetCounterIC

H4

Retrieves a count value of the counter on the chipset. ○ ○ ○ ○ ○

<Slot-in Power Supply module > 13 IfPsmGetModuleId Retrieves IDs of slot-in power

supply modules installed in the power supply backplane.

○ - ○ - ○

14 IfPsmGetStatus Retrieves statuses of slot-in power supply modules installed in the power supply backplane.

○ - ○ - ○

Note: *1 ○: Supported -: Not supported A: Long-Term Supply Industrial Controller Atom N2800 model B: Long-Term Supply Industrial Controller Atom model (N2800 excluded) C: Long-Term Supply Industrial Controller Core i7/Celeron models D: Slot-in Industrial Controller Atom model E: Slot-in Industrial Controller Core i7/Celeron model *2 These functions are not available in the Atom D525 model.

Page 83: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

83

5.1.1 IfCpuSetCpuClock Description

The IfCpuSetCpuClock function configures an operating frequency of the CPU (the SpeedStep function). This function is not supported in the Atom D525 models.

Syntax C BOOL IfCpuSetCpuClock( int stepno ); Visual Basic Declare Function IfCpuSetCpuClock Lib "IFWINCRP.DLL"( _ ByVal stepno As Long, _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfCpuSetCpuClock( int stepno ); Visual Basic .NET Declare Function IfCpuSetCpuClock Lib "ifwincrp.dll"(_ ByVal stepno As Integer, _ )As Boolean

Parameters stepno The parameter specifies a step number.

CPU Operating Frequency (unit: GHz) Step Number ATOM

N2800 Atom N450

AtomZ530

Core i7 620UE

Core i7 610E

Core i5 520E

Celeron P4505

CeleronU3405

0 1.862 1.66 1.60 0.667 1.197 1.197 0.931 0.6651 0.798 0.996 0.800 0.798 1.330 1.330 1.064 0.7982 - - - 0.931 1.463 1.463 1.197 0.9313 - - - 1.064 1.596 1.596 1.330 1.0644 - - - - 1.729 1.729 1.463 - 5 - - - - 1.862 1.862 1.596 - 6 - - - - 1.995 1.995 1.729 - 7 - - - - 2.128 2.128 1.862 - 8 - - - - 2.261 2.261 - - 9 - - - - 2.394 2.394 - -

10 - - - - 2.527 - - -

Page 84: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

84

CPU Operating Frequency (unit: GHz) Step

Number Core i5 2515E

Core i7 3517UE

Celeron 807UE

Core i7 2610UE

0 0.800 0.800 0.800 0.800 1 0.900 0.900 0.900 0.900 2 1.000 1.000 1.000 1.000 3 1.100 1.100 - 1.100 4 1.200 1.200 - 1.200 5 1.300 1.300 - 1.300 6 1.400 1.400 - 1.400 7 1.500 1.500 - 1.500 8 1.600 1.600 - - 9 1.700 1.700 - -

10 1.800 1.800 - - 11 1.900 1.900 - - 12 2.000 2.000 - - 13 2.100 2.100 - - 14 2.200 2.200 - - 15 2.300 - - - 16 2.400 - - - 17 2.500 - - -

Return Values

This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_CPUINFO E0000001h CPU information retrieval error IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Comments

When a step number is out of the range, the function automatically selects the maximum available step number. For example, when 3 is specified to the step number for the Atom N450 CPU, the function automatically selects 1 as the step number.

Example Setting the CPU step number to 1. C BOOL Ret;

Ret = IfCpuSetCpuClock(1); Visual Basic Dim Ret As Long

Ret = IfCpuSetCpuClock(1) Visual C# .NET bool Ret;

Ret = IFCWINCRP.IfCpuSetCpuClock(1); Visual Basic .NET Dim Ret As Boolean

Ret = IFCWINCRP.IfCpuSetCpuClock(1)

Page 85: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

85

5.1.2 IfCpuGetCpuClock Description

The IfCpuGetCpuClock function retrieves an operating frequency of the CPU (the SpeedStep function).

Syntax C BOOL IfCpuGetCpuClock( int* hz ); Visual Basic Declare Function IfCpuGetCpuClock Lib "IFWINCRP.DLL"( _ ByRef hz As Long _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfCpuGetCpuClock( out int hz ); Visual Basic .NET Declare Function IfCpuGetCpuClock Lib "ifwincrp.dll"(_ ByRef hz As Integer _ )As Boolean

Parameters hz The parameter points to a variable to receive an operating frequency of the CPU.

The unit is MHz. The value may have an error that ranges a few MHz.

Return Values

This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_CPUINFO E0000001h CPU information retrieval error IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specified IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Page 86: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

86

Example

Retrieving the CPU frequency. C

BOOL Ret; int hz; Ret = IfCpuGetCpuClock(&hz);

Visual Basic Dim Ret As Long Dim hz As Long Ret = IfCpuGetCpuClock(hz)

Visual C# .NET bool Ret; int hz; Ret = IFCWINCRP.IfCpuGetCpuClock(out hz);

Visual Basic .NET Dim Ret As Boolean Dim hz As Integer Ret = IFCWINCRP.IfCpuGetCpuClock(hz)

Page 87: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

87

5.1.3 IfCpuSetCpuClkDuty The IfCpuSetCpuClkDuty function configures a clock duty ratio of the CPU.

Syntax C BOOL IfCpuSetCpuClkDuty( int dutyno ); Visual Basic Declare Function IfCpuSetCpuClkDuty Lib "IFWINCRP.DLL"( _ ByVal dudyno As Long, _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfCpuSetCpuClkDuty( int dutyno ); Visual Basic .NET Declare Function IfCpuSetCpuClkDuty Lib "ifwincrp.dll"(_ ByVal dutyno As Integer, _ )As Boolean

Parameter dutyno The parameter specifies a clock duty ratio of the CPU.

Value Description 1 12.5 % 2 25.0 % 3 37.5 % 4 50.0 % 5 62.5 % 6 75.0 % 7 87.5 % 8 100.0 %

If a specified value is out of the range, the function sets 8 (100 %).

Return Values This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Comment

For the Core i7 model, this function is available only when HT (hyper threading) is enabled.

Page 88: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

88

Example

Configuring the CPU clock duty ratio to 50 %. C BOOL Ret; Ret = IfCpuSetCpuClkDuty(4);

Visual Basic Dim Ret As Long Ret = IfCpuSetCpuClkDuty(4)

Visual C# .NET bool Ret; Ret = IFCWINCRP.IfCpuSetCpuClkDuty(4);

Visual Basic .NET Dim Ret As Boolean Ret = IFCWINCRP.IfCpuSetCpuClkDuty(4)

Page 89: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

89

5.1.4 IfCpuGetCpuClkDuty

Description The IfCpuGetCpuClkDuty function retrieves a clock duty ratio of the CPU.

Syntax C BOOL IfCpuGetCpuClkDuty( int* dutyno ); Visual Basic Declare Function IfCpuGetCpuClkDuty Lib "IFWINCRP.DLL"( _ ByRef dutyno As Long _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfCpuGetCpuClkDuty( out int dutyno ); Visual Basic Declare Function IfCpuGetCpuClkDuty Lib "ifwincrp.dll"(_ ByRef dutyno As Integer _ )As Boolean

Parameter dutyno The parameter points to a variable to receive a clock duty ratio of the CPU.

Value Description 1 12.5 % 2 25.0 % 3 37.5 % 4 50.0 % 5 62.5 % 6 75.0 % 7 87.5 % 8 100.0 %

Return Values

This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specification IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Comment

For the Core i7 model, this function is available only when HT (hyper threading) is enabled.

Page 90: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

90

Example

Retrieving clock duty ratio

C BOOL Ret; int dutyno; Ret = IfCpuGetCpuClkDuty(&dutyno);

Visual Basic Dim Ret As Long Dim dutyno As Long Ret = IfCpuGetCpuClkDuty(dutyno)

Visual C# .NET bool Ret; int dutyno; Ret = IFCWINCRP.IfCpuGetCpuClkDuty(out dutyno);

Visual Basic .NET Dim Ret As Boolean Dim dutyno As Integer Ret = IFCWINCRP.IfCpuGetCpuClkDuty(dutyno)

Page 91: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

91

5.1.5 IfRasGetCpuTmp Description

The IfRasGetCpuTmp function measures a temperature of the CPU.

Syntax C BOOL IfRasGetCpuTmp( float* temp ); Visual Basic Declare Function IfRasGetCpuTmp Lib "IFWINCRP.DLL"( _ ByRef temp As Single _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfRasGetCpuTmp( out float temp ); Visual Basic .NET Declare Function IfRasGetCpuTmp Lib "ifwincrp.dll"(_ ByRef temp As Single _ )As Boolean

Parameters temp The parameter points to a variable to receive a measured temperature of the

CPU (or CPU1 for Atom N2800, Atom D525 and Core i7/Celeron models).

Return Values This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_CPUTEMP E0000002h CPU temperature retrieval error IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specified IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Page 92: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

92

Example

Retrieving the CPU temperature C BOOL Ret; float temp; Ret = IfRasGetCpuTmp(&temp);

Visual Basic Dim Ret As Long Dim temp As Single Ret = IfRasGetCpuTmp(temp)

Visual C# .NET bool Ret; float temp; Ret = IFCWINCRP.IfRasGetCpuTmp(out temp);

Visual Basic .NET Dim Ret As Boolean Dim temp As Single Ret = IFCWINCRP.IfRasGetCpuTmp(temp)

Page 93: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

93

5.1.6 IfRasGetVolt3 The IfRasGetVolt3 function measures a voltage of the bus (+3.3 Vdc).

Syntax

C BOOL IfRasGetVolt3( float* volt ); Visual Basic Declare Function IfRasGetVolt3 Lib "IFWINCRP.DLL"( _ ByRef volt As Single _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfRasGetVolt3( out float volt ); Visual Basic .NET Declare Function IfRasGetVolt3 Lib "ifwincrp.dll"(_ ByRef volt As Single _ )As Boolean

Parameters volt The parameter points to a variable to receive a measured voltage of the bus (+3.3 Vdc).

Return Values

This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_BUSVOLT E0000004h Bus voltage retrieval error IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specified IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Page 94: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

94

Example

Retrieving the bus voltage (+3.3 Vdc) C BOOL Ret; float volt; Ret = IfRasGetVolt3(&volt);

Visual Basic Dim Ret As Long Dim volt As Single Ret = IfRasGetVolt3(volt)

Visual C# .NET bool Ret; float volt; Ret = IFCWINCRP.IfRasGetVolt3(out volt);

Visual Basic .NET Dim Ret As Boolean Dim volt As Single Ret = IFCWINCRP.IfRasGetVolt3(volt)

Page 95: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

95

5.1.7 IfRasGetVolt5 Description

The IfRasGetVolt5 function measures a voltage of the bus (+5 Vdc). Syntax

C BOOL IfRasGetVolt5( float* volt ); Visual Basic Declare Function IfRasGetVolt5 Lib "IFWINCRP.DLL"( _ ByRef volt As Single _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfRasGetVolt5( out float volt ); Visual Basic .NET Declare Function IfRasGetVolt5 Lib "ifwincrp.dll"(_ ByRef volt As Single _ )As Boolean

Parameters volt This parameter points to a variable to receive a voltage of the bus (+ 5 Vdc)

Return Values

This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_BUSVOLT E0000004h Bus voltage retrieval error IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specified IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Page 96: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

96

Example

Retrieving the bus voltage (+5 Vdc) C BOOL Ret; float volt; Ret = IfRasGetVolt5(&volt);

Visual Basic Dim Ret As Long Dim volt As Single Ret = IfRasGetVolt5(volt)

Visual C# .NET bool Ret; float volt; Ret = IFCWINCRP.IfRasGetVolt5(out volt);

Visual Basic .NET Dim Ret As Boolean Dim volt As Single Ret = IFCWINCRP.IfRasGetVolt5(volt)

Page 97: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

97

5.1.8 IfRasGetVolt12 Description

The IfRasGetVolt12 function measures a voltage of the bus (+12 Vdc). This function is applicable only to Long-Term Supply Industrial Controllers.

Syntax C BOOL IfRasGetVolt12( float* volt ); Visual Basic Declare Function IfRasGetVolt12 Lib "IFWINCRP.DLL"( _ ByRef volt As Single _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfRasGetVolt12( out float volt ); Visual Basic .NET Declare Function IfRasGetVolt12 Lib "ifwincrp.dll"(_ ByRef volt As Single _ )As Boolean

Parameters volt This parameter points to a variable to receive a measured voltage of the bus

(+12 Vdc).

Return Values This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_BUSVOLT E0000004h Bus voltage retrieval error IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specified IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Page 98: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

98

Example

Retrieving the bus voltage (+12 Vdc) C BOOL Ret; float volt; Ret = IfRasGetVolt12(&volt);

Visual Basic Dim Ret As Long Dim volt As Single Ret = IfRasGetVolt12(volt)

Visual C# .NET bool Ret; float volt; Ret = IFCWINCRP.IfRasGetVolt12(out volt);

Visual Basic .NET Dim Ret As Boolean Dim volt As Single Ret = IFCWINCRP.IfRasGetVolt12(volt)

Page 99: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

99

5.1.9 IfRasWdtEnable The IfRasWdtEnable function enables the WDT. The time-out time of the WDT is fixed to 10 seconds. If the WDT is not cleared within 10 seconds, the WDT restarts the system. Syntax C BOOL IfRasWdtEnable(void); Visual Basic Declare Function IfRasWdtEnable Lib "IFWINCRP.DLL"() As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfRasWdtEnable(); Visual Basic .NET Declare Function IfRasWdtEnable Lib "ifwincrp.dll"() As Boolean

Parameters None

Return Values This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_INVALID_PARAM E0000011h WDT is running. IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Comment

If the WDT is running, this function returns FALSE.

Example Enabling WDT C BOOL Ret; Ret = IfRasWdtEnable();

Visual Basic Dim Ret As Long Ret = IfRasWdtEnable()

Visual C# .NET bool Ret; Ret = IFCWINCRP.IfRasWdtEnable();

Visual Basic .NET Dim Ret As Boolean Ret = IFCWINCRP.IfRasWdtEnable()

Page 100: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

100

5.1.10 IfRasWdtClear Description

The IfRasWdtClear function clears the WDT.

Syntax C BOOL IfRasWdtClear(void); Visual Basic Declare Function IfRasWdtClear Lib "IFWINCRP.DLL"() As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfRasWdtClear(); Visual Basic .NET Declare Function IfRasWdtClear Lib "ifwincrp.dll"() As Boolean

Parameters None

Return Values

This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_INVALID_PARAM E0000011h WDT is not running IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Comment

If the WDT is not running, this function returns FALSE.

Example Clearing WDT C BOOL Ret; Ret = IfRasWdtClear();

Visual Basic Dim Ret As Long Ret = IfRasWdtClear()

Visual C# .NET bool Ret; Ret = IFCWINCRP.IfRasWdtClear();

Visual Basic .NET Dim Ret As Boolean Ret = IFCWINCRP.IfRasWdtClear()

Page 101: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

101

5.1.11 IfRasWdtDisable Description

The IfRasWdtDisable function disables the WDT.

Syntax C BOOL IfRasWdtDisable(void); Visual Basic Declare Function IfRasWdtDisable Lib "IFWINCRP.DLL"() As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfRasWdtDisable(); Visual Basic .NET Declare Function IfRasWdtDisable Lib "ifwincrp.dll"() As Boolean

Parameters None

Return Values This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_INVALID_PARAM E0000011h WDT is not running IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Comment If WDT is not running, this function returns an error.

Example Disabling WDT C BOOL Ret; Ret = IfRasWdtDisable();

Visual Basic Dim Ret As Long Ret = IfRasWdtDisable()

Visual C# .NET bool Ret; Ret = IFCWINCRP.IfRasWdtDisable();

Visual Basic .NET Dim Ret As Boolean Ret = IFCWINCRP.IfRasWdtDisable()

Page 102: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

102

5.1.12 IfChipGetCounterICH4 Description

The IfChipGetCounterICH4 function retrieves a count value of the counter on the chipset. The counter length is 24 bits and the clock frequency is 3.579545 MHz.

Syntax C DWORD IfChipGetCounerICH4(void); Visual Basic Declare Function IfChipGetCounerICH4 Lib "IFWINCRP.DLL"() As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern uint IfChipGetCounerICH4(); Visual Basic .NET Declare Function IfChipGetCounerICH4 Lib "ifwincrp.dll"() As Integer

Parameters None

Return Values

This function returns counter value from 0 through 00FFFFFFh when it is successfully completed. Otherwise, it returns FFFFFFFFh. Get details by using the GetLastError function of Win32API if the function returns FFFFFFFFh. The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Example

Retrieving the current counter value C DWORD Count; Count = IfChipGetCounterICH4();

Visual Basic Dim Count As Long Count = IfChipGetCounterICH4()

Visual C# .NET uint Count; Count = IFCWINCRP.IfChipGetCounterICH4();

Visual Basic .NET Dim Count As Integer Count = IFCWINCRP.IfChipGetCounterICH4()

Page 103: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

103

5.1.13 IfPsmGetModuleId Description

The IfPsmGetModuleId function retrieves IDs of slot-in power supply modules installed in the power supply backplane.

Syntax C BOOL IfPsmGetModuleId( WORD* ModuleId ); Visual Basic Declare Function IfPsmGetModuleId Lib "IFWINCRP.DLL"( _ ByRef ModuleId As Integer _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfPsmGetModuleId( out ushort ModuleId ); [DllImport("ifwincrp.dll")] public static extern bool IfPsmGetModuleId( ushort[] ModuleId ); Visual Basic .NET Declare Function IfPsmGetModuleId Lib "ifwincrp.dll"(_ ByRef ModuleId As Short _ )As Boolean

Parameters ModuleId The parameter points to an array to receive IDs of slot-in power supply modules.

Prepare an array that has 4 or more elements. Array Description

pModuleId[0] ID of the slot-in power supply module installed in the P1 slot pModuleId[1] ID of the slot-in power supply module installed in the P2 slot pModuleId[2] ID of the slot-in power supply module installed in the P3 slot pModuleId[3] ID of the slot-in power supply module installed in the P4 slot

The index number of the array corresponds to a number that is given by subtracting one from the P number (silk number) printed on the power supply backplane.

Page 104: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

104

The IDs are defined as follows

ID Model Description 05h JPS-2057 +12 Vdc input module (isolated, 80 W) 06h JPS-2055 + 24 Vdc input module (isolated, 80 W) 08h JPS-2101 ATX output module (100 W) 09h JPS-2001 100 Vac/200 Vac input module (isolated, 130 W) 0Ah JPS-2053 +100 Vdc input module (isolated, 130 W) 0Bh JPS-2051 +48 Vdc input module (isolated, 130 W) 0Ch JPS-1059 +12~ +24 Vdc input module (non-isolated, 130 W) 0Dh JPS-105701 +12 Vdc input module for +12 Vdc power supply bus

(non-isolated, 50 W) 0Eh JPS-105501

JPS-205501+24 Vdc input module (non-isolated, 150 W) +24 Vdc input module (isolated,150 W) * JPS-105501 and JPS-205501 have the same ID.

0Fh Uninstalled No slot-in power supply module is installed.

Return Values This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_PSMMODULEID E0000005h Slot-in power supply module ID retrieval error IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specification IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Example

Retrieving a slot-in power supply module ID. C UINT Ret; WORD ModuleId[4]; Ret = IfPsmGetModuleId(&ModuleId[0], 4);

Visual Basic Dim Ret As Long Dim ModuleId(3) As Long Ret = IfPsmGetModuleId(ModuleId(0), 4)

Visual C# .NET uint Ret; uint[] ModuleId = new uint[4]; Ret = IFCWINCRP.IfPsmGetModuleId(ModuleId, 4);

Visual Basic .NET Dim Ret As Integer Dim ModuleId(3) As Integer Ret = IFCWINCRP.IfPsmGetModuleId(ModuleId(0), 4)

Page 105: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

105

5.1.14 IfPsmGetStatus Description

The IfPsmGetStatus function retrieves statuses of slot-in power supply modules installed in the power supply backplane.

Syntax C BOOL IfPsmGetStatus( WORD* Status ); Visual Basic Declare Function IfPsmGetStatus Lib "IFWINCRP.DLL"( _ ByRef Status As Integer _ )As Long Visual C# .NET [DllImport("ifwincrp.dll")] public static extern bool IfPsmGetStatus( out ushort Status ); [DllImport("ifwincrp.dll")] public static extern bool IfPsmGetStatus( ushort[] Status ); Visual Basic .NET Declare Function IfPsmGetStatus Lib "ifwincrp.dll"(_ ByRef Status As Short _ )As Boolean

Parameters pStatus The parameter points to an array to receive statuses of slot-in power supply modules.

Prepare an array that has 4 or more elements. Array Description

Status[0] Status of the slot-in power supply module installed in the P1 slot Status[1] Status of the slot-in power supply module installed in the P2 slot Status[2] Status of the slot-in power supply module installed in the P3 slot Status[3] Status of the slot-in power supply module installed in the P4 slot

The index number of the array corresponds to a number that is given by subtracting one from the P number (silk number) printed on the power supply backplane.

The following values are stored in each element when an error is detected. When no error

is detected, 0 is stored in each element. One or more values may be ORed. Code Value Description

CM_PSM_STATUS_DEG 01h Alarm (ALM signal detection) CM_PSM_STATUS_FAL 02h Fail (FAIL signal detection)

Page 106: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

106

Return Values

This function returns TRUE (non-zero value) when it is successfully completed. Otherwise, it returns FALSE (0). Get details by using the GetLastError function of Win32API if the function returns FALSE (0). The GetLastError function returns one of the following values.

Code Value Description IFWIN_ERROR_GET_PSMMODULEID E0000005h Slot-in power supply module ID retrieval error IFWIN_ERROR_INVALID_PARAM E0000011h NULL pointer specification IFWIN_ERROR_NOT_SUPPORTED E0000020h Unsupported system IFWIN_ERROR_CALL_DRIVER E0000030h Driver call error

Example

Retrieving statuses of the slot-in power supply modules. C UINT Ret; WORD Status[4]; Ret = IfPsmGetStatus(&Status[0]);

Visual Basic Dim Ret As Long Dim Status(3) As Long Ret = IfPsmGetStatus(Status(0))

Visual C# .NET uint Ret; uint[] Status = new uint[4]; Ret = IFCWINCRP.IfPsmGetStatus(Status);

Visual Basic .NET Dim Ret As Integer Dim Status(3) As Integer Ret = IFCWINCRP.IfPsmGetStatus(Status(0))

Page 107: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

107

Chapter 6 Sample Programs 6.1 Execution Procedure

This product provides executable files of the sample programs. Double-click each executable file (*.exe) to start. To use the sample programs for Visual C# .NET or Visual Basic .NET, .NET Framework 1.1 or later version is required. (event_clr for Visual C++ .NET requires 2.0 or later versions.) Visual C++ 6.0 1. Start Visual Studio. 2. Select File > Open Workspace. 3. Open the makefile, *.dsp. 4. Build the project file. 5. Run the executable file, *.exe. Visual C++ .NET 1. Start Visual Studio. 2. Select File > Open > Project. 3. Open the makefile, *.vcproj. 4. Build the project file. 5. Run the executable file, *.exe. Visual Basic 1. Start Visual Basic. 2. Open the project file, *.vbp. 3. Build the project file. 4. Run the executable file, *exe. Visual C# .NET 1. Start Visual Studio. 2. Select File > Open > Project. 3. Open the project file, *.csproj. *1 4. Build the project file. 5. Run the executable file, *.exe. Visual Basic .NET 1. Start Visual Studio. 2. Select File > Open > Project. 3. Open the project file, *.vbproj.*1 4. Build the project file. 5. Run the executable file, *.exe. Note: *1 The class library will be automatically built at the same time.

Page 108: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

108

6.2 List of Sample Programs Sample program Description wdt The sample program configures a time-out time of the WDT to 5

seconds and an action of the time-out to CPU reset. The sample program clears the WDT every 3 seconds. The sample program exits after it clears the WDT five times.

temperature The sample program retrieves and displays temperatures of the CPU and PCB every 3 seconds. The sample program exits after it displays the temperatures of the CPU and PCB five times.

power The sample program retrieves and displays a power supply voltage every 3 seconds. The sample program exits after it displays the power supply voltage five times.

event The sample program notifies a time-out event of the WDT by signaling an event, calling a callback function (applicable only in Visual C++), and posting a message. The sample program works as follows: - set a time-out time of the WDT to 3 seconds and an action of the

time-out to interrupt event with the Initialize WDT button, - register a signal event with the Signal button, - register a callback function by the Callback button. - register a message handler with the Message button.

- execute post-processes such as event release with the Kill Event button.

Note: For Visual C++ users, sample programs of MFC (event_mfc) and CLR (event_clr) are provided. CLR is applicable to Visual C++ 2005 or later versions.

pbfilter The sample program configures the error protection filter of the power button. The sample program enables the filter, and then disables it.

led The sample program configures the error conditions to blink the LED, then 5 second later, disable the error conditions.

fan The sample program retrieves and displays the operating status of the CPU fan every 3 seconds. The program exits after it displays the status 5 times. Note: Only products with a CPU fan support this sample program.

psm The sample program retrieves and displays the status of a slot-in power supply module every 3 seconds. The program exits after it displays the status 5 times.

bat The sample program retrieves and displays the information of the battery module. The program exits after it displays the information 5 times and history information.

Page 109: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

109

Chapter 7 Utility Program 7.1 Interface Utility

Interface Utility provides the following operations. * .NET Framework 2.0 or later is required to use Interface Utility. ●Log - Monitoring log information - Configuring a log file ● WDT - Enabling/disabling log recording of the WDT - Checking the status of the WDT - Setting and checking the time-out time and action - Starting, stopping, and clearing the WDT ● Temperature - Enabling/disabling log recording of temperature - Setting the saving cycle of temperature log information - Monitoring temperature information - Setting and checking the upper-limit/lower-limit values ● Power - Enabling/disabling log recording of voltage - Setting the saving cycle of voltage log information - Monitoring voltage information ● Fan - Checking the statuses of the fans - Enabling/disabling log recording of the fans ● Button filter - Configuring the one second error protection filter for the power button ● LED - Setting the blink condition when the temperature of the PCB is over the upper limit. - Setting the blink condition when the temperature of the PCB is below the lower limit. - Setting the blink condition when a fan has an error. ● PowerModule - Enabling/disabling log recording of the power supply modules - Monitoring the slot-in power supply modules ● Battery - Enabling/disabling log recording of the battery module - Monitoring information and history of the battery module - Configuring the termination method of the operating system at power failure and the duration of discharge.

Page 110: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

7.1.1 Starting the Utility This utility starts automatically when the operating system starts. To see if the utility is running, check the system tray. The following icon appears when the utility is running. In case the utility is closed, run IFUtil.exe in the interface\IFCPMGR\bin folder.

7.1.2 Commands Right click Interface Utility icon in the system tray to open the command menu.

Command Description Open This command opens Interface Utility to control functions. Exit This command closes Interface Utility. After clicking this command, the

icon in the system tray disappears and the utility exits.

7.1.3 Functions The pictures displayed on your screen may be different from the pictures below depending on the model you use.

1. Log Click the Log tab to open the following dialog box.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

110

Page 111: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Item Description

Monitor By clicking the Monitor button, the following Log Monitor window appears. You can execute any other processes even when the Log Monitor window opens.

New records are appended at the bottom of the text box.

Item Description Log File The path of a log file appears in the Log File box .No path appear

when log recording is disabled. The records displayed in the text box are saved in the log file.

Clear Click Clear to delete the records in the text box. The records in the log file on the disk will not be deleted.

Close Click Close to close the Log Monitor window. File The File area specifies a log file to be saved.

Click OK or Apply to save the changes. The logs can be displayed on the Log Monitor window without saving the log file. * Administrator privileges are required to save the settings.

No save No log file is saved.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

111

Page 112: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Item Description

No log limit Log records are appended in the existing log file. Click […] to open the Save As dialog box. Select or enter a file name in the dialog box. The path of the log file appears in the File name box.

Click the OK or Apply button to start to save log records in the log file.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

112

Page 113: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Item Description

New file every day

A new log file is created daily. The file name includes the date of creation. For example, the utility creates a log file whose file name is 20100812.log on August 12, 2010. The file name of the currently used log file appears in the Log window. Click […] to specify a folder where the log files are saved. The path of the folder appears in the Folder box.

Click OK or Apply to start to save log records in the log file.

OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes. The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

113

Page 114: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

2. WDT Click the WDT tab to open the following dialog box.

Item Description Enable WDT log

Select Enable WDT log to enable to output log records of the WDT. The log information includes; - start/stop of the WDT, - change of time-out time and action change, - WDT interrupt generation. Click OK or Apply to save the changes. Note: If setting change and WDT start/stop are successively executed at a short interval, not all the log may be output. * Administrator privileges are required to save the settings.

Status This item shows the operating status of the WDT. -STOP: WDT stops. - RUN: WDT is running.

Config This item configures the time-out time and action at the time-out of the WDT. Click OK or Apply to save the changes.

Cycle This item configures the WDT cycle. The configurable range is from 1 through 255. Action This item configures the action when the time-out occurs.

- Reset: Reset the CPU - Interrupt: An interrupt occurs

Control The Control area includes the following commands to control the WDT. Start Click Start to start the WDT. Stop Click Stop to stop the WDT. Clear Click Clear to clear the WDT. OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes. The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

When WDT interrupt is generated, a message appears on the icon in the system tray. If log output is enabled, the information is output in the log.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

114

Page 115: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

3. Temperature Click the Temperature tab to open the following dialog box. <Atom model>

Item Description Enable temperature log Select Enable temperature log to enable to output log records of

temperature. The log information includes; - change of upper-limit/lower-limit values, - abnormal temperature/recovery - temperature data (only when the Temperature log cycle is enabled). Click OK or Apply to save the changes. Note: * If the settings are often changed or abnormal temperature /

recovery successively occurs in a short interval, not all the log may be output.

* Administrator privileges are required to save the settings. Temperature log cycle Select Temperature log cycle to output temperature data at the specified

rate. The rate is configurable from 1 second to 3600 seconds by second. The temperature data log will not be output if the check box is cleared. Click OK or Apply to save the changes. * Administrator privileges are required to save the settings.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

115

Page 116: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

116

(Continued)

Item Description CPU The CPU area contains information of the CPU temperature.

Click OK or Apply to save the changes For Atom N2800 and Atom D525 models, temperatures of two cores are shown. The left is CPU core 1 and the other is CPU core 2.

Upper Limit Enter the upper-limit temperature in Upper Limit. Lower Limit Enter the lower-limit temperature in Lower Limit. History graph The graph shows a trend of CPU temperature.

Colors of the line indicate the temperature ranges. Higher than the upper-limit temperature: red High temperature: orange Medium temperature: yellow-green Lowe temperature: light blue Lower than the lower-limit temperature: white

Current temperature

The current CPU temperature is shown under the graph. The color changes depending on the current temperature. Higher than the upper-limit temperature: red High temperature: orange Medium temperature: green Lowe temperature: blue Lower than lower-limit temperature: black

Board The Board area contains information of the PCB temperature. Click OK or Apply to save the changes

Upper Limit Enter the upper-limit temperature in Upper Limit. Lower Limit Enter the lower-limit temperature in Lower Limit. History graph The graph shows a trend of the PCB temperature.

Colors of the line indicate the temperature ranges. Higher than the upper-limit temperature: red High temperature: orange Medium temperature: yellow-green Lowe temperature: light blue Lower than the lower-limit temperature: white

Current temperature

The current PCB temperature is shown under the graph. The color changes depending on the current temperature. Higher than the upper-limit temperature: red High temperature: orange Medium temperature: green Lowe temperature: blue Lower than lower-limit temperature: black

OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes. The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

Page 117: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

<Core i7/Celeron models>

Item Description Enable temperature log Select the Enable temperature log check box to enable to output log

records of temperature. The log information includes; - change of upper-limit/lower-limit values , - abnormal temperature/recovery - temperature data (only when the Temperature log cycle check box is

selected). Click OK or Apply to save the changes. Note: * If the settings are often changed or abnormal temperature /

recovery successively occurs in a short interval, not all the log may be output.

* Administrator privileges are required to save the settings. Temperature log cycle Select Temperature log cycle check box to output temperature data at the

specified rate. The rate is configurable from 1 second to 3600 seconds by second. The temperature data log will not be output if the check box is cleared. Click OK or Apply to save the changes. * Administrator privileges are required to save the settings.

CPU The item shows CPU temperature. Click the OK or Apply button to reflect the upper-limit/lower-limit temperature. The left is CPU core 1, and the other is CPU core 2.

History graph The graph shows a trend of CPU temperature. Colors of the line indicate the temperature ranges. Higher than100 degrees C: red High temperature: orange

Medium temperature: yellow-green Low temperature: light blue Lower than 0 degrees C: white

Current temperature

The current CPU temperature is shown under the graph. Colors of the value indicate the temperature ranges. Higher than100 degrees C: red High temperature: orange

Medium temperature: yellow-green Low temperature: blue Lower than 0 degrees C: black

Copyright 2010, 2015 Interface Corporation. All rights reserved.

117

Page 118: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

(Continued)

Item Description Board The Board area contains information of the PCB temperature.

Click OK or Apply to save the changes Upper Limit Type the upper-limit temperature in Upper Limit. Lower Limit Type the lower-limit temperature in Lower Limit. History

graph The graph shows a trend of the PCB temperature. Colors of the line indicate the temperature ranges. Higher than the upper-limit temperature: red High temperature: orange Medium temperature: yellow-green Lowe temperature: light blue Lower than the lower-limit temperature: white

Current temperature

The current PCB temperature is shown under the graph. The color changes depending on the current temperature. Higher than the upper-limit temperature: red High temperature: orange Medium temperature: green Lowe temperature: blue

Lower than lower-limit temperature: black Memory The memory area shows temperature around memory.

Click the OK or Apply button to reflect the upper-limit/lower-limit temperature. History

graph The graph shows a trend of temperature around memory. Colors of the line indicate the temperature ranges. Higher than the upper-limit temperature: red High temperature: orange

Medium temperature: yellow-green Lowe temperature: light blue Lower than lower-limit temperature: white

Current temperature

The current temperature around memory is shown under the graph. Higher than the upper-limit temperature: red

High temperature: orange Medium temperature: green Lowe temperature: blue Lower than lower-limit temperature: black

OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

When abnormal temperature is detected, the following massage appears on the icon in the system tray. Example: The board temperature is over the upper limit temperature. When the temperature changed from abnormal to normal temperature range, the following massage appears on the icon in the system tray. If log output is enabled, the information is output in the log.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

118

Page 119: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

4. Power Click the Power tab to open the following dialog box. * This function is applicable only to the Atom models.

Item Description Enable power log Select the Enable power log check box to enable to output log records of

voltage. The log information includes;

- abnormal voltage/recovery - voltage data (only when the Power log cycle check box is selected). Click OK or Apply to save the changes. Note: * If the settings are often changed or abnormal voltage/ recovery

successively occurs in a short interval, not all the log may be output. * Administrator privileges are required to save the settings.

Power log cycle Select the Power log cycle check box to output voltage data at the specified rate. The rate is configurable from 1 second to 3600 seconds by second. The voltage data log will not be output if the check box is cleared. Click OK or Apply to save the changes. * Administrator privileges are required to save the settings.

5 V The 5V area contains information of the status of 5 Vdc power supply. History graph The graph shows a trend of 5 Vdc power supply. The yellow dotted line

indicates the upper-limit/lower-limit voltage. The color of the graph line changes depending on the status of 5 Vdc power supply.

Normal: green Abnormal: red

Current voltage

The current voltage of 5 Vdc power supply is shown on the right side of the graph. Colors of the value indicate the status of the status of 5 Vdc power supply.

Normal: green Abnormal: red

Copyright 2010, 2015 Interface Corporation. All rights reserved.

119

Page 120: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

(Continued)

Item Description 3.3 V The 3.3 V area contains the status of 3.3 Vdc power supply. History graph The graph shows a trend of 3.3 Vdc power supply. The yellow dotted line

indicates the upper-limit/lower-limit voltages. The color of the graph line changes depending on the status of 3.3 Vdc power supply.

Normal: green Abnormal: red

Current voltage The current voltage of 3.3 Vdc power supply is shown on the right side of the graph. Colors of the value indicate the status of the status of 3.3 Vdc power supply.

Normal: green Abnormal: red

12 V The 12V area contains the status of 12 Vdc power supply. The item appears only when you use Long-Term Supply Industrial Controller Atom model.

History graph The graph shows a trend of 12 Vdc power supply. The yellow dotted line indicates the upper-limit/lower-limit voltages. The color of the graph line changes depending on the status of 12 Vdc power supply.

Normal: green Abnormal: red

Current voltage The current voltage of 12 Vdc power supply is shown on the right side of the graph. Colors of the value indicate the status of the status of 12 Vdc power supply.

Normal: green Abnormal: red

5 VSB The 5 VSB area contains the status of 5V standby power supply. The item appears only when you use Atom N2800 model.

History graph The graph shows a trend of 5 Vdc standby power supply. Current voltage The current voltage of 5 Vdc standby power supply is shown on the right side

of the graph. OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

When abnormal voltage is detected, the following massage appears from the icon in the system tray. Example: detection of abnormal 5 Vdc voltages When the voltage changed from abnormal to normal voltage range, the following massage appears from the icon in the system tray. If log output is enabled, the messages above are output in the log.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

120

Page 121: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

5. FAN This function is applicable only to Atom N2800, and Core i7/Celeron models. Click the FAN tab to open the following dialog box.

Item Description Enable fan log Select the Enable fan log check box to enable to output log records

of fan. The log information includes abnormal status and recovery of CPU fan. Click OK or Apply to save the changes. Note: * If abnormal status and recovery of CPU fan are successively

occurred at a short interval, not all the log may not be output.

* Administrator privileges are required to save the settings. CPU fan status Select the CPU fan status check box to output the operating status

of CPU fan. STOP means the fan stops, and RUN means the fan is in operation. For products without CPU fan, the information is invalid. In this case “-” is displayed.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

121

Page 122: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

(Continued)

Item Description Unit fan status The Unit fan status area contains the status of chassis fan. The fan

monitored by this utility differs depending on product you use. The picture above is the result for 7-slot unit product.

4-slot short unit / fan The item indicates the status of 4-slot unit (short size) fan. RUN: The fan is in operation. STOP or UNCONNECTED: The fan stops or is not connected.

7-slot unit /exhaust fan 9-slot unit /exhaust fan 1

The item indicates the status of 7-slot unit (short size/full size) exhaust fan or 9-slot unit (short size/full size) exhaust fan 1 RUN: The fan is in operation. STOP or UNCONNECTED: The fan stops or is not connected.

9-slot unit / exhaust fan 2 13-slot unit / exhaust fan 1

The item indicates the status of 9-slot unit (short size/full size) exhaust fan 2 or 13-slot unit (short size/full size) exhaust fan 1 RUN: The fan is in operation. STOP or UNCONNECTED: The fan stops or is not connected.

13-slot unit / exhaust fan 2 The item indicates the status of 13-slot unit (short size/full size) exhaust fan 2. RUN: The fan is in operation. STOP or UNCONNECTED: The fan stops or is not connected.

OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

When fan stop is detected, the following massage appears from the icon in the system tray. When the fan is recovered and starts operation, the following massage appears from the icon in the system tray. If log output is enabled, the messages above are output in the log.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

122

Page 123: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

6. ButtonFilter Click the ButtonFilter tab to open the following dialog box * This function is applicable only to Core i7/Celeron model.

Item Description Filter Enable power button

filter Select the check box to ignore any operation for a second to protect from erroneous operation.

OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

123

Page 124: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

7. LED Click the LED tab to open the following dialog box. * This function is applicable only to Core i7/Celeron models.

Item Description Config

when the board temperature is higher than the upper limit.

Select the check box to blink the power supply indicator LED on the rear panel of the product while the PCB temperature is higher than the upper-limit set at the Temperature tab or set by the CmSetTempLimit function.

when the board temperature is lower than the lower limit.

Select the check box to blink the power supply indicator LED on the rear panel of the product when the board temperature is lower than the lower-limit value set at the Temperature tab or set by the CmSetTempLimit function.

when the CPU fan stops.*

Select the check box to blink the power supply indicator LED on the rear panel of the product while the CPU fan stops.

OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

* This configuration is applicable only to Core i7/Celeron models with a CPU fan.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

124

Page 125: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

8. PowerModule This function is applicable only to slot-in power supply modules. Click the PowerModule tab to open the following dialog box. The picture in the dialog box shows 6 slots. The slots in which a slot-in power supply module is not inserted are described as blank panels.

Item Description Enable power module log Select the check box to output logs about slot-in power supply module.

The following information is logged: - warning/error and recovery - insertion and removal of slot-in power supply module Click the OK or Apply button to save changes. * If warning/error and recovery and insertion/removal are occurred continuously in short intervals, some logs may not be output. * Administrator privileges are required to save the settings.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

125

Page 126: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Item Description Status - The product models and pictures of slot-in power supply modules are

displayed. - The status of slot-in power supply modules are distinguished by the color. Warning (ALM):red

Error (FAIL): blue

Warning and error

(ALM+FAIL): white

When a slot-in power supply module is not inserted in a slot, product model is not displayed and the picture is described as a blank panel.

OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes. The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

Note: Because the JPS-105501 and JPS-205501 have the same ID, the product model is displayed as JPS-105501. If you use the JPS-205501, read it as JPS-205501.

When warning and error are detected, the following massage appears from the icon in the system tray. Example) A warning (ALM) is detected at JPS-1059 inserted into the P2 slot. Warning (ALM) and error (FAIL) are not notified simultaneously. Check the status by logs and the pictures in the Status. When a module is recovered from warning or error, the following massage appears.

If log output is enabled, the messages above are output in the log.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

126

Page 127: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

9. Battery This function is applicable only to battery module. Click the Battery tab to open the following dialog box.

Item Description Enable battery log Select the Enable battery log check box to enable to output logs about

battery. The log information includes; - battery charge start/full charge detection/power failure detection - abnormal battery status detection - diagnostic error detection Click the OK or Apply button to save changes. * If battery charge start/full charge detection/power failure detection are occurred continuously in short intervals, some logs may not be output. * Administrator privileges are required to save the settings.

Status The status area contains the current status of a battery. Charging: Full charge: Blacking out *While status transits to another status, status may not be shown.

Capacity The item shows the battery capacity. Voltage The item shows the battery voltage. Temperature The item shows the battery temperature. Current The current area contains information about current. Battery The item shows the measurement value of current.

The value is minus while discharging. Average The item shows the average value of current.

The value is minus while discharging

Copyright 2010, 2015 Interface Corporation. All rights reserved.

127

Page 128: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

128

(Continued)

Item Description Capacity The Capacity area contains information about battery. Learn The item shows the learning capacity of battery.

The value is the maximum capacity of the battery with consideration for learning and life time factor at discharging.

Nominal The item shows the nominal capacity of battery. History The button opens the history dialog box. Setting The button opens the setting dialog box. OK Click OK to save the changes and close the window. Cancel Click Cancel to discard the changes and close the window. Apply Click Apply to save the changes The window will not be closed. Help Click Help to open the Help file of System Monitoring Library.

Page 129: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

- History dialog box Click the History button to open the following dialog box.

Item Description Total operating time The item shows the total operating time of battery. The unit is hours (h). Black out count The item shows the number of power failure occurrence. The number

counts up when the module is recovered from power failure. Electric discharge capacity of the black out

The item shows the discharged capacity while discharging. The value increases while the battery module is discharging. When the status becomes charging, the total discharged capacity at the last power failure is retrieved.

Temperature distribution The graph shows accumulated operating time versus temperature of the battery.

- 9 Temperature < 10 degrees C 10 - 19 10<= Temperature < 20 20 - 29 20<= Temperature < 30 30 - 39 30<= Temperature < 40 40 - 49 40<= Temperature < 50 50 - 59 50<= Temperature < 60 60 - 69 60<= Temperature < 70

70 - 70<= Temperature To close the dialog box, click the close button on the upper right of the dialog box.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

129

Page 130: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

- Setting Dialog Box Click the Setting button to open the following dialog box.

Item Description Shutdown The Shutdown area includes items about the operating system shutdown

request at a power failure occurrence. Enable OS shutdown Select the check box to request to shut down the operating system by the

settings of Time and Type when a power failure occurs. Time Specify an interval time from a power failure occurrence (battery

discharge start) to OS shutdown request. The unit is seconds. The selectable range is 1 through 3600.

Type Select a process to be executed when the interval elapses after the power failure occurs. Shutdown: shutting down after the time specified in Time elapses. Hibernation: Go into hibernation mode after the time specified in Time elapses.

Battery off Specify time to terminate discharging of the battery. Time Discharge of the battery is forcibly terminated when the interval time

elapses after power failure occurred to protect the battery from over discharge. * System configuration information and files may be corrupted if battery discharge stops between a power failure occurrence and completion of post-processing and operating system shutdown.

OK Click OK to save the changes and close the window. * Administrator privileges are required to save the settings.

Cancel Click Cancel to discard the changes and close the window.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

130

Page 131: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

10. Information Click the Information tab to open the following dialog box.

Item Description Function This column shows the utility functions. Version This column shows the version of each function. Copy The button copies the functions and versions to the clip board.

Copyright 2010, 2015 Interface Corporation. All rights reserved.

131

Page 132: System Monitoring Library - Interface · System Monitoring Library . W indows Driver Software for Industrial Controllers. Help for Windows . Help for Windows Contents ... Sample programs

Help for Windows

Copyright 2010, 2015 Interface Corporation. All rights reserved.

132

Chapter 8 Terms of Use 8.1 Limited Warranty

Interface Corporation does not warrant uninterrupted or error-free operations of the software product. The entire risks as to the quality of or arising out of use or performance of the software products, if any, remains with you. Interface believes that information contained in the document is accurate. The document is carefully reviewed for technical accuracy. Interface reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition. Interface is not liable for any damages arising out of or related to this document or the information contained in it. Charts and tables contained in this document are only for illustration purposes and may vary depending upon a user's specific application. All official specifications are in metric. English unit is supplied for convenience.

8.2 Copyrights and Intellectual Property Rights Interface Corporation owns all titles and intellectual property rights in and to the products. The products include the product software, audio/visual content such as images, texts, or pictures.

8.3 Warning Regarding Medical and Clinical Use of Our Products Our products are not designed for components intended to ensure a level of reliability suitable for use under conditions that might cause serious injury or death. Our products are not designed with components and testing instrument intended to ensure a level of reliability suitable for use in treatment and diagnosis of human. Applications of our products involving medical or clinical treatment can create a potential for accidental injury caused by product failure, or by errors on the part of the user or application engineer.

8.4 Prohibition of Reproduction No part of this document may be reproduced or changed in any form without the prior consent of Interface Corporation.

8.5 Limitation of Liability Interface Corporation will not be liable for any special, incidental, indirect or consequential damages whatsoever even if Interface Corporation or any reseller could foresee the possibility of damages. Users shall assume any subsequent risks whatsoever resulting from such as using and installing this product. Interface Corporation shall not be liable for any incidental or consequential damages, including damages or other costs resulting from defects which might be contained in the product, product supply delay or product failure. Customer's right to recover damages caused by fault or negligence on the part of Interface Corporation shall be limited exclusively to product replacement. This product is designed under Japanese domestic specifications. Interface Corporation is not responsible for the use of this product outside Japan. We do not offer any maintenance service or technical support abroad. Interface Corporation is not liable for any damage arising from the included document or information.

8.6 Trademark Products and company names are trademarks, registered trademarks, or servicemarks of their respective owners.