Home
IO BOARD SOFTWARE MANUAL
Contents
1. 21 TGV ELEK EEEN E OK EE Ie RETE RUE UT ERIT EPIIT 24 R TALLE TAE DELL FROM BEN aaa 28 1 4 DEWOPROGRAM sites Reine 30 DESCRIPTION OF FUNCITON Sissi ANS 35 28 CONFIGURA TION CODE iate ip fed qub Moser IE Lp HUE casitas 37 2 ERROR CODE 0 A A A A AAA EA AAA AA RE 38 2 d co sip ERE 39 FI TESTEUNE TION ct lid cds 42 Fa Em 42 LADA 42 E A E A 43 ME A A K K EA EHEZ SEK EKET 43 23 THEM FUNCTIONS iin ee IS 44 PO TT 44 TA CO 4 4 o bI 46 2 3 IE ascen LEE eas 48 2 0 CHE DID UNCDEIONS Re 50 pA MEE A MH 50 zm o ND NIRE HIE ENE GREENE KEKE T S RR ry SAS ENE re Teter teeter EORR OO 31 2 TED TON ea 52 E PA mr 24 22 TEABEDEISIDEENETID au 53 A EEE abest doas bae ene be Ri ida ne tede itp edet but iaai i Zas ad OME PCI 180x Software Manual bro E T ArT ONS sine 54 A r S 35 CRINE A RTI E IOTER 56 29 THERTAGI SCAN FUNCTIONS DAA n PS ee ad ee 57 E PIE EIR mmm af 242 PICU SWING cancion wien anno eore aaa ae eee 58 zd PRIN R esent ribi rebate eer A ap oer bep betta edu 59 FECE o0 043 ARTO PT 60 dO EDER A a N E 61 BOG PISA Wa Moe CGP its m 62 2 10 THEPULORPLAY FUNCTIONS ni eek ee 63 SP ER ET A cita ous AAA EN Sa a emai fI CI eM A dd dae 63 ZINN T INEA sanieren eek 63 BAGS IGOR ren One Are O Het 65 POX H ING NE een 65 A a 67 2 11 NUET BL ed BL DI a En UU 68 2did PISO Fund Sari 68 al A
2. PO output the number of A D samples that have been acquired for the first board P1 output the number of A D samples that have been acquired for the second board e Return NoError OK e Demo Program DEMO20 C Page 71 OME PCI 180x Software Manual 2 12 The Single Board Batch Capture 2 12 1 P180X_FunB_Start e Description This function will start the batch capture process e Syntax WORD P180X_FunB_Start WORD wClockDivO WORD wChannelO WORD wConfigO WORD Buffero DWORD dwMaxCount0 SHORT nPriority e Parameter wClockDivO the A D sample rate divisor for this board the sample rate is 8M wClockDivO wChannel0 02no scan 1 scan for each channel of this board wConfigO configuration code for each channel of this board Refer to Section 2 1 Configuration Table BufferO buffer to store the A D data of this board dwMaxCountO A D sample count nPriority Thread priority The value of nPriority ranges from Value ID Description 2 THREAD PRIORITY LOWEST 1 THREAD PRIORITY BELOW NORMAL 0 THREAD PRIORITY NORMAL 1 THREAD PRIORITY ABOVE NORMAL 2 THREAD PRIORITY HIGHEST 15 THREAD PRIORITY TIME CRITICAL others THREAD PRIORITY NORMAL e Return NoError OK FindBoardError cannot find the OME PCI 180X board AdControllerError MagicScan controller hardware handshake error e Demo Program DEMO21 C Page 72 OME PCI 180x Software Manual 2 12 2
3. 3 Parport 3 PartMgr FF 3 Parvdm aa PCI 3 PCIDump J PCIIde ll DAS PCI 180x Card Properties MME General Driver Resources Hal DAS PCI 180x Card Resource settings Resource type Setting Bl Input Output Range E800 E803 H Input Output Range ECOO ECO m Interrupt Request 07 Setting based or Curent configuration M Use automatic settings henge Setting Conflicting device list No conflicts Type Data REG Sz Dis REG SZ i9 ErrorControl REG DWORD ab ImagePath REG EXPAND SZ ho Start REG_DWORD 22 Type REG_DWORD value not set PCI 180x Driver 0x00000001 1 System32 Drivers P180x 0x00000002 2 0x00000001 1 My ComputeriHKEY LOCAL MACHINEYSYSTEMYControlSeEO011ServicesYP 180x 7 Page 9 Fig 3 The registry path OME PCI 180x Software Manual e Registry Editor Registry Edit View Favorites Help E T Class E a 1337B647D 6400 449C Data value not set Me ta nn REG_52 DAS PCI 180x Card A dens H N S l m 4D36E966 E325 11CE e amp infrath REG S oemQ inf H 4D36E967 E325 11CE iabJInfsection REG 52 P180x Install GM 4D36E968 E325 11CE lab infSectionExt REG_SZ NTx86 Ge 14036 969 E325 11cE BB MatchingDeviceld REG sz pcilven 12348dev 5678 A 44p3 Esea Esos iicE AB ProviderName REG 57 DAS Co LTD 1 4D36E96B E325 11CE cg 4D36E96C E325 11
4. demo23 demo24 demo25 demo1 one board D I O test D A test A D polling amp pacer trigger test general test demo2 two board same as demo1 demo3 one board all 32 channels of A D by software trigger by polling demo4 two boards same as demo3 demo5 one board M function 1 demo demo6 two boards same as demo5 demo7 one board M function 2 demo demog8 two boards same as demo demo9 one board M function 3 demo two boards same as demo9 one board MagicScan demo two boards same as demo11 one board continuous capture demo two boards continuous capture demo Windows 95 NT only all installed boards D I O test for board number identification one board performance evaluation demo one board MagicScan demo scan sequence 49335 one boards MagicScan demo scan 32 channel show channel 0 1 15 16 17 one board A D calibration two boards P180X FUNA continuous capture demo single board P180X FUNB continuous capture demo single board post trigger demo single board pre trigger demo single board middle trigger demo Page 80 USA WARRANTY DISCLAIMER OMEGA ENGINEERING INC warrants this unit to be free of defects in materials and workmanship for a period of 13 months from date of purchase OM EGA s WARRANTY adds an additional one 1 month grace period to the normal one 1 year product warranty to cover handling and shipping time This ensures that OMEGA s customers receive maximum coverage on each prod
5. wndclass hCursor LoadCursor NULL IDC ARROW Page 30 OME PCI 180x Software Manual wndclass hbrBackground HBRUSH GetStockObject WHITE BRUSH wndclass lpszMenuName NULL wndclass IpszClassName szAppName wndclass hlconSm Loadlcon NULL IDI APPLICATION RegisterClassEx amp wndclass hwnd CreateWindow szAppName P180X Demo1 Program WS_OVERLAPPEDWINDOW CW_USEDEFAULT CW_USEDEFAULT CW_USEDEFAULT CW_USEDEFAULT NULL NULL hinstance NULL ShowWindow hwnd SW SHOWMAXIMIZED UpdateWindow hwnd while GetMessage amp msg NULL 0 0 TranslateMessage 8msg DispatchMessage amp msg return msg wParam LRESULT CALLBACK WndProc HWND hwnd UINT iMsg WPARAM wParam LPARAM IParam static int cxChar cyChar cxClient cyClient cxBuffer static int cyBuffer xCaret yCaret static char cBuf 80 HDC hdc TEXTMETRIC tm PAINTSTRUCT ps int i switch iMsg case WM CREATE window initial eee e eeedede dede elee eee eee dede IEREE SARI EERE ELIE LEER ERAS NOTICE call P180X Driverlnit to initialize the driver ERERERREREREAEAERELE SAREE KEREK EE ERLE EER ER ede eee ede II Initial the device driver and return the board number in the PC wiInitialCodezP180X Driverlnit amp wTotalBoard if wInitialCode NoError MessageBox hwnd No P180X card in this system P180X Card Error MB OK hdc GetDC hwnd SelectObject hdc GetStockObject SYSTEM_FIXED_FONT
6. 33 0 1 30 57 54 27 Toll Free in France 0800 466 342 e mail sales omega fr Daimlerstrasse 26 D 75392 Deckenpfronn Germany TEL 49 0 7056 9398 0 FAX 49 0 7056 9398 29 Toll Free in Germany 0800 639 7678 e mail info omega de One Omega Drive River Bend Technology Centre Northbank Irlam Manchester M44 5BD United Kingdom TEL 44 0 161 777 6611 FAX 44 0 161 777 6622 Toll Free in United Kingdom 0800 488 488 e mail sales omega co uk It is the policy of OMEGA to comply with all worldwide safety and EMC EMI regulations that apply OMEGA is constantly pursuing certification of its products to the European New Approach Directives OMEGA will add the CE mark to every appropriate device upon certification The information contained in this document is believed to be correct but OMEGA Engineering Inc accepts no liability for any errors it contains and reserves the right to alter specifications without notice WARNING These products are not designed for use in and should not be used for patient connected applications OME PCI 180x Software Manual Table of Contents 1 2 TN TROD UC TION susanne 5 Li 6 10 45 1 ZHAO 05 E Lr TON see 6 L2 PLUG amp PLAY riesen AAA RA 8 L3 USING WITH VISUAL e eier 11 Ir UONG NTEM ae 12 LS USING WITH BLE AEERE GE AERE KIE AFER RE UI REB ii 13 LO BING ITH VISDAL BASIC ana 14 LOT MAA E AAE REAA 14 PO TEF O E ner 15 L3 DEMOT AAA ea a ens de les 18 1 2 Roco TEUER DELP m
7. 5V or 10V by setting hardware jumper JP1 The software cannot detect the state of JP1 e Return NoError OK FindBoardError cannot find the OME PCI 180X board ExceedBoardNumber invalid board number DaChannelError channel number must be 0 or 1 e Demo Program DEMO1 C Page 52 OME PCI 180x Software Manual 2 8 The A D Fixed mode Functions 2 8 1 P180X_SetChannelConfig e Description This subroutine will set the A D channel s configuration code This subroutine will set the active A D channel for P180X_AdPolling P180X_AdsPolling and P180X_AdsPacer This function will refer to the current active PCI 180X board Use P180X_ActiveBoard to select the active board e Syntax WORD P180X_SetChannelConfig WORD wChannel WORD wConfig e Parameter wChannel A D channel number wConfig Configuration code Refer to Section 2 1 Configuration Table for details e Return NoError OK ExceedBoardNumber invalid board number FindBoardError cannot find the OME PCI 180X board AdControllerError MagicScan controller hardware handshake error e Demo Program DEMO1 C Page 53 OME PCI 180x Software Manual 2 8 2 P180X_AdPolling e Description This subroutine will perform a single A D conversion by software polling The P180X_SetChannelConfig subroutine can be used to change channel or configuration code This function will refer to the current active PCI 180X board Use P180X_ActiveBoard to select
8. GetTextMetrics hdc amp tm cxChar tm tmAveCharWidth cyChar tm tmHeight ReleaseDC hwnd hdc return 0 case WM SIZE cxClientZLOWORD IParam J window size in pixels cyClient HIWORD IParam Page 31 OME PCI 180x Software Manual cxBuffer max 1 cxClient cxChar window size in characters cyBuffer max 1 cyClient cyChar return 0 case WM SETFOCUS CreateCaret hwnd NULL cxChar cyChar SetCaretPos xCaret cxChar yCaret cyChar ShowCaret hwnd return 0 case WM KILLFOCUS HideCaret hwnd DestroyCaret return 0 case WM CHAR user press KEYBOARD for i 0 i lt int LOWORD IParam i switch wParam case b backspace pressed if xCaret gt 0 xCaret cBuf xCaret HideCaret hwnd hdc GetDC hwnd SelectObject hdc GetStockObject SYSTEM_FIXED_FONT TextOut hdc xCaret cxChar yCaret cyChar cBuf xCaret 1 ShowCaret hwnd ReleaseDC hwnd hdc break case r carriage return pressed if wFlag 1 InvalidRect hwnd NULL TRUE wFlag 0 break wFlag 1 cBuf xCaret 0 if xCaret 0 xCaret 0 yCaret READ_CMD cBuf TEST CMD hwnd xCaret cxChar yCaret cyChar xCaret 0 yCaret iLine if yCaret gt cyBuffer InvalidRect hwnd NULL TRUE break case x1B escape pressed InvalidRect hwnd NULL TRUE xCaret yCaret 0 break default other KEY pressed cBuf xCaret char wParam HideCaret hwnd hdc GetDC hwnd Sel
9. wAdClock WORD wAdNumber WORD wAdConfig WORD wAdBuf PWord WORD stdCall function P180X M FUN 3 wDaFrequency WORD wDaWave WORD fDaAmplitude Single wAdClock WORD wAdNumber WORD wChannelStatus PWord wAdConfig PWord fAdBuf PSingle fLowAlarm Single fHighAlarm Single WORD stdCall Page 22 OME PCI 180x Software Manual function P180X_M_FUN_4 wType WORD wDaFrequency WORD wDaWave WORD fDaAmplitude Single wAdClock WORD wAdNumber WORD wChannelStatus PWord wAdConfig PWord fAdBuf PSingle fLowAlarm Single fHighAlarm Single WORD stdCall Function of DI DO function P180X_Do wOutData Word Word stdCall function P180X_Di var wDiData Word WORD stdCall Function of AD DA function P180X_Da wDaChannel Word wDaVal Word WORD stdCall function P180X_SetChannelConfig wAdChannel Word wConfig Word WORD stdCall function P180X_AdPolling var fAdVal Single WORD stdCall function P180X_AdsPolling fAdVal PSingle wNum Word WORD stdCall function P180X_AdsPacer fAdVal PSingle wNum Word wSamplingDiv Word WORD stdCall 88 ORI YN Note EAT function P180X ClearScan WORD stdCall function P180X StartScan wSampleRateDiv WORD dwNum Longlnt nPriority Smalllnt WORD stdCall procedure P180X_ReadScanStatus var wStatus WORD var dwLowAlarm Longlnt var dwHighAlarm Longint stdCall function P180X AddToScan wAdChannel WORD wConfig WORD wAverage WORD wLowAlarm WORD wHighAlarm WORD w
10. 180X board AdChannelError invalid A D channel e Demo Program DEMO11 C e Code Fragment WORD wVO 100000 A D ch 0 buffer WORD wV2 100000 A D ch 2 buffer wRetVal P180X_ClearScan For PCI 180XL wRetVal P180X AddToScan 0 0 1 0 0 0 CH 0 to scan wRetVal P180X SaveScan 0 wVO wRetVal P180X AddToScan 2 0 1 0 0 0 CH 2 to scan wRetVal P180X SaveScan 1 wV2 Notice 1 not 2 Notice This is a ordinal number in Scan Queue not a channel number wSampleRateDiv 80 JI sample rate 8M wSampleRateDiv P180X StartScan wSampleRateDiv DATALENGTH nPriority Page 61 OME PCI 180x Software Manual 2 9 6 P180X WaitMagicScanFinish Description This subroutine will wait until the MagicScan operation is finished This function will refer to the current active OME PCI 180X board Use P180X_ActiveBoard to select the active board Syntax void P180X WaitMagicScanFinish WORD wStatus WORD wLowAlarm WORD wHighAlarm Parameter wStatus Store the MagicScan status Status Description 0x00 MagicScan initial condition idle state 0x01 MagicScan operation started 0x02 MagicScan stage 1 controller timeout 0x04 MagicScan stage 2 controller timeout 0x08 MagicScan FIFO overflow 0x80 MagicScan function OK wLowAlarm Store the MagicScan alarm status 32 bits corresponding to 32 channels every bit O indicates No Low Alarm 1 indicates Low Alarm For examp
11. ALL IMPLIED WARRANTIES INCLUDING ANY WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE HEREBY DISCLAIMED LIMITATION OF LIABILITY The remedies of purchaser set forth herein are exclusive and the total liability of OMEGA with respect to this order whether based on contract warranty negligence indemnification strict liability or otherwise shall not exceed the purchase price of the component upon which liability is based In no event shall OMEGA be liable for consequential incidental or special damages CONDITIONS Equipment sold by OMEGA is not intended to be used nor shall it be used 1 as a Basic Component under 10 CFR 21 NRC used in or with any nuclear installation or activity or 2 in medical applications or used on humans Should any Product s be used in or with any nuclear installation or activity medical application used on humans or misused in any way OM EGA assumes no responsibility as set forth in our basic WARRANTY DISCLAIM ER language and additionally purchaser will indemnify OMEGA and hold OMEGA harmless from any liability or damage whatsoever arising out of the use of the Product s in such a manner RETURN REQUESTS INQUIRIES Direct all warranty and repair requests inquiries to the OMEGA Customer Service Department BEFORE RETURNING ANY PRODUCT S TO OMEGA PURCHASER MUST OBTAIN AN AUTHORIZED RETURN AR NUMBER FROM OMEGA S CUSTOMER SERVICE DEPARTMENT IN ORDER TO AVOID PROCESSING DELAY S Th
12. As Integer Declare Function P180X_ActiveBoard Lib P180X dll ByVal wBoardNo As Integer As Integer Declare Function P180X WhichBoardActive Lib P180X dll As Integer Declare Function P180X M FUN 1 Lib P180X dll ByVal wDaFrequency As Integer _ ByVal wDaWave As Integer ByVal fDaAmplitude As Single _ ByVal wAdClock As Integer ByVal wAdNumber As Integer _ ByVal wAdConfig As Integer fAdBuf As Single ByVal fLowAlarm As Single _ ByVal fHighAlarm As Single As Integer Declare Function P180X M FUN 2 Lib P180X dll ByVal wDaNumber As Integer _ ByVal wDaWave As Integer wDaBuf As Integer ByVal wAdClock As Integer _ ByVal wAdNumber As Integer ByVal wAdConfig As Integer _ wAdBuf As Integer As Integer Page 15 OME PCI 180x Software Manual Declare Function P180X_M_FUN_3 Lib P180X dll ByVal wDaFrequency As Integer _ ByVal wDaWave As Integer ByVal fDaAmplitude As Single _ ByVal wAdClock As Integer ByVal wAdNumber As Integer _ wChannelStatus As Integer wAdConfig As Integer fAdBuf As Single _ ByVal fLowAlarm As Single ByVal fHighAlarm As Single As Integer Declare Function P180X_M_FUN_4 Lib P180X dll ByVal wType As Integer _ ByVal wDaFrequency As Integer _ ByVal wDaWave As Integer ByVal fDaAmplitude As Single _ ByVal wAdClock As Integer ByVal wAdNumber As Integer _ wChannelStatus As Integer wAdConfig As Integer fAdBuf As Single _ ByVal fLowAlarm As Single ByVal fHighAlarm As Single As Integer Declare Func
13. P180X_Da 1 dadata If RetValue lt gt 0 Then ret MsgBox The Return Error Code Str RetValue 0 P180X Return Error Code Exit Sub End If RetValue P180X_SetChannelConfig 0 0 5V range RetValue RetValue P180X_DelayUs 23 J delay 23 us settling time RetValue RetValue P180X_AdPolling VO If RetValue lt gt 0 Then ret MsgBox The Return Error Code Str RetValue 0 P180X Return Error Code Exit Sub End If Page 19 OME PCI 180x Software Manual CHOText Text Format VO 0 000 RetValue P180X_SetChannelConfig 1 0 5V range RetValue RetValue P180X_DelayUs 23 delay 3 us settling time RetValue RetValue P180X_AdPolling VO If RetValue lt gt 0 Then ret MsgBox The Return Error Code Str RetValue 0 P180X Return Error Code Exit Sub End If CH1Text Text Format VO 0 000 RetValue P180X SetChannelConfig 0 0 Ch 0 5V range RetValue RetValue P180X_DelayUs 23 delay 3 us settling time RetValue RetValue P180X_AdsPolling AdBuf 0 AdNumber Call ShowWave End Sub Page 20 OME PCI 180x Software Manual 1 7 Using With Delphi P180X PAS gt unit file P180X DLL gt DLLs NOTE 1 Tested under Windows 95 NT and Delphi 3 0 32 bit 1 7 4 P180X PAS unit P180X interface type PSingle Single type PWord Word const return code NoError 0 DriverHandleError 1 DriverCallError 2 AdControl
14. P180X_FunB_ReadStatus e Description This function provides the status of the batch capture e Syntax WORD P180X_FunB_ReadStatus void e Parameter None e Return 0 data is ready 1 data not ready e Demo Program DEMO21 C Page 73 OME PCI 180x Software Manual 2 12 3 P180X_FunB_Stop e Description This subroutine will stop the batch capture function e Syntax word P180X_FunB_Stop void e Parameter None e Return NoError OK StopError Stop Error e Demo Program DEMO21 C 2 12 4 P180X_FunB_Get e Description This function will retrieve the number of A D samples that have been acquired e Syntax word P180X FunB Get DWORD P0 e Parameter PO output how many A D data has been acquired for first board e Return NoError OK e Demo Program DEMO21 C Page 74 OME PCI 180x Software Manual 2 13 The Continuous Capture Functions 2 13 1 P180X_Card0_StartScan e Description This function will start the continuous capture function for card 0 The continuous capture functions are best suited for low speed long duration data collection Although computer dependent sample rates should generally be kept under 40kHz Refer to the OME PCI 1800 Hardware User Manual for additional details on this function e Syntax WORD P180X_Card0_StartScan WORD wSampleRate WORD wChannelStatus WORD wChanelConfig WORD wCount e Parameter wSampleRate A D sample rate 8M wSamp
15. View Our Web Site on the Internet d View Our FTP Site on the Internet d Install Acrobat Reader 5 0 5 Follow the instructions on the screen to complete the software installation The software is designed to support the entire OME family of data acquisition hardware so during the installation you will be asked to specify your particular hardware OME PCI 180x board in this case During the installation process you will also be prompted to enter the operating system you will be using After installation the following folders will be created on your computer 5 objects Page 6 OME PCI 180x Software Manual Demo Folder Contains all demonstration programs including the source code Examples are provided for Visual C Borland C Visual Basic and Delphi Please note The VC demos are developed with VC 4 0 After setting up the environment use the NMAKE EXE to compiling and linking the demo code For example C P1602 DEMO VC nmake f demol mak Driver Folder Contains software drivers include files and definition files for the programming languages Manual Folder Contains hardware user manuals software user manuals and technical notes Diag Folder Contains card diagnostic programs Inf Folder Contains tech notes and INF file for the plug and play installation only available for operating systems that support plug and play Page 7 OME PCI 180x Software Manual 1 2 PLUG amp PLAY Then the p180X inf pro
16. channel of the second board configuration code for each channel of the second board Refer to Section 2 1 Configuration Table buffer to store the A D data of the second board sample count for the second board Page 68 OME PCI 180x Software Manual nPriority A D thread priority The value of nPriority ranges from Value ID Description 2 THREAD_PRIORITY_LOWEST 1 THREAD PRIORITY BELOW NORMAL 0 THREAD PRIORITY NORMAL 1 THREAD PRIORITY ABOVE NORMAL 2 THREAD PRIORITY HIGHEST 15 THREAD PRIORITY TIME CRITICAL other THREAD PRIORITY NORMAL e Return NoError OK FindTwoBoardError cannot find two OME PCI 180X boards e Demo Program DEMO20 C Page 69 OME PCI 180x Software Manual 2 11 2 P180X_FunA_ReadStatus e Description This function will read the status of the batch capture process e Syntax WORD P180X_FunA_ReadStatus void e Parameter None e Return 0 data is ready 1 data not ready e Demo Program DEMO20 C Page 70 OME PCI 180x Software Manual 2 11 3 P180X FunA Stop e Description This function will stop the batch capture function e Syntax word P180X FunA Stop void e Parameter None e Return NoError OK StopError Stop Error e Demo Program DEMO20 C 2 11 4 P180X FunA Get e Description This function will retrieve the number A D samples acquired e Syntax word P180X FunA Get DWORD PO DWORD P1 e Parameter
17. char cChar if cChar lt 9 return cChar 0 else if CChar F return cChar A 10 else return cChar a 10 Page 33 OME PCI 180x Software Manual I al Ian NE a a Ba TE EN a Ba SE EN a TEE ee void TEST CMD HWND hwnd int x int dx int y int dy Test subroutine should be placed here The READ COM only accept fix format command The command format is given as below A wAdClk ale wDaFreq e if lo Enter key o accept current setting of wDaFreq and wAdCIk The steps to compile and link the demo program are described in Sec 1 3 All demo programs share the similar interface The separate testing subroutines are placed in TEST CMDY y So only the TEST CMD is listed in the user manual Page 34 OME PCI 180x Software Manual 2 DESCRIPTION OF FUNCTIONS The DLL functions are divided into the following groups The Test functions The M_Functions function The D I O functions The D A function The A D fixed mode functions The A D MagicScan mode functions The Batch capture functions The Continuous capture functions The Plug amp Play functions Other functions The fixed channel mode functions are as follows P180X_SetChannelConfig P180X_AdsPolling P180X_AdsPacer The MagicScan mode functions are as follows P180X ClearScan P180X StartScan P180X AddToScan data in 12 bits HEX format P180X SaveScan P180X ReadMagicScanResult Pa
18. low speed long duration data collection Although computer dependent sample rates should generally be kept under 40kHz Refer to the OME PCI 1800 Hardware User Manual for additional details on this function Syntax WORD P180X_Card1_StartScan WORD wSampleRate WORD wChannelStatus WORD wChanelConfig WORD wCount Parameter wSampleRate AID sample rate 8M wSampleRate wSampleRate 240 gt sample rate 8M 240 33KHz wChannelStatus 02no scan 1 scan for each channel wChannelConfig configuration code for each channel Refer to Section 2 1 Configuration Table wCount number of A D data for each scan channel Return NoError OK FindBoardError cannot find theOME PCI 180X board AdControllerError MagicScan controller hardware handshake error Demo Program DEMO14 C Page 77 OME PCI 180x Software Manual 2 13 5 P180X_Card1_ReadStatus e Description This function will read the data collected by the continuous capture function e Syntax P180X Card1 ReadStatus WORD wBuf WORD wBuf2 DWORD dwP1 DWORD dwP2 WORD wStatus e Parameter wBuf in scan sequence order 012 N012 N 012 N wBuf2 in channel sequence order 00000 11111 22222 NNNNN dwP1 reserved dwP2 reserved wStatus 1 thread start 22 TimeOut 8 FIFO overflow 0x80 thread finish e Return 0 data is ready 1 data not ready e Demo Program DEMO14 C 2 13 6 P180X_Card1_Stop e Description This fu
19. or configuration code and the P180X_AdsPacer will refer to that condition in later operation The hardware pacer will generate a periodic trigger signal to the A D converter The A D data can be used to reconstruct the waveform of the analog input Since the P180X_AdsPacer function uses the hardware pacer operating system interrupts will not affect it For this reason the P180X_AdsPacer function should be used if a waveform must be precisely reconstructed This function will refer to the current active PCI 180X board Use P180X_ActiveBoard to select the active board e Syntax WORD P180X_AdsPacer float fAdVal WORD wNum WORD wSample e Parameter fAdVall starting address of the A D data buffer the data will automatically be converted to volts based on the setting of P180X_SetChannelConfig wNum number of A D conversions to be performed wSample A D sample rate 8M wSample for example wSample 24 gt sample rate 8M 24 330K e Return NoError OK ExceedBoardNumber invalid board number FindBoardError cannot find the OME PCI 180X board AdPollingTimeOut hardware timeout error e Demo Program DEMO1 C P180X_SetChannelConfig P180X_AdPolling P180X_AdsPacer Page 56 OME PCI 180x Software Manual 2 9 The MagicScan Functions 2 9 1 P180X ClearScan e Description This subroutine will initialize the MagicScan controller This function will refer to the current active PCI 180X board Use P180X_Ac
20. the active board e Syntax WORD P180X AdPolling float fAdVal e Parameter fAdVal address of fAdVal which contains the A D data this data is automatically calculated based on the setting of P180X_SetChannelConfig e Return NoError OK ExceedBoardNumber invalidate board number FindBoardError cannot find the OME PCI 180X board AdPollingTimeOut hardware timeout error Demo Program DEMO1 C Page 54 OME PCI 180x Software Manual 2 8 3 P180X_AdsPolling e Description This subroutine will perform multiple A D conversions by polling The P180X_SetChannelConfig subroutine can be used to change channel or configuration code This function will refer to the current active PCI 180X board Use P180X_ActiveBoard to select the active board e Syntax WORD P180X AdsPolling float fAdVal WORD wNum e Parameter fAdVal starting address of A D data buffer the data will be automatically converted to volts based on the setting of PI80X SetChannelConfig wNum number of A D conversions to be performed e Return NoError OK ExceedBoardNumber invalid board number FindBoardError cannot find the OME PCI 180X board AdPollingTimeOut hardware timeout error e Demo Program DEMO1 C Page 55 OME PCI 180x Software Manual 2 8 4 P180X AdsPacer Description This subroutine will perform multiple A D conversions by pacer trigger The P180X_SetChannelConfig subroutine can be used to change channel
21. under Windows 95 NT and VB 4 0 32 bit 1 6 1 The Demo Result m P180X DEMO E yoo Page 14 OME PCI 180x Software Manual 1 6 2 The P180X BAS Attribute VB Name Module1 Option Explicit Global Const NoError Global Const DriverHandleError Global Const DriverCallError Global Const AdControllerError Global Const M FunExecError Global Const ConfigCodeError Global Const FrequencyCalculateError Global Const HighAlarm Global Const LowAlarm Global Const AdPollingTimeOut Global Const AlarmTypeError Global Const FindBoardError Global Const AdChannelError Global Const DaChannelError Global Const InvalidDelay Global Const DelayTimeOut 15 Global Const InvalidData 16 Global Const FifoOverflow Global Const TimeOut 18 Global Const ExceedBoardNumber Global Const NotFoundBoard 20 Global Const OpenError 21 Global Const FindTwoBoardError 22 Global Const ThreadCreateError 23 Global Const StopError 24 Global Const AllocateMemoryError 25 6 PR AHR OON IABRWN O 0N 0 gt Declare Function P180X Driverlnit Lib P180X dll wTotalBoards As Integer As Integer Declare Sub P180X_DriverClose Lib P180X dll Declare Function P180X_GetDriverVersion Lib P180X dll wVxdVersion As Integer As Integer Declare Function P180X_GetConfigAddressSpace Lib P180X dll ByVal wBoardNo As Integer _ wAddrTimer As Integer wAddrCtrl As Integer wAddrDio As Integer _ wAddrAdda As Integer
22. wAdClock AID sampling clock 8000000 wAdClock samples sec wAdNumber Number of A D data points to be read wAdConfig AID input range configuration code Refer to Section 2 1 Configuration Table fAdBuf the starting address of fAdBuf which contains the A D data fLowAlarm low alarm limit if fAdBuf fLowAlarm gt LowAlarm fHighAlarm high alarm limit if fAdBuf fHighAlarm gt HighAlarm Return NoError OK DriverHandleError Invalidate VxD SYS handle DriverCallError VxD SYS function call error ExceedBoardNumber invalidate board number FindBoardError no PCI 180X board AdControllerError embedded controller handshake error M_FunExecError M_Functions return code error ConfigCodeError wAdConfig configuration code error Page 44 OME PCI 180x Software Manual HighAlarm fAdBuf gt fHighAlarm LowAlarm fAdBuf lt fLowAlarm e Demo Program DEMO5 C Page 45 OME PCI 180x Software Manual 2 5 2 P180X M FUN 2 e Description The P180X M FUN 2 will not calculate the waveform image automatically Refer to OME PCI 1800 1802 Hardware Manual chapter 5 for details input A D channel 0 output DA channel 0 e Syntax WORD P180X M FUN 2 WORD wDaNumber WORD wDaWave WORD wDa Bufl WORD wAdClock WORD wAdNumber WORD wAdConfig WORD wAdBuf e Parameter wDaNumber Number of D A samples in one waveform wDaWave Number of D A waveforms to be output wDaBuf The array that contains the D A waveform im
23. A Get var PO Longint var P1 LongInt WORD stdCall kkkkkkkkkkkkkkkkkkk function P180X FunB Start wClockODiv WORD wChannel0 PWord wConfig0 PWord BufferO PWord dwMaxCountO Longlnt nPriority Smalllnt WORD stdCall function P180X FunB ReadStatus WORD stdCall function P180X FunB Stop WORD stdCall function P180X FunB Get var PO Longint WORD stdCall Page 24 OME PCI 180x Software Manual kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk implementation function function function function function P180X_FloatSub2 external P180X DLL name P180X_FloatSub2 P180X_ShortSub2 external P180X DLL name P180X ShortSub2 P180X GetDllVersion external P180X DLL name P180X GetDllVersion P180X GetDriverVersion external P180X DLL name P180X_GetDriverVersion P180X Driverlnit external P180X DLL name P180X Driverlnit procedure P180X DriverClose external P180X DLL name P180X_DriverClose function function function P180X GetConfigAddressSpace external P180X DLL name P180X_GetConfigAddressSpace P180X ActiveBoard external P180X DLL name P180X ActiveBoard P180X WhichBoardActive external P180X DLL name P180X WhichBoardActive Function of M Fun series function function function function function function function function f
24. A JODDE Sg an a oil caia 70 2idd EA PA SN A hyena ix esi las i cay aed ene Whe eee Aida ema CON Ra UU Aiea 71 PIT EG C4 Nc cem ef S THESINGLEBOARDENTCHL APDURE en nen 72 Ur PN A o a A 72 Adae ELA E A O A A A A A 73 K POSIT A S inea a 74 2124 PISA UA c 74 213 THE CONTINUOUS CAPTURE FUNCTIONS nn Ho ro a ee 75 E RA A A E EA A E 75 Bebe FISU Carat 70507 Eccc 76 PIE LOHN T ol ae tac a A 76 U PR RE SSM A mST z AD INN DIRT Sern ene ERU AA AA AA AA 78 LING FISON LI SO aren ni ie i on AAA AAA AAA EE KEMI AAA AAA 78 R L OTHER PUNCTIONS A a HC Ee pu SHE 79 SIE DENNIS Gaude EUH EGO Oo EUM ort erie tase teat SN cc LM dU ee 79 A DEMO PROGRAMS sonne 80 Page 4 OME PCI 180x Software Manual 1 INTRODUCTION The PCI 180x toolkit is a collection of DLLs for Windows 95 NT 2000 XP applications The DLLs are 32 bit and can be called by Visual C C BC Visual BASIC Delphi and LabVIEW These DLLs can perform a variety of data acquisition operations such as Get software version Initialize data acquisition hardware Digital Input Output A D conversion D A conversion Page 5 OME PCI 180x Software Manual 1 1 SOFTWARE INSTALLATION Insert the CD ROM included with your OME PCI 180x board and the following installation screen should auto start M OMEGA_B20030301 BEE LE OMEGA a Install Toolkits Softwares Manuals d Browse CD ROM Contents d Contact Us d View Readme txt d
25. AlarmType WORD WORD stdCall function P180X SaveScan wAdChannel WORD wBuf PWord WORD stdCall procedure P180X WaitMagicScanFinish var wStatus WORD var dwLowAlarm Longlnt var dwHighAlarm Longint stdCall function P180X StopMagicScan WORD stdCall LORE te eie function P180X DelayUs wDelayUs WORD WORD stdCall Page 23 OME PCI 180x Software Manual Be function P180X_CardO_StartScan wSampleRate WORD JI wChannelStatus PWORD wChannelConfig PWORD wCount WORD WORD stdCall function P180X CardO StartScan wSampleRate WORD wChannelStatus PWORD wChannelConfig PWORD wCount WORD WORD stdCall function P180X_CardO_ReadStatus wBuf PWORD wBuf2 PWORD var dwP1 LongInt var dwP2 Longlnt var wStatus WORD WORD stdCall procedure P180X CardO Stop stdCall function P180X_Card1_StartScan wSampleRate WORD wChannelStatus PWORD wChannelConfig PWORD wCount WORD WORD stdCall function P180X_Card1_ReadStatus wBuf PWORD wBuf2 PWORD var dwP1 Longint var dwP2 Longlnt var wStatus WORD WORD stdCall procedure P180X Card1 Stop stdCall PEE SEES ETE qom function P180X FunA Start wClockODiv WORD wChannel0 PWord wConfig0 PWord Buffer0 PWord dwMaxCount0 Longint wClock1Div WORD wChannel1 PWord wConfig1 PWord Buffer1 PWord dwMaxCount1 Longlnt nPriority Smalllnt WORD stdCall function P180X FunA ReadStatus WORD stdCall function P180X FunA Stop WORD stdCall function P180X Fun
26. Ascii As Integer If KeyAscii 13 Then Call StartCMD_Click End If End Sub Private Sub ExitCMD_Click Unload Me End Sub Private Sub Form_Load Page 18 OME PCI 180x Software Manual Dim TotalBoards As Integer Dim RetValue As Integer CR Chr 13 LF Chr 10 RetValue P180X Driverlnit TotalBoards If RetValue 0 Then ret MsgBox The Return Error Code Str RetValue CR LF The 180X Card Not Found 0 P180X Return Error Code Exit Sub End If End Sub Private Sub Form Unload Cancel As Integer Call P180X DriverClose End Sub Private Sub StartCMD Click Dim VO As Single Dim Didata As Integer Dim dadata As Integer Dim RetValue ret cc Dodata As Integer AdNumber 100 RetValue P180X_ActiveBoard 0 If RetValue lt gt 0 Then ret MsgBox The Return Error Code Str RetValue CR LF The 180X Card Not Found 0 P180X Return Error Code Exit Sub End If Dodata Val amp H DoText Text RetValue P180X_Do Dodata If RetValue lt gt 0 Then ret MsgBox The Return Error Code Str RetValue 0 P180X Return Error Code Exit Sub End If RetValue P180X_Di Didata If RetValue lt gt 0 Then ret MsgBox The Return Error Code Str RetValue 0 P180X Return Error Code Exit Sub End If DiText Text Hex Didata dadata Val amp h DAOText Text RetValue P180X_Da 0 dadata dadata Val amp h DA1Text Text RetValue
27. CE of 44D36E96D E325 11CE EI 4D36E96E E325 11CE H E 4D36E96F E325 11CE Y 44D36E970 E325 11CE of 44D36E971 E325 11CE GQ 14D36E972 E325 11CE 44D36E973 E325 11CE Cg 44D36E974 E325 11CE y i n amp My Computer HKEY_LOCAL_MACHINE SYSTEM ControlSet001 Control Class 337B647D 6400 4490 AF29 9924EE9753 Fig 4 Registry item details Page 10 OME PCI 180x Software Manual 1 3 Using With Visual C All demo programs were created with Visual C 5 and tested under Windows 95 NT Key issues are given below 1 2 oO ON OO rw NOTE Make sure the PATH includes the Visual C compiler Execute the MSDEV BIN VCVARS32 BAT to setup the environment The VCVARS32 BAT is provided by Visual C The source program must include P180X H Copy the P180X LIB import library to the same directory as the source program Copy the P180X DLL to the same directory as the source program Edit the source program refer to Demo VC5 DEMO1 C Edit the NMAKE file refer to Demo VC5 DEMO1 MAK NMAKE Y DEMO1 MAK Execute DEMO1 EXE The P180X lib is used while linking and the P180X DLL is used at run time Page 11 OME PCI 180x Software Manual 1 4 Using With MFC Using the PCI 180x toolkit with MFC is similar as using it with Visual C Key issues are given below aK oN NOTE Use MFC wizard to create the source code The source program must include P180X H Copy the P180X LIB import li
28. EMO programs The P180X_ActiveBoard will affect all functions except the following SR T I Gr e E E O 10 11 12 P180X_FloatSub2 P180X_ShortSub2 P180X_GetDriverVersion P180X_Drivelnit P180X_DriveClose P180X_GetConfigAddressSpace P180X CardO StartScan P180X CardO ReadData P180X CardO Stop P180X Card1 StartScan P180X Card1 ReadData P180X Card1 Stop Page 67 OME PCI 180x Software Manual 2 11 Multi board Batch Capture Two boards operating simultaneously 2 11 1 Description P180X FunA Start This function will start the batch capture process for two boards operating simultaneously Syntax WORD P180X FunA Start WORD wClockDivO WORD wChanneloO WORD wConfigO WORD Buffer0 DWORD dwMaxCountO WORD wClockDiv1 WORD wChannel1 WORD wConfig1 WORD Buffer1 DWORD dwMaxCount1 Short nPriority Parameter wClockDivO wChannel0 wConfigO BufferO dwMaxCountO wClockDiv 1 WChannel1 WConfig1 Buffer1 dwMaxCount1 the A D sample rate divisor for first board the sample rate is 8M wClockDivO O no scan 1 scan for each channel of the first board configuration code for each channel of the first board Refer to Section 2 1 Configuration Table buffer to store the A D data of the first board to specify the data length of the first board the A D sample rate devisor for the second board the sample rate is 8M wClockDiv1 O no scan 1 scan for each
29. OME PCI 180x Software Manual 2 4 3 P180X GetDllVersion e Description Reads the DLL version number of the P180X DLL e Syntax WORD P180X GetDllVersion void e Parameter None e Return return 0x200 gt Version 2 0 2 4 4 P180X GetDriverVersion e Description This subroutine will read the software version number of NAPPCI VxD for Windows 95 or NAPPCI SYS of Windows NT e Syntax WORD P180X GetDriverVersion WORD wDriverVersion e Parameter wDriverVersion address of wDriverVersion wDriverVersion 0x200 gt Version 2 0 e Return NoError OK DriverHandleError the NAPPCI VxD open error for Windows 95 the NAPWNT SYS open error for Windows NT 2000 XP DriverCallError call NAPPCI VxD return error call NAPWNT SYS return error Page 43 OME PCI 180x Software Manual 2 5 The M_Functions 2 5 1 P180X M FUN 1 Description The P180X M FUN 1 will calculate the waveform image automatically Refer to OME PCI 1800 1802 Hardware Manual chapter 5 for details input A D channel 0 output D A channel 0 Syntax WORD P180X M FUN 1 WORD wDaFrequency WORD wDaWave float fDaAmplitude WORD wAdClock WORD wAdNumber WORD wAdConfig float fAdBuf float fLowAlarm float fHighAlarm Parameter wDaFrequency _ D A output frequency 1 8M wDaFrequency Pentium 120MHz wDaWave Number of D A waveforms to be output fDaAmplitude Amplitude of D A output NOTE the hardware jumper J1 must be set to 10V
30. Scan function P180X CardO ReadStatus external P180X DLL name P180X CardO Read Status procedure P180X CardO Stop external P180X DLL name P180X CardO Stop function P180X Card1 StartScan external P180X DLL name P180X Card1 StartScan function P180X Card1 ReadStatus external P180X DLL name P180X_Card1_ReadStatus procedure P180X_Card1_Stop external P180X DLL name P180X_Card1_Stop kkkkkkkkkkkkkkkkkkk function P180X_FunA_Start external P180X DLL name P180X FunA Start function P180X FunA ReadStatus external P180X DLL name P180X_FunA_ReadStatus function P180X_FunA_Stop external P180X DLL name P180X_FunA_Stop function P180X_FunA_Get external P180X DLL name P180X FunA Get Page 26 OME PCI 180x Software Manual kkkkkkkkkkkkkkkkkkk function P180X_FunB_Start function P180X_FunB_ReadStatus P180X_FunB_ReadStatus function P180X_FunB_Stop function P180X_FunB_Get end external P180X DLL name P180X_FunB_Start external P180X DLL name external P180X DLL name P180X_FunB_Stop external P180X DLL name P180X FunB Get Page 27 OME PCI 180x Software Manual 1 8 Calling the DLL from LabVIEW LabVIEW is a graphical programming language developed by National Instruments P180X DII gt DLL DEMO1 VI gt Demo VI MFUN1 VI 2 Driver VI NOTE 1 Tested under Windows 95 NT and LabVIEW 4 0 2 The demo1 VI will call MFUN1 VI to perform M Functions The M Functio
31. Scan Description This subroutine will add one channel to the MagicScan circular queue This function will refer to the current active OME PCI 180X board Use P180X_ActiveBoard to select the active board Syntax void P180X_AddToScan WORD wAdChannel WORD wConfig WORD wAverage WORD wLowAlarm WORD wHighAlarm WORD wAlarmType Parameter wAdChannel A D channel number wConfig the configuration code Refer to Section 2 1 Configuration Table wAverage the factor for the digital average filter wLowAlarm 12 bit low alarm data wHighAlarm 12 bit high alarm data wAlarmType O no alarm 1 high alarm 2 low alarm 3 in alarm 4 out alarm Return NoError Ok ExceedBoardNumber invalid board number FindBoardError cannot find the OME PCI 180X board AdChannelError invalid AD channel AlarmTypeError only 0 1 2 3 4 are valid AdControllerError MagicScan controller hardware handshake error Demo Program DEMO11 C Page 60 OME PCI 180x Software Manual 2 9 5 P180X SaveScan e Description This subroutine will specify the starting address of A D data buffer for MagicScan e Syntax WORD P180X SaveScan WORD wAdChannel WORD wBuf e Parameter wAdChannel Scan number in the scan queue Note not the A D channel number wBuf starting address of A D data buffer for channel specified in wAdChannel e Return NoError Ok ExceedBoardNumber invalid board number FindBoardError cannot find the OME PCI
32. TEMPERATURE P Thermocouple RTD amp Thermistor Probes Connectors Panels amp Assemblies 4 Wire Thermocouple RTD amp Thermistor 4 Calibrators amp Ice Point References A Recorders Controllers amp Process Monitors IH Infrared Pyrometers PRESSURE STRAIN AND FORCE 4 Transducers amp Strain Gages A Load Cells amp Pressure Gages 4 Displacement Transducers 4 Instrumentation amp Accessories FLOW LEVEL 4 Rotameters Gas Mass Flowmeters amp Flow Computers A Air Velocity Indicators 4 Turbine Paddlewheel Systems A Totalizers amp Batch Controllers pH CONDUCTIVITY A pH Electrodes Testers amp Accessories A Benchtop Laboratory Meters 4 Controllers Calibrators Simulators amp Pumps 4 Industrial pH amp Conductivity Equipment DATA ACQUISITION 4 Data Acquisition amp Engineering Software 4 Communications Based Acquisition Systems 4 Plug in Cards for Apple IBM amp Compatibles 4 Datalogging Systems A Recorders Printers amp Plotters HEATERS Z Heating Cable ZP Cartridge amp Strip Heaters A Immersion amp Band Heaters LA Flexible Heaters 4 Laboratory Heaters ENVIRONMENTAL MONITORING AND CONTROL A Metering amp Control Instrumentation A Refractometers 4 Pumps amp Tubing A Air Soil amp Water Monitors 4 Industrial Water amp Wastewater Treatment A pH Conductivity amp Dissolved Oxygen Instruments M3932 0203
33. Usar Guide Omega com Shop online at www omega com e mail info omega com OME PCI 1800 1802 PCI Data Acquisition Boards Windows Software Manual omega com CEOMEGA OMEGAnet Online Service Internet e mail www omega com info omega com USA ISO 9001 Certified Canada Servicing North America One Omega Drive P O Box 4047 Stamford CT 06907 0047 TEL 203 359 1660 FAX 203 359 7700 e mail info omega com 976 Bergar Laval Quebec H7L 5A1 Canada TEL 514 856 6928 FAX 514 856 6886 e mail info omega ca For immediate technical or application assistance USA and Canada Mexico Benelux Czech Republic France Germany Austria United Kingdom ISO 9002 Certified Sales Service 1 800 826 6342 1 800 TC OMEGA Customer Service 1 800 622 2378 1 800 622 BEST Engineering Service 1 800 872 9436 1 800 USA WHEN TELEX 996404 EASYLINK 62968934 CABLE OMEGA En Espa ol 001 203 359 7803 e mail espanol omega com FAX 001 203 359 7807 info omega com mx Servicing Europe Postbus 8034 1180 LA Amstelveen The Netherlands TEL 31 0 20 3472121 FAX 31 0 20 6434643 Toll Free in Benelux 0800 0993344 e mail salesQomegaeng nl Frystatska 184 733 01 Karvin Czech Republic TEL 420 0 59 6311899 FAX 420 0 59 6311114 Toll Free 0800 1 66342 e mail info omegashop cz 11 rue Jacques Cartier 78280 Guyancourt France TEL 33 0 1 61 37 29 00 FAX
34. age wAdClock A D sampling clock 8000000 wAdClock samples sec wAdNumber Number of A D data points to be read wAdConfig A D input range configuration code Refer to Section 2 1 Configuration Table wAdBuff the starting address of fAdBuf which contains the A D data e Return NoError OK DriverHandleError Invalid VxD SYS handle DriverCallError VxD SYS function call error ExceedBoardNumber invalidate board number FindBoardError no OME PCI 180X board AdControllererror embedded controller handshake error M FunExecError M Functions return code error ConfigCodeError wAdConfig configuration code error e Demo Program DEMO7 C The D A output waveform generator is a machine dependent function The D A output frequency 1 8M wDaNumber is machine dependent The following benchmarks have been established Page 46 OME PCI 180x Software Manual DA output frequency 1 8M dwDaNumber for Pentium 120 DA output frequency 2 0M dwDaNumber for Pentium 133 The user must benchmark their system before using M_FUN_1 M_FUN_2 and M_FUN_3 Page 47 OME PCI 180x Software Manual 2 5 3 P180X M FUN 3 Description The P180X M FUN 3 will calculate the waveform image automatically Refer to OME PCI 1800 1802 Hardware Manual chapter 5 for details input programable channels output DA channel 0 This function will refer to the current active PCI 180X board Use P180X_ActiveBoard to select the active board Refer t
35. arameter Void e Return Void e Demo Program All DEMO programs Page 64 OME PCI 180x Software Manual 2 10 3 P180X_GetConfigAddressSpace e Description Returns the I O address of the OME PCI 1800 1802 board n This function is for debug purposes only It is not necessary to call this function e Syntax WORD P180X GetConfigAddressSpace WORD wBoardNo WORD wAddrTimer WORD wAddrCtrl WORD wAddrDio WORD wAddrAdda e Parameter wBoardNo OME PCI 1800 1802 board number wAddrTimer wAddrCtrl wAddrDio wAddrAdda refer to OME PCI 1800 1802 Hardware manual chapter 3 for details e Return NoError OK FindBoardError handshake check error ExceedBoardError wBoardNo is invalid e Demo Program DEMO1 C 2 10 4 P180X_WhichBoardActive e Description Returns the board number of the active board e Syntax WORD P180X_WhichBoardActive void e Parameter None e Return board number of the active board Page 65 OME PCI 180x Software Manual e Demo Program DEMO1 C Page 66 OME PCI 180x Software Manual 2 10 5 P180X_ActiveBoard Description This function will make active one of the OME PCI 1800 1802 boards installed in the system This function must be called once before the D I O A D D A functions are called Syntax WORD P180X_ActiveBoard WORD wBoardNo Parameter wBoardNo board number Return NoError OK ExceedBoardError wBoardNo is invalid Demo Program All D
36. brary to the same directory as the source program Copy the P180X DLL to the same directory as the source program Select Build Settings Link and key P180X lib in the object library modules field The P180X lib is used while linking and the P180X DLL is used in run time Page 12 OME PCI 180x Software Manual 1 5 Using With BC The DLL was created in Visual C 5 0 The P180X H and P180X lib are also designed for use with Visual C C BC can not use these two files The following modifications are necessary include lt conio h gt include lt windows h gt HINSTANCE hDLLLib II Step 1 declare a function pointer float CALLBACK FloatSub2 float fA float fB main II Step 2 load dll hDIILib LoadLibrary P180X dll if hDLLLib II Step 3 get the function address FloatSub2 FARPROC GetProcAddress hDLLLib P180X_FloatSub2 if FloatSub2 II Step 4 call function printf 1 2 3 4 f FloatSub2 1 2 3 4 else printf get P180X_FloatSub2 function address error II Step 5 free library FreeLibrary hDLLib else printf load P180X dll error getch This usage can be divided into 5 ste DS listing above Using this modification and P180X DLL the user can use BC to call DLL Page 13 OME PCI 180x Software Manual 1 6 Using With Visual Basic P180X DLL gt DLLs DEMO1 FRM gt Form file P180X BAS gt Module file DEMO1 VBP gt Project file NOTE 1 Tested
37. ckCount Lib kernel32 As Long Declare Sub Sleep Lib kernel32 ByVal dwMilliseconds As Long Global AdBuf 10000 As Single Global Channel 32 As Integer Global ConfigCode 32 As Integer Global Buf 10000 As Integer Global Buf1 10000 As Integer Global Buf2 10000 As Integer Global Card0Buf0 10000 As Integer Global CardOBuf1 10000 As Integer Global Card1Buf0 10000 As Integer Global Card1Buf1 10000 As Integer Global AdNumber As Integer Global CR Global LF Page 17 OME PCI 180x Software Manual 1 6 3 DEMO1 FRM Public Sub ShowWave Dim a 1000 yc xc xl yt As Single Dim ii As Integer Dim tmpstr Picture1 Cls yc Picture1 ScaleTop Picture1 ScaleHeight 2 xl Picture1 ScaleLeft xs Picture1 ScaleWidth AdNumber ys Picture1 ScaleHeight 10 Picture1 Line xl yc xl Picture1 ScaleWidth yc QBColor 4 Picture1 PSet X1 yc ys AdBuf 0 For ii 1 To AdNumber 1 Picture1 Line xs ii yc ys AdBuf ii Next ii End Sub Private Sub DAOText_Change DAOText Text UCase DAOText Text End Sub Private Sub DAOText KeyPress KeyAscii As Integer If KeyAscii 13 Then Call StartCMD Click End If End Sub Private Sub DA1Text_Change DA1Text Text UCase DA1Text Text End Sub Private Sub DA1Text_KeyPress KeyAscii As Integer If KeyAscii 13 Then Call StartCMD_Click End If End Sub Private Sub DoText_Change DoText Text UCase DoText Text End Sub Private Sub DoText_KeyPress Key
38. e assigned AR number should then be marked on the outside of the return package and on any correspondence The purchaser is responsible for shipping charges freight insurance and proper packaging to prevent breakage in transit FOR WARRANTY RETURNS please have the FOR NON WARRANTY REPAIRS consult OM EGA following information available BEFORE for current repair charges Have the following contacting OMEGA information available BEFORE contacting OMEGA L Purchase Order number under which the product 1 Purchase Order number to cover the COST was PURCHASED of the repair 2 Model and serial number of the product under 2 Model and serial number of the product and warranty and 3 Repair instructions and or specific problems 3 Repair instructions and or specific problems relative to the product relative to the product OMEGA s policy is to make running changes not model changes whenever an improvement is possible This affords our customers the latest in technology and engineering OMEGA is a registered trademark of OMEGA ENGINEERING INC Copyright 2002 OMEGA ENGINEERING INC All rights reserved This document may not be copied photocopied reproduced translated or reduced to any electronic medium or machine readable form in whole or in part without the prior written consent of OMEGA ENGINEERING INC Where Do I Find Everything Need for Process Measurement and Control OMEGA Of Course Shop online at www omega com
39. ectObject hdc GetStockObject SYSTEM_FIXED_FONT TextOut hdc xCaret cxChar yCaret cyChar cBuf xCaret 1 ShowCaret hwnd ReleaseDC hwnd hdc Page 32 OME PCI 180x Software Manual xCaret break SetCaretPos xCaret cxChar yCaret cyChar return 0 case WM PAINT clr and show HELP InvalidRect hwnd NULL TRUE hdc BeginPaint hwnd amp ps SelectObject hdc GetStockObject SYSTEM FIXED FONT sprintf cBuf Press any key to continue TextOut hdc 0 0 cBuf strlen cBuf xCaret 0 yCaret 1 SetCaretPos 0 yCaret cyChar EndPaint hwnd amp ps return 0 case WM DESTROY l Laini ekedede KER RARE dg ERAEER KRITERIEN NOTICE call P180X DriverClose to close the driver qtto ee a e P180X_DriverClose I close the driver PostQuitMessage 0 return O return DefWindowProc hwnd iMsg wParam IParam O 1 2 3 4 wll 6 7 8 9 dwAdClk f void READ CMD char szCmdq DWORD nT1 nT2 nT3 nT4 nT5 if szCmd 0 0 return only press Enter nT1 ASCII TO HEX szCmdq 0 nT2 ASCII TO HEX szCmdq 1 nT3 ASCII TO HEX szCmdq 2 nTA ASCII TO HEX szCmq 3 nT5 ASCII TO HEX szCmdq 4 dwDaNum nT1 10000 nT2 1000 nT3 100 nT4 10 nT5 II HEX format YS a nT1 ASCII TO HEX szCmdq 6 HEX format nT2 ASCII TO HEX szCmd 7 nT3 ASCII TO HEX szCmdqd 8 nT4 ASCIL TO HEX szCmdqd 9 dwAdClk DWORD nT1 1000 nT2 100 nT3 10 nT4 short ASCII TO HEX
40. eger Declare Function P180X StopMagicScan Lib P180X dll As Integer Declare Function P180X DelayUs Lib P180X dll ByVal wDelayUs As Integer As Integer FunB series Declare Function P180X_FunB_Start Lib P180X dll ByVal wClockDiv As Integer _ wChannel As Integer wConfig As Integer Buffer As Integer _ ByVal dwMaxCount As Long ByVal nPriority As Integer As Integer Declare Function P180X_FunB_ReadStatus Lib P180X dll As Integer Declare Function P180X FunB Stop Lib P180X dll As Integer Declare Function P180X FunB Get Lib P180X dll PO As Long As Integer Declare Function P180X CardO StartScan Lib P180X dll ByVal wSampleRate As Integer _ wChannelStatus As Integer wChannelConfig As Integer ByVal wCount As Integer As Integer Declare Function P180X CardO ReadStatus Lib P180X dll wBuf As Integer wBuf2 As Integer _ dwP1 As Long dwP2 As Long wStatus As Integer As Integer Declare Sub P180X CardO Stop Lib P180X dll Page 16 OME PCI 180x Software Manual Declare Function P180X_Card1_StartScan Lib P180X dll ByVal wSampleRate As Integer _ wChannelStatus As Integer wChannelConfig As Integer _ ByVal wCount As Integer As Integer Declare Function P180X Card1 ReadStatus Lib P180X dll wBuf As Integer wBuf2 As Integer _ dwP1 As Long dwP2 As Long wStatus As Integer As Integer Declare Sub P180X Card1 Stop Lib P180X dll Declare Function GetTi
41. ge 35 OME PCI 180x Software Manual e The M functions functions are as follows 1 P180X M FUN 1 2 P180X M FUN 2 3 P180X M FUN 3 O The multi board batch capture functions are as follows two boards operating simultaneously 1 P180X FunA Start 2 P180X FunA ReadStatus 3 P180X FunA Stop 4 P180X FunA Get 9 The single board batch capture functions are as follows P180X FunB Start P180X FunB ReadStatus P180X FunB Stop P180X FunB Get O The continuous capture functions are given as follows P180X CardO StartScan P180X CardO ReadStatus P180X CardO StopScan Group 0 for card 0 continuous capture function P180X Card1 StartScan P180X Card1 ReadStatus P180X Card1 StopScan Group 1 for card 1 continuous capture function Page 36 OME PCI 180x Software Manual 2 1 CONFIGURATION CODE PCI 180XL Configuration Code Table Bipolar Unipolar Input Signal Range Time Sr 7 Bipolar RV 5V 4 Bu us ox0 Bipolar 2 5v b T e o Bipolar H 128Y 4 bu x02 Sus og Bus I 0 00 0x05 Bus x6 Bus bo ovtorov pus 10x08 Sus foxoo Unipolar voz pus ga Unipolr fovtor z5v_ jus ED PCI 180XH Configuration Code Table Bipolar Unipolar Input Signal Range uli Time Bae os Bipolar sv o 1 289 oxto Bipolar be 0 5V 10 p8ys lo Bipolar 0 08v 100 140 us 0 005V 1000 1300 us 0x13 05 pays hm 5 beus 08 50 140us uvg ee E Un
42. ion include lt windows h gt include lt stdlib h gt include lt stdio h gt include lt conio h gt include P180X H BERBERS BRET ER EREREA A EEE ERAN EE KEZEK E KNK BKK RERE KEN Z BA DEMO program for one P180X card in the PC system Please set the resolution of your monitor to at least 1024 768 ERIS EREREREAESER ERE LAE EE CHARA EEE RALAA REE EAA RARE ERS EE E EAA First Card some P180X function call demo For the proper operation the P180X the following functions must be used P180X Driverlnit lt initial the driver K P180X DriverClose lt close the driver y j Cette EREERALA REE IEC EII RN RIIIE short nDMA 1 nIRQ 1 not used WORD wBase 0x220 wAdBuf 510 wFlag 0 wAddrCtrl int iLine DWORD dwDaNum 90 dwAdClk 24 WORD wTotalBoard wlnitialCode void READ_CMD char shortASCII TO HEX char void TEST CMD HWhND int int int int LRESULT CALLBACK WndProc HWND UINT WPARAM LPARAM void SHOW WAVE HWND hwnd int WINAPI WinMain HINSTANCE hlnstance HINSTANCE hPrevinstance PSTR szCmdLine int iCmdShow static char szzAppName P180X Demo1 HWND hwnd MSG msg WNDCLASSEX wndclass wndclass cbSize sizeof wndclass wndclass style CS_HREDRAWICS_VREDRAW wndclass lpfnWndProc WndProc wndclass cbClsExtra 0 wndclass cbWndExtra 0 wndclass hlnstance hlnstance wndclass hlcon Loadlcon NULL IDI APPLICATION
43. ipolar ovio fho peys pas Page 37 OME PCI 180x Software Manual 2 2 ERROR CODE Error Code Description NoError OK No Error DriverHandleError Device driver open error DriverCallError Error while calling the driver functions AdControllerError Embedded controller handshake error M_FunExecError Failed to execute the M_Functions ConfigCodeError Refer to Section 2 1 Configuration Code FrequencyCalculateError Not Used HighAlarm fAdBuf gt fHighAlarm LowAlarm fAdBuf lt fLowAlarm AdPolling TimeOut Hardware timeout error AlarmTypeError The valid range is 0 to 4 FindBoardError Can t find the PCI 180X board in the system AdChannelError The valid range is 0 to 31 DaChannelError The valid channel number must be 0 or 1 InvalidDelay The valid range of dwDelayUs is lt 8191 DelayTimeOut Timeout InvalidData Invalid Data FifoOverflow FIFO overflow TimeOut Timeout ExceedBoardNumber Invalid board number Valid range 0 to TotalBoards 1 NotFoundBoard Can t detect any PCI 180X boards in the system OpenError Not Used FindTwoBoardError Can t find two PCI 180X boards ThreadCreateError Failed to create thread StopError Stop Error AllocateMemoryError Failed to allocate the memory buffer Page 38 OME PCI 180x Software Manual 2 3 P180X H define EXPORTS extern C declspec dllimport Usage f
44. le wLowAlarm 0 indicates all channels are Okay wLowAlarm 3 indicates channel 0 and 1 are LowAlarm wHighAlarm Store the MagicScan alarm status 32 bits corresponding to 32 channels every bit O indicates No High Alarm 1 indicates High Alarm For example wHighAlarm 0 indicates all channels are Okay WHighAlarm 5 indicates channel 0 and 2 are HighAlarm Return Void Demo Program DEMO11 C Page 62 OME PCI 180x Software Manual 2 10 The Plug amp Play Functions 2 10 1 P180X_Driverlnit Description This function will detect all the OME PCI 1800 1802 boards installed in the system This function must be called once before the other functions are called e Syntax WORD P180X_Driverlnit WORD wTotalBoard e Parameter wTotalBoard address of wTotalBoard wTotalBoard 1 gt one OME PCI 180X card in the system wTotalBoard n gt n OME PCI 180X cards in the system e Return NoError OK NoFoundBoard can not detect any OME PCI 180X FindBoardError handshake check error DriverHandleError the NAPPCI VxD open error for Windows 95 the NAPWNT SYS open error for Windows NT DriverCallError call NAPPCI VxD return error call NAPWNT SYS return error e Demo Program All DEMO programs 2 10 2 P180X_DriverClose e Description Releases all system resources This function must be called once before the program is terminated e Syntax void P180X_DriverClose void Page 63 OME PCI 180x Software Manual e P
45. leRate wSampleRate 240 gt sample rate 8M 240 33KHz wChannelStatus 02no scan 1 scan for each channel wChannelConfig configuration code for each channel Refer to Section 2 1 Configuration Table wCount number of A D data for each scan channel e Return NoError OK FindBoardError cannot find the OME PCI 180X board AdControllerError MagicScan controller hardware handshake error e Demo Program DEMO13 C Page 75 OME PCI 180x Software Manual 2 13 2 P180X CardO ReadStatus e Description This function will read the data collected by the continuous capture function e Syntax P180X CardO ReadStatus WORD wBuf WORD wBuf2 DWORD dwP1 DWORD dwP2 WORD wStatus e Parameter wBuf in scan sequence order 012 N012 N 012 N wBuf2 in channel sequence order 00000 11111 22222 NNNNN dwP1 reserved dwP2 reserved wStatus 1 thread start 2 TimeOut 8 FIFO overflow 0x80 thread finish e Return 0 data is ready 1 data not ready e Demo Program DEMO13 C 2 13 3 P180X CardO Stop e Description This function will stop the continuous capture function e Syntax void P180X CardO Stop void e Parameter None e Return Void e Demo Program DEMO13 C Page 76 OME PCI 180x Software Manual 2 13 4 P180X_Card1 StartScan Description This function will start the continuous capture function for card 1 The continuous capture functions are best suited for
46. lerError 3 M_FunExecError 4 ConfigCodeError 5 FrequencyCalculateError 6 HighAlarm 7 LowAlarm 8 AdPollingTimeOut 9 AlarmTypeError 10 FindBoardError 11 AdChannelError 12 DaChannelError 13 InvalidDelay 14 DelayTimeOut 15 InvalidData 16 FifoOverflow 17 TimeOut 18 Page 21 OME PCI 180x Software Manual ExceedBoardNumber 19 NotFoundBoard 20 OpenError 21 FindTwoBoardError 22 ThreadCreateError 23 StopError 24 AllocateMemoryError 25 Function of Test function P180X_FloatSub2 fA Single fB Single Single stdCall function P180X ShortSub2 nA Smalllnt nB SmallInt SmallInt stdCall function P180X GetDllVersion WORD stdCall Function of Driver function P180X Driverlnit Var wT otalBoards Word WORD stdCall procedure P180X_DriverClose stdCall function P180X_GetDriverVersion var wDriverVersion Word WORD stdCall function P180X_GetConfigAddressSpace wBoardNo Word var wAddrTimer Word var wAddrCtrl Word var wAddrDio Word var wAddrAdda Word WORD stdCall function P180X_ActiveBoard wBoardNo Word WORD stdCall function P180X_WhichBoardActive WORD stdCall Function of M_Fun series function P180X_M_FUN_1 wDaFrequency WORD wDaWave WORD fDaAmplitude Single wAdClock WORD wAdNumber WORD wAdConfig WORD fAdBuf PSingle fLowAlarm Single fHighAlarm Single WORD stdCall function P180X M FUN 2 wDaNumber WORD wDaWave WORD wDaBuf PWord
47. nction will stop the continuous capture process e Syntax void P180X Card1 Stop void e Parameter None e Return Void e Demo Program DEMO14 C Page 78 OME PCI 180x Software Manual 2 14 Other Functions 2 14 1 P180X DelayUs e Description This is a machine independent timer This function can be used to generate the settling time delay or used as a general purpose machine independent timer This function will refer to the current active OME PCI 1800 1802 board Use P180X_ActiveBoard to select the active board e Syntax word P180X DelayUs WORD wDelayUs e Parameter wDelayUs number of us to delay 8191 Max wDelayUs 1 gt delay 1 us wDelayUs 1000 delay 1000 us 1 ms wDelayUs 8191 gt delay 8191 us 8 191 ms maximum delay wDelayUs 8192 gt invalid delay will return error e Return NoError OK ExceedBoardNumber invalid board number FindBoardError cannot find theOME PCI 180X board InvalidDelay dwDelayUs gt 8191 e Demo Program DEMO1 C e Long Time Delay WORD DelayMs WORD wDelayMs maximum delay 4294967 295 sec WORD wbDelay wRetVal wRetVal 0 for wDelay 0 wDelay lt wDelayMs wDelay wRetVal P180X_DelayUs 1000 return wRetVal Page 79 OME PCI 180x Software Manual 3 Demo Programs The following demonstration programs are provided on the included CD demo10 demo11 demo12 demo13 demo14 demo15 demo16 demo17 demo18 demo19 demo20 demo21
48. ne will read the 16 bit data from the digital input D I port This function will refer to the current active PCI 180X Use P180X_ActiveBoard to select the active board e Syntax WORD P180X_Di WORD wDi e Parameter wDi address of wDi which contains the 16 bit D I data e Return NoError OK FindBoardError cannot find the OME PCI 180X board ExceedBoardNumber invalid board number e Demo Program DEMO1 C Page 50 OME PCI 180x Software Manual 2 6 2 P180X_Do e Description This subroutine will send the 16 bit data to the digital output D O port This function will refer to the current active PCI 180X board Use P180X_ActiveBoard to select the active board e Syntax WORD P180X_Do WORD wDo e Parameter wDo the 16 bit data sent to the D O port e Return NoError OK ExceedBoardNumber invalid board number FindBoardError cannot find the OME PCI 180X board e Demo Program DEMO1 C Page 51 OME PCI 180x Software Manual 2 7 The D A Functions 2 7 1 P180X Da e Description This subroutine will send the 12 bit data to the analog output D A port This function will refer to the current active PCI 180X board Use P180X_ActiveBoard to select the active board e Syntax WORD P180X Da WORD wChannel WORD wDaVal e Parameter wChannel 0 for channel 0 D A 1 for channel 1 D A wDaVal 12 bit data sent to D A port O minimum and 4095 maximum The D A output can be
49. ns can send out an arbitrary waveform to the D A output port and perform the A D operation at the same time If D A channel O is connected to A D channel 0 M Functions can measure the D A output back The output response is shown in Fig 8 and the connection diagram of demo1 VI is given in Fig 9 60 1 1 L n L 1 L L n L 1 D 10 20 30 40 50 60 70 80 90 100 PETERA F 2 nj al vf lt MM xy Microsoft Wor Buz HOS fist LebvIEW Srna 1 Das ES emo vi AM 1102 Fig 8 The output of DEMO1 VI call M FUN 1 Page 28 OME PCI 180x Software Manual gt demol vi Diagram File Edit Operate Project Windows Help BEI EIN DIET keaton Feat ll dw DaFrequency dw4dBuf HOSO RR BY Microsoft H Ms Dos w LabVIEW S Untitled 1 D S united 1 Sinet vi S aemot vi Fig 9 The connection diagram of DEMO1 VI call MFUN1 VI ES am 11 03 IE Mfuni vi Diagram File Edit Operate Project Windows Help amp 12pt Application Font Rood a MARIS no x gt 4 VA ABER EY Microsoft Wor DE MS DOS iist LabVIEW Gua Sunni a IIS urat vids Bl AM 1104 Fig 10 The connection diagram of MFUN1 VI call DLL M FUN 1 Page 29 OME PCI 180x Software Manual 1 9 DEMO PROGRAM We use a common demo program for all p180X dll demostrations This demo program will accept the wDaFreq and wAdClk and call the different functions for used for demonstrat
50. o Sec 2 4 2 for further details Syntax WORD P180X M FUN 3 WORD wDaFrequency WORD wDaWave float fDaAmplitude WORD wAdClock WORD wAdNumber WORD wChannelStatus WORD wAdConfig float fAdBuf float fLowAlarm float fHighAlarm Parameter wDaFrequency _ D A output frequency 1 8M wDaFrequency Pentium 120 wDaWave Number of D A waveforms to be output fDaAmplitude Amplitude of D A output NOTE the hardware jumper J1 must be set to 10V wAdClock A D sampling clock 8000000 wAdClock samples sec wAdNumber Number of A D data points to be read wAdChannel 1 scan 0 no scan wAdConfig configuration code fAdBuf the starting address of fAdBuf which contains the A D data fLowAlarm low alarm limit if fAdBuf fLowAlarm gt LowAlarm fHighAlarm high alarm limit if fAdBuf gt fHighAlarm gt HighAlarm Return NoError OK DriverHandleError Invalid VXD SYS handle DriverCallError VXD SYS function call error ExceedBoardNumber invalidate board number FindBoardError no OME PCI 180X board AdControllerError embedded controller handshake error M FunExecError M Functions return code error ConfigCodeError wAdConfig configuration code error Page 48 OME PCI 180x Software Manual HighAlarm fAdBuf gt fHighAlarm LowAlarm fAdBuf lt fLowAlarm e Demo Program DEMO9 C Page 49 OME PCI 180x Software Manual 2 6 The DIO Functions 2 6 1 P180X_Di e Description This subrouti
51. or Allpication define EXPORTS Usage for DLL II THREAD_PRIORITY_LOWEST 1 THREAD_PRIORITY_BELOW_NORMAL II THREAD_PRIORITY_NORMAL Il THREAD PRIORITY ABOVE NORMAL Il THREAD PRIORITY HIGHEST return code define NoError 0 define DriverHandleError 1 define DriverCallError 2 define AdControllerError 3 define M FunExecError 4 define ConfigCodeError 5 define FrequencyCalculateError 6 define HighAlarm 7 define LowAlarm 8 define AdPollingTimeOut 9 define AlarmTypeError 10 define FindBoardError 11 define AdChannelError 12 define DaChannelError 13 define InvalidDelay 14 define DelayTimeOut 15 define InvalidData 16 define FifoOverflow 17 define TimeOut 18 define ExceedBoardNumber 19 define NotFoundBoard 20 define OpenError 21 define FindTwoBoardError 22 define ThreadCreateError 23 define StopError 24 define AllocateMemoryError 25 EXPORTS float CALLBACK P180X_FloatSub2 float fA float fB EXPORTS short CALLBACK P180X ShortSub2 short nA short nB EXPORTS WORD CALLBACK P180X GetDllVersion void EXPORTS WORD CALLBACK P180X Driverlnit WORD wTotalBoards EXPORTS void CALLBACK P180X DriverClose void EXPORTS WORD CALLBACK P180X GetDriverVersion WORD wVxdVersion EXPORTS WORD CALLBACK P180X GetConfigAddressSpace WORD wBoardNo WORD wAddrTimer WORD wAddrCtrl WORD wAddrDio WORD wAddrAdda EXPORTS WORD CALLBACK P180X ActiveBoard WORD wBoardNo EXPORTS WORD CALLBACK P180X WhichBoardActive
52. r FindBoardError cannot find the OME PCI 180X board AdControllerError MagicScan controller hardware handshake error e Demo Program DEMO11 C Page 58 OME PCI 180x Software Manual 2 9 3 P180X_ReadScanStatus e Description This subroutine will read the status of the MagicScan operation This function will refer to the current active OME PCI 180X board Use P180X_ActiveBoard to select the active board e Syntax void P180X_ReadScanStatus WORD wStatus WORD wLowAlarm WORD wHighAlarm e Parameter wStatus Store the MagicScan status Status Description 0x00 MagicScan initial condition idle state 0x01 MagicScan start to operation 0x02 MagicScan stage 1 controller timeout 0x04 MagicScan stage 2 controller timeout 0x08 MagicScan FIFO overflow 0x80 MagicScan function OK wLowAlarm Store the MagicScan alarm status 32 bits corresponding to 32 channels every bit O indicates No Low Alarm 1 indicates Low Alarm For example wLowAlarm 0 indicates all channels are Okay wLowAlarm 3 indicates channel 0 and 1 are LowAlarm wHighAlarm Store the MagicScan alarm status 32 bits corresponding to 32 channels every bit O indicates No High Alarm 1 indicates High Alarm For example wHighAlarm 0 indicates all channels are Okay WHighAlarm 5 indicates channel 0 and 2 are HighAlarm e Return void e Demo Program DEMO11 C Page 59 OME PCI 180x Software Manual 2 9 4 P180X AddTo
53. rm DWORD dwHighAlarm EXPORTS WORD CALLBACK P180X AddToScan WORD wAdChannel WORD wConfig WORD wAverage WORD wLowAlarm WORD wHighAlarm WORD wAlarmType EXPORTS WORD CALLBACK P180X SaveScan WORD wAdChannel WORD wBuf EXPORTS void CALLBACK P180X WaitMagicScanFinish WORD wStatus DWORD dwLowAlarm DWORD dwHighAlarm EXPORTS WORD CALLBACK P180X StopMagicScan EXPORTS WORD CALLBACK P180X DelayUs WORD wDelayUs EXPORTS WORD CALLBACK P180X CardO StartScan WORD wSampleRate WORD wChannelStatus WORD wChannelConfig WORD wCount EXPORTS WORD CALLBACK P180X CardO ReadStatus WORD wBuf WORD wBuf2 DWORD dwP1 DWORD dwP2 WORD wStatus EXPORTS void CALLBACK P180X CardO Stop void EXPORTS WORD CALLBACK P180X Card1 StartScan WORD wSampleRate WORD wChannelStatus WORD wChannelConfig WORD wCount EXPORTS WORD CALLBACK P180X Card1 ReadStatus WORD wBuf WORD wBuf2 DWORD dwP1 DWORD dwP2 WORD wStatus EXPORTS void CALLBACK P180X Card1 Stop void Page 40 OME PCI 180x Software Manual EXPORTS WORD CALLBACK P180X_FunA_Start WORD wClockODiv WORD wChannel0 WORD wConfig0 WORD Buffero DWORD dwMaxCounto WORD wClock1Div WORD wChannel1 WORD wConfig1 WORD Buffer1 DWORD dwMaxCount1 SHORT nPriority EXPORTS WORD CALLBACK P180X FunA ReadStatus void EXPORTS WORD CALLBACK P180X FunA Stop void EXPORTS WORD CALLBACK P180X FunA Get DWORD PO DWORD P1 EXPORTS WORD CALLBACK P180X FunB Sta
54. rtWORD wClockODiv WORD wChanneloO WORD wConfig0 WORD Buffero DWORD dwMaxCount0 SHORT nPriority EXPORTS WORD CALLBACK P180X FunB ReadStatus void EXPORTS WORD CALLBACK P180X FunB Stop void EXPORTS WORD CALLBACK P180X FunB Get DWORD P0 EXPORTS WORD CALLBACK P180X StartScanPostTrg WORD wSampleRateDiv DWORD dwNum SHORT nPriority EXPORTS WORD CALLBACK P180X StartScanPreTrg WORD wSampleRateDiv DWORD dwNum SHORT nPriority EXPORTS WORD CALLBACK P180X StartScanMiddleTrg WORD wSampleRateDiv DWORD dwN1 DWORD dwN2 SHORT nPriority EXPORTS WORD CALLBACK P180X_StartScanPreTrgVerC WORD wSampleRateDiv DWORD dwNum SHORT nPriority EXPORTS WORD CALLBACK P180X StartScanMiddleTrgVerC WORD wSampleRateDiv DWORD dwN1 DWORD dwN2 SHORT nPriority Page 41 OME PCI 180x Software Manual 2 4 TEST FUNCTIONS 2 4 1 P180X FloatSub2 e Description Calculates C A B in float format float 4 bytes floating point number This function is provided to test DLL linkage e Syntax float P180X_FloatSub2 float fA float fB e Parameter fA 4 bytes floating point value fB 4bytes floating point value e Return return fA fB 2 4 2 P180X ShortSub2 e Description Calculates C A B in SHORT format SHORT 16 bit signed number This function is provided to test DLL linkage e Syntax short P180X_ShortSub2 Short nA Short nB e Parameter nA 16 bit value nB 16 bit value e Return return nA nB Page 42
55. tion P180X Di Lib P180X dll wDi As Integer As Integer Declare Function P180X Do Lib P180X dll ByVal wDo As Integer As Integer Declare Function P180X Da Lib P180X dll ByVal wDaChannel As Integer _ ByVal wDaVal As Integer As Integer Declare Function P180X SetChannelConfig Lib P180X dll ByVal wAdChannel As Integer _ ByVal wConfig As Integer As Integer Declare Function P180X AdPolling Lib P180X dll fAdVal As Single As Integer Declare Function P180X AdsPolling Lib P180X dll fAdVal As Single ByVal wNum As Integer _ As Integer Declare Function P180X AdsPacer Lib P180X dll fAdVal As Single ByVal wNum As Integer _ ByVal wSample As Integer As Integer Declare Function P180X ClearScan Lib P180X dll As Integer Declare Function P180X StartScan Lib P180X dll ByVal wSampleRate As Integer _ ByVal dwNum As Long ByVal nPriority As Integer As Integer Declare Sub P180X_ReadScanStatus Lib P180X dll wStatus As Integer dwLowAlarm As Long _ dwHighAlarm As Long Declare Function P180X AddToScan Lib P180X dll ByVal wAdChannel As Integer _ ByVal wConfig As Integer ByVal wAverage As Integer ByVal wLowAlarm As Integer _ ByVal wHighAlarm As Integer ByVal wAlarmType As Integer As Integer Declare Function P180X SaveScan Lib P180X dll ByVal wOridinalOrder As Integer _ wBuf As Integer As Integer Declare Sub P180X WaitMagicScanFinish Lib P180X dll wStatus As Integer _ wLowAlarm As Integer _ wHighAlarm As Int
56. tiveBoard to select the active board e Syntax WORD P180X_ClearScan e Parameter None e Return NoError OK ExceedBoardNumber invalid board number FindBoardError cannot find the OME PCI 180X board AdControllerError MagicScan controller hardware handshake error e Demo Program DEMO11 C Page 57 OME PCI 180x Software Manual 2 9 2 P180X_StartScan e Description This subroutine will start the MagicScan operation The subroutine will return to the caller before the MagicScan operation is finished The P180X_WaitMagicScanFinish function or the P180X_ReadScanStatus function can be used to check the status of the MagicScan operation This function will refer to the current active OME PCI 180X board Use P180X_ActiveBoard to select the active board e Syntax P180X_StartScan WORD wSampleRateDiv DWORD dwNum SHORT nPriority e Parameter wSampleRateDiv A D sample rate 8M wSampleRate wSampleRate 24 gt sample rate 8M 24 330K dwNum Number of MagicScan cycle to perform nPriority Used to adjust the priority of the thread The valid values are as followings Value ID Description 2 THREAD PRIORITY LOWEST 1 THREAD PRIORITY BELOW NORMAL 0 THREAD PRIORITY NORMAL 1 THREAD PRIORITY ABOVE NORMAL 2 THREAD PRIORITY HIGHEST 15 THREAD PRIORITY TIME CRITICAL others THREAD PRIORITY NORMAL e Return NoError OK ExceedBoardNumber invalid board numbe
57. uct If the unit malfunctions it must be returned to the factory for evaluation OMEGA s Customer Service Department will issue an Authorized Return AR number immediately upon phone or written request Upon examination by OMEGA if the unit is found to be defective it will be repaired or replaced at no charge OM EGA s WARRANTY does not apply to defects resulting from any action of the purchaser includ ing but not limited to mishandling improper interfacing operation outside of design limits improper repair or unauthorized modification This WARRANTY is VOID if the unit shows evidence of having been tampered with or shows evidence of having been damaged as a result of excessive corrosion or current heat moisture or vibration improper specification misapplication misuse or other operating conditions outside of OM EGA s control Components which wear are not warranted including but not limited to contact points fuses and triacs OMEGA is pleased to offer suggestions on the use of its various products However OMEGA neither assumes responsibility for any omissions or errors nor assumes liability for any damages that result from the use of its products in accordance with information provided by OMEGA either verbal or written OMEGA warrants only that the parts manufactured by it will be as specified and free of defects OMEGA MAKES NO OTHER WARRANTIES OR REPRESENTATIONS OF ANY KIND WHATSOEVER EXPRESS OR IMPLIED EXCEPT THAT OF TITLE AND
58. unction function P180X M FUN 1 external P180X DLL name P180X M FUN 1 P180X M FUN 2 external P180X DLL name P180X M FUN 2 P180X M FUN 3 external P180X DLL name P180X M FUN 3 P180X M FUN 4 external P180X DLL name P180X M FUN 4 P180X Do external P180X DLL name P180X Do P180X Di external P180X DLL name P180X Di P180X Da external P180X DLL name P180X Da P180X SetChannelConfig external P180X DLL name P180X_SetChannelConfig P180X AdPolling external P180X DLL name P180X_AdPolling P180X AdsPolling external P180X DLL name P180X_AdsPolling Page 25 OME PCI 180x Software Manual function P180X_AdsPacer external P180X DLL name P180X_AdsPacer JS ERRORS S cie function P180X ClearScan external P180X DLL name P180X ClearScan function P180X StartScan external P180X DLL name P180X StartScan procedure P180X_ReadScanStatus external P180X DLL name P180X_ReadScanStatus function P180X_AddToScan external P180X DLL name P180X AddToScan function P180X SaveScan external P180X DLL name P180X SaveScan procedure P180X WaitMagicScanFinish external P180X DLL name P180X WaitMagicScanFinish function P180X StopMagicScan external P180X DLL name P180X StopMagicScan kkkkkkkkkkkkkkkkkkkkk function P180X_DelayUs external P180X DLL name P180X_DelayUs kkkkkkkkkkkkkkkkkkk function P180X_Card0_StartScan external P180X DLL name P180X_Card0_Start
59. vides all information needed to complete the Plug amp Play installation After the installation the Windows will reserve the resources and populate the registry The Plug amp Play information is shown in Figure 1 Figure 2 shows the resources that are reserved If the user executes c WINNT regedit exe the registration information of the PCI 180XH L will be located under My Computer HKEY_LOCAL_MACHINE SYSTEM ControlSet001 Services P180x as in Figure 3 Figure 4 shows the registration items in detail 2 Device Manager I Action View es amela Computer BB DAQCard B DAS PCI 180x Card amp Disk drives Display adapters DYD CD ROM drives lt Floppy disk controllers 3 Floppy disk drives lt IDE ATA ATAPI controllers 3 Keyboards TA Mice and other pointing devices 3 Monitors EF Network adapters Z Ports COM amp LPT g Sound video and game controllers m System devices Universal Serial Bus controllers F E E EE Fig 1 The Plug amp Play information Page 8 OME PCI 180x Software Manual Registry Editor 2 E E E ER EH 3 NetDDEdsdm 3 NetDetect 3 Netlogon J Netman 3 nm E Npfs 3 Ntfs 3 NtLmSsp 3 NtmsSvc 3 Null 3 NwinkFlt 3 NwlnkFwd 3 P180x 3 Parallel
60. void Page 39 OME PCI 180x Software Manual EXPORTS WORD CALLBACK P180X_M_FUN_1 WORD wDaFrequency WORD wDaWave float fDaAmplitude WORD wAdClock WORD wAdNumber WORD wAdConfig float fAdBuf float fLowAlarm float fHighAlarm EXPORTS WORD CALLBACK P180X M FUN 2 WORD wDaNumber WORD wDaWave WORD wDaBuf WORD wAdClock WORD wAdNumber WORD wAdConfig WORD wAdBuf EXPORTS WORD CALLBACK P180X M FUN 3 WORD wDaFrequency WORD wDaWave float fDaAmplitude WORD wAdClock WORD wAdNumber WORD wChannelStatus WORD wAdConfig float fAdBuf float fLowAlarm float fHighAlarm EXPORTS WORD CALLBACK P180X M FUN 4 WORD wType WORD wDaFrequency WORD wDaWave float fDaAmplitude WORD wAdClock WORD wAdNumber WORD wChannelStatus WORD wAdConfig float fAdBuf float fLowAlarm float fHighAlarm EXPORTS WORD CALLBACK P180X Di WORD wDi EXPORTS WORD CALLBACK P180X Do WORD wDo EXPORTS WORD CALLBACK P180X Da WORD wDaChannel WORD wDaVal EXPORTS WORD CALLBACK P180X SetChannelConfig WORD wAdChannel WORD wConfig EXPORTS WORD CALLBACK P180X AdPolling float fAdVal EXPORTS WORD CALLBACK P180X AdsPolling float fAdVal WORD wNum EXPORTS WORD CALLBACK P180X AdsPacer float fAdVal WORD wNum WORD wSample EXPORTS WORD CALLBACK P180X ClearScan void EXPORTS WORD CALLBACK P180X StartScan WORD wSampleRateDiv DWORD dwNum SHORT nPriority EXPORTS void CALLBACK P180X ReadScanStatus WORD wStatus DWORD dwLowAla
Download Pdf Manuals
Related Search
Related Contents
DPU 5045H - Wacker Neuson RIVELATORE LINEARE DI FUMO A RIFLESSIONE RK 75 R 機械に関する危険性等の通知情報の作成事例 schéma de câblage circuits du lave PowPak 0-10 V/PWM Dimming Module Japan Installation Sheet Part Réunion d`information FORMATION MODE D`EMPLOI 009 EVALUACION JUR ECON TEC SA.003 Copyright © All rights reserved.
Failed to retrieve file