Aim MIL-STD-1553 User manual

MIL-STD-1553
Interface Module
programmers guide
reference manual
AIM GmbH
Sasbacher Str. 2
79111 Freiburg, Germany
Tel: +49-761-45229-0
Fax: +49-761-45229-33
sales@aim-online.com
www.aim-online.com
April 2015
V22.9x Rev. F


MIL-STD-1553
Reference Manual
MIL-STD-1553 TEST AND SIMULATION INTERFACE
MODULE
AyX1553-1/-2/-4/-8
AyI1553-1/-2
AMC1553-1/2/4/T (PMC Version)
APM1553-1 (PC-Card Version)
AP104-1553-1/2/4 (PC104+ Version)
APU1553-1/2 (USB Version)
AEC1553-1/2 (ExpressCard Version)
APE1553-1/2/4/DS (PCIe Version)
AXC1553-1/2/4/T (XMC Version)
AMCX1553-1/2/4/T (PMC Version)
ACXX1553-1/2/4 (PXI Version)
ACE1553-1/2/4 (PXIe Version)
V22.9X Rev. F
April 2015
AIM No. 60-11900-36-229X-F

ii
AIM WORLDWIDE
AIM GmbH
Sasbacher Str. 2
79111 Freiburg, Germany
+49-761-45 22 90
sales@aim-online.com
Munich Sales Office
Terofalstrasse 23 a
80689 Muenchen
+49-89-70 92 92 92
salesgermany@aim-online.com
AIM-USA
Seven Neshaminy Interplex
Suite 211
TREVOSE, PA 19053
267-982-2600
877-520-1553
salesusa@aim-online.com
AIM UK
Cressex Business Park
Lincoln Rd, High Wycombe
Bucks HP12 3RB, England
+44-1494-44 68 44
salesuk@aim-online.com
Notice: The information that is provided in this document is believed to be accurate. No
responsibility is assumed by AIM for its use. No license or rights are granted by implication in
connection therewith. Specifications are subject to change without notice.
©Copyright 1999-2015 AIM
www.aim-online.com

iii
DOCUMENT HISTORY
The following table defines the history of this document. Appendix A provides a more
comprehensive list of changes made with each version.
Version
Cover Date
Created by
Description
V10.01
10.02.2000
Rolf Heitzmann
See Appendix A for details
V10.01 Rev A
18.02.2000
Rolf Heitzmann
See Appendix A for details
V11.01
05.09.2000
Rolf Heitzmann
See Appendix A for details
V12.0x
31.07.2000
Patrick Giesel
See Appendix A for details
V12.0x
Revision –A -
09.08.2000
Patrick Giesel
See Appendix A for details
V12.1x
27.10.2000
Patrick Giesel
See Appendix A for details
V13.0x
22.01.2001
Patrick Giesel
Rolf Heitzmann
See Appendix A for details
V16.0x
25.10.2002
Patrick Giesel
See Appendix A for details
V17.0x
10.01.2003
Michael Riedinger
See Appendix A for details
V17.0x Rev. A
16.06.2003
J. Furgerson
See Appendix A for details
V18.0x
29.08.2003
Thomas Jahn
J. Furgerson
See Appendix A for details
V18.1x Rev. A
06.11.2003
Patrick Giesel
See Appendix A for details
V19.0x Rev. A
12.03.2004
Patrick Giesel
See Appendix A for details
V19.0x Rev. B
14.04.2004
Patrick Giesel
Corrected phone number
Changed page i to a common layout
V19.0x Rev. C
19.04.2004
Frank Schmid
Small corrections
V19.1x Rev. A
29.12.2004
Patrick Giesel
See Appendix A for details
V19.2x Rev. A
24.02.2005
Patrick Giesel
See Appendix A for details
V19.2x Rev. B
05.04.2005
Jochen Pfaadt
See Appendix A for details
V19.3x Rev. A
03.02.2006
Patrick Giesel
See section 2 for details
V19.3x Rev. B
07.02.2006
Patrick Giesel
See Appendix A for details
V19.4x Rev. A
27.06.2006
Patrick Giesel
See Appendix A for details
V19.5x Rev. A
11.01.2007
Patrick Giesel
See Appendix A for details
V19.5x Rev. B
12.03.2007
Jochen Pfaadt
See Appendix A for details
V19.5x Rev. C
27.07.2007
S. Riedinger
Unify names of products
V19.8x Rev. A
04.10.2007
Patrick Giesel
See Appendix A for details
V21.0x Rev. A
24.04.2009
Patrick Giesel
See Appendix A for details
V21.0x Rev. B
25.06.2009
Martin Haag
ApiInstIntHandler added BIU3, 4
V21.1x Rev. A
15.07.2009
Martin Haag
See Appendix A for details
V21.2x Rev. A
27.07.2009
Martin Haag
See Appendix A for details
V21.3x Rev. A
08.09.2009
Martin Haag
No changes
V21.4x Rev. A
09.09.2009
Martin Haag
No changes
V21.5x Rev. A
16.09.2009
Martin Haag
New hardware AP104-1553-1/2/4
V21.5x Rev. B
30.10.2009
Markus Melcher
Renamed Manual for use with Linux
BSP
V21.5x Rev. C
03.11.2009
Markus Melcher
Formatting corrections
V21.5x Rev. D
03.11.2009
Markus Melcher
Formatting corrections
V21.6x Rev. A
21.04.2010
Martin Haag
Added APU1553
See Appendix A for details

