COM-EX(PCI/C-PCI) GPF Windows Drivers Software for Asynchronous Serial Communications Product. Help for Windows.

Size: px
Start display at page:

Download "COM-EX(PCI/C-PCI) GPF Windows Drivers Software for Asynchronous Serial Communications Product. Help for Windows."

Transcription

1 COM-EX(PCI/C-PCI) GPF-4161 Windows Drivers Software for Asynchronous Serial Communications Product Help for Windows

2 Contents Chapter 1 Introduction Overview Features...5 Chapter 2 Product Specifications Functional Specifications Product Composition...9 Chapter 3 Programming Guide Installation Programming Guide Programming Guide (UART) Initializing a Device Condition Check for Serial Communications module Initializing a Buffer Setting Time-Out Parameters Configuring Communications Parameters Writing Data Reading Data Closing the Port Programming Guide (DIO) Initializing a Port Checking the condition Input Output Retrieving Data Closing the Port...17 Chapter 4 Reference: Extension Function and Serial Communications Module List of Control Codes Control Codes IOCTL_COMEX_GET_HS_FUNCTION IOCTL_COMEX_SET_HS_FUNCTION IOCTL_COMEX_GET_TMODULE_STATUS IOCTL_COMEX_SET_TMODULE_POWER Structures COMMHSFUNC Structure

3 4.4 Transfer Rate Available Transfer Rate of the GPF Transfer Rate for PCI U Transfer Rate for PCI U and PCI U Monitor Functions CS/RS Connection CD/RS Connection Using Monitor Functions Restrictions Two/Four-Wire Communications Attentions Half-Duplex Control Half- Duplex Control of Communications Module Products Flow Control The Threshold Values of XON/XOFF Transmits Transmit Trigger Level Hardware Flow Control Stop Bit The ClearCommError Function Receive Interval Timeout DTR/DSR Flow Power Supply and Connection of Serial Communications Modules Events Setup Time and CS Hard Flow Control Ocupation Time by Receive Interrupt Version Considerations and Change Number...53 Chapter 5 Reference: Communications Module Event List of DLL Functions SetCommMask WaitCommEvent Structure OVERLAPPED Structure DCB Structure...60 Chapter 6 Reference (Standard COM) List of DLL function IfComU210xSetDuplex IfComU210xGetDuplex

4 Chapter 7 Reference (Digital Input/Output) List of DLL function SdioOpen SdioClose SdioCommonGetDeviceInfo SdioInputPoint SdioOutputPoint SdioInputByte SdioInputWord SdioInputDword SdioOutputByte SdioOutputWord SdioOutputDword SdioSetLatchLogic SdioGetLatchLogic SdioInputLatchPoint SdioInputLatchByte SdioInputLatchWord SdioInputLatchDword SdioGetTmoduleStatus SdioSetTmodulePower SdioSetEvent SdioSetEventLogic SdioGetEventLogic CallBack Function Callback Function Set by the SdioSetEvent Function Programming Constraints in Visual Basic Return Values Chapter 8 Sample Programs Execution Procedure List of Sample Programs Chapter 9 Utilities Interface Serial Port Terminal Application Required Items for the Terminal Application Starting the Terminal Application Diagnostic Program Required Items for the Diagnostic Program Starting the Diagnostic Program Checking the PCI Configuration and Other Operations

5 9.3 Duplex Setting Utility CardBus ID Number Configuration Digital Input Utility Digital Output Utility Chapter 10 How to Use.NET Overview Class Library Creating the Class Library Adding Class Library Reference Notes Chapter 11 Sample Programs for.net Execution Procedure List of Sample Programs Chapter 12 Terms of Use Limited Warranty Copyrights and Intellectual Property Rights Warning Regarding Medical and Clinical Use of Our Products Prohibition of Reproduction Limitation of Liability Trademark

6 Chapter 1 Introduction 1.1 Overview The GPF-4161 software controls Interface asynchronous serial communications products from your application running on Windows. Application software should link a provided dynamic link library (DLL) and control the asynchronous serial communications products through the application programming interface (Win32 API). 1.2 Features The GPF-4161 supports up to 1 Mbps transfer rate. The RS-485 products support 2 Mbps transfer rate. The GPF-4161 supports selectable transfer clock source; internal or external. Only the PCI-4161 supports this capability. You can configure a transfer clock for each channel. Hardware controlled RS/CS and XON/XOFF flow control dramatically improve software response. In half-duplex transmission, you can configure setup time (time to start outputting data) and hold time (time until data output is completed) by µs. The specifications differ deppending on model. You can monitor communication data and control signals between two communications devices. Only the CBI-4641, CBI , and CSI support this capability. TheGPF-4161 supports the serial communications module products. On-board CPU The GPF-4161 supports on-board CPU. This feature substantially reduces the burden on the computer or CPU board. Only the PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, PCI/CTP/CPZ Q support this capability. 5

7 The GPF-4161 can control up to 16-channel communications. Only the PCI/CTP/CPZ Q, PCI/CTP/CPZ Q supports up to 16 channel communications. The GPF-4161 can control up to 48-channel digital input/output Only the PCI/CTP/CPZ Q, PCI/CTP/CPZ Q controls up to 48-channel digital input/output. ActiveX control ActiveX control (IFXComm.dll) contains our extension function and the Microsoft Communications Control (MSComm32.ocx) in Visual Basic. ActiveX control features 1. Active X is compatible with MSCommand can be replaced by changing the object name. 2. The transfer rate is configurable to an arbitrary value. 3. The communications settings, full-duplex or half- duplex, are switchable. 6

8 Chapter 2 Product Specifications 2.1 Functional Specifications Maximum number of ports Transfer Rate * The transfer rate depends on the base clock and divisor. Refer to Transfer Rate for available values. Clock Source Base Clock Synchronous Mode Data Bit Parity Bit Stop Bit 255 ports Up to 16 boards of the same type can be installed in a system. PCI-4161, CBI-4641, 12 bps to 1 Mbps CBI , CBI WA PCI U (RS-232C) PCI U (RS-485), PCI U PCI U Other than those 2400 bps, 4800 bps, 7200 bps, 9600 bps, bps, bps, bps, bps, bps, bps, bps, bps, bps, bps, bps 300 bps to 2 Mbps 300 bps to 1 Mbps RS-232C 8 bps to 1 Mbps above RS-485 (422) 8 bps to 2 Mbps PCI-4161 Internal clock, external clock Other than PCI-4161 Internal clock PCI MHz, MHz, MHz, 32 MHz CBI-4641, MHz, MHz, 32 MHz CBI , CBI WA PCI U, PCI U, PCI U Other than those above 48MHz 8.192MHz, MHz, MHz, MHz, 32MHz, MHz, MHz Asynchronous communications PCI U 8 bits (RS-232C) Other than those 5 bits to 8 bits above PCI U, None, even number, odd number PCI U, PCI U Other than those above PCI U (RS-232C) Other than those above None, even number, odd number, mark, space 1 bit 1 bit, 2 bits Note: 1.5 stop bit is not supported. 7

9 Flow Control RS-232C Control Signals RS-485 Control Signals FIFO Depth PCI U, PCI U, PCI U, PCI Q, CPZ Q, CPZ Q, CPZ Q, CPZ Q, CTP Q, CTP Q, CTP Q, CTP Q Other than those above Output Input Output Input PCI- Transmit U Receive PCI- Transmit U, PCI U Other Transmit than those above Receive Receive FIFO Hardware flow (RS/CS) Software flow (XON/XOFF) Hardware flow (RS/CS, ER/DR) Software flow (XON/XOFF) RS, ER CS, DR, CI, CD C I RS-232C 288 bytes/channel RS bytes/channel RS-232C 288 bytes/channel RS bytes/channel 576 bytes/channel Receive 576 bytes/channel 1024 bytes/channel 1024 bytes/channel 1024 bytes/channel 8

10 2.2 Product Composition Item File Name Description Management file GPF4161.VER Management information file for Interface use Latest information README.HTM Latest information Installer SETUP.EXE Installation program Utilities DIAGCOMEX.EXE Self-diagnostic Program COMUTIL.EXE Communication Utility SDIUTIL.EXE Digital Input Utility SDOUTIL.EXE Digital Output Utility SETDUPLEX.EXE Half/Full-Duplex Switching Utility (for the PCI U, PCI U ) Sample programs Visual C#.NET Visual C++ Visual Basic.NET Visual Basic Delphi Send Receive InPoint OutPoint Send Receive Monitor InPoint InputByte OutPoint OutputByte Send Receive InPoint OutPoint Send Receive Monitor InPoint InputByte OutPoint OutputByte Terminal Send Receive Monitor InputPoint OutPoint Sample program for Visual C#.NET Sample program for Visual C++ Sample program for Visual Basic.NET Sample program for Visual Basic Sample program for Visual Basic using the ActiveX control Sample program for Delphi 9

11 Item File Name Description Class libraries Visual C#.NET IFCCOM Class library for Visual C#.NET IFCCOMEX IFCSDIO Visual Basic.NET IFCCOM Class library for Visual Basic.NET IFCCOMEX IFCSDIO DLL IFSDIO.DLL Dynamic link library file IFCOMU210X.DLL Dynamic link library file IFSDIO.LIB Import library file IFXCOMM.DLL ActiveX control MSCOMM32.OCX Microsoft ActiveX control Device drivers CP4203.SYS Driver for Windows 2000 and later versions CP4161x.SYS Driver for Windows 2000 and later versions CP4661x.SYS Driver for Windows 2000 and later versions CP4662x.SYS Driver for Windows 2000 and later versions SILABENM.SYS Driver for Windows 2000 and later versions SILABSER.SYS Driver for Windows 2000 and later versions IFSDIONU.SYS Driver for Windows 2000 and later versions GPC4161 *.INF Driver for Windows 2000 and later versions GPC4661 *.INF Driver for Windows 2000 and later versions GPC4201 *.INF Driver for Windows 2000 and later versions GPC4202 *.INF Driver for Windows 2000 and later versions GPC4161 *.SLD SLD file for Windows Embedded GPC4661 * SLD SLD file for Windows Embedded GPC4201 *.SLD SLD file for Windows Embedded GPC4202 *.SLD SLD file for Windows Embedded CP4161.SYS Driver for Windows NT 4.0 GPC4161.INF Driver install file for Windows Me/98/95 CP4161 *.VXD Driver for Windows Me/98/95 GPC4161.INF Driver install file for Windows Me/98/95 Header files COMEX.H Header file for Visual C++ IFSDIO.H Header file for Visual C++ IFCOMU210X.H Header file for Visual C++ COMEX.BAS Header file for Visual Basic IFSDIO.BAS Header file for Visual Basic IFCOMU210X.BAS Header file for Visual Basic COMEX.PAS Header file for Delphi IFSDIO.PAS Header file for Delphi Help HELP.PDF Help (PDF) Note: * The sample programs for Visual C#.NET, Visual Basic.NET are created with Visual C#.NET 2003, Visual Basic.NET 2003, respectively. 10

12 Chapter 3 Programming Guide 3.1 Installation Refer to README for installation. 3.2 Programming Guide When you use two or more identical boards or cards, set the following setting values not to overlap each other. - Compact PCI, PCI boards: the setting value of RSW1 rotary switch on each board - CardBus cards: the setting value of CardBus ID If the setting values overlap, the software will not work normally. For the PCI , PCI , PCI , PCI , and PCI on an ECO 2 /ECO 3 Classembly Devices(R), the RSW1 setting value is set to 0 by default. When expanding with the boards above, do not set the RSW number to 0. For the PCI on TOUGHCON Classembly Devices(R), the RSW1 setting value is set to 0 by default. When expanding with the board above, do not set the RSW number to 0. For PCI , PCI , PCI , PCI MATHECON Classembly Devices(R), the RSW1 setting value is set to 0 by default. When expanding with the boards above, do not set the RSW number to 0. For the PCI U, PCI U, and PCI U do not have RSW Programming Guide (UART) This section explains how to use the functions. The sample codes are written in C. Microsoft Win32 API is used for the driver software control of the GPF Refer to the Win32 API reference provided by Microsoft Corporation for details. 11

13 3.3.1 Initializing a Device The CreateFile function initializes a board. hport = CreateFile( "\\\\.\\COM5", GENERIC_READ GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); COM5 port is initialized. A port handle is returned to hport after the board is successfully initialized. The port handle allows you to reference the board and must be specified when a function is called. If you use two or more boards, retrieve port handle for each board by calling the CreateFile function as many times as the number of boards. The initialized board must be closed by the CloseHandle function before the application is terminated Condition Check for Serial Communications module Check the condition of serial communicatios module. Ret = DeviceIoControl(hPort, IOCTL_COMEX_GET_TMODULE_STATUS, NULL, 0, &GetStatus, sizeof(uchar), &cbreturns, NULL ); Initializing a Buffer The SetupComm function specifies each size of an input buffer and output buffer, and the PurgeComm discards all characters in the buffer. SetupComm(hPort, 4096, 4096); PurgeComm(hPort, PURGE_TXABORT PURGE_RXABORT PURGE_TXCLEAR PURGE_RXCLEAR); Setting Time-Out Parameters The COMMTIMEOUTS structure is used to set and query the time-out parameters for a communications device. COMMTIMEOUTS Timeout; Timeout.ReadIntervalTimeout = 0xFFFFFFFF; Timeout.ReadTotalTimeoutMultiplier = 0; Timeout.ReadTotalTimeoutConstant = 1000; Timeout.WriteTotalTimeoutMultiplier = 0; Timeout.WriteTotalTimeoutConstant = 1000; SetCommTimeouts(hPort, &Timeout); 12

14 3.3.5 Configuring Communications Parameters The GetCommState function retrieves the current communications parameters for a specified port. The SetCommState function configures communications parameters of a port. <Example of Four-Wire Full-Duplex Communications> DCB dcb; GetCommState(hPort, &dcb); dcb.baudrate = 9600; dcb.fabortonerror = 0; dcb.parity = 0; dcb.stopbits = ONESTOPBIT; dcb.bytesize = 8; dcb.foutxdsrflow = 0; dcb.fdtrcontrol = DTR_CONTROL_ENABLE; dcb.foutxctsflow = 0; dcb.frtscontrol = RTS_CONTROL_ENABLE; dcb.fbinary = TRUE; dcb.fparity = FALSE; dcb.finx = dcb.foutx = 0; SetCommState(hPort, &dcb); Writing Data The WriteFile function sends data through a serial port.. BYTE bsendbuffer[256]; DWORD dwsendsize; int n; for (n = 0; n < 256; n++) { bsendbuffer[n] = n; } WriteFile ( hport, bsendbuffer, 256, &dwsendsize, NULL ); Data of 256 bytes in bsendbuffer are written to the port Reading Data The ReadFile function receives data from a serial port. BYTE breadbuffer[256]; DWORD dwreadsize; ReadFile ( hport, breadbuffer, 256, &dwreadsize, NULL ); Data of 256 bytes will be retrieved and stored into breadbuffer Closing the Port The CloseFile function closes the board. CloseHandle ( hport ); Make sure that the port is closed before sutting down the application. 13

15 3.4 Programming Guide (DIO) The programming guide in this section is applicable only to the following products; PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, CSI This section explains how to use the functions. Sample codes are written in C Initializing a Port The SdioOpen function opens the device and get a device handle. hdevicehandle = SdioOpen("IFSDIO1"); The device name, IFSDIO1 is assigned by the system in the order that devices are found on the PCI bus device. The device driver assigns device names as follows: IFSDIO1, IFSDIO2, IFSDIO3 When you change the slot that boards are inserted or your computer, the device name may be changed because the detection order is changed. In WindowsXP/2000/Server 2003, FbiSDio is added to the Device Manager and the recognized digital input/output devices of our HDLC board is shown in a list. The rotary switch value on an board and device name are shown by the product model in the list. Check the device name after installation. You can check the rotary switch value and device name with the Digital Input Utility (SdiUtil.exe) or Digital Output Utility (SdoUtil.exe). In the program, the SdioCommonGetDeviceInfo function can check the device name and board ID (RSW1 setting). hdevicehandle = SdioOpen("IFSDIO1"); nret = SdioCommonGetDeviceInfo( hdevicehandle, &DeviceID, &VendorID, &RevisionID, &SubsystemID, &SubsystemVendorID, &BoardID, &TerminalNo ); You can confirm the digital input/output device by checking the values returned to DeviceID, BoardID and TerminalNo. 14

16 3.4.2 Checking the condition Check the status of serial communications module. nret = SdioGetTmoduleStatus(hDeviceHandle, &btmodulestatus); Input The device handle obtained by the SdioOpen function reads the specified pin status. // Read the pin status of IN1 through IN8. nret = SdioInputByte( hdevicehandle, IFSDIO_IN1_8, &Value ); // Read the pin status of IN1 through IN16. Ret = SdioInputWord( hdevicehandle, IFSDIO_IN1_16, &Value ); // Read the pin status of IN1 through IN32. nret = SdioInputDword( hdevicehandle, IFSDIO_IN1_32, &Value ); The method above shows how to read the pin status every 8 pins, 16 pins and 32 pins. The method below shows how to specify the input pin range. // Read the pin status of IN5, IN6 and IN7. nret = SdioInputPoint( hdevicehandle, &nbuffer[0], 5, 3 ); nbuffer must have three or more factors Output The device handle obtained by the SdioOpen function writes the output status. // Writes to OUT1 through OUT8. nret = SdioOutputByte( hdevicehandle, IFSDIO_OUT1_8, Value ); // Writes to OUT1 through OUT16. nret = SdioOutputWord( hdevicehandle, IFSDIO_OUT1_16, Value ); // Writes to OUT1 through OUT32. nret = SdioOutputDword( hdevicehandle, IFSDIO_OUT1_32, Value ); The method above shows how to write the the output status every 8 pins, 16 pins and 32 pins. The method below shows how to specify the output range. // Writes to OUT5, OUT6 and OUT7 nret = SdioOutputPoint( hdevicehandle, &nbuffer[0], 5, 3 ); nbuffer must have three or more factors. The values must be set to nbuffer in advance. The configured values for nbuffer [0], [1] and [2] are written to OUT3, OUT4 and OUT5. 15

17 3.4.5 Retrieving Data 1. Configures the polarity of STB. // Configures to latch on the falling edge of STB. nret = SdioSetLatchLogic( hdevicehandle, IFSDIO_FALL_EDGE ); 2. Configures the behavior at interrupt request from STB. // registers the callback function, CallBackProc nret = SdioSetEvent( hdevicehandle, NULL, 0, NULL, CallBackProc, 0); The method above is an example using the callback. The SdioSetEvent function can configure three types of synchronous processing. Callback This is the method to synchoronize with the callback function that GPF-4161 contains. The callback function that specified by the SdioSetEvent function when STB is input. Please refer to Callback Function for more detail. Event This is the method to synchoronize using the event on Windows. Please refer to the technical document for Windows, and so on for more detail about the Event function of Windows. Message This is the method to synchoronize using the message function on Windows. Please refer to the technical document for Windows, and so on for more detail about the message function of Windows. 3. Enables the interrupt at STB input. // Interrupts on the falling edge. nret = SdioSetEventLogic( hdevicehandle, IFSDIO_FALL_EDGE ); 4. Reads the pin status that is latched by STB input in the CallBackProc function. // Reads the pin status of IN1 through IN8. nret = SdioInputLatchByte( hdevicehandle, IFSDIO_IN1_8, &Value ); // Reads the pin status of IN1 through IN16. nret = SdioInputLatchWord( hdevicehandle, IFSDIO_IN1_16, &Value ); // Reads the pin status of IN1 through IN32. nret = SdioInputLatchDword( hdevicehandle, IFSDIO_IN1_32, &Value ); The method above shows how to read the pin status every 8 pins, 16 pins and 32 pins. The method below shows how to specify the pin range. // Reads the pin status of IN5, IN6 and IN7 nret = SdioInputLatchPoint( hdevicehandle, &nbuffer[0], 5, 3 ); nbuffer must have three or more factors. 16

18 3.4.6 Closing the Port 1. If the STB input interrupt is configured, disables the interrrupt and releases the registered processing. // Releases the STB input interrupt. nret = SdioSetEventLogic( hdevicehandle, 0); // Releases the processing at the STB input interrupt. nret = SdioSetEvent( hdevicehandle, NULL, 0, NULL, NULL, 0); 2. Closes the device handle obtained by the SioOpen function. nret = SdioClose( hdevicehandle ); 17

