Page 1
PCI-AC51 AND PCIE-AC51 USER’S GUIDE Form 1459-131106—November 2013 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 7
These cards are an ideal choice for customers who must replace an older ISA bus-based PC that currently uses an Opto 22 AC28 adapter card. NOTE: The PCI-AC28 is not recommended for new designs. Use the PCI-AC51 or the PCIe-AC51 instead. Using the PCI-AC51 or PCIe-AC51 adapter card, your computer can communicate with Opto 22 classic B4, B5, and B6 brain boards and with SNAP-B4 and SNAP-B6 brains.
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 or PCIe-AC51 using the Pamux Systems SDK, this ®...
Page 9
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 and PCIe-AC51 User’s Guide...
Page 10
FOR HELP PCI-AC51 and PCIe-AC51 User’s Guide...
Chapter 2 2: Installing the Card Follow the steps below to install the PCI-AC51 or PCIe-AC51 adapter card before you install the SDK software. Use any available expansion slot on the computer. You may add multiple adapter cards for convenience, but note that multiple cards do not increase Pamux throughput.
3. Starting with the connector end that allows the cable to lie flat, push the ribbon cable through one of the slot openings in the computer. 4. Run the cable across the top of the adapter card (so it covers the card) and attach the cable to the card, as shown. PCI-AC51 and PCIe-AC51 User’s Guide...
Page 13
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 adapter card. See Appendix C: Converting Applications to a Newer Card for specific information. PCI-AC51 and PCIe-AC51 User’s Guide...
Page 14
INSTALLING THE PCIE-AC51 PCI-AC51 and PCIe-AC51 User’s Guide...
Using the SDK on Windows 2000/XP..........page 16 Pamux Bus Reset Line................page 26 Special Precautions for the Software Developer ......page 27 NOTE: Version 2.0 and higher support only the PCI-AC51 or PCIe-AC51—not the AC28 and PCI-AC28 adapter cards. Running the SDK Setup Program The Pamux Systems SDK comes on the CD with the card.
Page 16
For Windows 8, Windows 7, and Vista, choose the 64-bit version or the 32-bit version. Select the operating system 4. If a Windows Security dialog box appears, click the Run or Install button to continue. PCI-AC51 and PCIe-AC51 User’s Guide...
The Pamux Systems SDK includes a driver, sample applications, and tools to help you develop applications for the PCI-AC51 or PCIe-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 18
Reset level Card selector button 3. If you have more than one PCI-AC51 or PCIe-AC51card installed, click the card selector button. NOTE: Normally you will use the default Adapter Card ID, which is 0. 4. In the dialog box that opens, select a card.
Page 19
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 and PCIe-AC51 User’s Guide...
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 Before you begin: • Add the PCIAC51.dll as a reference to your project. PCI-AC51 and PCIe-AC51 User’s Guide...
To open the function reference, go to the Start menu on your computer and select Start > All Programs > Opto 22 > PCI-AC51 > PCI-AC51 and PCIe-AC51 Function Reference. If your browser blocks the ActiveX controls, make sure to unblock them so that you can see the navigation pane.
This section shows you what’s in this version of the Pamux Systems SDK and how to use it to simplify application development with the PCI-AC51 or PCIe-AC51 adapter card. NOTE: If you are migrating current applications to use with the newer PCI or PCIe card, also see...
The Pamux Systems SDK includes a driver, sample applications, and tools to help you develop applications for the PCI-AC51 or PCIe-AC51 adapter card and integrate it with your system. The driver saves you time and effort by providing a simplified interface between input/output modules and application programs written in Microsoft Visual C++ and Visual Basic.
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 and PCIe-AC51 User’s Guide...
CHAPTER 3: SETTING UP AND USING THE SDK Function Reference for Windows 2000/XP The functions listed in this section include parameters and descriptions. All descriptions that mention the PCI-AC51 also apply to the PCIe-AC51. PCI-AC51 or PCIe-AC51 Operations Function Function...
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 and PCIe-AC51 User’s Guide...
Type long hHandle Provides the Pamux metrics needed: the long * pBank long PamuxDigIoPortGet PCI-AC51 or PCIe-AC51 handle, the bank long number, and the point number. * pPoint long * pIoPort long hHandle Reads one byte (eight bits) from the specified...
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 and PCIe-AC51 User’s Guide...
“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 and PCIe-AC51 User’s Guide...
(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 and PCIe-AC51 User’s Guide...
(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 and PCIe-AC51 User’s Guide...
One consideration is how you want your system to function if the computer loses power. Without power to the computer, the PCI-AC51 or PCIe-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.
If multiple applications are required to access the hardware, another application is required to synchronize the access. Multiple applications cannot access the cards simultaneously. PCI-AC51 and PCIe-AC51 User’s Guide...
Page 34
SPECIAL PRECAUTIONS FOR THE SOFTWARE DEVELOPER PCI-AC51 and PCIe-AC51 User’s Guide...
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 36
(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 37
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 and PCIe-AC51 User’s Guide...
Page 38
ERROR CODES FOR WINDOWS 2000/XP PCI-AC51 and PCIe-AC51 User’s Guide...
This appendix provides system requirements, card specifications, and information on card LEDs. System Requirements Here’s what you need to install and run the software provided for the PCI-AC51 and PCIe-AC51: • A computer with x86 compatible processor, 1 GHz or higher. The most recent version of BIOS must be installed.
Write Blinks when a Pamux write is executed. • Read 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 and PCIe-AC51 User’s Guide...
Reset Indicates the state of the reset line, which can be either High or Low (On = High). • Hardware Blinks when the PCIe-AC51 is accessed. NOTE: If the PCIe-AC51 is rapidly or continually accessed, the blinking indicators may appear to stick on (will not blink). This is normal. PCI-AC51 and PCIe-AC51 User’s Guide...
Page 42
LEDS PCI-AC51 and PCIe-AC51 User’s Guide...
XP operating systems. Inp() and Outp() function calls at the user level are unsupported because of the Windows hardware abstraction layer. The PCI-AC51 and PCIe-AC51 interface 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.
Page 44
CONVERTING APPLICATIONS THAT USE INP( ) AND OUTP( ) PCI-AC51 and PCIe-AC51 User’s Guide...
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.
ARCHITECTURE Architecture The PCI-AC51 and PCIe-AC51 cards contain an Altera FPGA (U8 on the PCI-AC51 and U1 on the PCIe-AC51). The Altera FPGA implements the PCI or PCI Express interface to the host computer, regulating data transactions between the host computer and the adapter card while also providing adapter card configuration information to the host computer's BIOS.
Pamux write cycle. The Read Status bit is 1 if the current or last Pamux bus cycle was a Pamux read. Switch/Jumper Register (0x05) Provides state of the switches on the PCI-AC51 or state of the jumpers on the PCIe-AC51. Custom driver applications may use S1 through S4 (or J1 through J4) in any desired fashion.
• ResetBrainsAndReturnToNormal() Controlling the Reset Line When Not Using the Pamux Driver Bit 0 of the Reset Control Register on the PCI-AC51 and the PCIe-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.
Pamux settings. • The PCI-AC51 has six DIP switches (the DS1 bank). A switch in the ON position reads as a zero and OFF reads as a one. The card is shipped with all switches in the ON position. •...
AC28’s with a Lattice chip). When S5 is on (PCI-AC51) or jumper 5 is not installed (PCIe-AC51), the card maintains the last AC28 (Rev K) timing specification, 2,700 ns. Switching to the 3,300 ns setting may improve long cable issues.
Reading the Switch Values The bit positions in the register correspond to the switches or jumpers on the board: • PCI-AC51—A switch in the on position reads as a zero. • PCIe-AC51—An uninstalled jumper reads as a zero. Polled PCI-AC51 and PCIe-AC51 Operation NOTE: All of the directions assume a byte-wide access to the card.
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 or PCIe-AC51, use the Pamux_Set_Slow_Bank_Range function.
Need help?
Do you have a question about the PCI-AC51 and is the answer not in the manual?
Questions and answers