iv
V21.6x Rev. B
06.08.2010
Thomas Jahn
New AIM-USA address
V21.6x Rev. C
14.09.2010
Jochen Pfaadt
See Appendix A for details
V21.7x Rev. A
12.2010
Jochen Pfaadt
Some cosmetic changes
V22.0x Rev. A
07.01.2010
Martin Haag
See Appendix A for details
V22.1x Rev. A
09.08.2011
Martin Haag
See Appendix A for details
V22.3x Rev. A
18.01.2012
Martin Haag
See Appendix A for details
V22.3x Rev. B
13.04.2012
Martin Haag
Jochen Pfaadt
See Appendix A for details
V22.5x Rev. A
20.07.2012
Martin Haag
See Appendix A for details
V22.6x Rev. A
03.08.2012
Martin Haag
See Appendix A for details
V22.7x Rev. A
07.12.2012
Martin Haag
See Appendix A for details
V22.7x Rev. B
21.12.2012
Martin Haag
QM review
V22.7x Rev. C
03.05.2013
Martin Haag
Added missing ApiExit function
V22.8x Rev. A
19.07.2013
Jochen Pfaadt
See Appendix A for details
V22.8x Rev. B
11.11.2013
Jochen Pfaadt
See Appendix A for details
V22.8x Rev. C
08.01.2014
Jochen Pfaadt
See Appendix A for details
V22.9x Rev. A
06.06.2014
Jochen Pfaadt
Martin Haag
See Appendix A for details
V22.9x Rev. B
11.06.2014
Martin Haag
QM Review
V22.9x Rev. C
28.07.2014
Martin Haag
See Appendix A for details
V22.9x Rev D
09.04.2015
Martin Haag
See Appendix A for details
V22.9x Rev E
14.04.2015
Martin Haag
QM Review
V22.9x Rev. F
21.04.2015
Martin Haag
QM Review

v
TABLE OF CONTENTS
Section Title Page
1INTRODUCTION .........................................................................................................1
1.1 Welcome.................................................................................................................1
1.2 How This Manual is Organized................................................................................1
1.3 Conventions Used...................................................................................................3
1.3.1 General Documentation Conventions..................................................................3
1.3.2 Naming Conventions...........................................................................................3
1.3.3 Function Call Documentation Conventions..........................................................5
1.3.3.1 Conventions for parameters ‘ul_ModuleHandle’ and ‘biu’......................................... 6
1.3.4 Function Calling Convention................................................................................6
1.3.5 Buffer Header ID, Buffer ID and Transfer ID Ranges...........................................7
1.4 Special Board Functionality.....................................................................................8
1.5 Applicable Documents.............................................................................................9
1.5.1 Industry Documents ............................................................................................9
1.5.2 AIM Document Family.........................................................................................9
1.6 C Header Files ......................................................................................................11
2LIBRARY ADMINISTRATION AND INITIALIZATION FUNCTIONS.......................... 13
2.1 General Library Administration Functions..............................................................15
2.1.1 ApiClose............................................................................................................15
2.1.2 ApiConnectToServer.........................................................................................16
2.1.3 ApiDelIntHandler...............................................................................................17
2.1.4 ApiDisconnectFromServer.................................................................................18
2.1.5 ApiExit...............................................................................................................19
2.1.6 ApiGetBoardInfo................................................................................................20
2.1.7 ApiGetDeviceConfig..........................................................................................24
2.1.8 ApiGetDriverInfo................................................................................................26
2.1.9 ApiGetErrorDescription .....................................................................................28
2.1.10 ApiGetLibraryInfo..............................................................................................29
2.1.11 ApiGetOpenErr..................................................................................................30
2.1.12 ApiGetServerInfo...............................................................................................31
2.1.13 ApiGetTcomStatus............................................................................................ 33
2.1.14 ApiGetTgEmul...................................................................................................34
2.1.15 ApiInit................................................................................................................35
2.1.16 ApiInstIntHandler...............................................................................................36
2.1.17 ApiOpen............................................................................................................43
2.1.18 ApiOpenEx........................................................................................................45
2.1.19 ApiPrintfOnServer .............................................................................................47
2.1.20 ApiSetDeviceConfig ..........................................................................................48
2.1.21 ApiSetDllDbgLevel ............................................................................................50
2.1.22 ApiSetTgEmul................................................................................................... 51
2.2 VME Intialization Functions ...................................................................................52
2.2.1 AiVmeExamineSlot ...........................................................................................52
2.2.2 Ai1553CheckModule.........................................................................................54
2.2.3 AiPciScan.......................................................................................................... 55
2.2.4 AiPciGetHeader ................................................................................................56
2.2.5 AiVmeInitGenericInterrupt.................................................................................57
2.2.6 AiVme1553MapModule.....................................................................................59
2.2.7 AiVme1553UnmapModule.................................................................................61