19 Chapter 4 Reference: Extension Function and Serial Communications Module This chapter describes the control codes that are used to control the extension function on the standard COM port, and retrieve the status and control power supply of the serial communications modules. * The serial communications on the GPF-4161 are controled using the Win32 API. To use the standard COM port functions, refer to the reference offered by Microsoft Corporation. 4.1 List of Control Codes * The PCI U, PCI U, and PCI U are not applicable to the following codes. No. Control Code Description Initialization 1 IOCTL_COMEX_GET_ HS_FUNCTION Retrieves the setting of the extension function on the standard communication port such as external clock and half duplex 2 IOCTL_COMEX_SET_ HS_FUNCTION Configuration 3 IOCTL_COMEX_GET_ TMODULE_STATUS 4 IOCTL_COMEX_SET_ TMODULE_POWER control. Configures the extension function on the standard communication port such as external clock and half duplex control. Retrieves the status of power supply and connection on the serial communications modules. Controls power supply on the serial communications modules. 18

20 4.2 Control Codes IOCTL_COMEX_GET_HS_FUNCTION Description The local_comex_get_hs_function control code retrieves the current external clock setting, hold/setup time settings in the half duplex mode, and T/C signal settings in RS-485 half duplex mode. Syntax C BOOL DeviceIoControl HANDLE Device, DWORD IoControlCode, LPVOID InBuffer, DWORD InBufferSize, LPVOID OutBuffer, DWORD OutBufferSize, LPDWORD BytesReturned, LPOVERLAPPED Overlapped ); Visual Basic Declare Function DeviceIoControl Lib "kernel32" Alias _ "DeviceIoControl"( _ ByVal hdevice As Long, _ ByVal dwiocontrolcode As Long, _ lpinbuffer As Any, _ ByVal ninbuffersize As Long, _ lpoutbuffer As Any, _ ByVal noutbuffersize As Long, _ lpbytesreturned As Long, _ ByVal lpoverlapped As Long _ )As Long Delphi function DeviceIoControl( Device: THandle; IoControlCode: DWORD; InBuffer: Pointer; InBufferSize: DWORD; OutBuffer: Pointer; OutBufferSize: DWORD; var BytesReturned: DWORD; Overlapped: POverlapped ):BOOL; stdcall; 19

21 Parameters Device IoControlCode InBuffer Specifies the device handle obtained by the CreateFile function in the Win32 API. Specifies a control code for operation. Specifies IOCTL_COMEX_GET_HS_FUNCTION. Species an input buffer. Specifies NULL. InBufferSize Specifies the input buffer size. Specifies 0. OutBuffer Points to an output buffer. Specifies variables as follows depending on the intended use. Retrieving the Point to the COMMHSFUNC structure. external clock setting, hold/setup time setting in the half duplex mode. Retrieving the T/C signal settings in the RS-485 half duplex mode. Point to the T/C signal settings storage variable, 8-bit unsigned integer type. Returns a variable that is added up two constant, one from the C signal and one from the T signal below. Signal Constant Description C COMEX_HS_ C_INVALID C signal is always disasserted. COMEX_HS_ C_TXE C signal is asserted when the transmit enable signal (TXE) is 1. C signal is disasserted when the transmit enable signal T COMEX_HS_ C_NOT_TXE COMEX_HS_ C_VALID COMEX_HS_ T_TXE COMEX_HS_ T_VALID (TXE) is 0. C signal is disasserted when the transmit enable signal (TXE) is 1. C signal is asserted when the transmit enable signal (TXE) is 0. C signal is always asserted. T signal is asserted when the transmit enable signal (TXE) is 1. T signal is disasserted when the transmit enable signal (TXE) is 0. T signal is always asserted. 20

22 OutBufferSize ByteReturned Overlapped Specifies an output buffer. Specifies the size depending on the intended use. Retrieving the external clock setting, hold time/setup time setting in the half duplex mode. Retrieving the T/C signal settings in the RS-485 half duplex mode. Point to the COMMHSFUNC structure. Specifies the byte size of the 8-bit unsigned integer type Point to the variable to store the data size that stored into the buffer specified by OutBuffer. Specifies the OVERLAPPED structure. Specifies Null. Return Value If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Example <Retrieving the current external clock settings and the hold/setup time settings in the half-duplex mode.> C COMMHSFUNC HsFunc; // Extension structure DWORD cbreturns; // The buffer to receive the number of bytes. BOOL Ret; // Return value // Retrieves the value of the COMMHSFUNC structure. Ret = DeviceIoControl( hport, IOCTL_COMEX_GET_HS_FUNCTION, NULL, 0, &HsFunc, sizeof(commhsfunc), &cbreturns, NULL ); Visual Basic Dim HsFunc As COMMHSFUNC ' Extension structure Dim cbreturns As Long ' The buffer to receive the number of bytes. Dim Ret As Boolean ' Return value ' Retrieves extension function< Ret = DeviceIoControl( _ hport, _ IOCTL_COMEX_GET_HS_FUNCTION, _ 0, _ 0, _ HsFunc, _ Len(HsFunc), _ cbreturns, _ 0 _ ) 21

23 GPF-4161 Help for Windows Delphi var HsFunc : COMMHSFUNC; // Extension structure cbreturns: DWORD; // The buffer to receive the number of bytes. Ret : Boolean; // Return value begin // Retrieves the extension function. Ret := DeviceIoControl( hport, IOCTL_COMEX_GET_HS_FUNCTION, Nil, SizeOf(COMMHSFUNC), cbreturns, Nil ); end; Retrieves the current setting value of the COMMHSFUNC structure. <Retrieving the T/C signal settings in the RS-485 half-duplex mode> C COMMHSFUNC HsFunc; // Extension structure DWORD cbreturns; // The buffer to receive the number of bytes. BOOL Ret; // Return value UCHAR SigData; // Retrieved value of T/C signals. Ret = DeviceIoControl( hport, IOCTL_COMEX_GET_HS_FUNCTION, NULL, 0, &SigData, sizeof(uchar), &cbreturns, NULL ); Visual Basic Dim HsFunc As COMMHSFUNC ' Extension structure Dim cbreturns As Long ' The buffer to receive the number of bytes. Dim Ret As Boolean ' Return value Dim SigData As Byte ' Retrieved value of T/C signals. ' Retrieves extension function Ret = DeviceIoControl( _ hport, _ IOCTL_COMEX_GET_HS_FUNCTION, _ 0, _ 0, _ SigData, _ Len(SigData), _ cbreturns, _ 0 _ ) 22

24 Delphi var HsFunc : COMMHSFUNC; // Extension structure cbreturns: DWORD; // The buffer to receive the number of bytes. Ret : Boolean; // Return value UCHAR : SigData; // Retrieved value of T/C signals. begin // Retrieves extension function Ret := DeviceIoControl( hport, IOCTL_COMEX_GET_HS_FUNCTION, Nil, SizeOf(UCHAR), cbreturns, Nil ); end; Retrieves the T/C signal settings in the RS-485 half-duplex mode. 23

25 4.2.2 IOCTL_COMEX_SET_HS_FUNCTION Description The IOCTL_COMEX_SET_HS_FUNCTION control code configures the current external clock settings, hold/setup time settings in the half duplex mode, and T/C signal settings in the RS-485 half duplex mode. Syntax C BOOL DeviceIoControl HANDLE Device, DWORD IoControlCode, LPVOID InBuffer, DWORD InBufferSize, LPVOID OutBuffer, DWORD OutBufferSize, LPDWORD BytesReturned, LPOVERLAPPED Overlapped ); Visual Basic Declare Function DeviceIoControl Lib "kernel32" Alias _ "DeviceIoControl"( _ ByVal hdevice As Long, _ ByVal dwiocontrolcode As Long, _ lpinbuffer As Any, _ ByVal ninbuffersize As Long, _ lpoutbuffer As Any, _ ByVal noutbuffersize As Long, _ lpbytesreturned As Long, _ ByVal lpoverlapped As Long _ )As Long Delphi function DeviceIoControl( Device: THandle; IoControlCode: DWORD; InBuffer: Pointer; InBufferSize: DWORD; OutBuffer: Pointer; OutBufferSize: DWORD; var BytesReturned: DWORD; Overlapped: POverlapped ):BOOL; stdcall; 24

26 Parameter Device IoControlCode InBuffer Specifies the device handle obtained by the CreateFile function in the Win32 API. Specifies a control code for operation. Specifies IOCTL_COMEX_SET_HS_FUNCTION. Species an input buffer. Specifies variables as follows depending on the intended use. Configuring the Point to the COMMHSFUNC structure. external clock setting, hold/setup time settings in the half duplex mode. Retrieving the T/C signal settings in the RS-485 half duplex mode. Point to the T/C signal settings storage variable, 8-bit unsigned integer type. Configures a variable that is added up two constant, one from the C signal and one from the T signal below. Signal Invariable Description C COMEX_HS_ C signal is always T C_INVALID COMEX_HS_ C_TXE COMEX_HS_ C_NOT_TXE COMEX_HS_ C_VALID COMEX_HS_ T_TXE COMEX_HS_ T_VALID disasserted. C signal is asserted when the transmit enable signal (TXE) is 1. C signal is disasserted when the transmit enable signal (TXE) is 0. C signal is disasserted when the transmit enable signal (TXE) is 1. C signal is asserted when the transmit enable signal (TXE) is 0. C signal is always asserted T signal is asserted when the transmit enable signal (TXE) is 1. T signal is disasserted when the transmit enable signal (TXE) is 0. T signal is always asserted. 25

27 InBufferSize Specifies the input buffer size. Specifies 0. Configuring the external clock Point to the COMMHSFUNC settings, hold/setup time settings structure. in the half duplex mode. Configuring the T/C signal settings Specifies the byte size of the 8-bit in the RS-485 half duplex mode. unsigned integer type. OutBuffer Point to an output buffer. Specifies NULL. OutBufferSize Specifies an output buffer size. Specifies 0. ByteReturned Overlapped Point to the variable to store the data size that stored into the buffer specified by OutBuffer. Specifies the OVERLAPPED structure. Specifies NULL. Return Value If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Example The current external clock settings and hold/setup time settings in the half duplex mode: C COMMHSFUNC HsFunc; // Extension structure DWORD cbreturns; // The buffer to receive the number of bytes. BOOL Ret; // Return value // Configures the values HsFunc.dwTxCSelect = COMEX_HS_TXC_EXTERNAL; HsFunc.dwRxCSelect = COMEX_HS_RXC_EXTERNAL; HsFunc.dwSetupTime = 10000; HsFunc.dwHoldTime = 15000; // Configure the extension function Ret = DeviceIoControl( hport, IOCTL_COMEX_SET_HS_FUNCTION, &HsFunc, sizeof(commhsfunc), NULL, 0, &cbreturns, NULL ); 26

28 Visual Basic Dim HsFunc As COMMHSFUNC ' Extension structure Dim cbreturns As Long ' the buffer to retrieve the number bytes. Dim Ret As Boolean ' Return value ' Configures the values HsFunc.dwTxCSelect = COMEX_HS_TXC_EXTERNAL HsFunc.dwRxCSelect = COMEX_HS_RXC_EXTERNAL HsFunc.dwSetupTime = HsFunc.dwHoldTime = ' Configures the extension function. Ret = DeviceIoControl( _ hport, _ IOCTL_COMEX_SET_HS_FUNCTION, _ HsFunc, _ Len(HsFunc), _ 0, _ 0, _ cbreturns, _ 0 _ ) Delphi var HsFunc : COMMHSFUNC; // Extension structure cbreturns: DWORD; // The buffer to receive the number of bytes. Ret : Boolean; // Return value begin // Configures the values. HsFunc.dwTxCSelect := COMEX_HS_TXC_EXTERNAL; HsFunc.dwRxCSelect := COMEX_HS_RXC_EXTERNAL; HsFunc.dwSetupTime := 10000; HsFunc.dwHoldTime := 15000; // Configures the extension function. Ret := DeviceIoControl( hport, SizeOf(COMMHSFUNC), Nil, 0, cbreturns, Nil ); end; Configures the COMMHSFUNC structure. 27

29 The T/C signal settings in the RS-485 half duplex mode: C DWORD cbreturns; // The buffer to receive the number of bytes. BOOL Ret; //Return value UCHAR SigData; // The setting value of the T/C signals // Configures the T/C signals. SigData = COMEX_HS_T_VALID COMEX_HS_C_VALID; Ret = DeviceIoControl( hport, IOCTL_COMEX_SET_HS_FUNCTION, &SigData, sizeof(uchar), NULL, 0, &cbreturns, NULL ); Visual Basic Dim HsFunc As COMMHSFUNC ' Extension Dim cbreturns As Long ' The buffer to receive the number of bytes Dim Ret As Boolean ' Return value Dim SigData As Byte ' The setting value of the T/C signals ' Configures the values SigData = COMEX_HS_T_VALID COMEX_HS_C_VALID ' Configures the extension function. Ret = DeviceIoControl( _ hport, _ IOCTL_COMEX_SET_HS_FUNCTION, _ SigData, _ Len(SigData), _ 0, _ 0, _ cbreturns, _ 0 _ ) 28

30 Delphi var HsFunc : COMMHSFUNC; // Extension structure cbreturns: DWORD; // The buffer to receive the number of bytes Ret : Boolean; // Return value UCHAR : SigData; // The setting value of the T/C signals begin // Configures the values. SigData := COMEX_HS_T_VALID COMEX_HS_C_VALID; // Configures the extension function Ret := DeviceIoControl( hport, SizeOf(UCHAR), Nil, 0, cbreturns, Nil ); end; Configures the T/C signal settings in the half duplex mode. 29

31 4.2.3 IOCTL_COMEX_GET_TMODULE_STATUS Description Syntax The IOCTL_COMEX_GET_TMODULE_STATUS control code retrieves the status of the power supply and connection on the serial communications modules. C BOOL DeviceIoControl HANDLE Device, DWORD IoControlCode, LPVOID InBuffer, DWORD InBufferSize, LPVOID OutBuffer, DWORD OutBufferSize, LPDWORD BytesReturned, LPOVERLAPPED Overlapped ); Visual Basic Declare Function DeviceIoControl Lib "kernel32" Alias _ "DeviceIoControl"( _ ByVal hdevice As Long, _ ByVal dwiocontrolcode As Long, _ lpinbuffer As Any, _ ByVal ninbuffersize As Long, _ lpoutbuffer As Any, _ ByVal noutbuffersize As Long, _ lpbytesreturned As Long, _ ByVal lpoverlapped As Long _ )As Long Delphi function DeviceIoControl( Device: THandle; IoControlCode: DWORD; InBuffer: Pointer; InBufferSize: DWORD; OutBuffer: Pointer; OutBufferSize: DWORD; var BytesReturned: DWORD; Overlapped: POverlapped ):BOOL; stdcall; 30

32 Parameters Device IoControlCode InBuffer Specifies the device handle obtained by the CreateFile function in the Win32API. Specifies a control code for operation. Specifies IOCTL_COMEX_GET_TMODULE_STATUS. Species an input buffer. Specifies NULL. InBufferSize Specifies the input buffer size. Specifies 0. OutBuffer Point to an output buffer. Point to a variable to store the status of the serial communications module (8-bit unsigned integer type). Each variable has meaning as follows. Bit7 Reserved Bit6 Reserved Bit5 Reserved Bit4 Reserved Bit3 Power supply history Bit2 Connection history Bit1 Power supply status Bit0 Connection status Power supply/connection history 1: has failed before. 0: has never failed Power supply/connection status 1: ready 2. failed OutBufferSize ByteReturned Overlapped Specifies an output buffer size. Specifies the byte size of the 8-bit unsigned integer type. Point to the variable to store the data size that stored into the buffer specified by OutBuffer. Specifies the OVERLAPPED structure. Specifies NULL. Return Value If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. 31

33 Example GPF-4161 Help for Windows C UCHAR GetStatus; // Argument DWORD cbreturns; // The buffer to receive the number of bytes. BOOL Ret; // Return value // Retrieves the status. Ret = DeviceIoControl( hport, IOCTL_COMEX_GET_TMODULE_STATUS, NULL, 0, &GetStatus, sizeof(uchar), &cbreturns, NULL ); Visual Basic Dim HsFunc As COMMHSFUNC ' Extension structure Dim cbreturns As Long ' The buffer to retrieve the number bytes. Dim Ret As Boolean ' Return Value Dim GetStatus As Byte ' Argument ' Retrieves the extension function Ret = DeviceIoControl( _ hport, _ IOCTL_COMEX_GET_TMODULE_STATUS, _ 0, _ 0, _ GetStatus, _ Len(GetStatus), _ cbreturns, _ 0 _ ) Delphi var HsFunc : COMMHSFUNC; // Extension function cbreturns: DWORD; // The buffer to retrieve the number bytes. Ret : Boolean; // Return Value UCHAR : GetStatus; // Argument begin // Retrieves the extension function Ret := DeviceIoControl( hport, IOCTL_COMEX_GET_TMODULE_STATUS, Nil, SizeOf(UCHAR), cbreturns, Nil ); end; Retrieves the status of a serial communications module. 32

34 4.2.4 IOCTL_COMEX_SET_TMODULE_POWER Description The IOCTL_COMEX_SET_TMODULE_POWER control code controls the power supply of the serial communications modules. Syntax C BOOL DeviceIoControl HANDLE Device, DWORD IoControlCode, LPVOID InBuffer, DWORD InBufferSize, LPVOID OutBuffer, DWORD OutBufferSize, LPDWORD BytesReturned, LPOVERLAPPED Overlapped ); Visual Basic Declare Function DeviceIoControl Lib "kernel32" Alias _ "DeviceIoControl"( _ ByVal hdevice As Long, _ ByVal dwiocontrolcode As Long, _ lpinbuffer As Any, _ ByVal ninbuffersize As Long, _ lpoutbuffer As Any, _ ByVal noutbuffersize As Long, _ lpbytesreturned As Long, _ ByVal lpoverlapped As Long _ )As Long Delphi function DeviceIoControl( Device: THandle; IoControlCode: DWORD; InBuffer: Pointer; InBufferSize: DWORD; OutBuffer: Pointer; OutBufferSize: DWORD; var BytesReturned: DWORD; Overlapped: POverlapped ):BOOL; stdcall; 33

35 Parameter Device IoControlCode InBuffer InBufferSize OutBuffer Specifies the device handle obtained by the CreateFile function in the Win32 API. Specifies a control code for operation. Specifies IOCTL_COMEX_GET_TMODULE_STATUS. Species an input buffer. Point to a variable to set the power supply of serial communications modules (8-bit unsigned integer type). Specifies either one of the following values. Value Description COMEX_POWER_OFF Communications module power supply: OFF COMEX_POWER_ON Communications module power supply: ON Specifies an input buffer size. Specifies the byte size of the 8-bit unsigned integer type. Point to an output buffer. Specifies NULL. OutBufferSize Specifies the output buffer size. Specifies 0. ByteReturned Overlapped Point to the variable to store the data size that stored into the buffer specified by OutBuffer. Specifies the OVERLAPPED structure. Specifies NULL. Return Value If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Example C UCHAR SetPower; // Argument DWORD cbreturns; // The buffer to receive the number of bytes. BOOL Ret; // Return value // Turn on the power supply. SetPower = 1; Ret = DeviceIoControl( hport, IOCTL_COMEX_SET_TMODULE_POWER, &SetPower, sizeof(uchar), NULL, 0, &cbreturns, NULL ); 34

36 Visual Basic Dim HsFunc As COMMHSFUNC ' Extension structure Dim cbreturns As Long ' The buffer to retrieve the number bytes. Dim Ret As Boolean ' Return value Dim SetPower As Byte ' Argument ' Sets the value SetPower = 1 ' Sets the extension function Ret = DeviceIoControl( _ hport, _ IOCTL_COMEX_SET_TMODULE_POWER, _ SetPower, _ Len(SetPower), _ 0, _ 0, _ cbreturns, _ 0 _ ) Delphi var HsFunc : COMMHSFUNC; // Extension structure cbreturns: DWORD; // The buffer to retrieve the number bytes. Ret : Boolean; // Return value UCHAR : SetPower; // Argument begin // Sets the value SetPower:= 1; end; // Sets the extension function Ret := DeviceIoControl( hport, SizeOf(UCHAR), Nil, 0, cbreturns, Nil ); Sets the serial communications module power supply to ON. 35

