Home
PCI-AC51 USER'S GUIDE
Contents
1. Note for Visual Basic users indicates a by reference argument PCI AC51 User s Guide 13 PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS Re Analog Watchdog Operations Function Function Parameter Parameter Description Type Type long PamuxAnaWatchdogSet long hHandle Sets up the watchdog timer for an analog long Bank point Time100 units are hundredths of a second long Time100 long Data 16 long PamuxAnaWatchdogTime long hHandle Sets the value of the watchdog timer in units of hundredths of a second Setting Time100 long Rank to 0 disables the watchdog Setting the time long Time100 to 0 can also be used to reset the watchdog error flag if it has tripped This and any other analog function can be used to tickle the watchdog to prevent it from tripping Note for Visual Basic users indicates a by reference argument Analog Status Operations Function Function Parameter Parameter Description Type Type long PamuxAnaStatusGetAsError long hHandle Gets an analog board s status and returns an equivalent error Analog read functions also return the same result after performing their read An analog configure function can be used to clear the power up error The old data error is cleared by the B6 processor as it updates inputs This function could be used to wait for fresh input data long Bank Note for Visual Basic users indi
2. eight bits to the specified port long Bank long Data Note for Visual Basic users indicates a by reference argument 12 PCI AC51 User s Guide PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS T Analog Bank Operations Function Function Parameter Parameter Description Type Type long PamuxAnaBank16Config long hHandle Configures a bank of analog I O points as Bank either inputs or outputs A 1 in the mask ong S indicates an output long OutputMask long PamuxAnaBank16Read long hHandle Reads a bank of 16 analog points and E places the values in the DataArray oog aes channel 0 in element 0 and channel 15 long DataArray16 in element 15 long PamuxAnaBank16Write long hHandle Writes values to a bank of analog points channel 0 value in element 0 long Bank long DataArray16 Note for Visual Basic users indicates a by reference argument Analog Point Operations Function Function Parameter Parameter Description Type Type long PamuxAnaPointConfig long hHandle Configures an analog point as either an input or output A non zero value to long Bank A bOutput configures the point as an output long Point long boutput long PamuxAnaPointRead long hHandle Reads the value of an analog point long Bank long Point long pData long PamuxAnaPointWrite long hHandle Writes the value in Data to an analog point long Bank long Point long Data
3. PCI AC51 functions start with PamuxPCl Banks and Points Some 0 points can be addressed in multiple ways A 16 channel 170 board has two banks Point 0 the first point is accessed using a bank number of 0 and a point number of 0 Point 8 can be accessed in two ways e Abank number of 0 and a point number of 8 or e A bank number of 1 and a point number of 0 8 PCI AC51 User s Guide PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS Common Function Parameters and Return Values int hHandle Handle to a PCI AC51 card Handles are acquired using PamuxPC CardOpen int Bank A bank number 0 to 63 int Point A point or channel number on a rack starting with zero OutputMask A 1 bit represents an output Used to configure outputs Return Values All functions in the OptoPM32 dil return an error value A non zero value indicates an error has occurred For proper application operation make sure your program checks error codes See the list of error codes on page 17 Developing the I O Application Use the following basic steps in your application in Visual Basic or Visual C 1 Open a handle to the board using the function PamuxPClCardopen 2 Inspect the error code of the device open function 3 Configure the direction of the points 4 Start the application loop that continuously reads or writes points At the same time continue to inspect the error codes from the OptoPM32 DLL 5 When the application loop
4. binary or 25 decimal Function Function Parameter Parameter Description Type Type long PamuxDigBankConfig long hHandle Configures a bank of digital I O points Bank as either inputs or outputs A 1 in the ong E mask indicates an output Use long OutputMask PamuxDigBankConfig for configuring between 8 and 32 points long Byte Qty PamuxDigBank16Config for 16 points long PamuxDigBankl6Config long hHandle or ee eee for 32 points long Bank The Byte Qty parameter in long OutputMask PamuxDigBankConfig indicates how many banks to configure Byte Qty 4 long PamuxDigBank32Config long hHandle for 32 points long Bank long OutputMask long PamuxDigBankRead long int hHandle Reads inputs and outputs and places i Bank the result in pData Use ong PamuxDigBankRead for reading eight long pData points PamuxDigBank16Read for 16 points or PamuxDigBank32Read for 32 long PamuxDigBank16Read long int hHandle points long Bank long pData long PamuxDigBank32Read long int hHandle long Bank long pData long PamuxDigBankWrite long hHandle Writes outputs using the value in Data i on Inputs are not affected if written to Use ong an PamuxDigBankWrite for writing to eight long Data points PamuxDigBank16Write for 16 points or PamuxDigBank32Write for 32 long PamuxDigBank16Write long hHandle points long Bank long Data long PamuxDigBank32Write long hHandle long Bank long Data Note for Visual Basi
5. of their respective companies or organizations PCI AC51 User s Guide Table of Contents Chapter 1 Installing the PCI AC5S1 ccccicscssccccssssscscsecsetestensecscasatencenesanssetosses 1 E I AE 1 E e E 1 e POLIT AUDI du ku r T 2 e HCrTeTE 2 E Re 3 EONO eee tence ET 3 KP netsh eect nce ec KET 4 Installing AN OG FE sects er v n E oda b n v ni 4 Installing Software r ve nt k dh dd 4 Testing the el ec enacts de aceasta hare dcata bean neti ates pda ek ina eee i 5 Changing Your Application for the PCI AC51 oo ccc ac aa cc us uns os can er encerenr ere ne ecen eren 6 Chapter 2 Programming with the PCI AC51 Toolkit in VVindovvs 7 OVEREN ee e e scmesmacnsbssesacesaceacausaceconetucturaeracaser E E 7 What Is the PCI AC51 Toolkit agoi ui red eet eae se sa Auhees eect ce Rates 7 nstallati Mieno E A AA A E 8 e e N 8 Required Function GUIS scaiscssacendsn cscstcnssasiasearesi ance ta ant acaats ienSet Seaaldnaheenesuesceschacaacd e 8 Naming Conventions charac E atChatantceo 8 Banks Aand POINTS ane v m en kun K ndi add eaa ieaiai EE ainei 8 Common Function Parameters and Return Va UA Sa a v va nana anon o neo er cenon 9 Return Mi MUD ae Ge cauremnaencanen e A S 9 Developing the 1 0 Application za o d sa n ni naj se k na t r 9 Special Directions for Visual Basic PrograMMelS ccsccccsseseseesesesseseseesesseseeeeseaeesees 9 Special Directions for Visual C Programmers uu on ana c cs can os
6. parameters must be specified the I O Port long ResetLevel addresses for the PCI AC51 base port its reset port and the reset level These three parameters must correspond to the PCI AC51 card ResetLevel 1 high reset 0 low reset This function does not reset the Pamux bus long BoardiD long PamuxPCICardClose long hHandle Releases the handle to the PCI AC51 and turns on LEDs 1 and 2 long PamuxCardReset long hHandle Resets the PCI AC51 card and resets the Pamux bus long PamuxReadType long hHandle Accesses the board ID for the specified bank Bank Note Not all Pamux boards support the pType self identification feature long PamuxReadTypeNoRead long hHandle Accesses the board IP for the last Pamux Board Read Bank does not access the Pamux Bus pType Note Not all Pamux boards support the self identification feature Note for Visual Basic users indicates a by reference argument 10 PCI AC51 User s Guide Digital Bank Operations PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS T The term bank refers to groups of eight digital 170 points A 32 channel Pamux board vvith a B4 brain board has four banks It is faster to read a bank all at once than to read each point individually Note that channel 0 corresponds to the least significant bit For example if you read a bank vvith channels 0 3 and 4 on and all other channels off the returned value would be 19 hex 11001
7. PCI AC51 USER S GUIDE FORM 1459 0501 20 JANUARY 2005 OPTo 2 2 43044 Business Park Drive e Temecula e CA 92590 3614 Phone 800 321 OPTO 6786 or 951 695 3000 Fax 800 832 OPTO 6786 or 951 695 2712 www opto22 com Product Support Services 800 TEK OPTO 835 6786 or 951 695 3080 Fax 951 695 3017 Email support opto22 com Web support opto22 com PCI AC51 User s Guide Form 1459 050120 JANUARY 2005 Copyright 2005 Opto 22 All rights reserved Printed in the United States of America The information in this manual has been checked carefully and is believed to be accurate however Opto 22 assumes no responsibility for possible inaccuracies or omissions Specifications are subject to change without notice Opto 22 warrants all of its products to be free from defects in material or workmanship for 30 months from the manufacturing date code This warranty is limited to the original cost of the unit only and does not cover installation labor or any other contingent costs Opto 22 170 modules and solid state relays with date codes of 1 96 or later are guaranteed for life This lifetime warranty excludes reed relay SNAP serial communication modules SNAP PID modules and modules that contain mechanical contacts or switches Opto 22 does not warrant any product components or parts not manufactured by Opto 22 for these items the warranty from the original manufacturer applies These products include but are not limited to OptoT
8. an array of boolean 0 or not 0 values to a bit packed integer long SourceArrayll long Qty void PamuxUtilBitUnPackI2Array long DestArray Converts a bit packed integer to an array of boolean 1 or 0 values long SourceInt K l Qty indicates the number of bits to be long Qty packed or unpacked Note for Visual Basic users indicates a by reference argument PCI AC51 User s Guide 15 PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS These interpolation functions are useful for converting between engineering units and raw analog counts Pamux analog input and output values range between 0 and FFF hex 4 095 decimal These values typically correspond to engineering units such as pH and psi For example to convert raw counts from 0 to FFF hex to a percentage use float fPercent PamuxUtilScalel2F 0 0xFFF 0 0 100 0 RawCount Function Function Parameter Parameter Type Type Scaling Operations long PamuxUtilScale121 long X1 long X2 long Y1 long Y2 long Xin float PamuxUtilScaleI2F long X1 long X2 float Y1 float Y2 long Xin float PamuxUtilScaleF2F float X1 float X2 float Y1 float Y2 float Xin long PamuxUtilScaleF2I float xi float X2 long Y1 long Y2 float Xin Note for Visual Basic users indicates a by reference argument 16 PCI AC51 User s Guide Error Codes PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS T In general most func
9. being used e Specific error messages and or numbers seen PCI AC51 User s Guide 3 INSTALLING THE PCI AC51 Quick Start Follow the steps in this section to e Install hardware e Install software e Use the utilities provided to identify and test the card e Change your application for the PCI AC51 Installing Hardware The PCI AC51 adapter card installs into any PCI expansion slot of a PCl capable computer The toolkit supports a maximum of 32 PCI AC51 cards You may add multiple PCI AC51 adapter cards for convenience but note that multiple cards do not increase Pamux throughput The number of Pamux accesses per computer is constant Follow these steps to install the card 1 Turn off the computer Remove the power cord and the computer s cover The power cord must be removed or any sudden spike may cause the computer to automatically boot 2 Before handling the PCI AC51 discharge excess static electricity by touching the computer s metal chassis 3 Install the card in one of the PCI expansion slots CAUTION Do not scratch this card or other cards in the computer as scratching may irreversibly damage the card or other devices 4 Verify that the PCI AC51 card is properly seated in the motherboard PCI socket Secure the card with the screw 5 Reinstall the power cord Leave the computer cover off temporarily so you can see the card s LEDs Installing Software To install software read and follow the instructi
10. c users indicates a by reference argument PCI AC51 User s Guide 11 PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS Digital Point Operations Function Function Parameter Parameter Description Type Type long PamuxDigPointConfig long hHandle Configures a point as either an input or output A non zero value in bOutput long Bank I 8 configures the point as an output long Position long boutput long PamuxDigPointRead long hHandle Reads the value of a point and puts the ake value in pData The value is either 1 for on ong am or 0 for off long Point long pData long PamuxDigPointWrite long hHandle Writes to a point using the value in Data A non zero value for Data turns the point on long Bank long Point long Data Note for Visual Basic users indicates a by reference argument Digital Fast Operations For high speed applications these functions can be used to bypass some error checking and port calculations The configure functions should be used to configure outputs Function Function Parameter Parameter Description Type Type long PamuxDigIoPortGet long hHandle Provides the Pamux metrics needed the I je PCI AC51 handle the bank number and ong ppan the point number long pPoint long ploPort long PamuxDirectRead long hHandle Reads one byte eight bits from the specified I O port long Bank long Data void PamuxDirectWrite long hHandle Writes one byte
11. can eres ee rene renien 9 Function Command Reference 1 nan nano n cn n anes core zere ee tezet enet ete eter e ete te nt ete tet eer men 10 PCI AC51 Operations eg e t eko kratt niat 10 Digital Bank Operations egos v na n nda d 11 Digital Point Operations ask tue e U e n r ab i sets 12 PCI AC51 User s Guide ili E Digital Fast Operations cgtade u aduss keni ok rete en as Rek arr vesa 12 Analog Bank Operations E ahetenten ss 13 e e 13 NT 14 Analog Status Operations tr Get God nn h d ra i 14 Pamux Utility DIJ AUDI j ka r an n 15 Error CodeS eeren E E A A i palla den 17 Converting Applications to the PCI AC51 i u get ad at hd desdossantasdecboanss 19 Applications that Used the OptoPMUX DLL for the AC Bu uu uv vc vuan cceesteteseeteseeneees 19 Converting Applications that Use Inp and Outp Deax cx can cc cccccarcccccrecosee 19 For the Windows 95 98 or Windows NT Historic OptoPMux User u ax c anccccc cin ccccc 19 Functions No Longer in USE scccccsccscscisssisetsctesisetsctsentidcsnestadavecnsteminsisalensaactieencee 20 Changed Functions zs ced czas castccascanaciachonetantanscssnnisnenbiathedasdtsbisostyecstanhagenanepabaucceumens 20 Special Precautions for the Software DeVelOper c cceccssesesesesessesestesesteseesseseeseseenees 20 iv PCI AC51 User s Guide CHAPTER 1 Installing the PCI AC51 Introduction The PCI AC51 adapter card brings industry standard Pamux to the w
12. cates a by reference argument 14 PCI AC51 User s Guide PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS a l Pamux Utility Operations The following utility functions are provided primarily for Visual Basic applications These are not Pamux specific functions Function Function Parameter Parameter Description Type Type Bit Operations void PamuxUtilBitSetTo long pData These bit operations are useful in Visual Basic ne er applications to access individual bits within an ong Pe integer The BitSetTo function either sets or long bBitValue clears the specified bit based on the value of 0 bBitValue Any non zero value for Data turns void PamuxUtilBitset long Se on the bit The BitSet and BitCir functions set long BitNumber0 and clear the specified bit Bit numbers start at zero for the least significant bit LSB void PamuxUtilBitclr long prata The zero at the end of the parameter name long BitNumber0 BitNumber0 serves as a reminder of this fact for anyone looking through the function long PamuxUtilBitTest long Data definitions in either the BAS file or the H long BitNunbero header files PamuxUtilBitTest returns true if bit number Bithumbero in Data is set Note for Visual Basic users indicates a by reference argument Function Function Parameter Parameter Description Type Type Pack Unpack Utility Operations void PamuxUtilBitPackArray2I long Destint Converts
13. e 8205 0x200D A handle number out of The handle submitted is invalid as it is beyond the number range tried to be used of handles the OptoPM32 DLL supports Inspect the handle for corruption Also validate that the handle number does not change when PamuxPClCardOpen opens a valid handle It is also possible that an incorrect argument is being passed to the function 8206 Ox200E Specified device is When inspecting the opening of a PCI AC51 the handle s already open data structure is marked as open The OptoPM32 DLL does not support multiple access handles to individual PCI AC51s 8207 0x2010 Registry entry does not A historic WinRT error that doesn t apply to the exist OptoPM32 DLL 8384 0x20C0 Specified PCI board ID The board ID is beyond the range of valid board ID was not found numbers The range is always from zero to one less than the number of adapters installed in the computer 8385 0x20C1 The device layer was not The customer application is copied onto a system that found does not have the toolkit layer installed 8386 0x20C2 The device layer file May happen if a toolkit with an older WinDriver version is version is too old for the installed onto the system Update all toolkit installations toolkit with the latest toolkits 8387 0x20C3 OptoPM32 does not An unsupported PCI AC51 function is called from the support this function application The PCI AC51 does not support the identify type and does not
14. erminal G70 OptoTerminal G75 and Sony Ericsson GT 48 see the product data sheet for specific warranty information Refer to Opto 22 form number 1042 for complete warranty information Opto 22 FactoryFloor Cyrano Optomux and Pamux are registered trademarks of Opto 22 Generation 4 ioControl ioDisplay ioManager ioProject ioUtilities mistic Nvio Nvio net Web Portal OptoConnect OptoControl OptoDisplay OptoENETSniff OptoOPCServer OptoScript OptoServer OptoTerminal OptoUtilities SNAP Ethernet 170 SNAP 170 SNAP OEM 170 SNAP Simple 1 0 SNAP Ultimate 1 0 and SNAP Wireless LAN 170 are trademarks of Opto 22 Activex JScript Microsoft MS DOS VBScript Visual Basic Visual C and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries Linux is a registered trademark of Linus Torvalds Unicenter is a registered trademark of Computer Associates International Inc ARCNET is a registered trademark of Datapoint Corporation Modbus is a registered trademark of Schneider Electric Wiegand is a registered trademark of Sensor Engineering Corporation Nokia Nokia M2M Platform Nokia M2M Gateway Software and Nokia 31 GSM Connectivity Terminal are trademarks or registered trademarks of Nokia Corporation Sony is a trademark of Sony Corporation Ericsson is a trademark of Telefonaktiebolaget LM Ericsson All other brand or product names are trademarks or registered trademarks
15. is complete close the handle to the board using PamuxPClCardClose Special Directions for Visual Basic Programmers Include the OptoPM32 bas file as a module in your project This file includes subroutine declarations function declarations and access paths to the OptoPM32 dll These files may be found in the toolkit under Vb VB dll header Special Directions for Visual C Programmers Include the header OptoPM32 h in your source code modules that reference the OptoPM32 dll functions Also include the DLL link library OptoPM32 lib in your project so the DLL references are resolved These files may be found in the toolkit under Vc VC Project Includes PCI AC51 User s Guide 9 PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS NR ee Function Command Reference The functions listed in this section include parameters and descriptions PCI AC51 Operations Function Function Parameter Parameters Description Type Type long PamuxPCICardopen long phHandle Opens access to a PCI ACS1 card phHandle gets a handle Three parameters must be specified the I O Port long ResetLevel addresses for the PCI AC51 base port its reset port and the reset level These three parameters must correspond to the PCI AC51 card ResetLevel 1 high reset 0 low reset This function also performs a Pamux bus reset long BoardiD long PamuxPCICardopenNoReset long phHandle Opens access to a PCI ACS1 card phHandle gets a handle Three
16. it 33 MHz PCI bus Microsoft Windows 2000 XP PCI compliance PCI Specification Revision 2 2 Opto 22 brain compatibility B4 B5 B6 SNAP B4 SNAP B6 Switches For software use LEDs Four indicating board access reset level read and write Operating temperature 0 to 70 C Storage temperature 30 to 85 C LEDs The PCI AC51 adapter card its four LEDs and their functions are shown in the following diagram LED 1 Reset level On Low ae LED 2 Hardware accessed OPTO 22 OUUU PCI AC51 LED 3 Write LED 4 Read 2 PCI AC51 User s Guide INSTALLING THE PCI AC51 What s in this Guide This guide assumes that you are familiar with Pamux and the brains racks and input output modules used with Pamux For more information on Pamux see Opto 22 form 726 Pamux Users Guide If you are going to program the PCI AC51 using the PCI AC51 Toolkit this guide assumes that you are already familiar with programming in Micros
17. o Write Watch values change once per second as they are automatically read Change values and watch them automatically written 6 When you have finished testing the card click Exit Changing Your Application for the PCI AC51 If you have been using an AC28 adapter card for the ISA bus you will need to make some changes to your application because of the new PCI adapter card See Chapter 2 for specific information 6 PCI AC51 User s Guide CHAPTER 2 Programming with the PCI AC51 Toolkit in Windows Overview To simplify communication to the Pamux bus you can use Opto 22 s PCI AC51 Toolkit This chapter explains how to use the toolkit What Is the PCI AC51 Toolkit The PCI AC51 Toolkit provides an interface between Pamux stations and application programs written in Microsoft Visual C and Visual Basic 6 0 The toolkit saves you time and effort that would otherwise be spent learning the intricacies of the Pamux bus structure The toolkit is 32 bit Microsoft Windows software a dynamically linked library called OptoPM32 dll The toolkit may be used with Microsoft Visual Basic or Visual C NOTE Release 2 0 and higher support only the PCI AC51 not the AC28 and PCI AC28 adapter cards The toolkit performs the following functions e Converts the data returned by Pamux to a form that is easily manipulated in a high level language e Transparently handles input masking on write operations for digital stations e Perf
18. oft Visual Basic or Visual C This guide includes two sections Chapter 1 Installing the PCI AC51 provides a Quick Start section to install the card Product Support information and specifications for the card Chapter 2 Programming with the PCI AC51 Toolkit in Windows includes a command reference as well as suggestions for customers moving from the AC28 or PCI AC28 adapter cards to the newer PCI AC51 adapter card For Help If you have problems installing or programming the PCI AC51 adapter card and cannot find the help you need in this guide contact Opto 22 Product Support Phone 800 TEK OPTO 835 6786 951 695 3080 NOTE Email messages Hours are Monday through Friday and phone calls to 7 a m to 5 p m Pacific Time Opto 22 Product Support are grouped together and Fax 991 695 3017 answered in the order Email support opto22 com ees O SEREN tae priority Opto 22 Web site support opto22 com When calling for technical support be prepared to provide the following information about your system to the Product Support engineer e PC configuration type of processor speed memory operating system and service packs e Acomplete description of your hardware and operating systems including additional accessories installed such as sound cards NICs etc type of power supply types of 170 units installed third party devices installed for example barcode readers e Software and version
19. ons in the Readme file in the software packet Installation automatically places the necessary files in the correct locations for the operating system you are using 4 PCI AC51 User s Guide INSTALLING THE PCI AC51 Testing the Card The easiest way to test the card is to use the PamScan PCI utility included in the PCI AC51 Toolkit Using PamScan PCI you can read and write directly to points on the 170 unit without going through your application Before testing attach the 170 unit using a flat HH series ribbon cable with a 50 pin header connector Connections are shown in the diagram below For additional information see Opto 22 form 726 Pamux User s Guide ue OPTO 22 TOUUUT APCrACS gy MUU aB BBa E sag BANORE ANARKI AKA ALLA Pin 1 PamScan PCI also serves as an application example as source code is provided for both Visual Basic and Visual C Sees Ld PamScan PCI File About PamScan PCI is a utility used to exercise Pamux I O for trouble shooting purposes I O can be read and outputs can be The main window appears as shown at right written 1 Locate PamScan PCI in the Toolkit folder under Demo Apps Double click PamScan PCI to launch it A A Things to do PCI AC51 2 Enter the board s ID number in the Board ID field me poe rash E board ID PCI board ID numbers start at zero p e ls an appropriate to match the brain 3 Set the Reset Level
20. orld of Peripheral Component Interconnect PCI a local bus standard developed by Intel The PCI AC51 adapter card is an ideal choice for customers who must replace an older ISA bus based PC that currently uses an Opto 22 AC28 adapter card The PCI AC51 is compatible with computers that feature a 33 MHz PCI bus Note that the PCI AC51 requires a 5 0 and 3 3 volt environment NOTE The PCI AC51 itself is no faster than its ISA cousin the AC28 but it is the better choice if you have no available ISA slots or available I O addresses The PCI AC28 is not recommended for new designs use the PCI AC51 instead With the PCI AC51 adapter card your PCI computer can communicate with Opto 22 classic B4 B5 and B6 brain boards and with SNAP B4 and SNAP B6 brains e Each Pamux bus can access up to 32 remote brains e Each Pamux bus supports up to 512 points e Up to 32 PCI AC51s are supported by the PCI AC51 Toolkit System Requirements Operating System Microsoft Windows 2000 Windows XP Development Environment Microsoft Visual Basic 6 0 Microsoft Visual C 6 0 Hardware Requirements Platform x86 compatible processor 1 GHz or higher The most recent version of BIOS must be installed PCI AC51 User s Guide 1 INSTALLING THE PCI AC51 Specifications Specifications for the PCI AC51 are shown below Power requirements 5 VDC 500 mA 3 3 VDC 300 mA Toolkit compatibility 32 b
21. orms error checking and returns diagnostic codes To use the toolkit in your application program you need to know the following e How to call a subroutine or function from the language you chose for your application e How to tell the toolkit what Pamux command to send by assigning values to parameters e How to interpret the data passed back by the toolkit The PCI AC51 toolkit may be used only with the PCI AC51 adapter card PCI AC51 User s Guide 7 PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS Installation The PCI AC51 toolkit comes on a CD with the card If you do not have the CD you can order it through Product Support or you can download the toolkit free from our Web site www opto22 com products softdevkits asp Pamux Functions Required Function Calls For many applications only four Pamux functions are required 1 Open a PCI AC51 to get a handle 2 Configure outputs 3 Read and write to 170 4 Close the PCI AC51 when the application is about to end Naming Conventions Function names in the Pamux library start with Pamux Example PamuxDigPointRead Function names follow the object operation format with the object first and the operation second Example PamuxDigPointRead where PamuxDigPoint the object is first and Read the operation follows Utility functions provided primarily for Visual Basic start with PamuxUtil Example PamuxUtilBitEqual Specific
22. s recently powered up due to a needs configuring manual power enable or from a power dip event causing the brain to reset This brain may require special reconfiguration 8200 0x2008 B6 didn t update PC The rate of the PC s polling is very fast This is not an polling too quick error It only indicates that the application should be modified to decrease the analog scan intervals This code may be seen on faster CPU computers 8201 0x2009 Watchdog timeout has The brain reports a watchdog timeout This is caused occurred when a communication cycle to the bus exceeds the watchdog timeout time 8202 0x200A Wrong OptoPMux DLL This error indicates that a call was made to a function that trying to open ISA card is not currently supported in this version of the OptoPM32 DLL 8203 0x200B Board ID doesn t exist in The PCI board number matching the Opto 22 vendor ID system 0x148A and device ID 0OxAC51 could not be found Remember that board IDs start from zero and end at n 1 where n is the number of boards PCI AC51 User s Guide 17 PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS e Code Code Description Remedy Decimal Hex 8204 0x200C A closed handle tried to The handle that was sent to this function is closed This be used may represent corruption of the handle failure to successfully open the handle or a PamuxPCICardClose may have been previously executed on this handl
23. support a reset level function 8388 0x20C4 The device layer could Another open is blocking the requested device Call not create a handle Product Support if this error is detected 8389 Ox20C5 The requested PCI With a DOS prompt box try the command wdreg install board doesn t exist or If this command fails reinstall the toolkit Otherwise call the device layer is Product Support improperly configured 8390 0x20C6 The PCI board failed to Try on a system with a newer PCI BIOS or see if the register with the PCI manufacturer has a PCI BIOS or BIOS ugrade for the BIOS system 18 PCI AC51 User s Guide PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS Converting Applications to the PCI AC51 This section describes how to convert applications that used the AC28 and PCI AC28 adapter cards Applications that Used the OptoPMUX DLL for the AC5 The Windows 32 PCI version of this library does not support the AC5 adapter card Special historic versions of the OptoPMux dll supported the AC5 This support is not possible due to independent hardware identification issues and the PCI bus For more information please see the PCI AC5 and AC5 User s Guide Opto 22 form 1211 Converting Applications that Use Inp and Outp This PCI toolkit library provides a consistent application code model for Windows 2000 and Windows XP operating systems Inp and Outp function calls at the user level are unsupported beca
24. tions return an integer error number Zero indicates no error You may see the following error codes when working with the PCI AC51 Toolkit Code Code Description Remedy Decimal Hex 0 0x0000 No Error Occurred Not an error 8192 0x2000 Invalid Handle The handle that was passed to the OptoPM32 DLL is invalid The handle may represent a closed handle or the value of the handle may be corrupted Inspect when the handle flaw is first detected and ensure that the handle was allocated with a successful open Also trace a sudden change in the value of the handle The handle should remain static between a PamuxPCICardOpen and a PamuxPClCardClose 8193 0x2001 Bad bank number used The bank number specified is either less than zero or greater than 63 8194 0x2002 Bad I O port used A historic WinRT error that doesn t apply to the OptoPM32 DLL 8195 0x2003 Out of handles to The PCI AC51 you attempted to open is already open allocate 8196 0x2004 The Opencommand has Not currently used in the OptoPM32 DLL conflicting parameters 8197 0x2005 Point number is bad The point argument is lower than zero or greater than 7 8198 0x2006 Could not acquire The attempt to gain access to the B6 or SNAP B6 analog access to B6 DPRAM memory failed This is not an error it may mean that the brain was involved in reading and writing to this memory array 8199 0x2007 Power up clear B6 The B6 or SNAP B6 wa
25. to match the brain configuration jumpers After configuring the PCI AC51 on the Pamux bus PCI AC51 We recommend that the Reset Level be set to Low If the computer is turned off while racks and brains are still running some of the outputs may change state If the Reset Level is set to Low however in this situation the brains will reset and the system will go to a safe state Reset level is indicated by LED 1 if reset level is low LED 1 is on See page 2 IMPORTANT The reset level set here and the reset level set on all the Pamux brains in your system must match i Board ID Reset Level Low v Last Error 0 Description Open PCI Card Config Adapter PCI AC51 User s Guide 5 INSTALLING THE PCI AC51 4 Click Open PCI Card EJ PamScan PCI Nisi x File About HO Address Bank lo I Analog Out Read Write Data Out Read Write Data cv fon oT fon oT fon oT fon oT fon 10 T fn 03 T fon nro 04 T er 127 fon 6 T fon 13 0 fon oT fon 147 fon oT fon 16 T fon ae F Hex T Auto Read an e Date chanae fo Description Config Adapter Exit PCI Debug Disable 5 Test the card by doing any of the following e Update the brain s address e Click the Read button and watch as points are updated e To write to a point click to put a check mark in the Out box Enter a value in the field that appears Click the Write button to write to that point e Check Auto Read or Aut
26. use of the Windows hardware abstraction layer The PCI AC51 interfaces to the existing Pamux interface by mimicking the 50 wire IDC connector and the Pamux timing interface The hardware model to the PC is radically different compared to the AC28 The AC28 relied on jumper settings for configuration but the PCI AC51 has no jumpers The primary advantage of converting your application to this library is the encapsulation of the Pamux functions This library provides high level functionality as opposed to setting and clearing bits Additionally porting the application to a 32 bit operating system takes advantage of 32 bit optimized processors and other current operating system features For the Windows 95 98 or Windows NT Historic OptoPMux User This new library eliminates the need for a WinRT OptoPort utility Each PCI card is referenced by PCI slot number The lowest numbered board zero is the PCI AC51 installed in the lowest PCI slot number and bus number Note that internal PCI slot numbers have no correlation with any SLOT number that may appear on the motherboard You may want to use a cyclic reset command to flash the LEDs on and off in order to identify the board in a final application The follovving tables list obsolete and changed functions PCI AC51 User s Guide 19 PROGRAMMING WITH THE PCI AC51 TOOLKIT IN WINDOWS Functions No Longer in Use Function Comments PamuxDigBankWriteFast Always returns an incorrect DLL
27. version error number 022_PM_WRONG_PMUX_DLL Use the new function PamuxDirectWrite PamuxDigBankReadFast Always returns an incorrect DLL version error number 022_PM_WRONG_PMUX_DLL Use the new function PamuxDirectRead PamuxCardOpen Always returns an incorrect DLL version error number 022 PM VVRONG PMUX DLL Use the new function PamuxPClCardOpen PamuxCardClose Always returns an incorrect DLL version error number 022_PM_WRONG_PMUX_DLL Use the new function PamuxPClCardClose Changed Functions Function Comments PamuxDigloPortGet Historic function used an absolute I O port address to generate references Since the PCI card hides the base address of the hardware this function is modified to only compute the bank number and the point number PamuxCardSetReset Always returns an incorrect DLL version error number O22 PM VVRONG PMUX DLL This ISA function sets the reset level of the Pamux bus Special Precautions for the Software Developer No exclusive access The PCI AC51 Toolkit allows up to 32 PCI AC51 cards to be used Only a single handle to a card is permitted If you use a multiple threaded application implement a mutex on the handle to avoid thread collision If multiple applications are required to access the hardware another application is required to synchronize the access Multiple applications cannot access the PCI AC51s simultaneously 20 PCI AC51 User s Guide
Download Pdf Manuals
Related Search
Related Contents
「製品安全の知識」パンフレットダウンロードはこちら(PDF Plugin ORBIT SOLARTRON Garmin 3000 Marine GPS System User Manual user manual n40a programmer 98-04-13919 for n40 バタフライバルブ エア式 TA・TW 型 取扱説明書 フル ページ写真 Vermont Casting 1610CE User's Manual MV protection relay Installation assistance guide Sepam ranges Otoscope Digital MacroView - Mode d`emploi Voyager® PRO UC v2 BT300 Copyright © All rights reserved.
Failed to retrieve file