vi
3SYSTEM FUNCTIONS ..............................................................................................63
3.1 Low Speed Functions............................................................................................65
3.1.1 ApiCmdBite.......................................................................................................65
3.1.2 ApiCmdBiuIntrCheck (obsolete) ........................................................................70
3.1.3 ApiCmdDefMilbusProtocol.................................................................................71
3.1.4 ApiCmdDefRespTout ........................................................................................72
3.1.5 ApiCmdExecSys ...............................................................................................73
3.1.6 ApiCmdGetIrigTime...........................................................................................75
3.1.7 ApiCmdIni .........................................................................................................77
3.1.8 ApiCmdInitDiscretes..........................................................................................82
3.1.9 ApiCmdLoadSRec............................................................................................. 83
3.1.10 ApiCmdProgFlash............................................................................................. 85
3.1.11 ApiCmdPSCTimerCon ......................................................................................87
3.1.12 ApiCmdReadDiscretes...................................................................................... 89
3.1.13 ApiCmdReadSWVersion................................................................................... 91
3.1.14 ApiCmdReset.................................................................................................... 92
3.1.15 ApiCmdSetIrigTime...........................................................................................94
3.1.16 ApiCmdSyncCounterGet...................................................................................96
3.1.17 ApiCmdSyncCounterSet ...................................................................................99
3.1.18 ApiCmdSysFree..............................................................................................100
3.1.19 ApiCmdSysGetBoardInfo ................................................................................101
3.1.20 ApiCmdSysGetMemPartition........................................................................... 102
3.1.21 ApiCmdSysMalloc........................................................................................... 107
3.1.22 ApiCmdSysSetMemPartition........................................................................... 108
3.1.23 ApiCmdSysPXICon.........................................................................................111
3.1.24 ApiCmdSystagCon.......................................................................................... 114
3.1.25 ApiCmdSystagDef........................................................................................... 115
3.1.26 ApiCmdTimerIntrCheck...................................................................................118
3.1.27 ApiCmdTrackDef............................................................................................. 119
3.1.28 ApiCmdTrackDefEx......................................................................................... 122
3.1.29 ApiCmdTrackPreAlloc..................................................................................... 126
3.1.30 ApiCmdTrackRead..........................................................................................128
3.1.31 ApiCmdTrackReadEx...................................................................................... 130
3.1.32 ApiCmdTrackScan.......................................................................................... 133
3.1.33 ApiCmdWriteDiscretes.................................................................................... 135
3.1.34 ApiReadBSPVersion.......................................................................................137
3.1.35 ApiReadBSPVersionEx...................................................................................142
3.1.36 ApiReadRecData ............................................................................................146
3.1.37 ApiWriteRepData ............................................................................................148
4CALIBRATION FUNCTIONS .................................................................................. 151
4.1 Low Speed Functions.......................................................................................... 152
4.1.1 ApiCmdCalCplCon.......................................................................................... 152
4.1.2 ApiCmdCalSigCon ..........................................................................................154
4.1.3 ApiCmdCalTransCon (obsolete)...................................................................... 155
4.1.4 ApiCmdCalXmtCon.........................................................................................156
5BUFFER FUNCTIONS ............................................................................................ 157
5.1 Low Speed Functions.......................................................................................... 158
5.1.1 ApiBHModify ...................................................................................................158
5.1.2 ApiCmdBufC1760Con..................................................................................... 161
5.1.3 ApiCmdBufDef ................................................................................................163