37 4.3 Structures COMMHSFUNC Structure C typedef struct { DWORD DwTxCSelect; DWORD DwRxCSelect; DWORD DwHoldTime; DWORD DwSetupTime; DWORD dwmode; } COMMHSFUNC, *PCOMMHSFUNC; Visual Basic Type COMMHSFUNC DwTxCSelect DwRxCSelect DwHoldTime dwsetuptime dwmode End Type Deplhi COMMHSFUNC = record dwtxcselect: dwrxcselect: dwholdtime: dwsetuptime: dwmode: end; As Long As Long As Long As Long As Long DWORD; DWORD; DWORD; DWORD; DWORD; Member dwtxcselect dwrxcselect Description Specifies either an internal clock or external clock used for a transmit clock. Code Description COMEX_HS_TXC_INTERNAL An internal clock is used for a transmit clock. COMEX_HS_TXC_EXTERNAL An external clock is used for a transmit clock. Note: Only the PCI-4161 can use an external clock. Specifies either an internal clock or external clock used for a receive clock. Code Description COMEX_HS_RXC_INTERNAL An internal clock is used for a receive clock. COMEX_HS_RXC_EXTERNAL An external clock is used for a receive clock. Note: Only the PCI-4161 can use an external clock. 36

38 dwholdtime The implication of the hold time differs depending on models. PCI-4161, CBI-4641, CBI WA: Configures hold time, in µs, in the half-duplex transmission mode. The hold time is the interval between the end of data transmission and the deassertion of the RS signal. The value of dwholdtime may range from 1 through µs (1.5 s). RS CS Transmit data S H The Other Models: Configures hold time, in µs, in half-duplex transmission mode. The hold time is the interval between the end of data transmission from boards and the deassertion of the TXE signal or RS signal. The value of dwholdtime may range from 1 through µs (150 ms). RS Transmit data S H 37

39 Notes: * All possible values are listed below. If a value other than the following is specified for dwholdtime, then the actual value shall be rounded up to the next possible value. For example, if you specify 1501, the value is rounded up to * The red values are configurable in the PCI-4161 and CBI series. Unit: µs dwsetuptime The implication of the setup time differs depending on models. PCI-4161, CBI-4641, CBI WA: Configures the setup time, in µs, in the half-duplex transmission mode. The setup time is the interval between the assertion of the CS (clear-to-send) signal and the start of data writing. The value of dwsettime may range from 1 through µs (1.5 s). RS CS Data S H 38

40 The Other Models: Configures setup time, in µs, in half-duplex transmission mode. The setup time is the interval between the assertion of the TXE signal or RS signal and the start of data writing from boards. The value of dwsettime may range from 1 through (150 ms). RS Data S H Notes: Available setting values are the same as that of dwholdtime. Refer to Setup Time and CS Hard Flow Control to simultaneously set the setup time in half-duplex mode and CS flow control dwmode Configures port settings. 1. Monitor function settings (CBI-4641, CBI , and CSI ) Refer to Monitor Functions. Code Description COMEX_HS_MONITOR_DISABLE Disables the monitor functions. COMEX_HS_MONITOR_RSCS Enables the monitor functions. (CS/RS connection). COMEX_HS_MONITOR_RSCD Enables the monitor functions. (CD/RS connection). 39

41 4.4 Transfer Rate Available Transfer Rate of the GPF-4161 The following table shows typical programmable transfer rates. When you use internal clock the following transfer rate (bps) are selectable. Note: - The maximum transfer rate of RS-232C products is 1 Mbps. - The following products are not applicable. - PCI U (Refer to Transfer Rate for PCI U ) - PCI U and PCI U (Refer to Transfer Rate for PCI U and PCI U ) Base Clock Frequency Divisor MHz MHz MHz MHz 32 MHz MHz MHz The settable transfer rate can be determined using the following discriminant. Value = Base clock (Hz) / (Transfer rate (bps) 16) The settable integer value is from 1 through

42 4.4.2 Transfer Rate for PCI U S-232C Only the following fixed transfer rate can be configured in RS-230C. 2400bps, 4800bps, 7200bps,9600bps, 14400bps, 19200bps, 28800bps, 38400bps, 56000bps, 57600bps, bps, bps,230400, bps, bps RS-485 The transfer rage can be configurable in the range from 300 bps through 2 Mbps. The following table shows the configurable transfer rate (bps) with an error within 2 %. The following values are examples of the transfer rates. Divisor To determine if a transfer rate is configurable or not, use the following discriminant. 1. Calculating Clock Divider Clock Divider 48 [MHz] (2 prescale transfer rate to configure [bps]) * Prescale is 4 when the transfer rate (bps) is equal to or less than 365, and 1 when the transfer rate is bigger than 365. * Clock Divider is an integer which is rounded down after the decimal point. 2. Caluculating the configured transfer rate using the result of 1. Configured transfer rate = 48[MHz] (2 prescale clock divider) * Prescale is 4 when the transfer rate (bps) is equal to or less than 365, and 1 when the transfer rate is bigger than Calculating the error of transfer rate [%] by the following fomula to check that the error is under the aceptable error of connectted device. (The acceptable error is genrarlly within ±2%.) Error of tranffer rate = 100 (1 - (configured transfer rate[bps] transfer rate to configure [bps])) ±0.25% 41

43 4.4.3 Transfer Rate for PCI U and PCI U The transfer rage can be configurable in the range from 300 bps through 1 Mbps. The following table shows the configurable transfer rate (bps) with an error within 2 %. The following values are examples of the transfer rates. Divisor * * The transfer rate is applicable only to the PCI-46101U. To determine if a transfer rate is configurable or not, use the following discriminant. 1. Calculating Clock Divider Clock Divider 48 [MHz] (2 prescale transfer rate to configure [bps]) * Prescale is 4 when the transfer rate (bps) is equal to or less than 365, and 1 when the transfer rate is bigger than 365. * Clock Divider is an integer which is rounded down after the decimal point. 2. Caluculating the configured transfer rate using the result of 1. Configured transfer rate = 48[MHz] (2 prescale clock divider) * Prescale is 4 when the transfer rate (bps) is equal to or less than 365, and 1 when the transfer rate is bigger than Calculating the error of transfer rate [%] by the following fomula to check that the error is under the aceptable error of connectted device. (The acceptable error is genrarlly within ±2%.) Error of tranffer rate = 100 (1 - (configured transfer rate[bps] transfer rate to configure [bps])) ±0.25% 42

44 4.5 Monitor Functions Data or control signals can be monitored by using the CBI-4641, CBI WA or CSI between two communications devices. The control signal which can monitor differs depending on the wiring of communications equipment. Straight connection for all pins such as the connection between modem and serial port cannot be monitored CS/RS Connection The CS, DR, and RD signals are monitorable signals. The CS and RS signals must be cross connection. Communications equipment 1 SD RD ER DR RS CS CD CI CSI CN1 CN Communications equipment SD RD ER DR RS CS CD CI CD/RS Connection The CD, DR, and RS signals are monitorable signals. The CD and RS signals must be cross connection. Communications equipment 1 SD RD ER DR RS CS CD CI CSI CN1 CN Communications equipment SD RD ER DR RS CS CD CI 43

45 4.5.3 Using Monitor Functions Call the ReadFile function to retrieve data, and the GetCommModemStatus function to retrieve the status of control signals. By calling the ReadFile and Get_CommModem Status function in the CN1/CN2 ports, the data/status of control signals output from communications devices can be retrieved. Communications equipment 1 SD RD ER DR RS CS CD CI CSI CN1(COM5) CN2(COM6) Communications equipment SD RD ER DR RS CS CD CI Example Retrieving output data from communications equipment 1. hport = CreateFile("\\\\.\\COM5", GENERIC_READ GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); DeviceIoControl(hPort, IOCTL_COMEX_GET_HS_FUNCTION, NULL, 0, &HsFunc, sizeof(commhsfunc), &cbreturns, NULL); HsFunc.dwMode = COMEX_HS_MONITOR_RSCS; DeviceIoControl(hPort, IOCTL_COMEX_SET_HS_FUNCTION, &HsFunc, sizeof(commhsfunc), NULL, 0, &cbreturns, NULL); ClearCommError(hPort, &ErrorStatus, &ComStat); if(comstat.cbinque > 0) { ReadFile(hPort, ReceiveBuffer, ComStat.cbInQue, &ReadLength, NULL); } CloseHandle(hPort); 44

