Hide thumbs Also See for PCI-AC51:
Table of Contents

Advertisement

Quick Links

PCI-AC51 USER'S GUIDE
Form 1459-121024—October 2012
43044 Business Park Drive
Temecula
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

Advertisement

Table of Contents
loading

Summary of Contents for OPTO 22 PCI-AC51

  • Page 1 PCI-AC51 USER’S GUIDE Form 1459-121024—October 2012 43044 Business Park Drive Temecula 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...
  • Page 2 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.
  • Page 3: Table Of Contents

    Chapter 2: Installing the PCI-AC51 ........
  • Page 4 Appendix D: PCI-AC51 Technical Reference ........37...
  • Page 5: Chapter 1: Introduction

    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.
  • Page 6: 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, the Pamux User’ s Guide. If you are going to program the PCI-AC51 using the PCI-AC51 SDK, this guide assumes that ®...
  • Page 7 CHAPTER 1: INTRODUCTION – third-party devices installed (for example, barcode readers) • Software and version being used • Specific error messages and/or numbers seen. PCI-AC51 User’s Guide...
  • Page 8 FOR HELP PCI-AC51 User’s Guide...
  • Page 9: Chapter 2: Installing The Pci-Ac51

    Chapter 2 2: Installing the PCI-AC51 Follow the steps below to install the PCI-AC51 adapter card before you install the SDK software. The PCI-AC51 adapter card installs into any PCI expansion slot of a PCI-capable computer. The OptoPM32.dll supports a maximum of 64 of these cards. The newer Windows 7 driver does not have a card limit.
  • Page 10 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 Appendix C: Converting Applications to the PCI-AC51 for specific information. PCI-AC51 User’s Guide...
  • Page 11: Chapter 3: Setting Up And Using The Sdk

    NOTE: Version 2.0 and higher support only the PCI-AC51—not the AC28 and PCI-AC28 adapter cards. Running the SDK Setup Program The PCI-AC51 SDK 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 free from our website, www.opto22.com.
  • Page 12 RUNNING THE SDK SETUP PROGRAM There is a 64-bit version and a 32-bit version for Windows 7 and Vista. Select the operating system 4. If a Windows Security dialog box appears, click the Run or Install button to continue. PCI-AC51 User’s Guide...
  • Page 13: Using The Sdk On Windows 7 And Vista

    The PCI-AC51 SDK includes a driver, sample applications, and tools to help you develop applications for the PCI-AC51 adapter card and integrate it with your system. The SDK saves you time and effort that would otherwise be spent learning the intricacies of the Pamux bus structure.
  • Page 14 5. Optional Step—Flash LEDs: This step is optional because it requires you to open your computer in order to see the LEDs on the PCI-AC51 card. a. With your computer open so that you can see the LEDs, choose the PCI-AC51 card, and then click the Flash LEDs button.
  • Page 15 Match the bank’s address on the rack Select the I/O type 8. Select the I/O type, either Analog or Digital. 9. For output modules: select each point that is an output, then click Configure Selected Points As Outputs. PCI-AC51 User’s Guide...
  • Page 16: Developing An I/O Application

    “On” Click here 11. Continue to experiment as you like with selecting points, configuring points as inputs or outputs, and turning points on and off. Developing an I/O Application Your application should include the following basic steps. PCI-AC51 User’s Guide...
  • Page 17: Function Reference For Windows 7 And Vista

    To open the function reference, go to the Start menu on your computer and select Start > All Programs > Opto 22 > PCI-AC51 > PCI-AC51 Function Reference. If your browser blocks the ActiveX controls, make sure to unblock it so that you can see the navigation pane.
  • Page 18: Vista

    Use this section if you have Windows 2000/XP. If you are using the SDK for Windows 7 or Vista, see “Using the SDK on Windows 7 and Vista” on page This section shows you what’s in this version of the PCI-AC51 SDK and how to use it to simplify application development with the PCI-AC51 adapter card.
  • Page 19: Pamux Functions

    1. Open a PCI-AC51 to get a handle. 2. Configure outputs. 3. Read and write to I/O. 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. ”...
  • Page 20: Developing An I/O Application

    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 SDK under \Vc\VC Project Includes. PCI-AC51 User’s Guide...
  • Page 21: Function Reference For Windows 2000/Xp

    Type long Opens access to a PCI-AC51 card. * phHandle phHandle gets a handle. long BoardID is the PCI-AC51 ID. The first PCI-AC51 BoardID is at ID 0. long PamuxPCICardOpen ResetLevel ResetLevel: 1 = high reset; 0 = low reset. Set...
  • Page 22: Digital Bank Operations

    PamuxDigBankWrite for writing to eight long PamuxDigBank16Write long Bank points, PamuxDigBank16Write for 16 points, or PamuxDigBank32Write for 32 long Data points. long hHandle long PamuxDigBank32Write long Bank long Data * Note for Visual Basic users: * indicates a “by reference” argument. PCI-AC51 User’s Guide...
  • Page 23: Digital Point Operations

    Type Type long hHandle Provides the Pamux metrics needed: the long * pBank long PamuxDigIoPortGet PCI-AC51 handle, the bank number, and the long point number. * pPoint long * pIoPort long hHandle Reads one byte (eight bits) from the specified...
  • Page 24: Analog Bank Operations

    Reads the value of an analog point. long Point long * pData long hHandle long Bank long PamuxAnaPointWrite Writes the value in Data to an analog point. long Point long Data * Note for Visual Basic users: * indicates a “by reference” argument. PCI-AC51 User’s Guide...
  • Page 25: Analog Watchdog Operations

    “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. * Note for Visual Basic users: * indicates a “by reference” argument. PCI-AC51 User’s Guide...
  • Page 26: Pamux Utility Operations

    (1 or 0) val- long void PamuxUtilBitUnPackI2Array SourceInt ues. Qty indicates the number of bits long to be packed or unpacked. * Note for Visual Basic users: * indicates a “by reference” argument. PCI-AC51 User’s Guide...
  • Page 27: Scaling Operations

    (from 0 to FFF hex) to a percentage, use: float float fPercent=PamuxUtilScaleI2F float PamuxUtilScaleF2F float (0,0xFFF,0.0,100.0,RawCount); float float float float long PamuxUtilScaleF2I long long float * Note for Visual Basic users: * indicates a “by reference” argument. PCI-AC51 User’s Guide...
  • Page 28: Pamux Bus Reset Line

    One consideration is how you want your system to function if the computer loses power. Without power to the computer, the PCI-AC51 cannot drive the reset line high, so by default it will be low. You would want to analyze your system needs to determine what is necessary for your system to automatically go into failsafe mode.
  • Page 29: Special Precautions For The Software Developer

    Special Precautions for the Software Developer No exclusive access—The PCI-AC51 SDK 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.
  • Page 30 SPECIAL PRECAUTIONS FOR THE SOFTWARE DEVELOPER PCI-AC51 User’s Guide...
  • Page 31: Appendix A: Error Codes

    PCIAC51_Card object, depending on what function was called. All error or warning messages are also logged in the Application area of the Event Log. The messages will be grouped under the application name, “Opto 22 PCI-AC51. ” Error Codes for Windows 2000/XP In general, most functions return an integer error number.
  • Page 32 (trying to open ISA card) OptoPM32.DLL. The PCI board number matching the Opto 22 vendor ID Board ID doesn’t exist in (0x148A) and device ID (0xAC51) could not be found. 8203...
  • Page 33 The PCI board failed to Try on a system with a newer PCI-BIOS or see if the manu- 8390 0x20C6 register with the PCI facturer has a PCI-BIOS or BIOS ugrade for the system. BIOS. PCI-AC51 User’s Guide...
  • Page 34 ERROR CODES FOR WINDOWS 2000/XP PCI-AC51 User’s Guide...
  • Page 35: Appendix B: Requirements, Specifications, & Leds

    LEDs. System Requirements Here’s what you need to install and run the software provided for the PCI-AC51: • A computer with x86 compatible processor, 1 GHz or higher. The most recent version of BIOS must be installed.
  • Page 36: Specifications

    Windows 7 and Vista, 32-bit and 64-bit (supports C#, VB.NET, and other .NET languages) PCI compliance PCI Specification Revision 2.2 Opto 22 brain compatibility B4, B5, B6, SNAP-B4, SNAP-B6 Four, indicating board access, LEDs reset level, read, and write Operating temperature 0 to 70 °C...
  • Page 37: Leds

    LED3 Blinks when a Pamux write is executed. • LED4 Blinks when a Pamux read is executed. NOTE: If the PCI-AC51 is rapidly or continually accessed, the blinking indicators may appear to stick on (will not blink). This is normal. PCI-AC51 User’s Guide...
  • Page 38 LEDS PCI-AC51 User’s Guide...
  • Page 39: Appendix C: Converting Applications To The Pci-Ac51

    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.
  • Page 40 CONVERTING APPLICATIONS THAT USE INP( ) AND OUTP( ) PCI-AC51 User’s Guide...
  • Page 41: Appendix D: Pci-Ac51 Technical Reference

    Windows kernel-mode driver. The information provided is as-is; you use this information at your own risk. Opto 22 does not support any kernel layer or drivers other than those we provide.
  • Page 42: Architecture

    ARCHITECTURE Architecture The PCI-AC51 PCI card contains two primary components, an AMCC 5920 PCI Target (U1) and a custom programmed Opto 22 Pamux State machine (U2). The PCI Target provides a PCI interface between the Pamux State Machine and the host computer’s local PCI Bridge. The PCI target also provides adapter card configuration information to the host computer’s PCI BIOS configuration.
  • Page 43: Register Description

    Pamux write cycle. The Read Status bit is 1 if the current or last Pamux bus cycle was a Pamux read. Switch Register (0x05) Provides state of the switches on the PCI-AC51. Custom driver applications may use S1 through S4 in any desired fashion. S5 and S6 may be verified for proper hardware settings.
  • Page 44: Powerup Conditions

    ResetBrainsAndReturnToNormal() Controlling the Reset Line When Not Using the Pamux Driver Bit 0 of the Reset Control Register on the PCI-AC51 is used to control the reset line. • When bit 0 is set to 0, the reset line will be HIGH and LED 1 will be ON.
  • Page 45: Default Power-Up State Of Reset Line

    Default Power-Up State of Reset Line When a computer with a PCI-AC51 card installed has just been powered up, bit 0 of the reset control register will be in its default power-up condition, which is a bit value of 0. This will drive the reset line HIGH and turn LED 1 (reset line) ON.
  • Page 46: Strobe Duration

    PCs are capable of performing back-to-back bus cycles with nearly no delay (as little as 60 ns). The PCI-AC51 (state machine version 2) enforces idle time between bus cycles. When S6 is on (high latency mode), 3,600 ns of idle time is added between each bus cycle. This means the busy bit may be busy for as much as 7,700 ns.
  • Page 47: Reading The State Machine Version

    APPENDIX D: PCI-AC51 TECHNICAL REFERENCE Reading the State Machine Version Read the Version Register. All 8 bits of the register are significant to the state machine’s implementation revision. This register is independent of all Pamux operations. It may be read without impact to any current operations the state machine is performing.
  • Page 48: Notes For The Snap-B6 (Digital Aspect)

    2. Allow a 2 millisecond delay before the next register operation occurs. 3. For PCIAC51.dll, use Set Slow Mode Delay( ) and Enable Slow Mode( ) to control the timing of operations. If you are using the OptoPM32.dll for the PCI-AC51, use the Pamux_Set_Slow_Bank_Range function.

Table of Contents