vii
5.1.4 ApiCmdBufRead .............................................................................................165
5.1.5 ApiCmdBufWrite.............................................................................................. 167
5.1.6 ApiCmdRamRead (obsolete)........................................................................... 169
5.1.7 ApiCmdRamReadByte (obsolete)....................................................................170
5.1.8 ApiCmdRamReadDataset............................................................................... 171
5.1.9 ApiCmdRamReadLWord (obsolete)................................................................ 172
5.1.10 ApiCmdRamReadWord (obsolete).................................................................. 173
5.1.11 ApiCmdRamWrite (obsolete)...........................................................................174
5.1.12 ApiCmdRamWriteByte (obsolete).................................................................... 175
5.1.13 ApiCmdRamWriteDataset ...............................................................................176
5.1.14 ApiCmdRamWriteLWord (obsolete) ................................................................177
5.1.15 ApiCmdRamWriteWord (obsolete) .................................................................. 178
5.1.16 ApiReadBlockMemData..................................................................................179
5.1.17 ApiReadMemData........................................................................................... 181
5.1.18 ApiWriteBlockMemData ..................................................................................183
5.1.19 ApiWriteMemData........................................................................................... 185
6FIFO FUNCTIONS................................................................................................... 187
6.1 ApiCmdBCAssignFifo.......................................................................................... 188
6.2 ApiCmdFifoIni......................................................................................................189
6.3 ApiCmdFifoReadStatus.......................................................................................190
6.4ApiCmdFifoWrite .................................................................................................191
6.5 ApiCmdRTSAAssignFifo...................................................................................... 192
7BUS CONTROLLER FUNCTIONS.......................................................................... 193
7.1 Low Speed Functions.......................................................................................... 195
7.1.1 ApiCmdBCAcycPrep....................................................................................... 195
7.1.2 ApiCmdBCAcycSend ......................................................................................197
7.1.3 ApiCmdBCBHDef............................................................................................ 199
7.1.4 ApiCmdBCBHRead.........................................................................................203
7.1.5 ApiCmdBCDytagDef........................................................................................ 205
7.1.6 ApiCmdBCFrameDef....................................................................................... 208
7.1.7 ApiCmdBCGetDytagDef.................................................................................. 210
7.1.8 ApiCmdBCGetMajorFrameDefinition............................................................... 213
7.1.9 ApiCmdBCGetMinorFrameDefinition............................................................... 214
7.1.10 ApiCmdBCGetXferBufferHeaderInfo...............................................................216
7.1.11 ApiCmdBCGetXferDef..................................................................................... 217
7.1.12 ApiCmdBCHalt................................................................................................ 224
7.1.13 ApiCmdBCIni...................................................................................................225
7.1.14 ApiCmdBCInstrTblGen....................................................................................227
7.1.15 ApiCmdBCInstrTblGetAddrFromLabel ............................................................232
7.1.16 ApiCmdBCInstrTblIni....................................................................................... 233
7.1.17 ApiCmdBCMFrameDef....................................................................................234
7.1.18 ApiCmdBCMFrameDefEx................................................................................235
7.1.19 ApiCmdBCModeCtrl........................................................................................236
7.1.20 ApiCmdBCSrvReqVecCon..............................................................................238
7.1.21 ApiCmdBCSrvReqVecStatus ..........................................................................240
7.1.22 ApiCmdBCStart............................................................................................... 242
7.1.23 ApiCmdBCStatusRead....................................................................................244
7.1.24 ApiCmdBCXferCtrl.......................................................................................... 246
7.1.25 ApiCmdBCXferDef .......................................................................................... 247
7.1.26 ApiCmdBCXferDefErr...................................................................................... 256