46 Retrieving the status of ER and RS signals on the communications equipment 1. hport = CreateFile("\\\\.\\COM5", GENERIC_READ GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); DeviceIoControl(hPort, IOCTL_COMEX_GET_HS_FUNCTION, NULL, 0, &HsFunc, sizeof(commhsfunc), &cbreturns, NULL); HsFunc.dwMode = COMEX_HS_MONITOR_RSCS; DeviceIoControl(hPort, IOCTL_COMEX_SET_HS_FUNCTION, &HsFunc, sizeof(commhsfunc), NULL, 0, &cbreturns, NULL); GetModemStatus(hPort, &ModemStatus); if(modemstatus & MS_CTS_ON) { // The RS signal is on. } if(modemstatus & MS_DSR_ON) { // The ER signal is on. } CloseHandle(hPort); Restrictions The monitor functions have restrictions as follows. 1. You cannot output data/change the status of the RS/ER signals. 2. The flow control is not supported. Even if the receive buffer overflows, the other equipment cannot stop sending data. Set the bigger buffer size to prevent the receive buffer overflowing. 45

47 4.6 Two/Four-Wire Communications The RS-485 products control two/four-wire communications in Advanced Setting COMxxx. xxx is the COM port number. * Open a port to enable this settings. * Communication function settings is not displayed in the RS-232C products. * The following products are not applicable to Advanced Setting COMxxx. To configure four-wire full-duplex communications/two-wire half-duplex communications, use Duplex Setting Utility. PCI U (RS-485), PCI U Operation procedure 1. Click Start button. Select Settings > Control Panel. The control panel appears. Click System in the control panel. Click the Hardware tab and point to Device Manager. The list of installed/set devices is shown. 2. Select a device from Port (COM & LPT). Click Action > Propaties. 3. The Propaties dialogue box appears. Click the Port Setting tub > Advanced 4. Set the setting values by moving the scroll box of the Transmit Buffer and Receive Buffer. The values of Transmit Buffer and Receive Buffer in the Advanced Settings for COMxxx are transmit/receive interrupt thresholds.they are not buffer size. 5. Select a communication function from Communication Function Setting in the Advanced Settings for COMxxx dialogue box and click OK. 6. Click OK in the Propaties dialogue box. 7. The communication function settings, two/four-wire and half duplex/full duplex, are completed. 46

48 4.7 Attentions Half-Duplex Control Half-duplex control requires the following settings for each language. * The following products are not applicable to Advanced Setting COMxxx. To configure four-wire full-duplex communications/two-wire half-duplex communications, use Duplex Setting Utility. PCI U, PCI U *The settings of RS-485 is applicable to four-wire communications. The RS-485 settings are available for two-wire half-duplex communications but the communication settings are always configured as two-wire half-duplex communications. C Specify RTS_CONTROL_TOGGLE to frtscontrol of the DCB structure. Visual Basic Specify 1 to Bit12 and Bit13 of fbitfieldsof the DCB structure. Delphi Specify 1 to Bit12 and Bit13 of Flags of the TDCB structure. Half-duplex control does not available without setting RTS_CONTROL_TOGGLE in the RS-232C. Because Visual Basic and Delphi do not support bit field as C supports, fbitfields is dealt as a 32-bit integer value in Visual Basic and Delphi, and on or off the the corresponding bit in frtscontrol. fbitfields of the DCB structure in Visual Basic and Flags of the TDCB structure in Delphi correspond to members of the DCB structure in C. The bit configuration is as follows. Bit Corresponding Members to the DCB Structure in C 0 fbinary 1 fparity 2 foutxctsflow 3 foutxdsrflow 4 fdtrcontrol (2 bits) 6 fdsrsendsitivity 7 ftxcontinueonxoff 8 foutx 9 finx 10 ferrorchar 11 fnull 12 frtscontrol (2 bits) 14 fabortonerror 15 fdummy2 (Reserved) 47

49 4.7.2 Half- Duplex Control of Communications Module Products In some of serial communications module products, the time that the TXE or RS signal is asserted or disasserted is delayed against transmit data. Refer to the following table for the procucts in which delay occurrs. Configure bigger value than the delay time for the setup time because delay occurs. And consider delay time to configure the setup time and hold time in serial communications module products. Model Version Change Number Delay Time CPZ/PCI Q 11 4 μs (max.) C01 4 μs (max.) C02 1 bit time (max.) μs CPZ/PCI Q 11 4 μs (max.) C01 4 μs (max.) C02 1 bit time (max.) μs CPZ/PCI Q 11 4 μs (max.) C01 4 μs (max.) C02 4 μs (max.) Setup time is 4 μs in default settings. C03 1 bit time (max.) μs CPZ/PCI Q 11 4 μs (max.) C01 4 μs (max.) C02 4 μs (max.) Setup time is 4 μs in default settings. C03 1 bit time (max.) μs CTP Q 11 1 bit time (max.) μs CTP Q 11 1 bit time (max.) μs CTP Q 11 1 bit time (max.) μs CTP Q 11 1 bit time (max.) μs CSI μs (max.) C01 1 bit time (max.) μs Flow Control The RS flow control and four-wire half-duplex communications are not performed simultaneously. The RS/CS flow control and half-duplex communications are not performed simultaneously on the following models. CPZ/CTP/PCI Q, CPZ/CTP/PCI Q, CPZ/CTP/PCI Q, CPZ/CTP/PCI Q 48

50 4.7.4 The Threshold Values of XON/XOFF Transmits The threshold values of XON transmit (XonLim) and XOFF transmit (XoffLim) are fixed depending on the receive trigger level. The fixed values are as follows. Note: The receive trigger level from one through seven is not applicable to the PCI-4161, CBI-4641, and CBI WA. Receive Trigger Level XonLim XoffLim 1 through Receive trigger level is the same meaning as receive buffer in Advanced settings for COMXXX. Refer to Two/Four-Wire Communications for the setting procedure Transmit Trigger Level The number of bytes transmitted in a time is determined by the transmit trigger level Hardware Flow Control The RS/CS flow, XON/XOFF flow, and half-duplex are controlled in a hardware using FIFO. When transmission is stopped (for example, when XOFF is received in XON/XOFF flow control settings), the hardware flow control stops data transmition from FIFO. Call the PurgeComm function to clear data in transmit FIFO. XON/XOFF flow is not applicable to two-wire half-duplex communications. To control hardware flow, Set the C and T signals always to be enabled with extension code (4.2.2 IOCTL_COMEX_SET_HS_FUNCTION) Stop Bit Only 1 stop bit and 2 stop bits are supported. If you specify 1.5 stop bits, the stop bit is automatically changed to 1 stop bit in the driver. 49

51 4.7.8 The ClearCommError Function XOFF hold is not supported most of products except the following models because they control XON/XOFF flow by hardware. The following models support Xoff hold: PCI-4161, CBI-4641, CBI , CBI WA Receive Interval Timeout Only 0 or FFFFFFFFh is set to receive interval timeout (ReadIntervalTimeout of the COMMTIMEOUTS structure) in the following models. PCI Q, PCI Q, PCI Q, PCI Q, CPZ Q, CPZ Q, CPZ Q, CPZ Q, CTP Q, CTP Q, CTP Q, CTP Q DTR/DSR Flow The following models do not support DTR/DSR flow. PCI Q, PCI Q, PCI Q, PCI Q, CPZ Q, CPZ Q, CPZ Q, CPZ Q, CTP Q, CTP Q, CTP Q, CTP Q, PCI U, PCI U, PCI U Only FALSE can be set to foutxdsrflow of the DCB structure. DTR_CONTROL_HANDSHAKE is not settable to fdtrcontrol of the DCB structure. Only FALSE can be set to fdsrsensitivility of the DCB structure Power Supply and Connection of Serial Communications Modules When a serial communications module products is not connected to the power supply of the serial communications module, the serial communications return ReadFile, CloseHandle, or error codes. Check the errors with GetLastError. Refer to the following error codes for the meaning. ERROR_NOT_READY ERROR_CRC The power supply or cable is not connected. The connected serial communications module is not correct. 50

52 Events The serial communications modules can monitor the connection of cables and power supply using events. Configure an event by the SetCommMask function and wait an event by the WaitCommEvent function. See below for the event masks. EV_EVENT1 EV_EVENT2 Monitors the cable connection. Monitors the power supply. The event occurrence means abnormal condition such as disconnection of cable and shutting off the power supply. If an event occurs, handle it properly. Note: This event will not be generated in the CPZ/PCI Q version 11 without channnels. The product shut down automatically instede of generating the event. If you use a function after shutdown of the product, an error will be returned. Check the error using the GetLast Error function. Recover from the error by closing the port or DIO, and open them. If the product is normal, it will be powered on and become available to use Setup Time and CS Hard Flow Control The setup time (dwsetuptime of the COMMHSFUNC structure) and the CS Flow control are configured in the half-duplex communications, the data is transmitted after setup time starts and the CS signal is asserted. RS CS Data S H If the CS signal is asserted after setup time is terminated, it may take much time than setup time to transmit data. RS CS Data S H 51

53 Ocupation Time by Receive Interrupt This software extracts receive data from FIFO during receive interrupt processings. Therefore, the occupation time of receive interrupt changes depending on the setting value of receive buffer. The bigger the value of receive buffer is, the longer the occupation time by receive interrupt becomes because the amount of extracted data from FIFO in one receive interrupt processing becomes bigger. The number of occurrences of receive interrupt is reduced. The smaller the value of receive buffer is, the shorter the occupation time by receive interrupt becomes because the amount of extracted data from FIFO in one receive interrupt processing becomes smaller. The number of occurrences of receive interrupt is increased. Refer to 4.6 Two/Four-Wire Communications to configure receive buffer. 52

54 4.8 Version Considerations and Change Number The hardware version and change number is shown the following location on the front face of an board. The displayed location may differ depending on model. Change Number Cyy xx] P/xxxx/x-xx [ Hardware version In this Help, the hardware versions and change numbers are discribed as follows. Example: Model PCI Q Hardware Version 11 Change Number C02 PCI Q[11]C02 53

55 Chapter 5 Reference: Communications Module Event 5.1 List of DLL Functions This chapter describes the Win32 API to use the power supply/connection events of the serial communications modules. No. Function Description Communications Module Event 1 SetCommMask Specifies events to be monitored. 2 WaitCommEvent Waits for event occurrence. 54

56 5.1.1 SetCommMask The SetCommMask function specifies a set of events to be monitored for a communication device. Syntax C BOOL SetCommMask( HANDLE Device, DWORD EvtMask ); Visual Basic Declare Function SetCommMask Lib "kernel32" Alias "SetCommMask"( _ ByVal Device As Long, _ ByVal EvtMask As Long _ )As Long Delphi function SetCommMask( Device: THandle; EvtMask: DWORD ):BOOL; stdcall; Parameters Device EvtMask Specifies the device handle obtained by the CreateFile function of the Win32 API. Specifies the event to be monitored. A value of zero disables all events. Use the following values for communication module event. Value Description Ev_Event1 An interrupt is generated when the communication module is disconnected.(connection monitor event) Ev_Event2 An interrupt is generated when the communications module power supply voltage is abnormal.(power supply monitor event) Return Value If the SetCommMask function succeeds, the return value is nonzero.if the function fails, the return value is zero. 55

57 Example C HANDLE DeviceHandle; BOOL Ret; Ret = SetCommMask(DeviceHandle, EV_EVENT1); Visual Basic Dim DeviceHandle As Long Dim Ret As Long Ret = SetCommMask(DeviceHandle, EV_EVENT1) Delphi var DeviceHandle: THandle; Ret: BOOL; begin Ret := SetCommMask(DeviceHandle, EV_EVENT1); end; Enables the monitor event of serial communications modules connection. 56

58 5.1.2 WaitCommEvent The WaitCommEvent function waits for event occurrence. Syntax C BOOL WaitCommEvent( HANDLE LPDWORD LPOVERLAPPED ); Device, EvtMask, Overlapped Visual Basic Declare Function WaitCommEvent Lib "kernel32" Alias "WaitCommEvent"( _ ByVal Device As Long _ EvtMask As Long, _ Overlapped As OVERLAPPED _ )As Long Delphi function WaitCommEvent( Device: Thandle; var EvtMask: DWORD; Overlapped: POverlapped ): BOOL; stdcall; Parameters Device EvtMask Overlapped Specifies the device handle obtained by the CreateFile function of the Win32 API. Pointer to a variable that receives a mask indicating the type of event that occurred. If an error occurs, the value is zero; otherwise, it is one of the following value Value Description Ev_Event1 Detects the disconnection with a serial communications module. (connection monitor event) Ev_Event2 Detects the power supply voltage abnormality of a serial communications module.(power supply monitor event) Pointer to an OVERLAPPED structure. This structure is required if a device was opened with FILE_FLAG_OVERLAPPED. Otherwise specify Null. Return Value If the WaitCommEvent function succeeds, the return value is nonzero.if the function fails, the return value is zero. 57

59 Example C HANDLE DeviceHandle; BOOL Ret; DWORD GetEvtMask; Ret = SetCommMask(DeviceHandle, EV_EVENT1); Ret = WaitCommEvent(DeviceHandle, GetEvtMask, NULL); Visual Basic Dim DeviceHandle As Long Dim Ret As Long Dim GetEvtMask As Long Ret = SetCommMask(DeviceHandle, EV_EVENT1) Ret = WaitCommEvent(DeviceHandle, GetEvtMask, 0) Delphi var DeviceHandle: THandle; Ret: BOOL; GetEvtMask: DWORD; begin Ret := SetCommMask(DeviceHandle, EV_EVENT1); Ret := WaitCommEvent(DeviceHandle, GetEvtMask, nil); end; Enables the monitor event of serial communications module disconnection. 58

60 5.2 Structure OVERLAPPED Structure C typedef struct _OVERLAPPED { DWORD Internal; DWORD InternalHigh; DWORD Offset; DWORD OffsetHigh; HANDLE hevent; } OVERLAPPED; Visual Basic Type OVERLAPPED Internal InternalHigh Offset OffsetHigh hevent End Type As Long As Long As Long As Long As Long Delphi POverlapped = ^TOverlapped; TOverlapped = record Internal: DWORD; InternalHigh: DWORD; Offset: DWORD; OffsetHigh: DWORD; HEvent: THandle; end; Member Internal Description Reserved for an operating system use. This member, which specifies a system-dependent status, is valid when the GetOverlapped Result function returns without setting the extended error information to ERROR_IO_PENDING. InternalHigh This member is reserved for an operating system. Specify the data length of transferred data. This file is available only when the GetOverlappedResult returns a value other than 0. Offset OffsetHigh hevent Specifies a file position at which to start the transfer. The file position is a byte offset from the start of the file. The calling process sets this member before calling the ReadFile or WriteFile function. This member is ignored when reading from or writing to named pipes and communications devices and should be zero. Specifies the high word of the byte offset at which to start the transfer. This member is ignored when reading from or writing to named pipes and communications devices and should be zero. Identify an event set to the signaled state when the transmission has been completed. 59

61 5.2.2 DCB Structure The DCB structure defines the control setting for a serial communications device. C typedef struct _DCB { DWORD DCBlength; DWORD BaudRate; DWORD fbinary; DWORD fparity; DWORD foutxctsflow; DWORD foutxdsrflow; DWORD fdtrcontrol; DWORD fdsrsensitivity; DWORD ftxcontinueonxoff; DWORD foutx; DWORD finx; DWORD ferrorchar; DWORD fnull; DWORD frtscontrol; DWORD fabortonerror; DWORD fdummy2; WORD wreserved; WORD XonLim; WORD XoffLim; BYTE ByteSize; BYTE Parity; BYTE StopBits; char XonChar; char XoffChar; char ErrorChar; char EofChar; char EvtChar; WORD wreserved1; } DCB; 60

62 Visual Basic Type DCB DCBlength BaudRate fbitfields wreserved XonLim XoffLim ByteSize Parity StopBits XonChar XoffChar ErrorChar EofChar EvtChar wreserved1 End Type As Long As Long As Long As Integer As Integer As Integer As Byte As Byte As Byte As Byte As Byte As Byte As Byte As Byte As Integer Delphi type TDCB = packed record DCBlength: DWORD; BaudRate: DWORD; Flags: Longint; wreserved: DWORD; XonLim: Word; XoffLim: Word; ByteSize: Byte; Parity: Byte; StopBits: Byte; XonChar: CHAR; XoffChar: CHAR; ErrorChar: CHAR; EofChar: CHAR; EvtChar: CHAR; wreserved1: Word; end; PDCB = ^TDCB; 61

63 Member DCBlength; BaudRate; fbitfields Flags fbinary fparity foutxctsflow foutxdsrflow Description Specifies the length, in bytes, of the DCB structure. Specifies transfer rate at which communication devices operates. RS-232C 128 bps through bps(1mbps) RS bps through bps(4mbps) The settable range differs depending on the board. Because Visual Basic and Delphi do not support bit field as C supports, fbitfields is dealt as a 32-bit integer value in Visual Basic and Delphi, and on or off the corresponding bit in frtscontrol. fbitfields of the DCB structure in Visual Basic and Flags of the TDCB structure in Delphi correspond to members of the DCB structure in C. The bit configuration is as follows. Bit Corresponding Members to the DCB Structure in C 0 fbinary 1 fparity 2 foutxctsflow 3 foutxdsrflow 4 fdtrcontrol (2 bits) 6 fdsrsendsitivity 7 ftxcontinueonxoff 8 foutx 9 finx 10 ferrorchar 11 fnull 12 frtscontrol (2 bits) 14 fabortonerror 15 fdummy2 (Reserved) Indicates whether binary mode is enabled. Windows does not support nonbinary mode transfers, so this member must be TRUE. Indicates whether parity checking is enabled. If this member is TRUE, parity checking is performed and errors are reported. Indicates whether the CS(clear-to-send) signal is monitored for output flow control. If this member is TRUE and CS is turned off, output is suspended until CS is sent again. Indicates whether the DSR(data-set-ready) signal is monitored for output flow control. If this member is TRUE and DSR is turned off, output is suspended until DSR is sent again. 62

64 fdtrcontrol fdsrsensitivity ftxcontinueonxoff foutx finx ferrorchar fnull Specifies DTR flow control. This member can be one of the following values. Value Description DTR_CONTROL_DISABLE Disables the DTR line when the device is opened and leaves it disabled. DTR_CONTROL_ENABLE Enables the DTR line when the device is opened and leaves it on. DTR_CONTROL_HANDSHAKE Enables DTR handshaking. Indicates whether the communication driver is sensitive to the state of the DSR signal. If this member is TRUE, the drive ignores any bytes received, unless the DSR modem input line is high. Indicates whether transmission stops when the input buffer is full and the driver has transmitted the XoffChar character. If this member is TRUE, transmission continues after the input buffer has come within XoffLim bytes of being full and the driver has transmitted the XoffChar character to stop receiving bytes. If this member is FALSE, transmission does not continue until input buffer is within XonLim bytes of being empty and the driver has transmitted the XonChar character to resume reception. ftxcontinueonxoff of the DCB structure is disabled because XonXoff is transmitted by hardware. Indicates whether XON/XOFF flow control is used during transmission. If this member is TRUE, transmission stops when the XoffChar character is received and starts again when the Xon Char character is received. Indicates whether XON/XOFF flow control is used during reception. If this member is TRUE, the XoffChar character is sent when the input buffer comes within XoffLim bytes of being full, and the XonChar character is sent when the input buffer comes within XonLim bytes of being empty. Indicates whether bytes received with parity errors are replaced with the character specified by the ErrorChar member. If this member is TRUE, replacement occurs. Indicates whether null bytes are discarded. If this member is TRUE, null bytes are discarded when received. 63

65 frtscontrol Specifies the RS flow control. This member can be one of the following values. Value Description RTS_CONTROL_DISABLE Disables the RS line when the device is opened and leaves it disabled. RTS_CONTROL_ENABLE Enables the RS line when the device is opened and leaves it on. RTS_CONTROL_ Enables RS handshaking. The RS HANDSHAKE signal is controlled as follows. When the number of data stored into the receive FIFO becomes 512 bytes or grater, the RS signal is disabled. (Receive FIFO data > 512 bytes ) When the number of data stored into receive FIFO becomes lower than the RS trigger value, the RS signal is enabled. (Receive FIFO data < RS trigger value) RS trigger value can be configured at Receive Buffer in the Advanced Settings for COMxxx Receive buffer < 8: The RS trigger value is 256 bytes. Receive buffer > 8: The RS trigger value is 384 bytes Refer to Two/Four-Wire Communications Communictions for settings. 64

66 Value RTS_CONTROL_TOGGLE Description Sets to the RS toggle (half duplex). PCI-4161,CBI-4641,CBI WA After the RS and CS are asserted and delay time (dwholdtime in the COMMHSFUNC structure; S in the figure below) is past, data is transmitted. After data transmission and delay time (dwholdtime in the COMMHSFUNC structure; hold time in the figure below), RS is disasserted. After transmission, the CS is disasserted. RS CS S Data S: setup time H: hold time The other models After the RS is asserted and delay time (dwsetuptime in the COMMHSFUNC structure; S in the figure below) is past, data is transmitted. After data is transmitted and delay time (dwholdtime in COMMHSFUNC structure; H in the figure below) is past, the RS is disasserted. RS H Data S H S: setup time H: hold time 65

67 fabortonerror fdummy2 wreserved XonLim XoffLim ByteSize Parity StopBits Indicates whether read and write operations are terminated if an error occurs. If this member is TRUE, the driver terminates all read and write operations with an error status if an error occurs. Reserved; do not use. Reserved; must be zero. Specifies the data size of receive buffer. When the receive buffer size becomes smaller than XonLim, the member transmits XonChar. Refer to The Threshold Values of XON/XOFF Transmits. Specifies the free space of receive buffer before XoffChar is transmitted. When the free space of receive buffer becomes smaller than XoffLim, the member transmits XoffChar. Refer to The Threshold Values of XON/XOFF Transmits. Specifies the number of bits in the bytes in the range from four through eight bytes. Parity scheme to be used. This member can be one of the following values. Value Description EVENPARITY Even MARKPARITY Mark NOPARITY No parity ODDPARITY Odd SPACEPARITY Space Specifies the number of stop bits to be used. This member can be one of the following values. Value Description ONESTOPBIT 1 stop bit TWOSTOPBITS 2 stop bits If you specify 1.5 stop bits, the stop bit is automatically changed to 1 stop bit. XonChar XoffChar ErrorChar EofChar EvtChar wreserved1 Specifies the value of the XON character for both transmission and reception. Specifies the value of the XOFF character for both transmission and reception. Specifies the value of the character used to replace bytes received with a parity error. Specifies the value of character used to signal the end of data. Specifies the value of the character used to signal an event. Reserved; do not use. 66

68 Comment Pay attention if you set as follows; DCB dcb; dcb.foutxctsflow = 1; dcb.frtscontrol = RTS_CONTROL_TOGGLE; PCI-4161, CBI-4641, and CBI WA: This setting is not applicable to these models. The other models: Data is sent when the RS is asserted, the setup time (dwsetuptime of the COMMHSFUNC structure) is past, and the CS is asserted. After data is transmitted and the hold time (dwholdtime in COMMHSFUNC) is past, the RS is disasserted. The CS is disasserted after transmission. RS CS Data S H Refer to Setup Time and CS Hard Flow Control to communicate in this setteings. RS (request-to-send) signal uses - Asserts the RS when data is transmitted. (Half-duplex) - Disasserts the RS when you do not want another equipment to send data. CS (clear-to-send) signal uses - Receives transmit permission from itself or another equipment. - Data is not output without transmit permission. (Hardware flow control) 67

69 Example Four-Wire Full Duplex DCB dcb; GetCommState(hPort, &dcb); dcb.baudrate = 9600; dcb.fabortonerror = 0; dcb.parity = 0; dcb.stopbits = ONESTOPBIT; dcb.bytesize = 8; dcb.foutxdsrflow = 0; dcb.fdtrcontrol = DTR_CONTROL_ENABLE; dcb.foutxctsflow = 0; dcb.frtscontrol = RTS_CONTROL_ENABLE; dcb.fbinary = TRUE; dcb.fparity = FALSE; dcb.finx = dcb.foutx = 0; SetCommState(hPort, &dcb); Four-Wire Half Duplex DCB dcb; GetCommState(hPort, &dcb); dcb.baudrate = 9600; dcb.fabortonerror = 0; dcb.parity = 0; dcb.stopbits = ONESTOPBIT; dcb.bytesize = 8; dcb.foutxctsflow = 0; dcb.foutxdsrflow = 0; dcb.fdtrcontrol = DTR_CONTROL_ENABLE; dcb.foutxctsflow = 0; dcb.frtscontrol = RTS_CONTROL_TOGGLE; dcb.fbinary = TRUE; dcb.fparity = FALSE; dcb.finx = dcb.foutx = 0; SetCommState(hPort, &dcb); 68

70 CS Hardware Flow Control and RS Handshaking(RS Hardware Flow Control) DCB dcb; GetCommState(hPort, &dcb); dcb.baudrate = 9600; dcb.fabortonerror = 0; dcb.parity = 0; dcb.stopbits = ONESTOPBIT; dcb.bytesize = 8; dcb.foutxctsflow = 1; dcb.foutxdsrflow = 0; dcb.fdtrcontrol = DTR_CONTROL_ENABLE; dcb.foutxctsflow = 0; dcb.frtscontrol = RTS_CONTROL_HANDSHAKE; dcb.fbinary = TRUE; dcb.fparity = FALSE; dcb.finx = dcb.foutx = 0; SetCommState(hPort, &dcb); CS Hardware Flow control for four-wire half Duplex DCB dcb; GetCommState(hPort, &dcb); dcb.baudrate = 9600; dcb.fabortonerror = 0; dcb.parity = 0; dcb.stopbits = ONESTOPBIT; dcb.bytesize = 8; dcb.foutxctsflow = 1; dcb.foutxdsrflow = 0; dcb.fdtrcontrol = DTR_CONTROL_ENABLE; dcb.foutxctsflow = 0; dcb.frtscontrol = RTS_CONTROL_TOGGLE; dcb.fbinary = TRUE; dcb.fparity = FALSE; dcb.finx = dcb.foutx = 0; SetCommState(hPort, &dcb); Note: This setting is not applicable to the PCI-4161, CBI-4641, and CBI WA. 69

71 Chapter 6 Reference (Standard COM) This section explains about Win32API functions used to configure the COM port of the following products. * These functions are applicable only to the following products. PCI U(RS-485), PCI U. The serial communicatinos of the GPF-4161 is controlled with Win 32API. To switch the full-duplex and half duplex (two-wire) communications, use functions in this section. For other stardard COM port function, refer to references provided by Microsoft corporation. 6.1 List of DLL function No. Function Description Initialization 1 IfComU210xSetDuplex Switches full-duplex and half duplex communications IfComU210xGetDuplex Retrieves the settings of full-duplex and half duplex communications. 70

72 6.1.1 IfComU210xSetDuplex The IfComU210xSetDuplex function configures the full-duplex and half-duplex (two-wire) communications. Syntax C LONG IfComU210xSetDuplex( HANDLE ComHandle, DWORD DuplexMode ); Visual Basic Declare Function IfComU210xSetDuplex Lib "Ifcomu210x.dll"( _ ByVal ComHandle As Long,_ ByVal DuplexMode As Long _ )As Long Parameters ComHandle DuplexMode Specifies the device handle obtained by the createfile of Win32API. Specifies the following invariable. The parameter is a variable which stores the setting value of full-duplex and half duplex (two-wire). Invariable Value Description IFCOMU210X_RS485_HALF_DUPLEX 0x00 Configures (two-wire) half-duplex communications. IFCOMU210X_RS485_FULL_DUPLEX 0x01 Configures full duplex communications. Return Value The IfComU210xSetDuplex function returns 0 (IFCOMU210X_ERROR_SUCCESS), if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. Example C HANDLE ComHandle; LONG Ret; Ret = IfComU210xSetDuplex(ComHandle, 0x01); Visual Basic Dim ComHandle As Long Dim Ret As Long Ret = IfComU210xSetDuplex(ComHandle, &H01) Configures the communications port to full duplex. 71

73 6.1.2 IfComU210xGetDuplex The IfComU210xGetDuplex retrieves the setting values of full-duplex and half-duplex (two-wire) communications. Syntax C LONG IfComU210xGetDuplex( HANDLE ComHandle, PDWORD DuplexMode ); Visual Basic Declare Function IfComU210xGetDuplex Lib "Ifcomu210x.dll"( _ ByVal ComHandle As Long, _ ByRef DuplexMode As Long _ )As Long_ Parameters ComHandle DuplexMode Specifies the device handle obtained by the createfile of Win32API. A pointer to the variable to return the setting of full-duplex and half duplex (two-wire). Invariable Value Description IFCOMU210X_RS485_HALF_DUPLEX 0x00 Half-duplex (two-wire) communications IFCOMU210X_RS485_FULL_DUPLEX 0x01 Full duplex communications Return Value The IfComU210xGetDuplex function returns 0 (IFCOMU210X_ERROR_SUCCESS), if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. Example C HANDLE ComHandle; DWORD DuplexMode LONG Ret; Ret = IfComU210xGetDuplex(ComHandle, &DuplexMode); Visual Basic Dim ComHandle As Long Dim DuplexMode As Long Dim Ret As Long Ret = IfComU210xGetDuplex(ComHandle, DuplexMode) Retrieves the settings of communication ports (full-duplex, half-duplex). 72

74 Chapter 7 Reference (Digital Input/Output) 7.1 List of DLL function This function is applicable only for the following models; PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, PCI/CTP/CPZ Q, CSI No. Function Description Initialization 1 SdioOpen Opens a digital input/output device of the serial communications module and enables to access to the module. 2 SdioClose Closes a digital input/output device of the serial communications module and releases the resources. Any subsequent accesses to the module are forbidden. 3 SdioCommonGetDeviceInfo Retrieves the resource information of devices. Input/output 4 SdioInputPoint Reads the input pin status. 5 SdioOutputPoint Writes output pin status. 6 SdioInputByte Reads the status of the specified 8 input pins. (BYTE access) 7 SdioInputWord Reads the status of the specified 16 input pins. (WORD access) 8 SdioInputDword Reads the status of the specified 32 input pins. (DWORD access) 9 SdioOutputByte Writes the status of the specified 8 output pins. (BYTE access) 10 SdioOutputWord Writes the status of the specified 16 output pins. (WORD access) 11 SdioOutputDword Writes the status of the specified 32 output pins. (DWORD access) Data latch 12 SdioSetLatchLogic Specifies the STB signal logic to latch input signals. 13 SdioGetLatchLogic Retrieves the STB signal logic to latch input signals. 14 SdioInputLatchPoint Reads the status of the latched input pins. 15 SdioInputLatchByte Reads the status of the latched 8 input pins. (BYTE access) 16 SdioInputLatchWord Reads the status of the latched 16 input pins. (WORD access) 17 SdioInputLatchDword Reads the status of the latched 32 input pins. (DWORD access) Communications module 18 SdioGetTmoduleStatus Retrieves the connection status of the serial communications modules. 19 SdioSetTmodulePower Controls the power supply of the serial communications module. Interruption 20 SdioSetEvent Specifies the event to be used when an interrupt is generated because the status of the STB signal changes or the serial communications module is abnormal. 21 SdioSetEventLogic Configures the interrupt logic of the STB signal. 22 SdioGetEventLogic Retrieves the interrupt logic of the STB signal. 73

75 7.1.1 SdioOpen The SdioOpen function opens a digital input/output device of the serial communications module and enables to access to the module. In Windows XP/2000/Server 2003, IfSdio is added to the Device Manager and the recognized digital input/output devices of our serial communications board is shown in a list. The rotary switch value on an board and device name are shown by the product model in the list. You can also check the rotary switch value and device name with the Digital Input Utility (SdiUtil.exe) or Digital Output Utility (SdoUtil.exe). When you change the slot that boards are inserted or your computer, the device name may be changed because the detection order is changed. If you use this product in such an environment, create an application so that you can change the device name specification. Syntax C (x86) HANDLE SdioOpen( LPCTSTR Name ); C (x64) HANDLE SdioOpen( LPCTSTR Name ); Visual Basic Declare Function SdioOpen Lib "IfSdio.DLL"(_ ByVal Name As String_ )As Long_ Delphi function SdioOpen( Name: String ):THandle; stdcall; external 'IfSdio.DLL'; Parameters Name Specifies the device name to open. Return Value The SdioOpen function returns a valid handle value, if the process is successfully completed. Other functions control devices with the handle obtained by this function. If this function fails to open, INVALID_HANDLE_VALUE(FFFFFFFFh) is returned. Comment - Unicode String In C (x86), although the string specified to the Name parameter of SdioOpen is defined as LPCTSTR type, the UNICODE string is not supported. To use the string in the x86 environment, write as example below. 74

76 Example C (x86) HANDLE Device; Device = SdioOpen((LPCTSTR)"IFSDIO1"); if(device == INVALID_HANDLE_VALUE) { /* fails to open */ printf("fail to open the port\n"); } C (x64) HANDLE Device; char* lpszname = IFSDIO1 ; Device = SdioOpen((LPCSTR) lpszname); if(device == INVALID_HANDLE_VALUE) { /* fails to open */ printf("fail to open the port\n"); } Visual Basic Dim hdevicehandle As Long hdevicehandle = SdioOpen("IFSDIO1") If hdevicehandle = -1 Then ' fails to open MsgBox("Fail to open the port") End If Delphi var hdevicehandle: THandle; begin // Initializing a port hdevicehandle := SdioOpen('IFSDIO1'); if hdevicehandle = INVALID_HANDLE_VALUE then begin // fails to open MessageDlg('Fail to open the port', mtinformation, [mbok], 0); end; end; Opens the digital input/output device of the serial communications module whose device name is IFDIO1, and returns the device handle to the hdevicehandle. 75

77 7.1.2 SdioClose The SdioClose function closes a digital input/output device of the serial communications module and releases the resources used to access the digital input/output of the serial communications module. Any subsequent accesses to the module are forbidden. Syntax C INT SdioClose( HANDLE DeviceHandle ); Visual Basic Declare Function SdioClose Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long_ )As Long_ Delphi function SdioClose( DeviceHandle: Thandle ) : DWORD; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle Specifies the device handle obtained by the SdioOpen function. Return Value The SdioClose function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. Comment To access to the digital input/output device of the serial communications module again, call the SdioOpen function. 76