viii
7.1.27 ApiCmdBCXferDescGet..................................................................................257
7.1.28 ApiCmdBCXferDescMod................................................................................. 258
7.1.29 ApiCmdBCXferRead .......................................................................................259
7.1.30 ApiCmdBCXferReadEx...................................................................................262
8REMOTE TERMINAL FUNCTIONS ........................................................................ 267
8.1 Low Speed Functions.......................................................................................... 268
8.1.1 ApiCmdRTBHDef............................................................................................ 268
8.1.2 ApiCmdRTBHRead.........................................................................................273
8.1.3 ApiCmdRTDytagDef........................................................................................ 275
8.1.4 ApiCmdRTEnaDis........................................................................................... 278
8.1.5 ApiCmdRTGetDytagDef..................................................................................279
8.1.6 ApiCmdRTGetSABufferHeaderInfo.................................................................282
8.1.7 ApiCmdRTGetSAConErr................................................................................. 284
8.1.8 ApiCmdRTGetSimulationinfo........................................................................... 287
8.1.9 ApiCmdRTGlobalCon...................................................................................... 291
8.1.10 ApiCmdRTHalt................................................................................................293
8.1.11 ApiCmdRTIni................................................................................................... 294
8.1.12 ApiCmdRTLCW............................................................................................... 296
8.1.13 ApiCmdRTLSW...............................................................................................297
8.1.14 ApiCmdRTModeCtrl........................................................................................298
8.1.15 ApiCmdRTMsgRead ....................................................................................... 300
8.1.16 ApiCmdRTMsgReadAll ...................................................................................302
8.1.17 ApiCmdRTNXW ..............................................................................................303
8.1.18 ApiCmdRTRespTime ...................................................................................... 304
8.1.19 ApiCmdRTRespTimeGet................................................................................. 305
8.1.20 ApiCmdRTSACon........................................................................................... 306
8.1.21 ApiCmdRTSAConErr....................................................................................... 308
8.1.22 ApiCmdRTSAMsgRead................................................................................... 311
8.1.23 ApiCmdRTSAMsgReadEx...............................................................................314
8.1.24 ApiCmdRTStart...............................................................................................318
8.1.25 ApiCmdRTStatusRead.................................................................................... 319
9BUS MONITOR FUNCTIONS.................................................................................. 321
9.1 Low Speed Functions.......................................................................................... 323
9.1.1 ApiCmdBMActRead ........................................................................................323
9.1.2 ApiCmdBMCapMode....................................................................................... 325
9.1.3 ApiCmdBMDytagMonDef ................................................................................327
9.1.4 ApiCmdBMDytagMonRead .............................................................................329
9.1.5 ApiCmdBMFilterIni .......................................................................................... 331
9.1.6 ApiCmdBMFTWIni .......................................................................................... 332
9.1.7 ApiCmdBMHalt................................................................................................333
9.1.8 ApiCmdBMIllegalIni.........................................................................................334
9.1.9 ApiCmdBMIni.................................................................................................. 335
9.1.10 ApiCmdBMIniMsgFltRec .................................................................................336
9.1.11 ApiCmdBMIntrMode........................................................................................338
9.1.12 ApiCmdBMReadMsgFltRec............................................................................. 339
9.1.12.1 Message Filter Recording Formats...................................................................... 341
9.1.12.1.1 0 .............................................................................................................342Format
9.1.12.1.2 Format 1 .............................................................................................................343
9.1.12.1.3 Format 2 .............................................................................................................344
9.1.12.1.4 Format 3 .............................................................................................................345

ix
9.1.12.1.5 Format 4 .............................................................................................................346
9.1.13 ApiCmdBMRTActRead....................................................................................349
9.1.14 ApiCmdBMRTSAActRead............................................................................... 351
9.1.15 ApiCmdBMStackEntryFind..............................................................................353
9.1.16 ApiCmdBMStackEntryRead ............................................................................356
9.1.17 ApiCmdBMStackpRead...................................................................................359
9.1.18 ApiCmdBMStart .............................................................................................. 361
9.1.19 ApiCmdBMStatusRead ...................................................................................362
9.1.20 ApiCmdBMSWXMIni....................................................................................... 365
9.1.21 ApiCmdBMTCBIni........................................................................................... 366
9.1.22 ApiCmdBMTCIIni ............................................................................................370
9.1.23 ApiCmdBMTIWIni............................................................................................ 372
9.1.24 ApiCmdDataQueueClose................................................................................ 374
9.1.25 ApiCmdDataQueueControl..............................................................................375
9.1.26 ApiCmdDataQueueOpen ................................................................................376
9.1.27 ApiCmdDataQueueRead................................................................................. 379
9.1.28 ApiCmdQueueFlush........................................................................................ 382
9.1.29 ApiCmdQueueHalt ..........................................................................................383
9.1.30 ApiCmdQueueIni............................................................................................. 384
9.1.31 ApiCmdQueueRead........................................................................................ 385
9.1.32 ApiCmdQueueStart.........................................................................................388
9.1.33 ApiCmdScopeSetup........................................................................................ 389
9.1.33.1 Using Scope Functionality On APX/ACX Cards................................................... 389
9.1.33.2 Using Scope Functionality On APE Cards ........................................................... 390
9.1.34 ApiCmdScopeStart..........................................................................................394
9.1.35 ApiCmdScopeStatus....................................................................................... 395
9.1.36 ApiCmdScopeStop..........................................................................................396
9.1.37 ApiCmdScopeReset........................................................................................397
9.1.38 ApiCmdScopeTriggerDef ................................................................................398
9.1.39 ApiCmdScopeTriggerDefEx ............................................................................401
9.1.40 ApiCmdScopeCalibrate...................................................................................404
9.1.41 ApiCmdScopeOffsetCompensation.................................................................406
9.1.42 ApiCreateScopeBuffer..................................................................................... 409
9.1.43 ApiCreateScopeBufferList............................................................................... 410
9.1.44 ApiFreeScopeBuffer........................................................................................ 411
9.1.45 ApiProvideScopeBuffers ................................................................................. 412
9.1.46 ApiWaitForScopeFinished............................................................................... 414
10 REPLAY FUNCTIONS ............................................................................................ 415
10.1 Low Speed Functions.......................................................................................... 416
10.1.1 ApiCmdReplayIni ............................................................................................416
10.1.2 ApiCmdReplayRT ...........................................................................................418
10.1.3 ApiCmdReplayStart.........................................................................................419
10.1.4 ApiCmdReplayStatus...................................................................................... 420
10.1.5 ApiCmdReplayStop......................................................................................... 422
11 GENERAL I/O (GENIO) FUNCTIONS..................................................................... 423
11.1 Low Speed Functions.......................................................................................... 424
11.1.1 ApiCmdGenIoAddrInit .....................................................................................424
11.1.2 ApiCmdGenIoOutChnWrite.............................................................................426
11.1.3 ApiCmdGenIoOutChnRead.............................................................................428
11.1.4 ApiCmdGenIoInChnRead................................................................................ 430