78 Example C INT Ret; HANDLE DeviceHandle; DeviceHandle = SdioOpen( IFSDIO1 ); : : Ret = SdioClose(DeviceHandle); Visual Basic Dim Name As String Dim DeviceHandle As Long Name = "IFSDIO1" & Chr( 0 ) DeviceHandle = SdioOpen(Name) : : Ret = SdioClose(DeviceHandle) Delphi var Name: String; DeviceHandle: THandle; begin Name := 'IFSDIO1'; DeviceHandle := SdioOpen(Name); : : Ret := SdioClose(DeviceHandle); end; Closes the digital input/output deviceof the serial communications module specified by the hdevicehandle. 77

79 7.1.3 SdioCommonGetDeviceInfo GPF-4161 Help for Windows The SdioCommonGetDeviceInfo function retrieves the following resource information of the device. Syntax C Device ID Vendor ID Revision ID Sub system ID Sub system vendor ID Board ID (RSW1 setting value) Terminal block number LONG SdioCommonGetDeviceInfo( HANDLE DeviceHandle, PDWORD DeviceID, PDWORD VendorID, PDWORD RevisionID, PDWORD SubSystemID, PDWORD SubsystemVendorID, PDWORD BoardID, PDWORD TerminalNo ); Visual Basic Declare Function SdioCommonGetDeviceInfo Lib "IfSdio.DLL"( ByVal DeviceHandle As Long, _ ByRef DeviceID As Long, _ ByRef VendorID As Long, _ ByRef RevisionID As Long, _ ByRef SubSystemID, As Long, _ ByRef SubsystemVendorID As Long, _ ByRef BoardID As Long, _ ByRef TerminalNo As Long_ ) As Long Delphi function SdioCommonGetDeviceInfo( DeviceHandle : THandle; var DeviceID: DWord; var VendorID DWord; var RevisionID DWord; var SubSystemID DWord; var SubsystemVendorID DWord; var BoardID DWord var TerminalNo DWord ):DWord; stdcall; external 'IfSdio.DLL'; 78

80 Parameters DeviceHandle DeviceID VendorID RevisionID SubSystemID SubsystemVendorID BoardID TerminalNo A handle to retrieve resource information A pointer to a variable to return the device ID A pointer to a variable to return the vendor ID Our vender ID is 1147h. A pointer to a variable to return the revision ID A pointer to a variable to return the subsystem ID A pointer to a variable to return the subsystem vendor ID A pointer to a variable to return the board ID A pointer to a variable to return the terminal block number Return Value The SdioCommonGetDeviceInfo function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 79

81 Example GPF-4161 Help for Windows C HANDLE hdevicehandle; DWORD dwdeviceid; DWORD dwvendorid; DWORD dwrevisionid; DWORD dwsubsystemid; DWORD dwsubsystemvendorid; DWORD dwboardid; DWORD dwterminalno; LONG nret; nret = SdioCommonGetDeviceInfo(hDeviceHandle, &dwdeviceid, &dwvendorid, &dwrevisionid, &dwsubsystemid, &dwsubsystemvendorid, &dwboardid,&dwterminalno ); Visual Basic Dim hdevicehandle As Long Dim dwdeviceid As Long Dim dwvendorid As Long Dim dwrevisionid As Long Dim dwsubsystemid As Long Dim dwsubsystemvendorid As Long Dim dwboardid As Long Dim dwterminalno As Long Dim nret As Long nret = SdioCommonGetDeviceInfo(hDeviceHandle, dwdeviceid, dwvendorid, RevisionID, dwsubsystemid, dwsubsystemvendorid, dwboardid, dwterminalno ) Delphi var hdevicehandle: THandle; dwdeviceid: DWord; dwvendorid: DWord; dwrevisionid: DWord; dwsubsystemid: DWord; dwsubsystemvendorid: DWord; dwboardid: DWord; dwterminalno: DWord; nret: DWord; begin nret := SdioCommonGetDeviceInfo(hDeviceHandle, dwdeviceid, dwvendorid, dwrevisionid, dwsubsystemid, dwsubsystemvendorid, dwboardid, dwterminalno ); end; Retrieves resource information of the device specified by hdevicehandle. 80