x
11.1.5 ApiCmdGenIoSysTaskCtrl...............................................................................432
11.1.6 ApiCmdGenIoTestSeq ....................................................................................434
12 TROUBLESHOOTING ............................................................................................ 437
12.1 Error Reporting Design........................................................................................ 437
12.2 Driver Command Codes and Associated Library Function Calls..........................443
13 NOTES.................................................................................................................... 447
13.1 Acronyms and Abbreviations...............................................................................447
13.2 Definition of Terms .............................................................................................. 450
14 APPENDIX A DOCUMENT/SOFTWARE HISTORY................................................ 455
15 APPENDIX B FUNCTIONALITY OVERVIEW ......................................................... 483
15.1 Limitations for specific boards.............................................................................. 483
15.1.1 APU1553-1/2...................................................................................................483
15.1.2 Limitations for boards with Multichannel Firmware ..........................................483
15.2 Board functionality overview................................................................................ 484

xi
LIST OF TABLES
Table Title Page
Table 1.3.2-I API S/W Library Data type Naming Conventions................................................. 4
Table 1.3.5-I Transfer ID/ Buffer Header ID Ranges ............................................................... 7
Table 1.3.5-II Buffer ID Ranges................................................................................................ 7
Table 1.3.5-I AIM Board Type Restrictions.............................................................................. 8
Table 2-I –General Library Administration Function Descriptions ........................................... 13
Table 2-II –VME Specific Library Administration Function Descriptions.................................. 13
Table 3-I –System Function Descriptions ............................................................................... 63
Table 4-I –Calibration Function Descriptions........................................................................ 151
Table 5-I –Buffer Function Descriptions................................................................................ 157
Table 6-I –FIFO Function Descriptions................................................................................. 187
Table 7-I –Bus Controller Function Descriptions................................................................... 193
Table 8-I –Remote Terminal Function Descriptions.............................................................. 267
Table 9-I –Bus Monitor Function Descriptions...................................................................... 321
Table 10-I –Replay Function Descriptions............................................................................ 415
Table 11-I –GenIo Function Descriptions ............................................................................. 423
Table 12.2-I Driver Command Codes .VS. API Function Calls........................................... 443
Table A-I –Summary of Changes for each Version Update .................................................. 456
Table A-II –Summary of Version Changes for each S/W Library Function............................ 474
Table B-I –Functionality Overview for boards with ASP........................................................ 484
Table B-II –Functionality Overview for boards without ASP.................................................. 485
Table B-III –Function Support By Boards With ASP ............................................................. 486
Table B-IV –Function Support By Boards Without ASP........................................................ 487
Table B-V –Functions With Performance Limitations By Plattform........................................ 488
LIST OF FIGURES
Figure Title Page
Figure 1.3.3-1 –Document Conventions................................................................................... 5
Figure 8-1 Status Word......................................................................................................... 268
Figure 8-2 Command Word................................................................................................... 268
Figure 9.1.17-1 Monitor Buffer Pointer............................................................................... 360
Figure 12.1-1 API S/W Library Function / Target S/W Interfaces......................................... 437
Figure 12.1-2 “ERROR in function” Error Message............................................................. 438
Figure 12.1-3 Example “Error in function “ Error Message................................................... 438
Figure12.1-4 _ApiIo Driver Command Status Error .............................................................. 440
Figure12.1-5 Did Not Get Expected Ack –Acknowledgement Error ..................................... 440
Figure 12.1-6 Target S/W Status and Acknowledge Interpretation Message........................ 441
Figure 12.1-7 Example Target S/W / Host API S/W Library Function Error Reporting ......... 442

xii
THIS PAGE INTENTIONALLY LEFT BLANK

MIL-STD-1553 Reference Manual
1
Chapter 1 - Introduction
1 INTRODUCTION
1.1 Welcome
Welcome to the Software Library Reference Manual for the AIM MIL-STD-1553 application
programming interface. This reference manual, in conjunction with the Programmer's Guide, is
intended to provide the software (s/w) programmer with the information needed to develop a
host computer application interface to the AIM 1553 interface module. This reference manual
provides the user with detailed programming information including library function call and
header file details and specific troubleshooting information. The programmer's guide provides
the 1553 application developer with high-level s/w development information including high
level AIM 1553 interface module system design information, board support package (BSP)
contents, user application system design concepts, function call guidelines, and sample
programs.
1.2 How This Manual is Organized
This reference manual is divided into the following Sections:
Chapter 2
Library
Admin
Functions
Chapter 3
System
Functions
Chapter 4
Calibration
Functions
Chapter 5
Buffer
Functions
Chapter 6
FIFO
Functions
Chapters 2 - 6 comprise the system setup and support
functions used when controlling an AIM 1553 interface
module.
Provides helpful information about the content and
structure of the Header Files used when developing C
programs for the user's application interface to the AIM
1553 interface module.
Chapter 1
C Library
Header
Files

2 MIL-STD-1553 Reference Manual
Chapter 1 - Introduction
Chapter 7
Bus
Controller
Functions
Chapter 8
Remote
Terminal
Functions
Chapter 9
Bus
Monitor
Functions
Chapter 10
Replay
Functions
Chapter 12
Trouble-
shooting
Sections 7 - 11 contain the function
calls used to setup the main
functional systems on the 1553
interface module including:
Bus Controller
Remote Terminal(s)
Bus Monitor
Replay
GenIo
Section 12 contains helpful information enabling the user
to interpret error messages and steps to take to correct
those errors.
Provides detailed information regarding the history of
the API Library reference software and documentation
App A
Document/
Software
History
Chapter 11
GenIo
Functions

MIL-STD-1553 Reference Manual
3
Chapter 1 - Introduction
1.3 Conventions Used
1.3.1 General Documentation Conventions
We use a number of different styles of text and layout in this document to help differentiate
between the different kinds of information. Here are some examples of the styles we use and an
explanation of what they mean:
Italics - used as a placeholder for the actual name, filename, or version of the software in use
Bold text - a function, or parameter, or used to highlight important information
Bold italics - caution, warning or note
Font - font used to show paths, directories and filenames within the body of text will be shown
in blue, for example:
C:\Windows\System32\Drivers\Aim_mil.sys
A smaller version of this font will be used to list
software code.
In addition to text and layout convention, there are a couple of naming conventions used to
simplify the information herein. All AIM hardware systems/cards utilize the same s/w library
functions also called the Application Program Interface (API). Therefore, for ease of
documentation flow, this s/w library will be referred to from this point on as the API S/W
Library. In addition, the software and firmware contained on the AIM bus interface 1553
device will be referred to as the Target S/W. Several references will be made within the API
S/W Library function description to the Application Interface. The Application Interface is the
software interface between the API S/W Library function calls and the Target S/W.
1.3.2 Naming Conventions
Naming conventions have been used for naming constants, structures, functions calls and data
types throughout the API S/W Library. All constants, structures and functions used in the API
S/W Library are defined in the Ai1553i_def.h header file which is contained in Appendix B.
Data types used in the API S/W Library are defined in ai_cdef.h, also defined in Appendix B.
Naming conventions used include the following
Constants - For every function call, a list of constants have been defined to better
describe the numerical value of the function input or output (located in Ai1553i_def.h)
Structures - Named as ty_api_name where name is unique to the structure (located in
Ai1553i_def.h)
Functions - Named as either Apiname or ApiCmdname -
Apiname functions do not involve driver commands to the biu
ApiCmdname functions involve driver commands to the biu