82 7.1.4 SdioInputPoint The SdioInputPoint function reads the input pin status. Each status is stored in a variable. Syntax C LONG SdioInputPoint ( HANDLE DeviceHandle, PBYTE Buffer, DWORD StartNum, DWORD InputNum ); Visual Basic Declare Function SdioInputPoint Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByRef Buffer As Byte, _ ByVal StartNum As Long, _ ByVal InputNum As Long_ ) As Long Delphi function SdioInputPoint( DeviceHandle: THandle; Buffer: pointer; StartNum: Integer; InputNum: Integer ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle Buffer StartNum InputNum Specifies the device handle obtained by the SdioOpen function. Points to a buffer to read data from a device. Specifies the data the pin number 1 through 24 to start to input. Number Signal IN1 IN2 IN3 IN23 IN24 1: Low level 0: High level Specifies the number of input pin. 81

83 Return Value The SdioInputPoint function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. Example C HANDLE hdevicehandle; LONG nret; BYTE bbuffer[8]; nret = SdioInputPoint( hdevicehandle, &bbuffer[0], 16, 8 ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim bbuffer(8) As Byte nret = SdioInputPoint( hdevicehandle, bbuffer(0), 16, 8 ) Delphi Var hdevicehandle: THandle; nret: Integer; bbuffer: Array[0..7] of Byte; begin nret := SdioInputPoint( 16, 8 ); end; Reads the status of IN16 trough IN23 of the device specified by hdevicehandle and stores it into bbuffer [0.7]. 82

84 7.1.5 SdioOutputPoint The SdioOutputPoint function writes data to arbitrate number of output pins. Status will be controlled by the data stored in the variable. Syntax C LONG SdioOutputPoint( HANDLE DeviceHandle, PBYTE Buffer, DWORD StartNum, DWORD OutputNum ); Visual Basic Declare Function SdioOutputPoint Lib "IfSdio.DLL" (_ ByVal DeviceHan dle As Long, _ ByRef Buffer As Byte, _ ByVal StartNum As Long, _ ByVal OutputNum As Long_ ) As Long Delphi function SdioOutputPoint ( DeviceHandle: THandle; Buffer: pointer; StartNum: DWORD; OutputNum: DWORD ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle Buffer StartNum OutputNum Specifies the device handle obtained by the SdioOpen function. Points to a variable to write data from devices. Specifies the pin number 1 through 24 to start to output. Number Signal OUT1 OUT2 OUT3 OUT23 OUT24 1: Low level 0: High level Specifies the number of output pin. Return Value The SdioOutputPoint function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 83

85 Example GPF-4161 Help for Windows C HANDLE hdevicehandle; LONG hret; BYTE bbuffer[8]; bbuffer[0] = 1; bbuffer[1] = 0; bbuffer[2] = 0; bbuffer[3] = 1; bbuffer[4] = 0; bbuffer[5] = 1; bbuffer[6] = 1; bbuffer[7] = 0; nret = SdioOutputPoint( hdevicehandle, &bbuffer[0], 16, 8 ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim bbuffer(8) As Byte bbuffer(0) = 1 bbuffer(1) = 0 bbuffer(2) = 0 bbuffer(3) = 1 bbuffer(4) = 0 bbuffer(5) = 1 bbuffer(6) = 1 bbuffer(7) = 0 nret = SdioOutputPoint( hdevicehandle, bbuffer(0), 16, 8 ) Delphi Var hdevicehandle: THandle; nret: Integer; bbuffer: array[0..7] of Byte begin bbuffer[0] := 1; bbuffer[1] := 0; bbuffer[2] := 0; bbuffer[3] := 1; bbuffer[4] := 0; bbuffer[5] := 1; bbuffer[6] := 1; bbuffer[7] := 0; nret := SdioOutputPoint( 16, 8 ); end; Writes the value of bbuffer[0 7] into OUT16 through OUT23 of the device specified by hdevicehandle. 84

86 7.1.6 SdioInputByte The SdioInputByte reads data from eight pins and stores the data into a byte variable. Syntax C LONG SdioInputByte ( HANDLE DeviceHandle, DWORD InputNo, PBYTE Value ); Visual Basic Declare Function SdioInputByte Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal InputNo As Long, _ ByRef Value As Byte_ ) As Long Delphi function SdioInputByte( DeviceHandle: Thandle; InputNo: DWORD; var Value: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle InputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be read with the following identifiers. IFSDIO_IN1_8: Reads the data in IN1 through IN8. IFSDIO_IN9_16: Reads the data in IN9 through IN16. IFSDIO_IN17_24: Reads the data in IN17 through IN24. Points to the variable to store the read data. Return Value The SdioInputByte function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 85

87 Comment GPF-4161 Help for Windows Each retrieved data is corresponding to pins every bit as below. Bit Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 IFSDIO_IN1_8 IN8 IN7 IN6 IN5 IN4 IN3 IN2 IN1 IFSDIO_IN9_16 IN6 IN15 IN14 IN13 IN12 IN11 IN10 IN9 IFSDIO_IN17_24 IN24 IN23 IN22 IN21 IN20 IN19 IN18 IN17 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; BYTE bvalue; nret = SdioInputByte( hdevicehandle, IFSDIO_IN1_8, &bvalue ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim bvalue As Byte nret = SdioInputByte( hdevicehandle, IFSDIO_IN1_8, bvalue ) Delphi var hdevicehandle: THandle; nret: Integer; bvalue: Byte; begin nret := SdioInputByte( hdevicehandle, IFSDIO_IN1_8, bvalue ); end; Reads the status of IN1 through IN8 on the device specified by hdevicehandle and stores it into bvalue. 86

88 7.1.7 SdioInputWord The SdioInputWord function reads data from 16 pins and stores the data into a word variable. Syntax C LONG SdioInputWord ( HANDLE DeviceHandle, DWORD InputNo, PWORD Value ); Visual Basic Declare Function SdioInputWord Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal InputNo As Long, _ ByRef Value As Integer_ ) As Long Delphi function SdioInputWord ( DeviceHandle: Thandle; InputNo: DWORD; var Value: Word ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle InputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be read with the following identifiers. IFSDIO_IN1_16: Reads the data in IN1 through IN16. IFSDIO_IN17_32: Reads the data in IN17 through IN32. Points to the variable to store the read data. A 24 pin input terminal block cannot retrieve the data in IN25 through IN32. When the data in IN 25 through IN32 is read, 0 is stored into pwvalue. Return Value The SdioInputWord function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 87

89 Comment GPF-4161 Help for Windows Data format Each retrieved data is corresponding to pins every bit as below. Bit Bit15 Bit14 Bit13 Bit2 Bit1 Bit0 IFSDIO_IN1_16 IN16 IN15 IN14 IN3 IN2 IN1 IFSDIO_IN17_32 IN32 IN31 IN30 IN19 IN18 IN17 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; WORD wvalue; nret = SdioInputWord( hdevicehandle, IFSDIO_IN1_16, &wvalue ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim wvalue As Integer nret = SdioInputWord( hdevicehandle, IFSDIO_IN1_16, wvalue ) Delphi Var hdevicehandle: THandle; nret: Integer; wvalue: Word; Begin nret := SdioInputWord( hdevicehandle, IFSDIO_IN1_16, wvalue ); end; Reads the status of IN1 through IN16 on the device specified by hdevicehandle and stores it into wvalue. 88

90 7.1.8 SdioInputDword The SdioInputDword reads data from 32 pins and stores the data into a double word variable. Syntax C LONG SdioInputDword ( HANDLE DeviceHandle, DWORD InputNo, PDWORD Value ); Visual Basic Declare Function SdioInputDword Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal InputNo As Long, _ ByRef Value As Long_ ) As Long Delphi function SdioInputDword ( DeviceHandle: Thandle; InputNo: DWord; var Value: DWord ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle InputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be read with the following identifier. IFSDIO_IN1_32: Reads the data in IN1 through IN32. Points to the variable to store the read data. A 24 pin input terminal block cannot retrieve the data in IN25 through IN32. When the data in IN 25 through IN32 is read, 0 is stored into pdwvalue. Return Value The SdioInputDword function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 89

91 Comment GPF-4161 Help for Windows Data format Each retrieved data is corresponding to pins every bit as below. Bit Bit31 Bit30 Bit29 Bit2 Bit1 Bit0 IFSDIO_IN1_32 IN32 IN31 IN30 IN3 IN2 IN1 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; DWORD dwvalue; nret = SdioInputDword( hdevicehandle, IFSDIO_IN1_32, &dwvalue ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim dwvalue As Long nret = SdioInputDword( hdevicehandle, IFSDIO_IN1_32, dwvalue ) Delphi Var hdevicehandle: THandle; nret: Integer; dwvalue: DWord; Begin nret := SdioInputDword( hdevicehandle, IFSDIO_IN1_32, dwvalue ); end; Reads the status of IN1 through IN32 on the device specified by hdevicehandle and stores it into dwvalue. 90

92 7.1.9 SdioOutputByte The DioOutputByte function writes data to eight output pins. Syntax C LONG SdioOutputByte ( HANDLE DeviceHandle, DWORD OutputNo, BYTE Value ); Visual Basic Declare Function SdioOutputByte Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal OutputNo As Long, _ ByVal Value As Byte_ ) As Long Delphi function SdioOutputByte( DeviceHandle: Thandle; OutputNo: DWORD; Value: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle OutputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be written with the following identifiers. IFSDIO_OUT1_8: Writes the data in OUT1 through OUT 8. IFSDIO_OUT9_16: Writes the data in OUT 1 through OUT 16. IFSDIO_OUT17_24: Writes the data in OUT 17 through OUT 24. Specifies the data to write. Return Value The SdioOutputByte function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 91

93 Comment Data format Each retrieved data is corresponding to pins every bit as below. Bit Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 IFSDIO_OUT1_8 OUT8 OUT7 OUT6 OUT5 OUT4 OUT3 OUT2 OUT1 IFSDIO_OUT9_16 OUT16 OUT15 OUT14 OUT13 OUT12 OUT11 OUT10 OUT9 IFSDIO_OUT17_24 OUT24 OUT23 OUT22 OUT21 OUT20 OUT19 OUT18 OUT17 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; nret = SdioOutputByte( hdevicehandle, IFSDIO_OUT1_8, 0x12); Visual Basic Dim hdevicehandle As Long Dim nret As Long nret = SdioOutputByte( hdevicehandle, IFSDIO_OUT1_8, &h12 ) Delphi var ndevicehandle: THandle; hret: Integer; begin hret := SdioOutputByte( ndevicehandle, IFSDIO_OUT1_8, $12 ); end; Writes 12h to OUT1 through OUT8 on the device specified by hdevicehandle. 92

94 SdioOutputWord The DioOutputWord function writes data to 16 output pins. Syntax C LONG SdioOutputWord( HANDLE DeviceHandle, DWORD OutputNo, WORD Value ); Visual Basic Declare Function SdioOutputWord Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal OutputNo As Long, _ ByVal Value As Integer_ ) As Long Delphi function SdioOutputWord( DeviceHandle: Thandle; OutputNo: DWORD; Value: Word ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle InputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be written with the following identifiers. IFSDIO_OUT1_16: Writes the data in OUT1 through OUT16. IFSDIO_OUT17_32: Writes the data in OUT 7 through OUT32. Specifies the data to write. A 24 pin output terminal block cannot write the data with OUT25 through OUT32. Return Value The SdioOutputWord function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 93

95 Comment Each retrieved data is corresponding to pins every bit as below. Bit Bit15 Bit14 Bit13 Bit2 Bit1 Bit0 IFSDIO_OUT1_16 OUT16 OUT15 OUT14 OUT3 OUT2 OUT1 IFSDIO_OUT17_32 OUT32 OUT31 OUT30 OUT19 OUT18 OUT17 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; nret = SdioOutputWord( hdevicehandle, IFSDIO_OUT1_16, 0x1234 ); Visual Basic Dim hdevicehandle As Long Dim nret As Long nret = SdioOutputWord( hdevicehandle, IFSDIO_OUT1_16, &h1234 ) Delphi Var hdevicehandle: THandle; hret: Integer; Begin nret := SdioOutputWord( hdevicehandle, IFSDIO_OUT1_16, $1234 ); end; Writes 1234h to OUT1 through OUT16 on the devices specified by hdevicehandle. 94

96 SdioOutputDword The SdioOutputDword function writes data to 32 output pins. Syntax C LONG SdioInputDword ( HANDLE DeviceHandle, DWORD OutputNo, DWORD Value ); Visual Basic Declare Function SdioInputDword Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal OutputNo As Long, _ ByVal Value As Long_ ) As Long Delphi function SdioInputDword ( DeviceHandle: Thandle; OutputNo : DWORD; Value: DWORD ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle OutputNo Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be written with the following identifier. IFSDIO_OUT1_32: Writes the data in OUT1 through OUT32. A 24 pin output terminal block cannot write the data with OUT25 through OUT32. Value Specifies the data to write. Return Value The SdioOutputDword function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 95

97 Comment Data format Each retrieved data is corresponding to pins every bit as below. Bit Bit31 Bit30 Bit29 Bit2 Bit1 Bit0 IFSDIO_OUT1_32 OUT32 OUT31 OUT30 OUT3 OUT2 OUT1 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; nret = SdioOutputDword( hdevicehandle, IFSDIO_OUT1_32, 0x123456); Visual Basic Dim hdevicehandle As Long Dim nret As Long nret = SdioOutputDword( hdevicehandle, IFSDIO_OUT1_32, &h ) Delphi Var hdevicehandle: THandle; nret: Integer; Begin nret := SdioOutputDword( hdevicehandle, IFSDIO_OUT1_32, $ ); end; Write h to OUT1 through OUT32 on the devices specified by hdevicehandle. 96

98 SdioSetLatchLogic The SdioSetLatchLogic function specifies the STB signal logic to latch an input signal. Syntax C LONG SdioSetLatchLogic( HANDLE DeviceHandle, BYTE LatchLogic ); Visual Basic Declare Function SdioSetLatchLogic Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal LatchLogic As Byte_ ) As Long Delphi function SdioSetLatchLogic( DeviceHandle: THandle; LatchLogic: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle LatchLogic Specifies the device handle obtained by the SdioOpen function. Specifies the STB signal logic to latch input signal with the following identifier. IFSDIO_RISE_EDGE: Latch on the rising edge of the STB signal IFSDIO_FALL_EDGE: Latch on the falling edge of the STB signal. Return Value TheSdioSetLatchLogic function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. Comment The SdioSetLatchLogic function can simultaneously configure both the rising edge and falling edge to latch. The SdioSetLatchLogic function can interrupt when the status of the STB signal changes. Also, this function can configure the interrupt setting and latch setting separately. 97

99 Example C HANDLE hdevicehandle; LONG nret; nret = SdioSetLatchLogic( hdevicehandle, IFSDIO_RISE_EDGE ); Visual Basic Dim hdevicehandle As Long Dim nret As Long nret = SdioSetLatchLogic( hdevicehandle, IFSDIO_RISE_EDGE ) Delphi Var hdevicehandle: THandle; nret: Integer; begin nret := SdioSetLatchLogic( hdevicehandle, IFSDIO_RISE_EDGE ); end; Configures the input signal to latch on the rising edge of the STB signal. 98

100 SdioGetLatchLogic The SdioGetLatchLogic function retrieves the STB signal logic to latch input signal. Syntax C LONG SdioGetLatchLogic( HANDLE DeviceHandle, PBYTE LatchLogic ); Visual Basic Declare Function SdioGetLatchLogic Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByRef LatchLogic As Byte_ ) As Long Delphi function SdioGetLatchLogic( DeviceHandle: THandle; var LatchLogic: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle LatchLogic Specifies the device handle obtained by the SdioOpenfunction. Points to the variable to store the STB signal logic. IFSDIO_RISE_EDGE:Latch on the rising edge of the STB signal IFSDIO_FALL_EDGE: Latch on the falling edge of the STB signal. Return Value The SdioGetLatchLogic function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 99

101 Example C HANDLE hdevicehandle; BYTE blatchlogic; LONG nret; nret = SdioGetLatchLogic( hdevicehandle, &blatchlogic ); Visual Basic Dim hdevicehandle As Long Dim blatchlogic As Byte Dim nret As Long nret = SdioGetLatchLogic (hdevicehandle,blatchlogic) Delphi Var hdevicehandle: THandle; blatchlogic: byte; nret: Integer; begin nret := SdioGetLatchLogic (hdevicehandle, blatchlogic); end; Retrieves the logic to latch the STB signal. 100

102 SdioInputLatchPoint The SdioInputLatchPoint function reads the status of the latched input pin. Each status is stored in a variable. Syntax C LONG SdioInputLatchPoint( HANDLE DeviceHandle, PBYTE Buffer, DWORD StartNum, DWORD InputNum ); Visual Basic Declare Function SdioInputLatchPoint Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByRef Buffer As Byte, _ ByVal StartNum As Long, _ ByVal InputNum As Long _ ) As Long Delphi function SdioInputLatchPoint( DeviceHandle: THandle; Buffer: pointer; StartNum: Integer; InputNum: Integer ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle Buffer Specifies the device handle obtained by the SdioOpen function. Points to a variable to store the data read from the buffer. StartNum Specifies the pin number 1through 24. IN1/OUT1 pin are corresponding to 1. InputNum Contact number Input signal IN1 IN2 IN3 IN31 IN32 1: Low level 2: High level 101

103 Return Value The SdioInputLatchPoint function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. Example C HANDLE hdevicehandle; LONG nret; BYTE bbuffer[8]; nret = SdioInputLatchPoint( hdevicehandle, &bbuffer[0], 16, 8 ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim bbuffer(8) As Byte nret = SdioInputLatchPoint( hdevicehandle, bbuffer(0), 16, 8 ) Delphi Var hdevicehandle: THandle; nret: Integer; bbuffer: Array[0..7] of Byte; begin nret := SdioInputLatchPoint( 16, 8 ); end; Returns the input pin status of IN16 through IN23 on the devices specified by hdevicehandle to bbuffer[0...7]. 102

104 SdioInputLatchByte The DioInputLatchByte function reads eight latched pins and stores the data into a byte variable. Syntax C LONG SdioInputLatcByte ( HANDLE DeviceHandle, DWORD InputNo, PBYTE Value ); Visual Basic Declare Function SdioInputLatchByte Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal InputNo As Long, _ ByRef Value As Byte _ ) As Long Delphi function SdioInputLatchByte( DeviceHandle: THandle; InputNo: DWord; var Value: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle InputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be read with the following identifiers. IFSDIO_IN1_8: Reads the data in IN1 through IN8. IFSDIO_IN9_16: Reads the data in IN9 through IN16. IFSDIO_IN17_24: Reads the data in IN17 through IN24. Points to the variable to store the read data. Return Value The SdioInputLatchByte function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 103

105 Comment Data format Each retrieved data is corresponding to pins every bit as below. Bit Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 IFSDIO_IN1_8 IN8 IN7 IN6 IN5 IN4 IN3 IN2 IN1 IFSDIO_IN9_16 IN16 IN15 IN14 IN13 IN12 IN11 IN10 IN9 IFSDIO_IN17_24 IN24 IN23 IN22 IN21 IN20 IN19 IN18 IN17 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; BYTE bvalue; nret = SdioInputLatchByte( hdevicehandle, IFSDIO_IN1_8, &bvalue ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim bvalue As Byte nret = SdioInputLatchByte( hdevicehandle, IFSDIO_IN1_8, bvalue ) Delphi Var hdevicehandle: Thandle; nret: Integer; bvalue: Byte; begin nret := SdioInputLatchByte( hdevicehandle, IFSDIO_IN1_8, bvalue ); end; Reads the status of IN1 through IN8 on the device specified by hdevicehandle and stores the it to bvalue. 104

106 SdioInputLatchWord The SdioInputLatchWord function reads 16 latched pins and stores the data into a word variable. Syntax C LONG SdioInputLatchWord( HANDLE DeviceHandle, DWORD InputNo, PWORD Value ); Visual Basic Declare Function SdioInputLatchWord Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal InputNo As Long, _ ByRef Value As Integer_ ) As Long Delphi function SdioInputLatchWord ( DeviceHandle: Thandle; InputNo: DWord; var Value: Word ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle InputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be read with the following identifiers. IFSDIO_IN1_16: Reads the data in IN1 through IN16 IFSDIO_IN17_32: Reads the data in IN17 through IN32. Points to the variable to store the read data. A 24 pin input terminal block cannot retrieve the data in IN25 through IN32. When the data in IN 25 through IN32 is read, 0 is stored into pdwvalue. Return Value The SdioInputLatchWord function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 105

107 Comment Each retrieved data is corresponding to pins every bit as below. Bit Bit15 Bit14 Bit13 Bit2 Bit1 Bit0 IFSDIO_IN1_16 IN16 IN15 IN14 IN3 IN2 IN1 IFSDIO_IN17_32 IN32 IN31 IN30 IN19 IN18 IN17 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; WORD wvalue; nret = SdioInputLatchWord( hdevicehandle, IFSDIO_IN1_16, &wvalue ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim wvalue As Integer nret = SdioInputLatchWord( hdevicehandle, IFSDIO_IN1_16, wvalue ) Delphi Var hdevicehandle: THandle; nret: Integer; wvalue: Word; begin nret := SdioInputLatchWord( hdevicehandle, IFSDIO_IN1_16, wvalue ); end; Reads the status of IN1 through IN16 latched by the STB signal on the device specified by hdevicehandle and stores it to wvalue. 106

108 SdioInputLatchDword The SdioInputLatchDword function reads 32 latched pins and stores the data into a double word variable. Syntax C LONG SdioInputLatchDword ( HANDLE DeviceHandle, DWORD InputNo, PDWORD Value ); Visual Basic Declare Function SdioInputLatchDword Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal InputNo As Long, _ ByRef Value As Long_ ) As Long Delphi function SdioInputLatchDword ( DeviceHandle: Thandle; InputNo: DWord; var Value: DWord ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle InputNo Value Specifies the device handle obtained by the SdioOpen function. Specifies the pins to be read with the following identifiers. IFSDIO_IN1_32: Reads the data in IN1 through IN32. Points to the variable to store the read data. A 24-pin input terminal block cannot retrieve the data in IN25 through IN32. When the data in IN 25 through IN32 is read, 0 is stored into pdwvalue. Return Value The SdioInputLatchDword function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 107

109 Comment The retrieved data corresponding to pins every bit as below. Bit Bit31 Bit30 Bit29 Bit2 Bit1 Bit0 IFSDIO_IN1_32 IN32 IN31 IN30 IN3 IN2 IN1 1: Low level 0: High level Example C HANDLE hdevicehandle; LONG nret; DWORD dwvalue; nret = SdioInputLatchDword( hdevicehandle, IFSDIO_IN1_32, &dwvalue ); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim dwvalue As Long nret = SdioInputLatchDword( hdevicehandle, IFSDIO_IN1_32, dwvalue ) Delphi Var hdevicehandle: Thandle; nret: Integer; dwvalue: DWORD; begin nret := SdioInputLatchDword( hdevicehandle, IFSDIO_IN1_32, dwvalue ); end; Reads the status of IN1 through IN32 latched by the STB signal on the device specified by hdevicehandle and stores it to dwvalue. 108

110 SdioGetTmoduleStatus The SdioGetTmoduleStatus function retrieves the connection status of serial communications module. Syntax C LONG SdioGetTmoduleStatus( HANDLE DeviceHandle, PBYTE TmoduleStatus ); Visual Basic Declare Function SdioGetTmoduleStatus Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByRef TmoduleStatus As Byte_ ) As Long Delphi function SdioGetTmoduleStatus ( DeviceHandle: THandle; var TmoduleStatus: byte ):Integer; stdcall; external 'IfSdio.DLL'; 109

111 Parameters DeviceHandle Specifies the device handle to retrieve the connection status of the serial communications module. TmoduleStatus Points to a variable to store the connection status of serial communications module.(c) Specifies the variable to store the connection status of serial communications module. (Visual Basic, Delphi) bit7 bit6 Bit5 bit4 bit3 bit2 bit1 bit0 Reserved Reserved PWRNG SAFNG Reserved Reserved PWROK SAFOK SAFOK 1 Currently connected with the serial communications module. 0 Currently not connected with the serial communications module. PWROK 1 The power supply voltage of the serial communications module is normal. 0 The power supply voltage of the serial communications module is abnormal. SAFNG 1 The serial communications module was disconnected between last execution and this execution of this function. 0 The power supply voltage of the serial communications module was not disconnected between last execution and this execution of this function. PWRNG 1 The serial communications module was abnormal between last execution and this execution of this function. 0 The serial communications module was normal between last execution and this execution of this function. Return Value The SdioGetTmoduleStatus returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 110

112 Example C HANDLE hdevicehandle; BYTE btmodulestatus; LONG nret; nret = SdioGetTmoduleStatus(hDeviceHandle, &btmodulestatus); Visual Basic Dim hdevicehandle As Long Dim btmodulestatus As Byte Dim nret As Long nret = SdioGetTmoduleStatus(hDeviceHandle, btmodulestatus) Delphi Var hdevicehandle: THandle; btmodulestatus: byte; nret: Integer; nret := SdioGetTmoduleStatus(hDeviceHandle, btmodulestatus); Retrieves the status of the serial communications module. 111

113 SdioSetTmodulePower The SdioSetTmodulePower function controls the power supply of serial communications module. Syntax C LONG SdioSetTmodulePower( HANDLE DeviceHandle, BYTE SetPower ); Visual Basic Declare Function SdioSetTmodulePower Lib " IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByVal SetPower As Byte_ ) As Long Delphi function SdioSetTmodulePower ( DeviceHandle: Thandle; SetPower: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle SetPower Specifies the device handle to control the power supply voltage of serial communications module. Specifies the status of power voltage. Identifier Value Description IFSDIO_POWER_ON 1 Powers on the serial communications module IFSDIO_POWER_OFF 0 Powers off the serial communications module Return Value The SdioSetTmodulePower function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 112

114 Example C HANDLE hdevicehandle; LONG nret; nret = SdioSetTmodulePower(hDeviceHandle, IFSDIO_POWER_OFF); Visual Basic Dim hdevicehandle As Long Dim nret As Long nret = SdioSetTmodulePower (hdevicehandle, IFSDIO _POWER_OFF) Delphi Var hdevicehandle: Thandle; nret: Integer; nret := SdioSetTmodulePower (hdevicehandle, IFSDIO _POWER_OFF); Powers off the serial communications module. 113

115 SdioSetEvent The SdioSetEvent function specifies the event to be used when an interrupt occurs due to the STB signal status change. Syntax C LONG SdioSetEvent ( HANDLE DeviceHandle, HANDLE WindowHandle, ULONG WindowsMessage, HANDLE EventHandle, LPSDIOCALLBACK CallBackProc, DWORD UserData ); C(x64) LONG SdioSetEvent ( HANDLE DeviceHandle, HANDLE WindowHandle, ULONG WindowsMessage, HANDLE EventHandle, LPSDIOCALLBACK CallBackProc, DWORD UserData ); Visual Basic Declare Function SdioSetEvent Lib "IfSdio.DLL" (_ ByVal, DeviceHandle As Long,_ ByVal WindowHandle As Long, _ ByVal WindowsMessage As Long, _ ByVal EventHandle As Long, _ ByVal CallBackProc As Long, _ ByVal UserData As Long_ ) As Long Delphi function SdioSetEvent ( DeviceHandle: THandle; WindowHandle: THandle; WindowsMessage: Integer; EventHandle: THandle; CallBackProc: Pointer; UserData: Integer ):Integer; stdcall; external 'IfSdio.DLL'; 114

116 Parameters DeviceHandle WindowHandle WindowsMessage EventHandle CallBackProc UserData Specifies the device handle obtained by the SdioOpen function. Specifies a window handle to send message at interruption. Specifies the message to be sent at interruption. Specifies an event handle that becomes signal status at interruption. Points to a callback function to be called when an interrupt occurs. Specifies the callback function and user data to pass the message handler. Return Value The SdioSetEvent function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. Example C HANDLE hdevicehandle; HANDLE heventhandle; LONG nret; heventhandle = CreateEvent(NULL, FALSE, FALSE, NULL); nret = SdioSetEvent(hDeviceHandle, NULL, 0, heventhandle, NULL, 0); Visual Basic Dim hdevicehandle As Long Dim heventhandle As Long Dim nret As Long heventhandle = CreateEvent(0, False, False, 0) nret = SdioSetEvent(hDeviceHandle, 0, 0, heventhandle, 0, 0) Delphi var hdevicehandle: THandle; heventhandle: Thandle; nret: Integer; begin heventhandle = CreateEvent(nil, False, False, nil); nret := SdioSetEvent(hDeviceHandle, nil, 0, heventhandle, nil, 0); end; Register the event to be signal status at the STB signal interrupt. 115

117 SdioSetEventLogic The SdioSetEventLogic function configures the STB signal interrupt and abnormal interrupt. Syntax C LONG SdioSetEventLogic ( HANDLE DeviceHandle, BYTE EventLogic ); Visual Basic Declare Function SdioSetEventLogic Lib "IfSdio.DLL" (_ RyVal DeviceHandle As Long, _ RyVal EventLogic As Byte_ ) As Long Delphi function SdioSetEventLogic ( DeviceHandle: THandle; EventLogic: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle Specifies the device handle obtained by the SdioOpen function. EventLogic Specifies the STB signal interrupt logic with the following identifiers. IFSDIO_RISE_EDGE: interrupts on the rising edge of the STB signal. IFSDIO_FALL_EDGE: interrupts on the falling edge of the STB signal. Specifies the abnormal interrupt of the serial communications with the following identifiers. IFSDIO_CONNECT_EVENT: interrupts at disconnection from the serial communications module. IFSDIO_POWER_EVENT: interrupts when the serial communications module is in an abnormal power supply voltage. Return Value The SdioSetEventLogic function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 116

118 Comment The SdioSetEventLogic function can simultaneously configure both the rising edge and falling edge to latch. The SdioSetEventLogic function can interrupt when the status of the STB signal changes. Also, this function can configure the interrupt setting and latch setting separately. Example C HANDLE hdevicehandle; LONG nret; nret = SdioSetEventLogic(hDeviceHandle, IFSDIO_FALL_EDGE); Visual Basic Dim hdevicehandle As Long Dim nret As Long nret = SdioSetEventLogic(hDeviceHandle, IFSDIO_FALL_EDGE) Delphi Var hdevicehandle: THandle; nret: Integer; begin nret := SdioSetEventLogic(hDeviceHandle, IFSDIO_FALL_EDGE); end; Configures the STB interrupt logic to latch on the falling edge of STB signal. 117

119 SdioGetEventLogic The SdioGetEventLogic function retrieves the setting of the STB signal interrupt. Syntax C LONG SdioGetEventLogic ( HANDLE DeviceHandle, PBYTE EventLogic ); Visual Basic Declare Function SdioGetEventLogic Lib "IfSdio.DLL" (_ ByVal DeviceHandle As Long, _ ByRef EventLogic As Byte _ ) As Long Delphi function SdioGetEventLogic ( DeviceHandle: Thandle; EventLogic: Byte ):Integer; stdcall; external 'IfSdio.DLL'; Parameters DeviceHandle EventLogic Specifies the device handle obtained by the SdioOpen function. Points to a variable to store the STB signal interrupt logic and abnormal interrupt of the serial communications module. The interrupt logic and status are stored with the following identifiers. Identifier Description IFSDIO_RISE_EDGE interrupts on the rising edge of STB signal. IFSDIO_FALL_EDGE interrupts on the falling edge of the STB signal. IFSDIO_CONNECT_EVENT interrupts at disconnection from the serial communications module. IFSDIO_POWER_EVENT interrupts when the serial communications module is in an abnormal power supply voltage. Return Value The SdioGetEventLogic function returns IFSDIO_ERROR_SUCCESS if the process is successfully completed. Otherwise, this function returns another code. Please refer to the Return Values for more detail. 118

120 Example C HANDLE hdevicehandle; LONG nret; BYTE beventlogic; nret = SdioGetEventLogic(hDeviceHandle, &beventlogic); Visual Basic Dim hdevicehandle As Long Dim nret As Long Dim beventlogic As Byte nret = SdioGetEventLogic(hDeviceHandle, beventlogic) Delphi var hdevicehandle: THandle; nret: Integer; beventlogic : BYTE; begin nret := SdioGetEventLogic (hdevicehandle, beventlogic); end; Retrieves the interrupt logic of the STB signal. 119

121 7.2 CallBack Function Visual Basic has some constraints to use the callback function. Refer to Programming Constraints in Visual Basic for details. 7.3 Callback Function Set by the SdioSetEvent Function The Callback function is a placeholder for a callback routine. The function passed to the SdioSet Event function is called. Syntax To use the callback routine, write as follows. The following syntax is an example that the callback routine is CallBackProc. C void CALLBACK CallBackProc(DWORD EventLogic, DWORD UserData) { // writes a process to respond to an interrupt event } The LPSDIOCALLBACK callback routine is defined as follows. #define SDIOCALLBACK CALLBACK typedef void (SDIOCALLBACK *LPSDIOCALLBACK)(DWORD EventLogic, DWORD UserData); C (x64) void CALLBACK CallBackProc(DWORD EventLogic, PVOID UserData) { // writes a process to respond to an interrupt event } The LPSDIOCALLBACK callback routine is defined as follows. #define SDIOCALLBACK CALLBACK typedef void (SDIOCALLBACK *LPSDIOCALLBACK)(DWORD EventLogic, PVOID UserData); 120

122 Visual Basic Function CallBackProc(EventLogic As Long, UserData As Long) writes a process to respond to an interrupt event End Function The callback routine should be written in a standard module of a project that calls the SdioSetEvent function. The AddressOf operator is used to pass the procedure address argument parameter of the SdioSetEvent function. Refer to the examples of the SdioSetEvent function.when you use the AddressOf operator, the procedure address, not the return value of the procedure, is passed to the SdioSetEvent function of the DLL. Delphi procedure CallBackProc(EventLogic:DWORD; UserData:DWORD); stdcall; begin // writes a process to respond to an interrupt event end; Parameters EventLogic UserData The interrupt logic that called the callback routine. The interrupt logic is stored with the following identifier. IFSDIO_RISE_EDGE: interrupts on the rising edge of the STB signal. IFSDIO_FALL_EDGE: interrupts on the falling edge of the STB signal. IFSDIO_CONNECT_EVENT: interrupts at disconnection from the serial communications module. IFSDIO_POWER_EVENT: interrupts when the serial communications module is in an abnormal power supply voltage. A user data specified by the SdioSetEvent function. Return Value This function has no return value. 121

123 7.3.1 Programming Constraints in Visual Basic The event function is not supported because the callback function cannot be registered (the AddressOf operator is not supported) in Visual Basic 4.0. In Visual Basic 5.0, the event function is supported. If you use the callback function offered by our software library in Microsoft Visual Basic 6.0, the following application error may occur. The instruction at 0x660d64d0 referenced memory at 0x c. The memory could not be written. 0x660d64d0 may be different value. An application error occurs in the following conditions; - Calling functions, including the functions offered by our software library. - Calling Statements of Visual Basic such as Str(). - Assigning strings to a static text In Visual Basic 6.0, use appropriate notification methods, such as the event signaling, message passing, and/or polling, instead of the callback routine. The Apartment model is adopted as the threading model in Microsoft Visual Basic 6.0. An application error may occur when a callback function is performed by a thread other than that is generated and started with Microsoft Visual Basic 6.0. Such error occurs because our software library performs a callback function registered at another thread that is started in the library. 122

124 7.4 Return Values Standard COM Error Code Value Description Comments/Solutions IFCOMU210X_ERROR_ 0 The process was SUCCESS successfully completed. - IFCOMU210X_ERROR_ INVALID_HANDLE h The device handle is invalid. An invalid device handle is called. Please use the device handle returned by the IFCOMU210X_ERROR_ INVALID_PARAMETER IFCOMU210X_ERROR_ DEVICE_IO_FAILED IFCOMU210X_ERROR_FUN CTION_NOT_SUPPORTED h h h The values of argument parameter are invalid. Access to a device or dll call failed. This function is not supported. CreateFile function. The specified value to API function is invalid or out of range. Access to a device or dll call failed. Check that the product is successfully installed. The specified COM does not support this function. General Purpose Digital Input/Output Error Code Value Description Comments/Solutions IFSDIO_ERROR_SUCCESS 0 The process was successfully completed. - IFSDIO_ERROR_INVALID_ PARAMETER 0xC The values of argument parameter are invalid. The specified value to API function is invalid. NULL is specified to the IFSDIO_ERROR_TERMINAL 0xC The terminal block is abnormal. IFSDIO_ERROR_INVALID_ HANDLE 0xC The device handle is invalid. argument. The power supply voltage of the terminal block is abnormal, the terminal block is not connected, or the combination of terminal block is not correct. Please connect the terminal block correctly. An invalid device handle is called. Please use the device handle returned by the open function. 123

125 Chapter 8 Sample Programs 8.1 Execution Procedure This product provides sample program files for C++, Visual Basic, and Delphi. Executable files of the sample programs are not included with this product. Compile the source code and create executable file to start. Visual C++ 1. Start Visual C++ (Visual Studio). 2. Select File > Open Workspace. 3. Open the makefile, *.mak. 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. Delphi 1. Start Delphi. 2. Open the project file, *.dpr. 3. Build the project file. 4. Run the executable file, *.exe. 8.2 List of Sample Programs The following table shows the sample programs. Sample Program Description Monitor Is used in the monitor mode. Send Transmits data. Receive Receives data. Event Generates an event and process it. InPoint Reads data from digital input/output pins. OutPoint Write data to digital input/output pins. 124

126 Chapter 9 Utilities 9.1 Interface Serial Port Terminal Application This program allows you to transfer data between communication stations Required Items for the Terminal Application The following items are required for this program. Interface asynchronous serial communications board Interface serial port terminal application Starting the Terminal Application 1. Click Start button, point to Programs, point to Interface GPF-4161, then click Serial Port Terminal Application. 2. The Interface Serial Port Terminal Application main window will appear. 3. Click Configuration menu. 125

127 4. The Configuration dialog box will appear. Specify communications parameters such as a port number, baud rate, data bits, and so on. 5. After configuration, click Connect on the Connection menu. Then, communications between the stations can be performed. Notes: Input data will be transmitted and the received data will be displayed in the window. To display all characters sent to the remote device on the terminal screen, check Local echo in the Configuration dialog box. Then, you can see the characters you have sent in blue font on the screen. 126

128 9.2 Diagnostic Program This program can determine if a malfunction is located in the software or in the hardware. If the problem is located in the software, this program can diagnose the problem in detail. * The following products are not supported. PCI U, PCI U, PCI U Required Items for the Diagnostic Program The following items are required for this program. Interface asynchronous serial communications board Interface asynchronous serial communications board diagnostic program Starting the Diagnostic Program 1. Click the Start button, point to Programs, point to Interface GPF-4161, then click Diagnostic Program. 2. The Interface Asynchronous Serial Communication Board Diagnostic Program main window will appear. 3. Click Select New Port in the File menu. 127

129 4. The Select New Port dialog box that contains the port number, board model, channel number, and RSW1 value will appear. 5. Select a port that you want to diagnose. This program can open only one port at a time. The following table shows available menu items and commands. Menu Command Description File Open Opens the link. Save Saves the Diagnosis result. Exit Closes the program. Diagnosis Start Diagnosis Starts to diagnose. Clear Diagnostic Results Clears the diagnostic results. Help Version Information Displays the version information. The rotary switch on each of our boards identifies each board in cases where our multiple boards of the same type are installed in the same system. Remember to set this switch to a unique setting on each board so there is not a conflict among boards of the same type Checking the PCI Configuration and Other Operations 1. Click Start Diagnosis on the Diagnosis menu. 2. Each diagnosis starts automatically and each result with be displayed in the main window. 3. When the result is NG, click Save on the File menu. And please send the result to our Customer Support Center by fax or

130 9.3 Duplex Setting Utility This utility program configures the communicationy method, half-duplex/full-duplex communications. * The following products are not supported. PCI U(RS-485), PCI U * The configured communication method is saved on the operation system and the setting value is reflected after the reboot. If the EWF function is enabled, the confuguration change is not saved. How to Use the Utility in GUI 1. Install software. Click Start > Programs > Interface GPF-4161 > Duplex Setting Utility. 2. Click File(F) > Open(O) ind menu bar to open the dialog box and select a device (RS-485) to configure communication method. 4. Select a radio button of Full Duplex or Half Duplex, and click the Set button. 5. Close the device by clicking File(F) > Close(C) in the menu bar. Close the program by clicking File(F) > Exit(X) in the menu bar. How to Use the Utility in CUI Start command prompt and pass an argument to SetDuplex.exe to switch full-duplex and half-duplex on the command line. Setduplex.exe [COM number] [DuplexMode] COM number : Type COMxx. Plug the COM number to be configured in xx. DuplexMode : Specify 1 to set to full-duplex, and 0 to set to half-duplex. 129

131 Example - Full-duplex Communication Setting COM3 to full-duplex comunication. >Setduplex.exe COM3 1 - Half-duplex Communication Setting COM3 to half-duplex communication. >Setduplex.exe COM

132 9.4 CardBus ID Number Configuration The CardBus ID configuration utility program can configure the CardBus ID number. The ID number on each our CardBus board is used to uniquely identify each board, in case multiple Interface CardBus boards of the same type are installed in the same system. This ID number for CardBus board is the same meaning as the rotary switch number for PCI/CompactPCI boards. Therefore, the CardBus ID number is appeared as the rotary switch number (RSW1) on the diagnostic program or device manager. How to specify the ID number is as follows. 1. After installing the driver software, click the Start button and point to Settings, and then click Control Panel. 2. Double-click Interface CardBus ID Utility, and then the CardBus ID Utility dialog box will appear. Item Description Bus (hex) Bus number in hexadecimal Dev (hex) Device number in hexadecimal Func (hex) Function number in hexadecimal Board type Model ID Number (hex) CardBus ID number in hexadecimal 3. Select an board that you want to set the ID number. Then, another CardBus ID Utility dialog box will appear. 4. Specify the ID number. Notes: Selectable ID number is in the range from 0h through Fh. To recognize the board which changed the ID number, remove the board and insert it or restart the computer. To identify each board, we recommend to put a sticker with the ID number on the board. 131

133 9.5 Digital Input Utility 1. Click the Start button and open the SdiUtil. 2. Click the Find Boards button. A list of available degital input/output devices appears. 3. Select the device you want to use, and click OK. The Current status of all input signals is displayed. This program always monitors the board. This program can open only one port at a time. The rotary switch on each of our boards identifies each board in cases where our multiple boards of the same type are installed in the same system. Remember to set this switch to a unique setting on each board so there is not a conflict among boards of the same type. 132

134 9.6 Digital Output Utility 1. Click the Start button and open the SdioUtil. 2. Point to Find Boards button. A list of available degital input/output devices appears. 3. Select the device you want to use, and click OK. To switch ON/OFF of the output signal, click the displayed button. The menu has ON and OFF functions for all input and output pins. This program can open only one port at a time. The rotary switch on each of our boards identifies each board in cases where our multiple boards of the same type are installed in the same system. Remember to set this switch to a unique setting on each board so there is not a conflict among boards of the same type. 133

LAP-B(PCI/C-PCI) GPF LAP-B Communications Driver Software for for Windows. Help for Windows.

LAP-B(PCI/C-PCI) GPF LAP-B Communications Driver Software for for Windows. Help for Windows. LAP-B(PCI/C-PCI) GPF-4115 LAP-B Communications Driver Software for for Windows Help for Windows www.interface.co.jp Contents Chapter 1 Introduction 4 1.1 Overview4 1.2 Features.4 Chapter 2 Product Specifications

More information

Table Of Contents. Rev. 1.0 Page 2

Table Of Contents. Rev. 1.0 Page 2 Table Of Contents Copyrights And Warranties... 1 Scope... 1 Table Of Contents... 2 1 System Requirements... 3 2 Extent of Supply... 3 3 Driver Installation... 3 4 Driver Deinstallation... 4 5 Customizing

More information

DYNAMIC ENGINEERING. 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est.

DYNAMIC ENGINEERING. 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est. DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 PMC Biserial S311 Software Manual Driver Documentation Developed

More information

CC Pilot XS. Backlight interface description

CC Pilot XS. Backlight interface description CC Pilot XS Backlight interface description Table of Contents Introduction... 3 Purpose... 3 References... 3 History... 3 Backlight device interface... 4 Summary of IOCTLs... 4 IOCTL_BACKLIGHT_GET_RESOLUTION...

More information

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA Fax Est.

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA Fax Est. DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA 95060 831-457-8891 Fax 831-457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 IpTest WDF Driver Documentation For the IP-Test module Developed

More information

DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est.

DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est. DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 IpGeneric WDF Driver Documentation Developed with Windows

More information

PCI-EK01 Driver Level Programming Guide

PCI-EK01 Driver Level Programming Guide PCI-EK01 Driver Level Programming Guide Windows, Windows2000, Windows NT and Windows XP are trademarks of Microsoft. We acknowledge that the trademarks or service names of all other organizations mentioned

More information

PcieAltBase & PcieAltChan

PcieAltBase & PcieAltChan DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 PcieAltBase & PcieAltChan WDF Driver Documentation For the

More information

DIO-BM(PCI/C-PCI)Linux/RT GPH-2X72C. Bus Master Digital Input/Output Board Driver Software for Linux/RTLinux. Help for Linux.

DIO-BM(PCI/C-PCI)Linux/RT GPH-2X72C. Bus Master Digital Input/Output Board Driver Software for Linux/RTLinux. Help for Linux. DIO-BM(PCI/C-PCI)Linux/RT GPH-2X72C Bus Master Digital Input/Output Board Driver Software for Linux/RTLinux Help for Linux www.interface.co.jp -Contents- Chapter 1 Introduction...4 1.1 Summary... 4 1.2

More information

PHLnkBase & PHLnkChan

PHLnkBase & PHLnkChan DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 PHLnkBase & PHLnkChan WDF Driver Documentation For the Six-Channel

More information

Software Specification. For. J1708 Driver

Software Specification. For. J1708 Driver Software Specification For J1708 Driver 11025-10041 Version 1.0 Last Revision: December 8, 2004 Document History: Version Date By Notes 1.0 12/9/2004 MSS Initial Draft Applied Data Systems, Inc. 2 Introduction

More information

DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est.

DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA (831) Fax (831) Est. DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 Bae9Base & Bae9Chan Driver Documentation Developed with Windows

More information

& WizChan. Driver Documentation

& WizChan. Driver Documentation DYNAMIC ENGINEERING 150 DuBois St. Suite C, Santa Cruz, CA 95060 831-457-8891 Fax 831-457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 PmcWiz & WizChan Driver Documentation Win32 Driver Model

More information

PMC Parallel TTL BA16 Base. Channel Software Manual

PMC Parallel TTL BA16 Base. Channel Software Manual DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 PMC Parallel TTL BA16 Base & Channel Software Manual Driver

More information

PMC Parallel TTL BA17 Base & Channel

PMC Parallel TTL BA17 Base & Channel DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 PMC Parallel TTL BA17 Base & Channel Driver Documentation

More information

Pci3Ip, Pci5Ip, Pc104pIp, Pc104p4Ip, cpci2ip, cpci4ip and PcieCar IndustryPack Carrier Device Drivers

Pci3Ip, Pci5Ip, Pc104pIp, Pc104p4Ip, cpci2ip, cpci4ip and PcieCar IndustryPack Carrier Device Drivers DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 Pci3Ip, Pci5Ip, Pc104pIp, Pc104p4Ip, cpci2ip, cpci4ip and

More information

DYNAMIC ENGINEERING 150 DuBois, Suite C, Santa Cruz, CA Fax Est

DYNAMIC ENGINEERING 150 DuBois, Suite C, Santa Cruz, CA Fax Est DYNAMIC ENGINEERING 150 DuBois, Suite C, Santa Cruz, CA 95060 831-457-8891 Fax 831-457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 IpPlr Driver Documentation Win32 Driver Model Revision B Corresponding

More information

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-9: WCE Serial Communication, Network, device-to

REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux. Lesson-9: WCE Serial Communication, Network, device-to REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux Lesson-9: WCE Serial Communication, Network, device-to to-device socket and Communication Functions 1 1. Windows CE Serial

More information

ccpmc Parallel TTL BA18 Base & Channel

ccpmc Parallel TTL BA18 Base & Channel DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 ccpmc Parallel TTL BA18 Base & Channel Driver Documentation

More information

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA (831) Fax (831) Est.

DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA (831) Fax (831) Est. DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 DartBase & DartChan Driver Documentation Win32 Driver

More information

IVI-6.2: VISA Interoperability Requirements for USBTMC Specification

IVI-6.2: VISA Interoperability Requirements for USBTMC Specification IVI Interchangeable Virtual Instruments IVI-6.2: VISA Interoperability Requirements for USBTMC Specification March 23, 2010 Edition Revision 1.0 Important Information Warranty Trademarks IVI-6.2: VISA

More information

S3C6400 HW Mulimedia Codec (MFC) User s Guide. S3C6400 HW Multimedia Codec (MFC) User s Guide

S3C6400 HW Mulimedia Codec (MFC) User s Guide. S3C6400 HW Multimedia Codec (MFC) User s Guide S3C6400 HW Multimedia Codec (MFC) User s Guide Samsung Electronics Co., Ltd. Mobile Solution Team, System LSI. Copyright 2007 Samsung Electronics Co, Ltd. All Rights Reserved. Though every care has been

More information

Key Switch Control Software Windows driver software for Touch Panel Classembly Devices

Key Switch Control Software Windows driver software for Touch Panel Classembly Devices IFKSMGR.WIN Key Switch Control Software Windows driver software for Touch Panel Classembly Devices Help for Windows www.interface.co.jp Contents Chapter 1 Introduction 3 1.1 Overview... 3 1.2 Features...

More information

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 PBBae Driver Documentation Win32 Driver Model Revision A

More information

ADS Windows CE Digital I/O Driver

ADS Windows CE Digital I/O Driver ADS Windows CE Digital I/O Driver Specification Version 1.2 ADS Document 110025-10056 ADS document # 110025-10056 Page 1 Introduction The purpose of the Digital I/O (DIO) driver is to encapsulate all available

More information

BBK-PCI. User s Manual. Document: Document No.: Date: File:

BBK-PCI. User s Manual. Document: Document No.: Date: File: User s Manual BBK-PCI Rottstraße 33 52068 Aachen Germany Tel: +49 (241) 54 19 01 Fax: +49 (241) 53 68 36 E-Mail: support@imp.ac.uunet.de WWW: http://members.aol.com/impaachen Document: Document No.: Date:

More information

MOXA Sync Board API Programmer s Manual

MOXA Sync Board API Programmer s Manual MOXA Sync Board API Programmer s Manual First Edition, Jan 2002 Moxa Technologies Co., Ltd. Tel: +866-2-8919-1230 Fax: +886-2-8919-1231 www.moxa.com service@moxa.com.tw MOXA Sync Board API Programmer s

More information

IP-429-II ARINC 429 Interface 1-4 Transmitters 2-8 Receivers

IP-429-II ARINC 429 Interface 1-4 Transmitters 2-8 Receivers DYNAMIC ENGINEERING 150 DuBois St., Suite C Santa Cruz, CA 95060 831-457-8891 Fax 831-457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 IP-429-II ARINC 429 Interface 1-4 Transmitters 2-8 Receivers

More information

DPF-0401 Windows driver software for USB expansion I/O products

DPF-0401 Windows driver software for USB expansion I/O products Interface USB Driver (I/O-CD) DPF-0401 Windows driver software for USB expansion I/O products Help for Windows www.interface.co.jp Contents Chapter 1 Introduction...3 1.1 Overview... 3 1.2 Corresponding

More information

System Monitoring Library Windows driver software for Classembly Devices

System Monitoring Library Windows driver software for Classembly Devices IFCPMGR.WIN System Monitoring Library Windows driver software for Classembly Devices www.interface.co.jp Contents Chapter 1 Introduction 3 1.1 Overview...3 1.2 Features...3 Chapter 2 Product Specifications

More information

COM(PCI/C-PCI)Linux/RT GPH Asynchronous Serial Comunications Driver Software for Linux/RTLinux. Help for Linux.

COM(PCI/C-PCI)Linux/RT GPH Asynchronous Serial Comunications Driver Software for Linux/RTLinux. Help for Linux. COM(PCI/C-PCI)Linux/RT GPH-4141 Asynchronous Serial Comunications Driver Software for Linux/RTLinux Help for Linux www.interface.co.jp -Contents- GPH-4141 Help for Linux Chapter 1 Introduction 4 1.1 Overview...4

More information

JetBox 8152 User Manual. WinCE 5.0 Canbus.

JetBox 8152 User Manual. WinCE 5.0 Canbus. JetBox 8152 User Manual WinCE 5.0 Canbus www.korenix.com Copyright Notice Copyright 2011 Korenix Technology Co., Ltd. All rights reserved. Reproduction without permission is prohibited. Information provided

More information

Ver.2.20 COM-2P(PCI)H COM-4P(PCI)H Features Cable & Connector (Option)

Ver.2.20 COM-2P(PCI)H COM-4P(PCI)H Features Cable & Connector (Option) RS-C ch Serial I/O Board with Isolation COM-P(PCI)H RS-C ch Serial I/O Board with Isolation COM-P(PCI)H This board is a PCI interface board for performing RS-C serial communications with external devices

More information

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est.

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est. DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 IpCan, BCan & PCan Driver Documentation Win32 Driver Model

More information

Controlling the motors: DSPIC 33F RS232

Controlling the motors: DSPIC 33F RS232 LOW LEVEL PROTOCOLE Single DSPIC 33F using RS232 To control the chassis you need to send via RS232 at 19200 bauds some special char that will be received by the DSPIC 33F that controls the motors. To get

More information

RS-422A/485 Serial I/O Board with Isolation for PCI. Features. Cable & Connector (Option) Product Configuration List.

RS-422A/485 Serial I/O Board with Isolation for PCI. Features. Cable & Connector (Option) Product Configuration List. Ver..0 RS-A/ Serial I/O Board with Isolation for PCI ch ch COM-PD(PCI)H This board is a PCI bus interface board for performing RS-A/ serial communications with external devices. The has two RS-A/ serial

More information

NSPI Driver. NetDCU. Windows CE. Native SPI Support. Version 2.0 ( )

NSPI Driver. NetDCU. Windows CE. Native SPI Support. Version 2.0 ( ) NSPI Driver Native SPI Support Version 2.0 (2009-03-20) NetDCU PicoMOD Windows CE About This Document This document describes how to install the Native SPI device driver (NSPI) and how to use it in own

More information

COM-2CL-PCI COM-4CL-PCI. Features. Packing List. PCI-compliant 2 port Isolated RS-232C. PCI-compliant 4 port Isolated RS-232C

COM-2CL-PCI COM-4CL-PCI. Features. Packing List. PCI-compliant 2 port Isolated RS-232C. PCI-compliant 4 port Isolated RS-232C Ver..00 PCI-compliant port Isolated RS-C COM-CL-PCI Features - 0,00bps (max) RS-C Serial Communication COM-CL-PCI two RS-C-compliant serial ports. COM-CL-PCI four RS-C-compliant serial ports. Baud rates

More information

BBK-PCI light. User s Manual

BBK-PCI light. User s Manual User s Manual BBK-PCI light Rottstraße 33 52068 Aachen Germany Tel: +49 (241) 54 19 01 Fax: +49 (241) 53 68 36 E-Mail: support@imp.ac.eunet.de WWW: http://members.aol.com/impaachen Document: Document No.:

More information

EWF Management Software Windows driver software for Classembly Devices /Industrial Controller

EWF Management Software Windows driver software for Classembly Devices /Industrial Controller IFEWF.WIN EWF Management Software Windows driver software for Classembly Devices /Industrial Controller Help for Windows www.interface.co.jp Contents Chapter 1 Introduction...3 1.1 Overview... 3 1.2 Features...

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 PB3Oseh Driver Documentation Win32 Driver Model Revision A Corresponding

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 PciLvds2R/T Driver Documentation Win32 Driver Model Revision A

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 PcBis3 & Bis3Chan Driver Documentation Win32 Driver Model Revision

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 User Manual PCI LVDS 8R Driver Documentation Revision A Corresponding

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 PmcB2B Driver Documentation Win32 Driver Model Revision A Corresponding

More information

Tape Channel Analyzer Windows Driver Spec.

Tape Channel Analyzer Windows Driver Spec. Tape Channel Analyzer Windows Driver Spec. 1.1 Windows Driver The Driver handles the interface between the Adapter and the Adapter Application Program. The driver follows Microsoft Windows Driver Model

More information

User Manual UNO TI Cortex AM3505 DIN-rail PC with 2 x LAN, 5 x COM, 4 x USB

User Manual UNO TI Cortex AM3505 DIN-rail PC with 2 x LAN, 5 x COM, 4 x USB User Manual UNO-1110 TI Cortex AM3505 DIN-rail PC with 2 x LAN, 5 x COM, 4 x USB Copyright The documentation and the software included with this product are copyrighted 2013 by Advantech Co., Ltd. All

More information

System Monitoring Library Windows Driver Software for Industrial Controllers

System Monitoring Library Windows Driver Software for Industrial Controllers IFPMGR.WIN System Monitoring Library Windows Driver Software for Industrial ontrollers Help for Windows www.interface.co.jp ontents hapter 1 Introduction...4 1.1 Overview... 4 1.2 Features... 4 hapter

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 PciLvds8R/T Driver Documentation Win32 Driver Model Revision A

More information

User Manual VScom PCI Cards VScom Industrial Card

User Manual VScom PCI Cards VScom Industrial Card User Manual VScom PCI Cards VScom Industrial Card Edition: July 2011 Tel: +49 40 528 401 0 Fax: +49 40 528 401 99 Web: www.visionsystems.de Support: service@visionsystems.de The software described in this

More information

User Manual UNO-1251G. Windows Embedded Compact7 Software Manual

User Manual UNO-1251G. Windows Embedded Compact7 Software Manual User Manual UNO-1251G Windows Embedded Compact7 Software Manual Copyright The documentation and the software included with this product are copyrighted 2016 by Advantech Co., Ltd. All rights are reserved.

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 PB3Hw1 Driver Documentation Win32 Driver Model Revision A Corresponding

More information

Serial Communication. Simplex Half-Duplex Duplex

Serial Communication. Simplex Half-Duplex Duplex 1.5. I/O 135 Serial Communication Simplex Half-Duplex Duplex 136 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave

More information

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels.

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels. Modular PCI Range of Cards Summary features Modular Architecture Interface compatible with PCI Local bus Specification, revision 2.1, June 1995 2 or 4 Module General Purpose Carrier Cards 8 Channels per

More information

Serial Communication. Simplex Half-Duplex Duplex

Serial Communication. Simplex Half-Duplex Duplex 1.5. I/O 128 Serial Communication Simplex Half-Duplex Duplex 129 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave

More information

DPC-0225 Storage Protection Management Software

DPC-0225 Storage Protection Management Software Storage Protection Management Software DPC-0225 Storage Protection Management Software Ver.1.10 Help for Windows www.interface.co.jp Contents Chapter 1 Introduction 3 1.1 Overview...3 1.2 Features...3

More information

Comprehensive User s Guide 236 Adapter. Version 1.0. DH electronics GmbH

Comprehensive User s Guide 236 Adapter. Version 1.0. DH electronics GmbH 111 12 22 Comprehensive User s Guide 236 Adapter Version 1.0 12 DH electronics GmbH Am Anger 8 83346 Bergen Germany Tel.: +49 8662 4882-0 Fax.: +49 8662 4882-99 E-Mail: info@xlon.de www.xlon.de This documentation

More information

UNO PXA 200MHZ, 64MB RAM, 2 x LAN,4 x COM Universal Network Controller. User Manual

UNO PXA 200MHZ, 64MB RAM, 2 x LAN,4 x COM Universal Network Controller. User Manual UNO-1019 PXA 200MHZ, 64MB RAM, 2 x LAN,4 x COM Universal Network Controller User Manual Copyright The documentation and the software included with this product are copyrighted 2006 by Advantech Co., Ltd.

More information

Human Interface Devices: Host Application

Human Interface Devices: Host Application Human Interface Devices: Host Application 13 Human Interface Devices: Host Application Chapter 10 showed how to obtain a handle to communicate with a device. This chapter shows how Visual Basic.NET and

More information

USB Interface User Manual

USB Interface User Manual USB Interface User Manual Gesytec GmbH Pascalstr. 6 52076 Aachen, Germany Tel. + (49) 24 08 / 9 44-0 Fax + (49) 24 08 / 94 4-100 email: info@gesytec.de www.gesytec.com Doc. ID: LPU/UserDoc/LPU_Manual-E_V3.8.docx,

More information

Call DLL from Limnor Applications

Call DLL from Limnor Applications Call DLL from Limnor Applications There is a lot of computer software in the format of dynamic link libraries (DLL). DLLCaller performer allows your applications to call DLL functions directly. Here we

More information

TECHNICAL BULLETIN [ 1 / 8 ]

TECHNICAL BULLETIN [ 1 / 8 ] TECHNICAL BULLETIN [ 1 / 8 ] [Title] Production discontinuation of the QD51(-R24) intelligent communication module [Date of Issue] March 2016 [Relevant Models] QD51, QD51-R2 Thank you for your continued

More information

User s Guide. RS-232C Serial I/O Board for PCI Express Low Profile Size 1ch type COM-1C-LPE. 2ch type COM-2C-LPE. 4ch type COM-4C-LPE CONTEC CO.,LTD.

User s Guide. RS-232C Serial I/O Board for PCI Express Low Profile Size 1ch type COM-1C-LPE. 2ch type COM-2C-LPE. 4ch type COM-4C-LPE CONTEC CO.,LTD. PC-HELPER RS-232C Serial I/O Board for PCI Express Low Profile Size 1ch type COM-1C-LPE 2ch type COM-2C-LPE 4ch type COM-4C-LPE User s Guide CONTEC CO.,LTD. Check Your Package Thank you for purchasing

More information

Digi document reference number: _A

Digi document reference number: _A Digi document reference number: 90000922_A Digi International Inc. 2008. All Rights Reserved. The Digi logo is a registered trademark of Digi International, Inc. All other trademarks mentioned in this

More information

Vhand 2.0 SDK Manual. DGTech Engineering Solutions

Vhand 2.0 SDK Manual. DGTech Engineering Solutions Vhand 2.0 SDK Manual DGTech Engineering Solutions www.dg-tech.it Release 1.1 October 2007 Table of Contents Introduction...3 Class Project...5 Global project manipulation...6 int LoadProject()...6 int

More information

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est

DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA (831) Fax (831) Est DYNAMIC ENGINEERING 150 DuBois, Suite 3 Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 www.dyneng.com sales@dyneng.com Est. 1988 PciAlt Driver Documentation Win32 Driver Model Revision D Corresponding

More information

IO-Warrior Dynamic Library V1.5 for Windows

IO-Warrior Dynamic Library V1.5 for Windows V1.5 for Windows Applicable for all IO-Warriors Overview The IO-Warrior Kit Dynamic Library provides a simple API to access all IO-Warrior products from Code Mercenaries. It is intended to be used with

More information

Bulk Transfers Using Visual Basic 6.0

Bulk Transfers Using Visual Basic 6.0 Revision 0.BMay 11, 2001 Introduction This document describes Bulk_XferVB, a small Windows application that uses Bulk Transfers to move data in and out of EZ-USB / EZ-USB FX devices using the EZ-USB General

More information

DYNAMIC ENGINEERING 150 DuBois St Suite 3, Santa Cruz CA Fax Est.

DYNAMIC ENGINEERING 150 DuBois St Suite 3, Santa Cruz CA Fax Est. DYNAMIC ENGINEERING 150 DuBois St Suite 3, Santa Cruz CA 95060 831-457-8891 Fax 831-457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 User Manual PCI-Altera-485 Driver Documentation CSC Version

More information

MODELS PCIe-COM-8SM, PCIe-COM-4SM, PCIe-COM485-8, PCIe-COM485-4, PCIe-COM422-8, PCIe-COM422-4

MODELS PCIe-COM-8SM, PCIe-COM-4SM, PCIe-COM485-8, PCIe-COM485-4, PCIe-COM422-8, PCIe-COM422-4 10623 Roselle Street, San Diego, CA 92121 (858) 550-9559 FAX (858) 550-7322 contactus@accesio.com www.accesio.com MODELS PCIe-COM-8SM, PCIe-COM-4SM, PCIe-COM485-8, PCIe-COM485-4, PCIe-COM422-8, PCIe-COM422-4

More information

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est

DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif Fax Est DYNAMIC ENGINEERING 435 Park Dr., Ben Lomond, Calif. 95005 831-336-8891 Fax 831-336-3840 http://www.dyneng.com sales@dyneng.com Est. 1988 PmcPario Driver Documentation Win32 Driver Model Revision A Corresponding

More information

Foreword 0. 3 How to... Distribute It. 1 Serial... Communication. EscapeCommFunc... Function. GetXferStatus... Function. GetInputDataCount...

Foreword 0. 3 How to... Distribute It. 1 Serial... Communication. EscapeCommFunc... Function. GetXferStatus... Function. GetInputDataCount... Contents 1 Table of Contents Foreword 0 Part I About MegaPipe Win32 DLL 3 1 Introduction... 3 2 How to... Use It 3 Trial Version... 3 Full Version... 3 3 How to... Distribute It 4 Part II Reference Guide

More information

$U6RIW,QWHUQDWLRQDO. Modbus Driver for Windows 95/98/NT/2000/XP 8VHUV0DQXDO 0RGEXV,QWHUIDFH. 9HUVLRQ Page 1

$U6RIW,QWHUQDWLRQDO. Modbus Driver for Windows 95/98/NT/2000/XP 8VHUV0DQXDO 0RGEXV,QWHUIDFH. 9HUVLRQ Page 1 0RGEXV,QWHUIDFH 8VHUV0DQXDO 9HUVLRQ Page 1 6\VWHP,QWHUIDFH The implemented procedures and functions in the DLL modbus (Modbus.dll ) are subsequently described in detail: 2SHQ&RP 'LVDEOH&RP 5HDG:RUGV :ULWH:RUGV

More information

USB Socket Interface User Manual

USB Socket Interface User Manual USB Socket Interface User Manual Gesytec GmbH Pascalstr. 6 52076 Aachen, Germany Tel. + (49) 24 08 / 9 44-0 Fax + (49) 24 08 / 94 4-100 email: info@gesytec.de www.gesytec.com Doc. ID: LPM3/UserDoc/LPM3_Manual-E-v2.1.docx,

More information

MODEL USB-FLEXCOM4. USB to Four RS-232/422/485 Serial Ports and MODEL USB-COM232-4A USB to Four RS-232 Serial Ports USER MANUAL

MODEL USB-FLEXCOM4. USB to Four RS-232/422/485 Serial Ports and MODEL USB-COM232-4A USB to Four RS-232 Serial Ports USER MANUAL Embedded Solutions MODEL USB-FLEXCOM4 USB to Four RS-232/422/485 Serial Ports and MODEL USB-COM232-4A USB to Four RS-232 Serial Ports USER MANUAL FILE: MUSB-FLEXCOM4.B1f ADL Embedded Solutions GmbH, Eiserfelder

More information

Connection Guide (RS-232C) OMRON Corporation

Connection Guide (RS-232C) OMRON Corporation Machine Automation Controller NJ-series General-purpose Serial Connection Guide (RS-232C) OMRON Corporation Ultra Small Multi-code Reader (V400-R2 Series) P567-E1-01 About Intellectual Property Rights

More information

Omron Toolbus Driver Help Kepware Technologies

Omron Toolbus Driver Help Kepware Technologies Omron Toolbus Driver Help 2012 Kepware Technologies 2 Table of Contents Table of Contents 2 4 Overview 4 Device Setup 5 Modem Setup 5 Data Types Description 6 CS1/CJ1 Address Descriptions 7 Error Descriptions

More information

Keithley KPCI-3160 Series

Keithley KPCI-3160 Series Keithley KPCI-3160 Series Information in this document is subject to change without notice. The software described is this document is furnished under a license agreement. The software may be used or copied

More information

PCIe Card Selection Guide. PCIe-CAN Card. PCIe-COM Card. Taiwan Pulse Motion Co.,Ltd. Bus Interface PCI Express x 1 LPE-C122 PCE-C122D PCE-C122T

PCIe Card Selection Guide. PCIe-CAN Card. PCIe-COM Card. Taiwan Pulse Motion Co.,Ltd. Bus Interface PCI Express x 1 LPE-C122 PCE-C122D PCE-C122T PCIe Card Selection Guide PCIe-CAN Card Bus Interface PCI Express x 1 LPE-C122 PCE-C122D PCE-C122T Channels I/O Isolation Voltage Baud Rate Terminator Resistor I/O PIN Type 2 Max. 1 Mbps Jumper for 120

More information

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC

CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision For Use With Analog Devices ADSP-SC58x Series Processors. Closed Loop Design, LLC CLD SC58x CDC Library v.1.00 Users Guide Users Guide Revision 1.00 For Use With Analog Devices ADSP-SC58x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC

CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3. For Use With Analog Devices ADSP-BF70x Series Processors. Closed Loop Design, LLC CLD BF70x CDC Library v.1.3 Users Guide Users Guide Revision 1.3 For Use With Analog Devices ADSP-BF70x Series Processors Closed Loop Design, LLC 748 S MEADOWS PKWY STE A-9-202 Reno, NV 89521 support@cld-llc.com

More information

MAP/950 SERIAL I/O CARD INSTALLATION MANUAL

MAP/950 SERIAL I/O CARD INSTALLATION MANUAL MAP/950 4 PORT ISOLATED RS422/RS485 PCI SERIAL I/O CARD INSTALLATION MANUAL HIGH-PERFORMANCE UART FAMILY This document describes the installation and use of the Axxon Computer Corporation MAP/950 4 Port

More information

PCI Express 4-Port Industrial Serial I/O Cards

PCI Express 4-Port Industrial Serial I/O Cards PCI Express 4-Port Industrial Serial I/O Cards The PCIe-400i and PCIe-400i-SI PCI Express 4-port industrial serial I/O cards are plug & play high-speed serial I/O expansion cards for the PCI Express bus.

More information

Informatics for industrial applications

Informatics for industrial applications Informatics for industrial applications Lecture 5 - Peripherals: USART and DMA Martino Migliavacca martino.migliavacca@gmail.com October 20, 2011 Outline 1 Introduction to USART Introduction Synchronous

More information

int result; int waitstat; int stat = PmcaAsyncGetGain(&result); // stat receives request id

int result; int waitstat; int stat = PmcaAsyncGetGain(&result); // stat receives request id PMCA COM API Programmer's Guide PMCA COM is an Application Programming Interface Library for the Amptek Pocket Multichannel Analyzers MCA8000 and MCA8000A. PMCA COM runs on personal computers under any

More information

Topics. Interfacing chips

Topics. Interfacing chips 8086 Interfacing ICs 2 Topics Interfacing chips Programmable Communication Interface PCI (8251) Programmable Interval Timer (8253) Programmable Peripheral Interfacing - PPI (8255) Programmable DMA controller

More information

CSCE : Computer Systems Homework #1 Part 1 (25 pts) Due date: 1/24/19

CSCE : Computer Systems Homework #1 Part 1 (25 pts) Due date: 1/24/19 1. Purpose CSCE 313-200: Computer Systems Homework #1 Part 1 (25 pts) Due date: 1/24/19 Understand the Visual Studio environment, creation of projects, simple process debugging, search algorithms, and

More information

RS-232C Isolated Serial I/O Board for PCI Express 2ch COM-2PC-PE 4ch COM-4PC-PE User s Guide

RS-232C Isolated Serial I/O Board for PCI Express 2ch COM-2PC-PE 4ch COM-4PC-PE User s Guide PC-HELPER RS-232C Isolated Serial I/O Board for PCI Express 2ch COM-2PC-PE 4ch COM-4PC-PE User s Guide CONTEC CO.,LTD. XXXXXXXXXXXXX XXXXXXXXXXXXX Check Your Package Thank you for purchasing the CONTEC

More information

System Monitoring Library Linux Driver Software for Classembly Devices(R)

System Monitoring Library Linux Driver Software for Classembly Devices(R) IFCPMGR.LIN System Monitoring Library Linux Driver Software for Classembly Devices(R) Help for Linux www.interface.co.jp Contents Chapter 1 Introduction 3 1.1 Overview...3 1.2 Features...3 Chapter 2 Product

More information

Multifunction Serial Interface (PDL_MFS) Features. General Description. When to Use a PDL_MFS Component. Quick Start 1.0

Multifunction Serial Interface (PDL_MFS) Features. General Description. When to Use a PDL_MFS Component. Quick Start 1.0 1.0 Features Configures the Multi-Function Serial (MFS) Interface to one of the following modes: UART (Asynchronous normal serial interface) Clock synchronous serial interface (SPI and I 2 S can be supported)

More information

MODEL USB-COM-2SM USER MANUAL

MODEL USB-COM-2SM USER MANUAL C (C C MODEL USB-COM-2SM USER MANUAL FILE: MUSB-COM-2SM.A1a Notice The information in this document is provided for reference only. Portwell does not assume any liability arising out of the application

More information

Keithley KPCI-ISO Series. Using DriverLINX with Your Hardware

Keithley KPCI-ISO Series. Using DriverLINX with Your Hardware Keithley KPCI-ISO Series Using DriverLINX with Your Hardware Information in this document is subject to change without notice. The software described in this document is furnished under a license agreement.

More information

MiniOS7 API Functions Reference Manual. (For C Language) Version 1.12, Jan 2009

MiniOS7 API Functions Reference Manual. (For C Language) Version 1.12, Jan 2009 MiniOS7 API Functions Reference Manual (For C Language) Version 1.12, Jan 2009 Original Writer:Tim Tsai Last Editer: Vic Tsai i-7188 series i-7188(d) i-7188xa(d) i-7188xb(d) i-7188xc(d) i-7188ex(d) i-7188ea(d)

More information

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers Application Note, V1.0, Jul. 2006 AP16095 XC16x Interfacing the XC16x Microcontroller to a Serial SPI EEPROM Microcontrollers Edition 2006-07-10 Published by Infineon Technologies AG 81726 München, Germany

More information

HT42B564-x USB (HID) to UART Bridge IC

HT42B564-x USB (HID) to UART Bridge IC USB (HID) to UART Bridge IC Features Operating Voltage (V DD ): 3.3V~5.5V UART pin Voltage (V DDIO ): 1.8V~V DD (Less than V DD voltage) Power down and wake-up functions to reduce power consumption Fully

More information

USB Dynamic Industrial Interface V A Universal Application Programming Interface To Data Acquisition Products Users Manual

USB Dynamic Industrial Interface V A Universal Application Programming Interface To Data Acquisition Products Users Manual USB Dynamic Industrial Interface V 2.0.1.1 A Universal Application Programming Interface To Data Acquisition Products Users Manual Design & Implementation by Decision Computer International Company No

More information

AET60 BioCARDKey. Application Programming Interface. Subject to change without prior notice

AET60 BioCARDKey. Application Programming Interface.  Subject to change without prior notice AET60 BioCARDKey Application Programming Interface Subject to change without prior notice Table of Contents 1.0. Introduction... 3 2.0. Application Programming Interface... 4 2.1. Overview...4 2.2. Data

More information

DTSX3000 Communications(Modbus) Guide

DTSX3000 Communications(Modbus) Guide User s Manual DTSX3000 Communications(Modbus) Guide First Edition Blank Page < Introduction > i Introduction About this Manual Thank you for purchasing the DTSX3000 Distributed Temperature Sensor. This

More information

Serial Interfaces Part 1. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Serial Interfaces Part 1. ECE 153B Sensor & Peripheral Interface Design Winter 2016 Serial Interfaces Part 1 ECE 153B Sensor & Peripheral Interface Design Serial Interfaces Simple Serial Interfaces RS-232C (UART) Provides for point to point communications, primarily Among the simplest

More information

Files, Registry and Databases for storing data

Files, Registry and Databases for storing data REAL TIME OPERATING SYSTEM PROGRAMMING-II: II: Windows CE, OSEK and Real time Linux Lesson-4: Files, Registry and Databases for storing data 1 1. WCE Files 2 File Creation function arguments CreateFile

More information