4 MIL-STD-1553 Reference Manual
Chapter 1 - Introduction
(located in Ai1553i_def.h)
Data Types - all variable are assigned an AIM equated data type as shown in Table 1.4-I
below (defined in ai_cdef.h):
Table 1.3.2-I API S/W Library Data type Naming Conventions
API S/W Library
Data Type
Size
(in bytes)
AiInt
Int
4
AiUInt
unsigned int
4
AiInt8
char
1
AiUInt8
unsigned char
1
AiInt16
short
2
AiUnt16
unsigned short
2
AiInt32
int
4
AiUInt32
unsigned int
4
AiInt64
long long
8
AiUInt64
unsigned long long
8
AiChar
Char
1
AiUChar
unsigned char
1
AiDouble
double
8
AiFloat
float
4

MIL-STD-1553 Reference Manual
5
Chapter 1 - Introduction
1.3.3 Function Call Documentation Conventions
Each function call contained in this document uses a standard documentation format.
The information included for each function call is as follows:
Figure 1.3.3-1 –Document Conventions
Prototype:
return value data type function name (function parameter(s));
Driver Command:
Constant Definition (value)
Purpose:
Purpose of the function
I
In
np
pu
ut
t
l
li
is
st
t
o
of
f
i
in
np
pu
ut
ts
s
O
Ou
ut
tp
pu
ut
t
l
li
is
st
t
o
of
f
o
ou
ut
tp
pu
ut
ts
s
Return Value
r
re
et
tu
ur
rn
n
v
va
al
lu
ue
e
Data type of the return
value. Will show
"Void" if there is no
return value
Specifies the hex code
for the driver
command used by the
target s/w to
accomplish the action
required by the
function. See Section
13 for a complete list.
Specifies the inputs to
the function. All
possible input values
are detailed.
Outputs are provided via
an address specified as an
input parameter. The
structure and content of
the information output to
that address location is
specified here.
The value returned via the
function is a status/error code
defining the success/failure of
the function call. The
status/error code value is
detailed here.
Specifies the
parameters to be
passed to the
function, the function
name and the type of
the return value.

6 MIL-STD-1553 Reference Manual
Chapter 1 - Introduction
1.3.3.1 Conventions for parameters ‘ul_ModuleHandle’ and ‘biu’
Most API S/W Library function calls require the parameters "ul_ModuleHandle" and
"biu". In order to simplify the manual, these two function parameters are not detailed in
the documentation for each function call, therefore, they are both defined here as
follows:
"ul_ModuleHandle " - usually the first function parameter. This parameter determines
the AIM destination module handle. The handle is returned by ApiOpen() or
ApiOpenEx().
"biu" - usually the second function parameter. This parameter determines the Bus
Interface Unit (biu) of the selected AIM module.
Value
Constant
Comment
1
API_BIU_1
Bus Interface Unit 1 on the AIM board
2
API_BIU_2
Bus Interface Unit 2 on the AIM board
..
..
Bus Interface Unit 3 on the AIM board
8
API_BIU_8
Bus Interface Unit 8 on the AIM board
Note: The ‘biu’ parameter is only relevant if the command ApiOpen() was used to get
the module handle. When using ApiOpenEx() the ‘biu/stream’ information is
already coded within the module handle and therefore this parameter is ignored
in this case.
Note: For 3910 board application interfaces and opened with ApiOpen():
For all functions that require 'biu' as input, only API_BIU_1 is valid, with the
exception of ApiInstIntHandler/ApiDelINtHandler functions.
(For 3910 boards, BIU1 is always the LS BIU and BIU2 is the HS BIU. All 3910Hs
functions automatically program API_BIU_2 for HS and API_BIU_1 [if required]
for LS functionality.)
1.3.4 Function Calling Convention
For Microsoft Windows the library is created using the “_stdcall” calling convention. To avoid
side effects in a Microsoft Windows operating system be sure to use also “_stdcall” as the
calling convention in your application.
Other manuals for MIL-STD-1553
1
Table of contents
Other Aim Recording Equipment manuals
Popular Recording Equipment manuals by other brands

Panasonic
Panasonic SV-3800 operating instructions

Bespoke
Bespoke Scoreboards Play cricket scorer pro Set up and operating instructions

Data Video
Data Video RMC-140 user manual

TC Electronic
TC Electronic DVR250-DT user manual

Yamaha
Yamaha QY10 Operation manual

Korg
Korg Tone Works Pandora PX4D owner's manual