advertisement
M4K1553PxII
&
EXC-1553PCMCIA/EPII
Galahad Software Tools
Programmer’s Reference
311 Meacham Ave ♦
Elmont
♦
NY 11003
♦
tel. (516) 327-0000
♦
fax (516) 327-4645 e:mail: [email protected]
website: www.mil-1553.com
Table of Contents
Table of Contents
An Overview of the Data Communications Bus ................................................. 1-3
Using Interrupts Under VISA for VME Boards .................................................. 2-25
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page i
Table of Contents page ii
Excalibur Systems
Table of Contents
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page iii
Table of Contents
Appendices
Appendix A MIL-STD-1553 Formats .......................................................................... A-1
Appendix B Galahad Software Tools Installation Instructions.............................. B-1
Installation Instructions for PCI-MXI-2 Systems .................................................B-6
Appendix D Application of External Loopback Test............................................... D-1
Function Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index - 1
page iv Excalibur Systems
Chapter 1
1 Introduction
Introduction
Chapter 1 provides an overview of the Excalibur M4K1553Px module, (or Px for short) and the EXC-1553PCMCIA/EPII card.
Note:
The Px module can be mounted on the following Excalibur carrier boards:
• EXC-4000PCI
• EXC-4000cPCI
• EXC-4000VME
• EXC-4000VXI
The topics covered are:
Getting Started
Welcome to M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools, your tool for creating custom application programs for the M4K1553Px module and the EXC-1553PCMCIA/EPII card.
Before starting to write applications:
1. On the Excalibur Installation CD, included in the package you received with the hardware:
•Locate the appropriate M4K1553PxII & EXC-1553PCMCIA/EPII Galahad
Software Tools for your hardware;
•Download a copy of M4K1553PxII & EXC-1553PCMCIA/EPII Galahad
Software Tools Programmer’s Reference;
•Download a copy of your hardware’s User’s Manual.
2. Install the hardware. For hardware installation instructions, refer to the
User’s Manual.
3. Fill out the registration card and return it to your Excalibur representative.
Note:
If anything is missing or damaged, contact your Excalibur representative.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 1 - 1
Chapter 1 Introduction
The Excalibur Systems Website
More copies of the M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software
Tools Programmer’s Reference can be downloaded from our website: www.mil-1553.com
. In addition, information about our full range of products can be found at this site.
The software provided with Excalibur hardware is for Windows operating systems. The latest versions of the software can be down loaded from our website.
For further assistance, write to [email protected]
.
Installation
For
PCI
and
cPCI
Appendix B-1: EXC-4000PCI Boards,
hardware and software installation instructions.
For
VME
or
VXI
Appendix B-2: EXC-4000VME Boards,
hardware and software installation instructions.
Appendix B-3: PCMCIA/EPII Cards,
and software installation instructions.
The Excalibur Configuration Utility Program
This is a configuration setup program for PCI, cPCI and PCMCIA hardware. Use the utility program to specify which hardware in a machine is being used.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools supports the use of up to four PCI or cPCI boards simultaneously and two PCMCIA/EPII cards. Only if more than one board or card is used, is it necessary to run the utility program.
The configuration program allows the user to set or change settings on the hardware itself. Excalibur hardware will work only after device values are properly entered and saved in the ExcConfig utility. Instructions for entering values in the utility program are in:
•
Appendix C-1: EXC-4000PCI and EXC-4000cPCI Boards
• In the readme.pdf file, on the Excalibur Installation CD, you received with your Excalibur hardware.
To configure multiple VME and VXI boards, see
page 1 - 2 Excalibur Systems
Chapter 1 Introduction
An Overview of the Data Communications Bus
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools enables the user to create custom diagnostic programs for the Excalibur Px module. To use
Galahad Software Tools, some familiarity with the functioning of the 1553 data communications bus and an understanding of the hardware is required. This overview is an introduction to the 1553 bus. It will assist in understanding the rationale of the software functions for the hardware.
Military Standard 1553 (MIL-STD-1553) has been a mainstay of military avionics communications since its introduction in 1975. This specification defines a data communications bus capable of supporting up to 32 devices, called Remote
Terminals, and coordinated by a device called a Bus Controller. The
Data communications bus
is physically composed of two wires used to transmit and receive a differential signal between the various devices. For backup purposes, a second pair of wires is often used and is called the secondary bus. The two buses are also referred to as “Bus A” and “Bus B.”
Each
Remote Terminal
can transfer data to or receive data from the Bus Controller or another Remote Terminal in response to a command from the Bus Controller.
Remote Terminals for their part never initiate communications but merely react to the Bus Controller.
The
Bus Controller
directs the flow of data on the data bus. Since all transmission takes place over a single pair of wires, some mechanism must be included to ensure that only a single device attempts to transmit at any given time.
MIL-STD-1553 deals with this issue by dictating that the Bus Controller must initiate all communication. The Bus Controller determines the sequence of messages, the size of each message, and the timing between messages. The Bus
Controller also determines which of the Remote Terminals will be transmitting or receiving data.
The
Bus Monitor
is a passive device which records 1553 bus traffic. A monitor may collect all the data from the bus or may collect selected data.
Data is transmitted in the form of
messages
. Messages consist of a Command
Word containing routing information transmitted by the Bus Controller, between
1 and 32 data words containing the information to be communicated, and a Status
Word transmitted by a Remote Terminal acknowledging receipt of a command. A number of message types are defined in MIL-STD-1553. The most common message types involve data transfer either from the Bus Controller (BC) to a single Remote Terminal (RT) or from an RT to the BC. Less frequently, data may be broadcast from the Bus Controller to all RTs or from one RT directly to a second RT. In all cases, the type of message is encoded in the Command Word that is transmitted by the BC.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 1 - 3
Chapter 1 Introduction
The MIL-STD-1760 Options
MIL-STD-1760 implements an enhanced MIL-STD-1553 digital interface for the transfer of digital messages to the remote terminal. The enhancements include:
Use of Checksums
Support for Header
Word
The use of checksums for the standard message, stored in place of the last data word of the message.
Support for the Header Word as the first word in a message, including the predefined Header Words.
Checksums
Checksum is mandated on critical control messages and provisional on the remainder of the messages. Implementing this level of error detection ensures a higher degree of error free data integrity requirements than that which odd parity provides.
The 1760 option implements checksum error detection capabilities. Checksums are computed as each data word is sent or received. If the checksum flag is set on an outgoing message, the checksum will be sent in place of the last data word. On an incoming message, the computed checksum is checked against the last data word received. If it does not match, the Checksum Error bit is set in the Message
Status word.
The 1760 option has the additional feature of checksum error injection in BC/
Concurrent RT mode. The user can set the checksum to intentionally send an error, giving the additional capability to test for checksum errors on the receiving
RTs.
Header Word
In the MIL-STD-1760 specification, the first data word of a message may be a
Header Word, which is used for message identification. The header word is associated with a specific RT subaddress.
To indicate that a specific subaddress will require a Header Word, set the corresponding entry in the 1760 Header Active table to 1. Then set the corresponding entry in the 1760 Header Value table to the value you expect to receive in the first data word of the message.
The MIL-STD-1760 specification provides predefined header values. These are preset on Excalibur hardware according to the operating mode: Remote Terminal,
BC/Concurrent-RT or Bus Monitor.
page 1 - 4 Excalibur Systems
Chapter 1 Introduction
Galahad Software Tools Functions
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools is a set of C language functions designed to aid users of the Galahad Software Tools to write test programs. These functions provide access to all of the module’s functions in a structured and straightforward programming environment.
Galahad Software Tools is available for Windows 9x, Windows NT and Windows
2000. The Windows drivers were written and tested using Borland C++, and
Microsoft Visual C++.
Software Tools for the EXC-4000 Carrier Board
There are numerous modules available for use on the EXC-4000 board. To date,
Excalibur provides the following M4K modules:1553Px, 429/RTx, 1553MCH,
Discrete, Serial, 708, CAN and H009.
Various combinations of these modules may be present on the carrier board at one time. One application may access any of the following configurations:
• one module
• multiple modules of the same type located on one board
• multiple modules of the same type located on separate boards
• multiple modules of different types located on one or separate boards
A general-purpose dll EXC4000.DLL (and its Microsoft-compiled version
EXC4000MS.DLL) accompanies the M4K[module] Software Tools for each of the
EXC-4000 modules. The function,
Get_4000Module_Type
may be called for each board and module number, to check which, if any, modules are currently available at that location. (This function is also called automatically from
Init_Module_
[handle]
to ascertain that the type of module matches the module Software Tools package being used). These DLLs are installed automatically in the Windows/System folder when the Software Tools is installed for each of the modules.
The Time Tag source is set at the carrier board level, or PCMCIA card level. See the User’s Manual for your hardware.
Note:
The EXC4000.DLL is not relevant for the EXC-1553PCMCIA/EPII but must be present on the computer to provide initial startup services.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 1 - 5
Chapter 1 Introduction
Compiler Options
Programmers must use one of the following calling options, depending on the compiler used:
• The Borland DLL is compiled using _stdcall options
• The Microsoft DLL is compiled using _cdecl options
The driver functions in Galahad Software Tools are supplied both in source form and linked as a DLL. When writing application-programs, keep in mind that the module is a physical resource, and therefore you cannot run multiple copies of the program simultaneously, accessing the same module.
Each function is presented with its formal definition, including data types of all input and output variables. A brief description of the purpose of the function is provided along with the legal values for inputs where applicable.
Functions are written as ‘C’ functions, i.e., they return values. A negative value signifies an error. Full error messages may be printed using the
function. (See
In Windows all user-defined programs must include the file proto_px.h. This file includes all the necessary header files and DLL functions to operate
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools for Px modules and PCMCIA/EPII cards.
Conventions Used in Galahad Software Tools
To help differentiate between different kinds of information, the following text styles are used in Galahad Software Tools:
Functions
look like this.
Variables look like this: unsigned short int = usint
Parameters look like this.
File names look like this.
FLAGS look like this
page 1 - 6 Excalibur Systems
Chapter 2
2 General Functions
General Functions
Chapter 2 contains the software functions which are not mode specific and can be used in at least two modes.
The input values included in each function are given, in Hex format, by each flag within the function description.
Any reference to a module, also applies to the EXC-1553PCMCIA/EPII card.
The following functions are described in this chapter:
Init_Module_Px for PCI boards and PCMCIA cards
Init_Module_Px for VME and VXI boards
To handle interrupts in Windows see
The functions described are:
Wait_For_Multiple_Interrupts_Px
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 1
Chapter 2 General Functions
Enable_1553A_Support_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Enable_1553A_Support_Px
enables MIL-STD-1553A support.
BC mode
No Mode Codes with data
RT mode
The Broadcast bit is not set in the 1553 Status word.
Enable_1553A_Support_Px
(int handle , int enableflag ) handle
The handle designated by
Init_Module_Px enableflag
MIL-STD-1553A support [0001 H]
DISABLE Disable MIL-STD-1553A support [0000 H] none ebadhandle If invalid handle specified; should be value returned by
Init_Module_Px
If an invalid value was used as an input einval emode
0
If current mode is not BC or RT mode
If successful
page 2 - 2 Excalibur Systems
Chapter 2 General Functions
External_Loopback_Px
Description
Note
Syntax
Input parameters
Output Parameters
struct E_LOOPBACK
{
External_Loopback_Px
is used to check the 1553 transceivers, transformers and associated bus cables.
External_Loopback_Px
requires a loopback cable to connect Bus A to Bus B.
Appendix D Application of External Loopback Test
External_Loopback_Px
(int
*elbvals ) handle , struct e_loopback handle
The handle designated by
Init_Module_Px elbvals
Status Value
usint frame_val; usint frame_status; usint cmd_send[8]; usint ttag_val_lo usint ttag_val_hi usint ttag_status;
} *E_loopback;
Return values
0
Address in
Dual-Port RAM
0
6
8
2
4
12
14
16
18
A
C
E
10 elbfailure ebadhandle
X (not for user)
8000H passed, 8001H failed cmd_send[0]: 5555H cmd_send[1]: 8000H passed, else failed cmd_send[2]: 1234H cmd_send[3]: 8000H passed, else failed cmd_send[4]: 5555H cmd_send[5]: 8000H passed, else failed cmd_send[6]: 1234H cmd_send[7]: 8000H passed, else failed
30D4H ± 2
0
8000H passed, 8001H failed
If External Loopback test failed
If invalid handle specified; should be value returned by
Init_Module_Px.
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 3
Chapter 2 General Functions
Get_Board_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Note:
Get_Board_Status_Px
indicates the status of the specified module.
Get_Board_Status_Px
(int handle
, int module) handle
The handle designated by
Init_Module_Px none ebadhandle einval
If an invalid handle was specified; should be value returned by
Init_Module_Px
If an invalid value was used as an input
0 or more of the following flags:
BOARD_READY Module has completed reset sequence
[0001 H]
RAM_OK
TIMERS_OK
Module has passed internal memory self-test [0002 H]
Module has passed internal timers self-test [0004 H]
SELF_TEST_OK Module has passed full internal selftest [0008 H]
BOARD_HALTED Module is stopped [0010 H]
Bit 7 is always set to 1
Get_Card_Type_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Card_Type_Px
indicates the module firmware type, either
1553 or 1760.
Get_Card_Type_Px
(int handle
, usint * cardtype) handle
The handle designated by
Init_Module_Px cardtype ebadhandle
0
1553H or 1760H
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
page 2 - 4 Excalibur Systems
Chapter 2 General Functions
Get_Error_String_Px
Description
Syntax
Example
Input Parameters
Output Parameters
Return Values
Get_Error_String_Px
accepts the error returns from other
Galahad Software Tools functions. This function returns the string containing a corresponding error message.
Get_Error_String_Px ( int errcode
, char
*errstring
) char ErrorStr[255];
Get_Error_String_Px (errorcode, ErrorStr); printf(“error is: %s”, ErrorStr) errorcode The error code returned from a Galahad
Software Tools function.
errstring A string of characters, with the corresponding error message. In case of bad input, a string denoting that.
0 Always
Get_Header_Exists_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Header_Exists_Px
checks to see if the Subaddress (SA) has an assigned Header Word Value.
Note:
This function is applicable only to modules that support the 1760 options
Get_Header_Exists_Px
(int handle , int sa , int * enable ) handle
The handle designated by
Init_Module_Px sa enable: ebadhandle rterror
0
The Subaddress to be checked
Legal flags are:
1 Header Word assigned
0 Header Word not assigned
If an invalid handle was specified; should be value returned by
Init_Module_Px
Bad Subaddress number
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 5
Chapter 2 General Functions
Get_Header_Value_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Header_Value_Px
gets the Header Word assigned to this
Subaddress.
Note:
This function is applicable only to modules that support the 1760 options.
Get_Header_Value_Px
(int handle, int sa
, usint *header_value) handle
The handle designated by
Init_Module_Px sa
The Subaddress to be checked header_value The assigned Header Word ebadhandle rterror
If an invalid handle was specified; should be value returned by
Init_Module_Px
Bad Subaddress number
0 If successful
Get_Id_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Id_Px
returns the module ID of the specified module.
Get_Id_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px
Anything other than module ID Failure
Module ID: E [0045 H] If successful
page 2 - 6 Excalibur Systems
Chapter 2 General Functions
Get_Mode_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Mode_Px
indicates the current mode of the specified module reflecting the last call to
Set_Mode_Px
.
Get_Mode_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle einval
If an invalid handle was specified; should be value returned by
Init_Module_Px
If an invalid value was used as an input
One of the following flags:
RT_MODE Module set up as a Remote Terminal
[0002 H]
BC_RT_MODE
MON_BLOCK
Module set up as BC/Concurrent RT
[0004 H]
Module set up as a Monitor in
Sequential Block submode [0008 H]
MON_LOOKUP Module set up as Monitor in Table
Lookup submode [0020 H]
Get_Rev_Level_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Rev_Level_Px
indicates the current revision level of the firmware for the specified module. Each Hex nibble
(i.e. 4 bits) reflects a level, so the 0x11 should be interpreted as revision 1.1.
Get_Rev_Level_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle firmware revision level
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 7
Chapter 2 General Functions
Get_Time_Tag_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Time_Tag_Px
returns the running Time tag of the module.
Get_Time_Tag_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle
32 bit Timetag
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
Init_Module_Px for PCI boards and PCMCIA cards
Description
Syntax
Note:
Init_Module_Px
is the first function the user must call for each
Px module, on each board, or PCMCIA/EPII card that is accessed in the application program.
EXC-4000PCI and cPCI
Init_Module_Px
enables the user to access up to four modules on a single board, or any combination of up to 16 modules on four separate boards.
The function may be called with the SIMULATE argument.
If the SIMULATE argument is used, a portion of the memory equal to the size of the board’s dual-port RAM is set aside.
This area is then initialized with an id and version number for use in testing programs when no module is available.
Multiple modules may be simulated. It is possible to have real or simulated modules in one application. Up to 17 real or simulated modules may be initialized. More than one module may be simulated simultaneously.
EXC-1553PCMCIA/EPII
Up to two cards may be used.
The function may be called with the SIMULATE argument.
If the SIMULATE argument is used, a portion of the memory equal to the size of the card’s dual-port RAM is set aside.
This area is then initialized with an id and version number for use in testing programs when no card is available.
Two cards may be simulated simultaneously. It is possible to have real or simulated cards in one application.
Before exiting a program, call
Release_Module_Px
for each module initialized with
Init_Module_Px
.
Init_Module_Px
(usint device_num
, usint module_num )
page 2 - 8 Excalibur Systems
Chapter 2 General Functions
Init_Module_Px (cont.)
Input parameters
Note:
Output parameters
Return Values
EXC-4000PCI and cPCI
device_num module_num
The device number is the index of the entry value set in ExcConfig: 0 - 3
or
SIMULATE
[FFFF H]
The module number of the Px module on the board specified by device_num: 0 – 3
If only one board is used, the define value EXC_4000PCI can be used instead of a device number. If more than one board is used the programmer must run the ExcConfig utility to set the device number.
none
EXC-1553PCMCIA/EPII
EXC_PCMCIA_MODULE [0064 H] sim_no_mem eopenkernel If there was an error opening a device ekernelcantmap If a pointer to memory cannot be obtained emodnum Invalid module number specified enomodule
If init failed in SIMULATE mode due to
Malloc call failure ewrngmodule
If no EXC-4000 module present at specified location
If module specified on EXC-4000PCI board is not Px module enoid etimeoutreset ealocresources handle
If init could not find a module with the given device number
If timed out waiting for reset
If there was an error allocating resources
If successful, the handle to the specified module on the board. This handle is used as the first parameter in all module functions. A valid handle is a positive number ranging from 0 – 16.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 9
Chapter 2 General Functions
Init_Module_Px for VME and VXI boards
Description
Syntax
Input Parameters
Output Parameters
Return Values
Init_Module_Px
for VME is the first function the user must call for a VME or VXI board. The function may be called with the
SIMULATE argument.
Init_Module_Px
must be called once per module (in multimodule) applications. Up to 8 modules can be used or simulated per board. The number of VME or VXI boards which can be used or simulated simultaneously, depends on the system used.
Before exiting a program, call
module for which
Init_Module_Px
was called.
Init_Module_Px
(usint device_num, usint module_num ) device_num A device number (0 – 255) as set with the
DIP switches.
or
SIMULATE [FFFF H]
Appendix B-2 EXC-4000VME Boards
module_num
The module number of the Px module on the board specified by device_num: 0 – 7 none eboardnotfound If device number is not valid sim_no_mem If init failed in SIMULATE mode due to
Malloc call failure enoid If init could not find a board with the given device number as set by the DIP switches.
etimeoutreset If timed out waiting for reset eallocresources If there was an error allocating resources eopendefaultrm If error in VISA function viOpenDefaultRM eviopen If error in VISA function viOpen evimapaddress If error in VISA function viMapAddress
0 If successful
page 2 - 10 Excalibur Systems
Chapter 2 General Functions
Internal_Loopback_Px
Description
Syntax
Input parameters
Output parameters
struct I_LOOPBACK
{ usint frame_val; usint frame_status; usint resp_status; usint early_val; usint receive_data1; usint status_1; usint receive_data2; usint status_2; usint mc_status; usint ttag_val_lo; usint ttag_val_hi; usint ttag_status; usint prl;
} *I_loopback;
Return values
Internal_Loopback_Px
is used to check the 1553 front-end logic, excluding transceivers and coupling transformers.
Internal_Loopback_Px
(int
*ilbvals ) handle , struct i_loopback handle
The handle designated by
Init_Module_Px ilbvals ilbfailure ebadhandle
0
Address in
Dual-Port Ram
0
2
4
6
8
12
14
16
18
A
C
E
10
Status Value
X (not for user)
8000H passed, 8001H failed
8000H passed, 8001H failed
6 LSB must be 15H
5555H
8000H passed, else failed
AAAAH
8000H passed, else failed
8000H passed, else failed
30D4H ± 2
0
8000H passed, 8001H failed
8 LSB contain the CPU version
If Internal Loopback test failed.
If invalid handle specified; should be value returned by
Init_Module_Px.
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 11
Chapter 2 General Functions
Print_Error_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Print_Error_Px
has been superseded by
Get_Print_Error_Px
. The function has been retained for backward compatibility.
Print_Error_Px
accepts the error code returned from other
Galahad Software Tools functions. This function returns a char pointer to a string containing a corresponding error
complete list of error messages.) char *
Print_Error
( int errorcode ) errorcode
The error code returned from a Galahad
Software Tools call none a pointer Pointer to a message string that contains a corresponding error message. In case of bad input this function points to a string denoting “No such message”.
Read_Start_Reg_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Read_Start_Reg_Px
returns the value in the Start register, indicating whether or not the module is currently operating.
Read_Start_Reg_Px
(int handle , usint * startval
) handle
The handle designated by
Init_Module_Px startval ebadhandle
0
Value in the start register
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
page 2 - 12 Excalibur Systems
Chapter 2 General Functions
Release_Module_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Release_Module_Px
must be called for each module initialized with
Init_Module_Px
, before exiting a program.
Following a call to this function, the user must call
Init_Module_Px before selecting another module or release memory allocated for simulated modules.
Release_Module_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
Reset_Time_Tag_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Reset_Time_Tag_Px resets the module’s Time tag register.
Reset_Time_Tag_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
Restart_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Restart_Px
continues processing following
Set_Stop_on_Error_Px.
Restart_Px
(int handle) handle
The handle designated by
Init_Module_Px none ebadhandle
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 13
Chapter 2 General Functions
Set_Header_Exists_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Header_Exists_Px
indicates that messages associated with this Subaddress are expected to have the specified Header
Word.
Note:
This function is applicable only to modules that support the 1760 options.
Set_Header_Value_Px
(int handle, int
sa, usint
enable) handle
The handle designated by
Init_Module_Px sa enable
BC/Concurrent-
RT mode
RT mode
Monitor mode
The Subaddress assigned a Header Word
Valid values depend of the current mode:
HEADER_ENABLE Header Word expected on Transmit messages
[0001 H]
HEADER_DISABLE No Header Word expected [0000 H]
HEADER_ENABLE Header Word expected on Receive messages
[0001 H]
HEADER_DISABLE No Header Word expected [0000 H]
HEADER_ENABLE_RCV Header Word expected on Receive messages [0003 H]
HEADER_ENABLE_XMT Header Word expected on Transmit messages [0002 H]
HEADER_ENABLE Header Word expected on both Transmit and
Receive messages
[0001 H]
HEADER_DISABLE No Header Word expected [0000 H] none ebadhandle rterror
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If a bad Subaddress number is selected
If successful
page 2 - 14 Excalibur Systems
Chapter 2 General Functions
Set_Header_Value_Px
Descriptionf
Note
Syntax
Input Parameters
Output Parameters
Return Values
Set_Header_Value_Px
sets the Header Word assigned to this
Subaddress.
This function is applicable only to modules that support the
1760 options.
Set_Header_Value_Px
(int handle, int
sa, usint
header_value) handle
The handle designated by
Init_Module_Px sa
The Subaddress associated with this Header
Word header_value The assigned Header Value none ebadhandle rterror
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If a bad Subaddress number is selected
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 15
Chapter 2 General Functions
Set_Interrupt_Px
Description
Syntax
Input Parameters
Set_Interrupt_Px
describes the conditions under which the module is to generate an interrupt or disables interrupts.
Note:
In RT mode, interrupts can also be generated using
Set_RT_Interrupt_Px
. See
Set_Interrupt_Px
(int handle , int
flag) handle
The handle designated by
Init_Module_Px flag
0
MSG_CMPLT
Conditions must be appropriate to the current mode. Multiple conditions (flags) maybe ORed together
Do not set interrupts of any kind
Message sent [0002 H]
BC/Concurrent-RT mode
RT mode
Sequential
Monitor mode
END OF FRAME
MSG_ERR
SRQ_MSG
END_MINOR_FRAME
MSG_CMPLT
BEGIN_MSG
TRIG_RCVD
MSG_IN_PROGRESS
CNT_TRIG_MATCH
Complete frame of messages sent [0004 H]
Error occurred [0008 H]
Interrupt when SRQ messages sent [0020 H]
Minor Frame completed
[0010 H]
Message sent [0002 H]
Start of message sent [0001 H]
Received message, matched trigger [0001 H]
Message in progress [0002 H]
Set_Cnt_Trig_Px
block number message received [0004 H]
Message in progress [0002 H]
Look-up Table
Monitor
Output Parameters
Return Values
MSG_IN_PROGRESS none ebadhandle eintr noirqset emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If attempted to set an undefined interrupt
If no interrupt allocated
If the module mode is not recognized
If successful
page 2 - 16 Excalibur Systems
Chapter 2 General Functions
Set_Mode_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Mode_Px
sets the mode that the relevant module on the board is to operate. It performs a reset, clearing all the memory on the module and initializes the module to its default values.
This function must be called prior to any mode specific function.
Note: Set_Mode_Px
may be called just for reset purposes; if you wish to reset only the function variables in BC mode,
Clear_Card_Px
or
Clear_Frame_Px
are faster.
Set_Mode_Px ( int handle
, int mode
) handle
The handle designated by
Init_Module_Px mode
BC_RT_MODE
RT_MODE
Set up module as a BC/Concurrent-RT
[0004 H]
Set up module as Remote Terminal
[0002 H]
MON_BLOCK up
Lookup submode [0020 H] none
Set up module as Monitor in Sequential
Block submode [0008 H] ebadhandle einval
If an invalid handle was specified; should be value returned by
Init_Module_Px
If an invalid parameter was used as an input bad_mem If an invalid pointer was specified etimeoutreset If timed out waiting for reset
0 If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 17
Chapter 2 General Functions
Set_Timetag_Res_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Timetag_Res_Px
sets the resolution of the time tag used in the RT and Monitor Mode. The minimum Time tag resolution is 4
µsec. Resolution is rounded up the nearest multiple of 4.
Note:
Set
Set_Timetag_Res_Px
before starting RT or Monitor mode. The new resolution takes effect the next time the
RT or Monitor is started.
Set_Timetag_Res_Px
(int handle , usint resolution ) handle
The handle designated by
Init_Module_Px resolution none
Valid values: 4 – 1024, multiples of 4 only ebadhandle einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If an invalid parameter was used as an input
If successful
Stop_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Stop_Px
stops the current operation of the module in all modes.
Stop_Px ( int handle) handle
The handle designated by
Init_Module_Px none ebadhandle
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
page 2 - 18 Excalibur Systems
Chapter 2 General Functions
Using Interrupts in Windows
When writing a Windows program that processes interrupts, a separate thread is generally created to handle the interrupt processing. This thread calls
Wait_For_Interrupt_Px,
page-2-22, in order to wait for the next interrupt. When the
function returns, the interrupt is processed as needed. This method is demonstrated in the test programs demo_int.c and demo_intms.c included with the Galahad Software Tools
.
Note:
There is no need to reset the physical interrupt line in the interrupt thread; this is handled internally.
In cases of very high interrupt frequency, several interrupts may occur before the interrupt thread resumes execution. The
Get_Interrupt_Count_Px
function may be used to determine if multiple interrupts have occurred. Conversely, it is possible that the
Wait_For_Interrupt_Px
function will indicate an interrupt that has already been processed by the thread. (This will occur in the case where a subsequent interrupt occurs in between the return of the
Wait_For_Interrupt_Px function and the call to
Get_Interrupt_Count_Px.)
Once again, the
Get_Interrupt_Count_Px function may be used to determine if the interrupt has already been processed.
The following functions are described below:
Wait_For_Multiple_Interrupts_Px
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 19
Chapter 2 General Functions
Get_Interrupt_Count_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Interrupt_Count_Px
returns the total interrupt count for the specified module from the time the module was initialized with
Init_Module_Px
.
Get_Interrupt_Count_Px ( int
*pdwInterruptCount) handle
, unsigned long handle
The handle designated by
Init_Module_Px pdwInterruptCount ebadhandle
Pointer to an unsigned long which receives the interrrupt count
If an invalid handle was specified; should be value returned by
Init_Module_Px egetintcount ekernelinitmodule
If there was a kernel error
If error initializing kernel related data ekernelbadparameter If input parameter is invalid ekernelbadpointer If output parameter buffer is invalid ekerneldevicenotopen If specified device has not been opened
0 If successful
page 2 - 20 Excalibur Systems
Chapter 2 General Functions
InitializeInterrupt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
InitializeInterrupt_Px instructs the Excalibur kernel driver to keep track of interrupts which occur on the Excalibur module.
Once this function has been called, the kernel driver will make note of any interrupts which occur on the module, even if the application is not currently waiting for interrupts (via the
function). When the application later calls
immediately, indicating an interrupt has occurred in the meantime.
Note:
1. This function need only be called once during a given session with a module. Subsequently, interrupts will continue to be tracked for the module until
is called to close the session.
2. The use of this function is not absolutely necessary for interrupt processing. If
is called before
InitializeInterrupt_Px
has been called, then the initialization will be performed automatically, at that point. The use of
InitializeInterrupt_Px
is necessary only if the user requires interrupt tracking prior to the first call to
.
InitializeInterrupt_Px
(int handle ) handle none
The handle designated by
Init_Module_Px ebadhandle egeteventhandle1
If an invalid handle was specified; should be value returned by
Init_Module_Px
If there is an error in kernel
Get_Event_Handle, first part egeteventhandle2 ekernelinitmodule
If there is an error in kernel
Get_Event_Handle, second part
If error initializing kernel related data ekernelbadparam If input parameter is invalid ekerneldevicenotopen If specified device was not opened ekernelbadpointer
0
If output parameter buffer is invalid
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 21
Chapter 2
Wait_For_Interrupt_Px
Description
Syntax
Example
General Functions
Wait_For_Interrupt_Px
waits for an interrupt on the module. It suspends control of the calling thread while waiting, and returns control to the thread upon receipt of the interrupt, or upon expiration of the time out. If timeout is set to INFINITE, then the call will return only upon receipt of the interrupt.
Wait_For_Interrupt_Px
(int handle, unsigned int
timeout )
Since this function suspends execution of the calling thread, it is generally called from a separate thread, to allow the main thread to continue its processing. An example of a thread routine which waits for interrupts and processes them as they come in is as follows:
DWORD InterruptThread(int referenceParam)
{
while (1)
{
int status;
status = Wait_For_Interrupt_Px(module_handle, INFINTE);
if (status < 0)
{
// We don’t check for ekerneltimeout since we passed
// in a timeout value of INFINITE.
// All other return values indicate error.
// Process error
ExitThread(1);
}
…
// Process interrupt
…
// Get the status register to determine the
//cause of this interrupt bc_stat = Get_BC_Status;
Reset_BC_Status(); if (bc_stat & END_OF_FRAME)
{
// interrupt due to end of frame
// process…
} if (bc_stat & MSG_CMPLT)
{
// interrupt due to message completed
// process…
} if (bc_stat & MSG_ERR)
{
// interrupt due to message error
// process…
}
// Check total number of interrupts
Get_Interrupt_Count_Px(module_handle, &numints);
}
}
page 2 - 22 Excalibur Systems
Chapter 2 General Functions
Wait_For_Interrupt_Px (cont.)
Input Parameters
Output Parameters
Return Values
handle timeout
The handle designated by
Init_Module_Px
Timeout is specified in milliseconds
or
INFINITE [FFFF H] none ebadhandle egeteventhand1 egeteventhand2
If an invalid handle is specified; should be value returned by
Init_Module_Px
If there is an error in kernel mGetEventHandle, first part
If there is an error in kernel mGetEventHandle, second part ekernelinitmodule ekernelbadparam
If error initializing kernel related data
If input parameter is invalid ekerneldevicenotopen If specified device was not opened
Successful if either: ekerneltimeout The wait timed out without receiving an interrupt
or
0
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 23
Chapter 2 General Functions
Wait_For_Multiple_Interrupts_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Wait_For_Multiple_Interrupts_Px waits for an interrupt on any of the specified modules. It suspends control of the calling thread while waiting, and returns control to the thread either upon receipt of the interrupt, or upon expiration of the time out. If timeout is set to INFINITE, then the call will return only upon receipt of the interrupt.
Wait_For_Multiple_Interrupts_Px( int
* handle_list
, int num_modules
, unsigned int timeout
, unsigned long
*pdwInterruptBitfield) handle_list
An array of module handles num_modules timeout pdwInterruptBitfield
Number of modules in the handle_list
Timeout is specified in milliseconds
or
INFINITE [FFFF H]
Pointer to an unsigned long which receives a bitfield indicating which of the modules have interrupted
(note that more than one module may have interrupted simultaneously). The modules are distributed in the bitfield such that the lowest bit corresponds to the first module in the handle_list, and so on. egeteventhand1 egeteventhand2 ebadhandle ekernelinitmodule
If invalid handle specified; should be value returned by
Init_Module_RTx.
If error initializing kernel related data
If input parameter is invalid ekernelbadparam ekerneldevicenotopen If the specified device was not opened ekernelbadpointer
Successful if either:
If output parameter buffer is invalid ekerneltimeout The wait timed out without receiving an interrupt
or
If there is an error in kernel mGetEventHandleForModule, first part
If there is an error in kernel mGetEventHandleForModule, second part
0
page 2 - 24 Excalibur Systems
Chapter 2 General Functions
Using Interrupts Under VISA for VME Boards
When using interrupts under VISA an “interrupt service function” must be created into which the user can place any code that is to run in response to receiving an interrupt. The interrupt line should be reset when an interrupt is received so that the next interrupt can be recorded.
Galahad Software Tools includes test programs, such as demo_int.c and
demo_intms.c, that show how to use interrupts using VISA library functions.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 2 - 25
Chapter 2 General Functions page 2 - 26 Excalibur Systems
Chapter 3
3 Remote Terminal Functions
Remote Terminal Functions
Chapter 3 describes the Excalibur Px module and PCMCIA/EPII card operation in Remote Terminal (RT) mode. The RT module is used to simulate one or more
Remote Terminals. The user can:
• Control which RTs will be simulated.
• Determine which data should be sent for each RT/subaddress combination.
• Store data to each RT/subaddress combination.
Any reference to a module, also applies to the EXC-1553PCMCIA/EPII card.
The functions described in this chapter are:
The input values included in each function are given, in Hex format, by each flag within the function description.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 1
Chapter 3 Remote Terminal Functions
RT Identifier
Many of the functions in this section take an RT identifier ( RTid ) as an argument.
The RTid is defined as an RT address, T/R bit value and RT subaddress combination. The structure of the RTid is illustrated below:
5 bits 1 bit 5 bits
RT ADDRESS T/R SUBADDRESS
Example:
RT 5, Transmit, Subaddress 6 would be represented as 00101 1 00110 or 0166 H. This value can be isolated from a Command word by shifting the Command word 5 bits to the right.
The
RT_Id_Px
function (on page 3-16) is provided to carry out this calculation.
For quick reference, the frequently called functions are grouped by use:
Init_Module_Px
Stop_Px
Release_Module_Px
To initialize the module
To place the module into RT mode
To select which RT(s) to simulate
To start simulation
To Stop the RT
To release resources assigned to the module
To control the data being transmitted by the simulated RT(s) or read the data received by them:
To associate a buffer with an RTid
To enter data to be transmitted
To read data received by an RTid
To set up a value to be transmitted as the 1553 Status
Word for the specified RT and to be used as a response to the Transmit Status mode commands
To set up response to Transmit Status mode commands and to set up the 1553 Status Word
To use messages in the Message Stack:
A Command stack retains a history of the last 512 commands processed by the module. This history is used to compile statistics about bus traffic and alerts the user to incoming messages so that any necessary processing can be performed in real-time. Use of interrupts notifies the user when a particular message comes in and can save processing time. The functions to use are:
To read an entry from the message stack
To select which RTs generate interrupts
page 3 - 2 Excalibur Systems
Chapter 3 Remote Terminal Functions
To invoke Error injection capabilities:
The Px module provides a wide array of error injection capabilities for testing at a systems level. To invoke error injection capabilities call:
To alter the number of bits in transmitted data
To select which errors to inject
To select how many words to send in a message
To simulate other systems:
A number of system parameters may be altered to change the character of the system.
To select how to respond to invalid data
To select which subaddress represents a mode command
To select how long to wait before responding to a command
To send checksum values in modules with the 1760 options:
With the Excalibur Px modules with the 1760 options, the user can set which data blocks (associated with some RTids) are associated with a valid checksum value.
To set which block numbers are enabled to check for a valid checksum value
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 3
Chapter 3 Remote Terminal Functions
Assign_DB_Datablk_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Assign_DB_Datablk_Px
enables double buffering for the specified
Receive type RTid and assigns the data blocks for the messages received by that RTid. The data for each message received by the RTid will be stored alternately in the given block and in the next block sequence. The block number specified must be an even-numbered block.
For example, selecting block number 4 will cause that the data for messages to this RTid will be stored alternately in block 4, block 5, block 4, block 5, etc.
This data can be retrieved by the user via the
Read_RTid_Px function.
Assign_DB_Datablk_Px
(int blknum ) handle , int rtid , int enable , int handle
The handle designated by
Init_Module_Px rtid enable
11 bit identifier including RT#, T/R bit and
ENABLE Enable double buffering for the RTid [0001 H] blknum
DISABLE Disable double buffering for the RTid [0001 H]
Even numbered Data block: 0 – 199
Note:
Data block 0, while technically a legal block, should be avoided. It is the default block for all RTs and all active
RTs with no block assigned will end up here.
none ebadhandle emode einval
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range ercvfunc If T/R bit is set to Transmit ebadblknum If block number selected is not an even number
0 If successful
page 3 - 4 Excalibur Systems
Chapter 3 Remote Terminal Functions
Assign_RT_Data_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Assign_RT_Data_Px
associates an RTid with a data block.
Assign_RT_Data_Px
(int handle , int rtid , int blknum ) handle
The handle designated by
Init_Module_Px rtid blknum
11 bit identifier including RT#, T/R bit and
Data block 0 – 199
Note:
Data block 0 represents a default for all unassigned RTid’s and is not recommended for use by anyone interested in using the data.
If the RT does not assign a Data block to an RTid, the default Data block is used for both receive and transmit messages.
none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
Clear_RT_Sync_Entry_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Clear_RT_Sync_Entry_Px
clears (resets to 0) the internally stored
Time tag and Data word, if any, relating to the occurrence of a
Sync Mode Code message (MC-1 or MC-17) for this RT.
Clear_RT_Sync_Entry_Px
(int handle , int rtnum )
The handle designated by
Init_Module_Px handle rtnum
The number of the RT for which to get the
Sync information.
Valid values: 0 – 31 none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode.
If parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 5
Chapter 3 Remote Terminal Functions
Get_Blknum_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Blknum_Px returns the data block number which was assigned to specified RTid.
Get_Blknum_Px
(int handle , int rtid ) handle
The handle designated by
Init_Module_Px rtid
11 bit identifier including RT#, T/R bit and
none ebadhandle emode einval block number
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful: valid values 0 – 199
Get_Checksum_Blocks_Px
Description
Syntax
Input Parametersi
Output Parameters
Return Values
Get_Checksum_Blocks_Px
returns the number of data blocks for which the associated RT subaddress will receive a checksum.
This function returns the value set by
Set_Checksum_Blocks_Px on page 3-19.
Note:
This function is applicable only to modules that support the Excalibur 1760 options.
Get_Checksum_Blocks_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle
0
1 – 200
If an invalid handle was specified; should be value returned by
Init_Module_Px
Invalid value or no value set
Number of data blocks to receive a checksum. For example:
A value of 5 means that data blocks 0 – 4 will receive a checksum; 5 – 199 will not.
page 3 - 6 Excalibur Systems
Chapter 3 Remote Terminal Functions
Get_Next_Message_RTM_Px
Description
Syntax
Input Parameters
Output Parameters
Get_Next_Message_RTM_Px
relates to the I
nternal Concurrent Monitor
available in the memory of the module. The
Internal Concurrent
Monitor
operates automatically when the module is started in
Remote Terminal mode. All bus traffic in RT mode is recorded in the
Internal Concurrent Monitor
memory. The Concurrent
Monitor operates in sequential fixed block mode which means that the 1553 Message blocks are stored in sequential locations in memory, beginning from block 0.
The first call to the function
Get_Next_Message_RTM_Px
returns the contents of block 0. If the next block does not contain a new message, an error value will be returned.
Note:
The structure returned by this function is similar to that returned by the Sequential Monitor mode function
Get_Next_Message_Px
. However, the bits used in the
Message Status word of the
Internal Concurrent Monitor
are unique to this function – they are similar but not identical to the bits set in the Message Status word of
Sequential Monitor mode and BC/Concurrent-RT mode and its Internal Concurrent Monitor.
For each mode verify the Message Status bits for the appropriate mode and function.
Get_Next_Message_RTM_Px
(int
* msgptr, usint * param3 ) handle, struct MONMSG handle
The handle designated by
Init_Module_Px msgptr
A pointer to a structure of type MONMSG containing information regarding the next available entry from the message stack.
struct MONMSG { usint msgstatus;
END_OF_MSG
Status Word containing one or more of the following flags:
Indicates end of message
[8000 H]
BUS_A
ME_SET
Indicates bus A [4000 H]
BAD_CHECKSUM_CONCM Checksum error [2000 H]
(for 1760 option only)
Message Error bit in the RT
Status word [1000 H]
BAD_STATUS RT Status Word bits set (not
ME bit) [0800 H]
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 7
Chapter 3 Remote Terminal Functions
Get_Next_Message_RTM_Px (cont.)
Return Values
TX_TIME_OUT
LATE_RESP
In RT-to-RT message receiving
RT did not detect a transmitter Status Word
[0400 H]
Response time error occurred in the message, even if no RT active on the module [0200 H]
INVALID_MSG_RT2RT Invalid message; perhaps RTto-RT with two receive
Command Words [0100 H]
INVALID_WORD [0080 H] At least one invalid 1553
Word received [0080 H]
BAD_HEADER_RTCM Bad Header Word [0040 H]
(for 1760 option only)
WORD_CNT_ERR Incorrect number of words received in a message
[0020 H]
1553 Status word did not contain the correct RT address [0010 H]
BAD_SYNC Sync of either the Command or the Data word(s) is incorrect
[0008 H]
BAD_GAP Invalid gap received between
1553 Words [0004 H]
RT2RT_MSG_CONCM RT-to-RT message was received [0002 H] occurred - defined in other flags [0001 H] unsigned long elapsedtime;
} unsigned int words [36];
A 32-bit-Time Tag
A pointer to an array of 1553 Words in the sequence they were received over the bus.
param3
Reserved for future use ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px emode enomsg
If module is not in RT mode
If there is no message to return block number If successful. Valid values: 0 – 127
page 3 - 8 Excalibur Systems
Chapter 3 Remote Terminal Functions
Get_Next_RT_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Get_Next_RT_Message_Px reads the next available entry from the message stack; the entry immediately following the entry that was returned via a previous call to this routine. If the next block does not contain a new entry an error will be returned.
Note:
If the user falls 512 entries behind, it will be impossible to know if the message returned is newer or older than the previous message returned.
Get_Next_RT_Message_Px
(int
* cmdstruct ) handle , struct CMDENTRYRT handle
The handle designated by
Init_Module_Px
A pointer to a structure of type CMDENTRY containing information regarding the next available entry from the message stack.
struct CMDENTRYRT *cmdstruct struct CMDENTRYRT{ usint command; 1553 Command word usint command2; 1553 transmit Command word for
RT-to-RT usint timetaghi; 16 upper bits of 32-bit Time tag of message usint timetaglo; 16 lower bits of 32-bit Time tag of message usint status; status containing one or more of the following flags:
END_OF_MSG Indicates end of message [8000 H]
BUS_A Indicates bus A [4000 H]
RT_BAD_CHECKSUM Bad 1760 Checksum on the RT receive side (for 1760 only)
[2000 H]
TX_TIME_OUT
INVALID_WORD
BAD_WD_CNT
BROADCAST
BAD_SYNC
BAD_GAP
In RT-to-RT no response [0400 H]
At least one invalid 1553 Word received [0080 H]
Wrong number of words received
[0020 H]
Broadcast command received
[0010 H]
Sync of either the Command or the
Data word(s) is incorrect [0008 H]
Invalid gap received between 1553
Words [0004 H]
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 9
Chapter 3 Remote Terminal Functions
Get_Next_RT_Message_Px (cont.)
RT2RTMSG
MSG_ERROR
Return Values
} ebadhandle emode enomsg entry number
RT-to-RT message was received
[[0002 H]
Error occurred - defined in other flags [0001 H]
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If no unread messages are available to return
If successful: valid values are 0 – 511
page 3 - 10 Excalibur Systems
Chapter 3 Remote Terminal Functions
Get_RT_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Get_RT_Message_Px
reads the next available entry from the message stack; the entry immediately following the entry that was returned via a previous call to this routine. If the next block does not contain a new entry an error will be returned.
Note:
1. If the user falls 42 entries behind, it will be impossible to know if the message returned is newer or older than the previous message returned.
2. Call this function for modules rev A, A1 and C using firmware 1.6 or earlier.
Call
for module rev C using firmware 1.7 or later.
Get_RT_Message_Px
(int
* cmdstruct ) handle , struct CMDENTRY handle
The handle designated by
Init_Module_Px
A pointer to a structure of type CMDENTRY containing information regarding the next available entry from the message stack.
struct CMDENTRY *cmdstruct struct CMDENTRY{ usint command; 1553 Command word usint command2; 1553 transmit Command word for
RT-to-RT usint timetag; 16-bit Time tag of message usint status;
END_OF_MSG status containing the following flags:
Indicates end of message [8000 H]
BUS_A Indicates bus A [4000 H]
RT_BAD_CHECKSUM Bad Checksum on the RT receive side [2000 H] (for 1760 only)
TX_TIME_OUT In RT-to-RT no response [0400 H]
INVALID_WORD
BAD_WD_CNT
At least one invalid 1553 Word received [0080 H]
Wrong number of words received
[0020 H]
BROADCAST
BAD_SYNC
BAD_GAP
Broadcast command received
[0010 H]
Sync of either the Command or the
Data word(s) is incorrect [0008 H]
Invalid gap received between 1553
Words [0004 H]
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 11
Chapter 3 Remote Terminal Functions
Get_RT_Message_Px (cont.)
RT2RTMSG
MSG_ERROR
Return Values
} ebadhandle emode enomsg entry number
RT-to-RT message was received
[0002 H]
Error occurred - defined in other flags [0001 H]
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If no unread messages are available to return
If successful
Values values: 0 – 41
Get_RT_Sync_Entry_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_RT_Sync_Entry_Px
extracts the internally stored Time tag and Data word, if any, of the most recent occurrence of a Sync
Mode Code message (MC-1 or MC-17) for this RT.
Get_RT_Sync_Entry_Px
(int
* handle , int rtnum , usint sync_timetag , usint * sync_data ) handle
The handle designated by
Init_Module_Px rtnum
The number of the RT for which to get the
Sync information.
Valid values: 0 – 31 sync_timetag
The lower 16-bits of the Time tag reading when the Sync message arrived sync_data ebadhandle emode einval
0
The Data Word of the Sync message. For
Sync message with data, MC-17, only.
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode.
If parameter is out of range
If successful
page 3 - 12 Excalibur Systems
Chapter 3 Remote Terminal Functions
Load_Datablk_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Load_Datablk_Px
assigns data to a specified data block. This data will be used to respond to a Transmit command or a
Transmit mode command.
Note:
The same data block may be assigned to multiple RTs.
Data block 0 is the default data block used by any
Active RT for which
Assign_RT_Data_Px
has not been called. Since this block is the default for Receive commands as well, its data may change in an unpredictable way. Avoid using this block.
Load_Datablk_Px
(int handle , int blknum , usint * words ) handle
The handle designated by
Init_Module_Px blknum words ebadhandle emode einval
0
Number of block to assign data to.
Valid values: 0 – 199
Pointer to an array of up to 32 words of data to be placed in the block
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 13
Chapter 3 Remote Terminal Functions
Read_Datablk_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Read_Datablk_Px
returns the number of words requested from a particular block. The most common use of this function is to retrieve data from a block assigned to a receive RTid. To do
this, set up the block and check
an interrupt). When a message is received, call
to find out which
RT received the message. Then call
Read_Datablk_Px
to retrieve the data.
Read_Datablk_Px
(int handle , int blknum , usint * words ) handle
The handle designated by
Init_Module_Px blknum words ebadhandle emode einval
0
Number of block to assign data to.
Valid values: 0 – 199
Note:
Data block 0, while technically a legal block, should be avoided. It is the default block for all RTs and all active
RTs with no block assigned will end up here.
Pointer to an array of up to 32 words of data to be placed in the block. Although the message may contain fewer than 32 words,
32 words will be transferred.
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
Read_RT_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Read_RT_Status_Px
returns 1 if a 1553 Message has been received since the last time
Read_RT_Status_Px
was called.
Read_RT_Status_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle emode status
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
1 Message was received
0 No message was received
page 3 - 14 Excalibur Systems
Chapter 3 Remote Terminal Functions
Read_RTid_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Read_RTid_Px
returns an array of 32 words that are found in the data block assigned to the selected RTid, selecting the appropriate buffer of the double-buffer set.
Read_RTID_Px
(int handle , int rtid , usint * words ) handle
The handle designated by
Init_Module_Px rtid words ebadhandle emode einval ercvfunc edbnotset
0
11 bit identifier including RT#, receive bit and subaddress. See
Pointer to an array of 32 words. Although the message may contain fewer than 32 words, 32 words will be transferred.
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If T/R bit is set to TRANSMIT
If selected RTid does not have double-buffering set
If successful
Reset_RT_Interrupt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Reset_RT_Interrupt_Px
turns off request for Message Complete interrupt. A Message Complete interrupt will not be
generated following this call until
is called.
Reset_RT_Interrupt_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 15
Chapter 3 Remote Terminal Functions
RT_Id_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
RT_Id_Px is a utility function to help the user calculate the
RT_Id_Px
(int rtnum , int type , int subaddr, int * rtid ) rtnum
Address of the RT
Valid values: 0 – 31 type subaddr rtid einval
0
TRANSMIT Allocate memory for data to be transmitted [0001 H]
RECEIVE Allocate memory for data to be received [0000 H]
Designated Subaddress of the given RT
Valid values: 0 – 31
The calculated RTtid
If an invalid value or parameter was used as an input
If successful
Run_RT_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Run_RT_Px
starts RT simulation for all RTs that have been activated with
.
Run_RT_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If successful
page 3 - 16 Excalibur Systems
Chapter 3 Remote Terminal Functions
Set_1553Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_1553Status_Px
provides a value, with a flag specifying duration, to be transmitted as the 1553 Status Word for the specified RT.
Set_1553Status_Px
(int duration ) handle , int rtnum , int statusvalue , int handle rtnum statusvalue duration
The handle designated by
Init_Module_Px
Address of the RT
Valid values: 0 – 31
1553 Status word value to be transmitted
DUR_ALWAYS The 1553 Status word specified should always be used for the RT
[0000 H]
DUR_ONETIME The 1553 Status word specified should be used only once for this RT
[0001 H] none ebadhandle einval emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If parameter is out of range
If module is not in RT mode
If successful
Set_Bit_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Bit_Px
provides a value to be returned in response to the
Transmit BIT (Built in Test) Word mode command for the given RT.
Set_Bit_Px
(int handle , int rtnum , int bitvalue ) handle
The handle designated by
Init_Module_Px rtnum bitvalue none
Address of the RT
Valid values: 0 – 31
BIT response value – the value to be set ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 17
Chapter 3 Remote Terminal Functions
Set_Bit_Cnt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Bit_Cnt_Px
determines how many bits will be sent for messages that have requested BIT_CNT_ERR errors. The number sent will be the legal number of bits in a word (20) + offset.
Set_Bit_Cnt_Px
(int handle
, int offset
) handle
The handle designated by
Init_Module_Px offset
Number of bits to add or subtract from the correct number of bits in a 1553 word (20).
Valid values: -3 to +3 none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
Set_Broad_Interrupt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Broad_Interrupt_Px
determines whether an interrupt is to be generated when a broadcast message is detected.
Set_Broad_Interrupt_Px
(int handle
, int intrpt
) handle
The handle designated by
Init_Module_Px intrpt
ENABLE Generate an interrupt
[0001 H]
DISABLE Do not generate an interrupt
{0000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
page 3 - 18 Excalibur Systems
Chapter 3 Remote Terminal Functions
Set_Checksum_Blocks_Px
Description
Note:
Syntax
Input Parameters
Output Parameters
Return Values
Set_Checksum_Blocks_Px
is used to specify which RTid will receive a checksum. Associate an RTid with a data block using
, see page 3-5. RTids associated with
all data blocks numbered up to the value specified in this function will receive a checksum.
The value set in this function is returned by
This function is applicable only for modules with the 1760 options.
Set_Checksum_Blocks_Px
( int handle
, int csum_blocks
) handle
The handle designated by
Init_Module_Px csum_blocks
Number of data blocks to receive checksum.
Valid values: 1 – 200
For example:
A value of 5 means that data blocks 0 – 4 will receive a checksum; 5 – 199 will not.
none ebadhandle
<0
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If failure
If successful
Set_Invalid_Data_Res_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Invalid_Data_Res_Px
determines whether RTs are to respond to messages containing invalid data words.
Set_Invalid_Data_Res_Px
(int handle
, int flag
) handle
The handle designated by
Init_Module_Px flag
ENABLE Respond to message with invalid data [0001 H]
not respond to this message with invalid data [0000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 19
Chapter 3 Remote Terminal Functions
Set_Mode_Addr_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Mode_Addr_Px
defines which subaddresses in a Command
Word are to be used to indicate that the command in a Mode
Command, instead of being interpreted as an RT subaddress.
Set_Mode_Addr_Px
(int handle , int flag ) handle
The handle designated by
Init_Module_Px flag ‘0’ 11111 and 00000 are mode commands
‘1’ only 00000 is a mode command
‘2’ only 11111 is a mode command none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
Set_RT_Active_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Active_Px
causes a particular RT to be simulated. When an RT is simulated the 1553 Data words are either transmitted from an assigned data block or received by the
RT and are then stored in the assigned data block.
, on page 3-5, to assign a data block.
Input parameter, this RT.
intrpt, lets the user request an interrupt when a message is processed for every RTid associated with
This function may be called in BC/Concurrent-RT mode to turn on Concurrent RT simulation.
Set_RT_Active_Px
(int handle , int rtnum , int intrpt ) handle
The handle designated by
Init_Module_Px rtnum intrpt
Address of the RT
Valid values: 0 – 31
1 Generate ’message complete’ interrupt when a message is processed by this RT
0 Do not generate interrupt none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
page 3 - 20 Excalibur Systems
Chapter 3 Remote Terminal Functions
Set_RT_Active_Bus_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Active_Bus_Px
causes a particular RT to respond to a specified bus or buses.
Set_RT_Active_Bus
(int handle
, int rtnum, usint bus) handle
The handle designated by
Init_Module_Px rtnum
Address of the RT
Valid values: 0 – 31 bus BUS_A_ONLY
BUS_B_ONLY
BUS_AB
BUS_NONE
Bus A only [0002 H]
Bus B only [0001 H]
Buses A and B [0000 H]
No buses active [0003 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
Set_RT_Broadcast_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Broadcast_Px
designates RT address 31 as either the broadcast address or as a regular RT.
Set_RT_Broadcast_Px
(int handle , int toggle ) handle
The handle designated by
Init_Module_Px toggle
ENABLE Enable RT31 as the broadcast address [0001 H]
DISABLE Disable RT31 from being the broadcast address [0000 H] none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 21
Chapter 3 Remote Terminal Functions
Set_RT_Errors_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Errors_Px
sets up which errors are to be inserted by all
RTs.
Set_RT_Errors_Px
(int handle , int errormask ) handle
The handle designated by
Init_Module_Px errormask
All requested errors may be ORed together.
The following errors are defined:
BIT_CNT Insert bad bit count
[0002 H]
BAD_GAP_TIME Insert bad gap between
Data words 1 and 2
[0004 H]
STATUS_PARITY Send Status word with even parity [0010 H]
STATUS_SYNC Send Status word with data sync [0020 H]
DATA_PARITY Send Data word with even parity [0040 H]
DATA_SYNC Send Data word with command sync [0080 H]
0 Clears error injection: no errors are inserted by any RT on a transmit message [0000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
page 3 - 22 Excalibur Systems
Chapter 3 Remote Terminal Functions
Set_RT_Interrupt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Interrupt_Px
has been retained for backward compatibility. Use
Set_Interrupt_Px on page 2-16.
Set_RT_Interrupt_Px
(int handle
) handle
The handle designated by
Init_Module_Px none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If successful
Set_RT_Nonactive_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Nonactive_Px
sets a particular RT address nonactive, thereby turning off simulation for the specified RT. The module will not respond to messages sent to nonactive RTs nor will it store messages to or from nonactive RTs.
This function may be called in BC mode to turn off concurrent RT simulation.
Set_RT_Nonactive_Px
(int handle
, int rtnum
) handle
The handle designated by
Init_Module_Px rtnum
Address of the RT
Valid values: 0 – 31 none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 23
Chapter 3 Remote Terminal Functions
Set_RT_Resp_Time_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Resp_Time_Px
sets response time for RTs. This is the time between receipt of the command (and data for
BC-to-RT messages) and the transmission of the 1553 Status word by the RT.
This function may be called in BC mode to adjust the timing of simulated concurrent RTs.
Set_RT_Resp_Time_Px
(int handle handle
, int nsecs
)
The handle designated by
Init_Module_Px nsecs
Time in nanoseconds.
Valid values: 4000 – 42000 none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If successful
Set_RTid_Interrupt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RTid_Interrupt_Px
enables or disables the generation of an interrupt for the given RTid upon specified conditions.
Set_RTid_Interrupt_Px
(int int_type
) handle , int rtid , int enable , int handle rtid enable int_type
The handle designated by
Init_Module_Px
11 bit identifier including RT#, T/R bit and
ENABLE Generate interrupt for this
RTid [0001 H]
DISABLE Do not generate interrupt for this RTid [0000 H] type of interrupt to generate
INT_ON_ERR Generate interrupt on error [0001 H]
INT_ON_ENDOFMSG Generate interrupt on end of message
[000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
page 3 - 24 Excalibur Systems
Chapter 3 Remote Terminal Functions
Set_RTid_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RTid_Status_Px enables or disables the ILLEGALIZATION or INACTIVE status of a given RTid.
Set_RTid_Status_Px
(int status_type ) handle , int rtid , int enable , int handle
The handle designated by
Init_Module_Px rtid enable
11 bit identifier including RT#, T/R bit and
ENABLE Enable the feature for this
RTid [0001 H] status_type
Note:
DISABLE Disable the feature for this
RTid [0000 H]
Status to set for the RTid:
RTID_ILLEGAL RTid will accept data on receive message, will not send data for transmit messages [0002 H]
RTID_INACTIVE RTid will not respond to any messages sent to it
[0003 H]
For Transmit messages with RTID_INACTIVE enabled, in order to ensure that the RT does not send the Status word back to the BC, the RT
Response Time must be set to a minimum of
5
µsec. The default setting is 4 µsec. none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 25
Chapter 3 Remote Terminal Functions
Set_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Status_Px
provides a value to be transmitted as the 1553
Status word for the specified RT.
Set_Status_Px
(int handle , int rtnum , int statusvalue ) handle
The handle designated by
Init_Module_Px rtnum statusvalue none
Address of the RT
Valid values: 0 – 31
1553 Status word value to be transmitted ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
Set_Var_Amp_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Var_Amp_Px
enables the user to set the amplitude of the
1553 output signal.
Set_Var_Amp_Px
(int handle , int millivolts ) handle
The handle designated by
Init_Module_Px millivolts
Amplitude in millivolts.
Valid range: 0 – 7.5 volts
Value is rounded up to the nearest 30 millivolts.
none ebadhandle einvamp
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If tried to set an invalid amplitude
If successful
page 3 - 26 Excalibur Systems
Chapter 3 Remote Terminal Functions
Set_Vector_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Vector_Px
provides a value to be transmitted in response to the Transmit Vector Word mode command for the specified
RT.
Set_Vector_Px
(int handle , int rtnum , int vecvalue ) handle
The handle designated by
Init_Module_Px rtnum vecvalue
Address of the RT
Valid values: 0 – 31
Service Request vector response value to be set none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
Set_Wd_Cnt_Err_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Wd_Cnt_Err_Px
requests the selected RT to insert a Word
Count Error in its transmissions. Each individual RT can be set to send up to three words more than the word count or up to three words less than the word count.
Set_Wd_Cnt_Err_Px
(int handle
, int rtnum
, int offset
) handle
The handle designated by
Init_Module_Px rtnum offset
Address of the RT
Valid values: 0 – 31
Offset to add to correct word count.
Valid values: -3 to +3 none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 3 - 27
Chapter 3 Remote Terminal Functions page 3 - 28 Excalibur Systems
Chapter 4
4 Bus Monitor Functions
Bus Monitor Functions
Chapter 4 describes the Excalibur Px module and PCMCIA/EPII operation in
Bus Monitor mode. The Bus Monitor mode is used to simulate the Bus Monitor in an application.
Any reference to a module, also applies to the EXC-1553PCMCIA/EPII card.
Galahad Software Tools supports two different submodes for Monitoring:
•
Look Up Submode is useful for applications in which the last data for a given RTid is important. In this mode all messages to the same same buffer.
RTid are stored in the
•
Sequential Submode
is used when the sequence of the incoming messages is important. In this mode messages are stored sequentially in a circular buffer.
This submode supports extensive filtering and triggering capabilities which causes the module to record only wanted messages and saves valuable processing time.
In each mode, the user can select which messages will cause the module to generate an interrupt.
The functions described in this chapter are listed, under their submode.
Functions that can be used with both submodes are listed under
All Submodes
.
All Submodes
Look Up Submode
Sequential submode
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 1
Chapter 4 Bus Monitor Functions
RT Identifier
Many of the functions in this section take an RT identifier ( RTid) as an argument.
The RTid is defined as an RT address, T/R bit value and RT subaddress combination. The structure of the RTid is illustrated below:
5 bits 1 bit 5 bits
RT ADDRESS T/R SUBADDRESS
Example:
RT 5, Transmit, Subaddress 6 would be represented as 00101 1 00110 or 0166 H. This value can be isolated from a Command word by shifting the Command word 5 bits to the right.
The
RT_Id_Px
function (on page 3-16) is provided to carry out this calculation.
All Submodes
Clear_Msg_Blks_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Clear_Msg_Blks_Px
clears out all 1553 messages previously received and stored in memory. The Monitor Status register is also cleared. If the module is running, it is stopped, cleared and restarted.
Clear_Msg_Blks_Px
(int handle
) handle none
The handle designated by
Init_Module_Px ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
If successful
page 4 - 2 Excalibur Systems
Chapter 4 Bus Monitor Functions
Get_MON_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_MON_Status_Px
returns the status of the Monitor. The function is useful to determine what condition triggered an interrupt.
Note:
The status is automatically reset each time it is read.
Get_MON_Status_Px
(int handle ) handle
The handle designated by
Init_Module_Px none
Status word to check for the following flags:
MSG_IN_PROGRESS A message is in the process of being received [0002 H]
TRIG_RCVD A message which matched trigger1 or trigger2 has been received [0001 H]
CNT_TRIG_MATCH The number of messages recorded by the module has reached the number
[0004 H] ebadhandle emode
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
0 If successful
Run_MON_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Run_MON_Px
causes the Monitor module to start.
Run_MON_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle emode etimeout
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
If Monitor is currently running
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 3
Chapter 4 Bus Monitor Functions
Set_Broad_Ctl_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Broad_Ctl_Px
designates the RT address 31 as either the broadcast address or as a regular RT.
Set_Broad_Ctl_Px
(int handle , int flag ) handle
The handle designated by
Init_Module_Px flag ENABLE Sets RT31 as the broadcast address [0001 H]
DISABLE Sets RT31 as a regular RT
[0000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
If an invalid parameter was used as an input
If successful
Set_Mode_Addr_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Mode_Addr_Px
defines which ‘subaddresses’ in a Command
Word are to be used to indicate that the command in a Mode
Code, instead of being interpreted as an RT subaddress.
Set_Mode_Addr_Px
(int handle , int flag ) handle
The handle designated by
Init_Module_Px flag
‘0’ 11111 and 0000 are mode commands
‘1’ only 00000 is a mode command
‘2’ only 11111 is a mode command none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
If an invalid parameter was used as an input
If successful
page 4 - 4 Excalibur Systems
Chapter 4 Bus Monitor Functions
Set_MON_Concurrent_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_MON_Concurrent_Px
links pairs of modules to each other such that one module of the pair can monitor the other module in the pair internally without attaching to the bus.
PCI
and
cPCI
Module 1 can monitor module 0 and module 3 can monitor module 2 without attaching to the bus.
VME
and
VXI
PCMCIA/EPII
In addition to the above, module 5 can monitor module 4 and module 7 can monitor module 6 without attaching to the bus.
Not applicable
Set_MON_Concurrent_Px ( int handle
, int enable
) handle
The handle designated by
Init_Module_Px enable
ENABLE Enable the internal monitor links [0001 H]
DISABLE Disable the internal monitor links [0000 H] none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px econcurrmonmodule If module 1 or 3 (or modules 5 or 7 on
VME/VXI boards) is not currently selected einval If an invalid parameter was used as an input func_invalid
0
If called for a PCMCIA/EPII card
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 5
Chapter 4 Bus Monitor Functions
Set_Mon_Response_Time_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Mon_Response_Time_Px
sets the Monitor’s response time window. The value determines the maximum wait time until an RT’s Status Response is considered invalid by the
Monitor.
Set_Mon_Response_Time_Px
(int handle , usint rtime ) handle rtime none
The handle designated by
Init_Module_Px
Permissible response time in microseconds ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in Bus Monitor mode
If successful
page 4 - 6 Excalibur Systems
Chapter 4 Bus Monitor Functions
Look Up Submode
Assign_Blk_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Assign_Blk_Px
assigns a data block to a RT subaddress.
Assign_Blk_Px
(int handle , int rtid , int blknum ) handle
The handle designated by
Init_Module_Px rtid blknum
11 bit identifier including RT#, T/R bit and
Block number:
Valid values: 1 – 127 Assign data block to RTid
or
0 De-assigns block‘ none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px emode If module is not in Monitor mode einval
0
If an invalid parameter was used as an input
If successful
Enable_Lkup_Int_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Enable_Lkup_Int_Px
enables or disables interrupts for the specified RTid .
Enable_Lkup_Int_Px
(int handle , int rtid , int toggle ) handle
The handle designated by
Init_Module_Px rtid toggle
11 bit identifier including RT#, T/R bit and
ENABLE Enable interrupts for the RTid
[0001 H]
DISABLE Disable interrupts for the RTid
[0000 H] none ebadhandle einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If an invalid parameter was used as an input
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 7
Chapter 4 Bus Monitor Functions
Get_Last_Blknum_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Last_Blknum_Px returns the number of the last data block written to.
Get_Last_Blknum_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle emode otherwise
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
Number of the current data block in use:
Valid values 1 – 127
No block
Get_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Get_Message_Px
retrieves a specified message from the
Message Block Area.
Get_Message_Px
(int
* msgptr ) handle , int blknum , struct MONMSG handle
The handle designated by
Init_Module_Px blknum msgptr
The blknum for the most recent message is obtained via the
function.
Valid values: 0 – 127
Pointer to the structure defined below with the data returned. Space should always be allocated for 36 words of data to accommodate the maximum case of RT-to-RT transmission of 32 Data words + 2 Status words + 2 Command words.
typedef struct { int msgstatus;
RT2RT_MSG
ME_SET
Status word containing the following flags:
END_OF_MSG
TRIGGER_FOUND
Indicates end of message [8000 H]
Trigger message was received and restored [4000 H]
Message was RT-to-RT transfer
[2000 H]
Message Error bit in the RT
Status word [1000 H]
BAD_STATUS
INVALID_MSG
RT Status word bits set (not ME bit) [0800 H]
Word count or Sync error occurred
[0400 H]
page 4 - 8 Excalibur Systems
Chapter 4 Bus Monitor Functions
Get_Message_Px (cont.)
BM_BAD_CHECKSUM Bad checksum [0200 H]
(1760 options only)
BUS_A_XFER Message was transferred on bus A
[0100 H]
INVALID_WORD Bad bit count, Manchester or parity [0080 H]
BAD_HEADER_MON* Header error [0060 H] (for 1760 options only)
Note:
If 1760 options are in effect, set either bits 05 or 06 for
Word Count Errors; both bits must be set for Header
Error.
WORD_CNT_HI
WORD_CNT_LO
RT transmitted too many words
[0040 H]
RT transmitted too few words
[0020 H]
BAD_RT_ADDR
BAD_SYNC
BAD_GAP
MON_LATE_RESP
Received 1553 Status word did not contain the correct RT address
[0010 H]
Sync of either the Command or the
Data word(s) is incorrect [0008 H]
Invalid gap received between 1553
Words [0004 H]
Response time error occurred in the message, even if no RT active on the module [0002 H]
MSG_ERROR unsigned long elapsedtime;
Error occurred, defined in other flags [0001 H]
The 32-bit Time tag associated with the message.
int *words; A pointer to an array of 1553 words.
Return Values
} ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
If an invalid parameter was used as an input
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 9
Chapter 4 Bus Monitor Functions
Sequential Submode
Get_Counter_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Counter_Px
returns the number of the last block to be filled with a monitored message. There are 200 blocks, numbered
0 – 199.
Get_Counter_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle emode counter
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Sequential Monitor mode
0 – 199
Get_Next_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Get_Next_Message_Px
reads the message block following the block read in the previous call to
Get_Next_Message_Px
. The first call to
will return block 0.
Note:
If the next block does not contain a new message an error will be returned. If the user falls 200 blocks behind, it is impossible to know if the message returned is newer or older than the previous returned message unless the Time tag is checked. The function therefore returns the Time tag itself in the elapsed time field rather than a delta value.
Get_Next_Message_Px
(int handle , struct MONMSG * msgptr ) handle
The handle designated by
Init_Module_Px msgptr struct MONMSG { int msgstatus; Status word containing the following flags:
END_OF_MSG Indicates end of message [8000 H]
TRIGGER_FOUND
RT2RT_MSG
Pointer to the structure defined below in which to return the message
Trigger message was received and restored [4000 H]
Message was RT-to-RT transfer
[2000 H]
ME_SET Message Error bit in the RT
Status word [1000 H]
page 4 - 10 Excalibur Systems
Chapter 4 Bus Monitor Functions
Get_Next_Message_Px (cont.)
BAD_STATUS
INVALID_MSG
RT Status word bits set (not ME bit) [0800 H]
Word count or Sync error occurred
[0400 H]
BM_BAD_CHECKSUM Bad checksum [0200 H]
(1760 options only)
BUS_A_XFER Message was transferred on bus A
[0100 H]
INVALID_WORD Bad bit count, Manchester or parity [0080 H]
BAD_HEADER_MON* Header error[0060 H]
(for 1760 options only)
Note:
If 1760 options are in effect, set either bits 05 or 06 for
Word Count Errors; both bits must be set for Header
Error.
WORD_CNT_HI
WORD_CNT_LO
RT transmitted too many words
[0040 H]
RT transmitted too few words
[0020 H]
BAD_RT_ADDR
BAD_SYNC
BAD_GAP
MON_LATE_RESP
MSG_ERROR unsigned long elapsedtime; unsigned int
*words [36];
Received 1553 Status word did not contain the correct RT address
[0010 H]
Sync of either the Command or the
Data word(s) is incorrect [0008 H]
Invalid gap received between 1553
Words [0004 H]
Response time error occurred in the message, even if no RT active on the module [0002 H]
Error occurred, defined in other flags [0001 H]
The 32-bit Time tag associated with the message.
A pointer to an array of 1553 words in the sequence they were received over the bus.
}
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 11
Chapter 4 Bus Monitor Functions
Get_Next_Message_Px (cont.)
Return Values
ebadhandle emode enomsg eoverrun block number
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Monitor mode
If there is no message to return
If message was overwritten in the middle of being read here. At least 200 messages were received since the previous
Get_Next_Message_Px, so the Time tags are out of sync.
If successful: valid values 0 – 199
Set_Cnt_Trig_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Cnt_Trig_Px
sets a block number as the counter trigger.
When this block is filled, the CNT_TRIG_MATCH bit within the Monitor status word will be set and, if requested via the
Set_Interrupt_Px
function an interrupt will be generated.
Set_Cnt_Trig_Px
(int handle , int blknum ) handle
The handle designated by
Init_Module_Px blknum
Block numbers
Valid values: 0 – 199 none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Sequential Monitor mode
If an invalid parameter was used as an input
If successful
page 4 - 12 Excalibur Systems
Chapter 4 Bus Monitor Functions
Set_Trigger_Mode_Px
Description
Syntax
Input Parameters
Set_Trigger_Mode_Px
determines:
1. The action to be taken upon receiving a message matching the trigger.
2. If the source of the trigger will be the Command word or the message Status Word.
The trigger message is always stored, and the user can choose to store all messages from this point on or only those messages matching the trigger.
To disable the triggers, call
Set_Trigger_Mode_Px
with a mask argument of 0000.
Note: Set_Trigger_Mode_Px
must be called after
Set_Trigger1_Px and
Set_Trigger2_Px
. Otherwise, the mode may not be set properly.
Set_Trigger_Mode_Px
(int handle , int mode ) handle
The handle designated by
Init_Module_Px mode
When to trigger
Combination of one flag from each group
ORed together
STORE_AFTER Default – Causes storage of messages to begin following the first occurrence of a trigger message
[0010 H]
STORE_ONLY Causes only messages matching the trigger to be stored
[0008 H]
Output Parameters
Return Values
On what to trigger
TCOMMAND Default – Causes triggering to be based on the Command word
[0000 H]
STATUS_TRIGGER Causes triggering to be based on the
Message Status word
[0080 H] none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px emode einval
0
If module is not in Sequential Monitor mode
If an invalid parameter was used as an input
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 13
Chapter 4 Bus Monitor Functions
Set_Trigger1_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
In
Set_Trigger_Mode_Px
the user can select a 1553 Command word
or a Message Status word for the monitor to trigger on. (See
Set_Trigger_Mode_Px on page 4-13.)
In
Set_Trigger1_Px
the user specifies which Control word or
Message Status word is the trigger. When a message matching this parameter is encountered, the trigger is met and the action specified in
Set_Trigger_Mode_Px
is taken.
The user has the option of setting an additional trigger using
Set_Trigger2_Px
.
Note: Set_Trigger1_Px
must be called before
Set_Tigger_Mode_Px
.
Otherwise, the mode may not be set properly.
Set_Trigger1_Px
(int handle , int trigger
, int mask ) handle
The handle designated by
Init_Module_Px trigger mask
Example
16 bit trigger value – a Command Word or
Message Status Word
Set_Trigger_Mode_Px on page 4-13
Mask for trigger. Specifies which bits in the trigger word are required to match and which are ‘don’t care’
‘1’ in required bit positions
‘0’ in don't care bit positions
Mask of all ‘0’s turns off trigger
When triggering on Command words,
Set_Trigger1_Px
or
Set_Trigger2_Px
(0843 H, F800 H) would trigger all messages to/from RT1.
none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Sequential Monitor mode
If successful
page 4 - 14 Excalibur Systems
Chapter 4 Bus Monitor Functions
Set_Trigger2_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
In
Set_Trigger_Mode_Px
the user can select a 1553 Command word
or a Message Status word for the monitor to trigger on. (See
Set_Trigger_Mode_Px on page 4-13.)
In
Set_Trigger2_Px
the user specifies which Control word or
Message Status word is the trigger. When a message matching this parameter is encountered, the trigger is met and the action specified in
Set_Trigger_Mode_Px
is taken.
The user has the option of setting an additional trigger using
Set_Trigger1_Px
.
Note: Set_Trigger2_Px
must be called before
Set_Tigger_Mode_Px
.
Otherwise, the mode may not be set properly.
Set_Trigger2_Px
(int handle , int trigger
, int mask ) handle
The handle designated by
Init_Module_Px trigger mask
Example
16 bit trigger value – a Command Word or
Message Status Word
Set_Trigger_Mode_Px on page 4-13
Mask for trigger. Specifies which bits in the trigger word are required to match and which are ‘don’t care’
‘1’ in required bit positions
‘0’ in don't care bit positions
Mask of all 0s turns off trigger
When triggering on Command words,
Set_Trigger1_Px
or
Set_Trigger2_Px
(0843 H, F800 H) would trigger all messages to/from RT1.
none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in Sequential Monitor mode
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 4 - 15
Chapter 4 Bus Monitor Functions page 4 - 16 Excalibur Systems
Chapter 5
5 BC/Concurrent-RT Functions
BC/Concurrent-RT Functions
Chapter 5 describes the Galahad Software Tools functions for operating the Px module and PCMCIA/EPII card in BC/Concurrent-RT mode. To set the module in
BC/Concurrent-RT mode, see
In BC/Concurrent-RT mode the module operates as a Bus Controller. The user can define 1553 messages and group them into frames and has control over which commands and data are transmitted over the bus as well as the timing between messages and frames. Error injection options permit detailed testing of RTs, and error detection features provide rich reporting capabilities.
In addition, the module can simulate up to 32 Remote Terminals using the
Any reference to a module, also applies to the EXC-1553PCMCIA/EPII card.
The following functions are described in this chapter:
The input values included in each function are given, in Hex format, by each flag within the function description.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 1
Chapter 5 BC/Concurrent-RT Functions
BC/Concurrent-RT Simulation
In BC/Concurrent-RT mode, the
Create_1553_Message_Px function is used to define both the BC message and any simulated RT response. In BC/Concurrent-RT mode, the maximum number of Words in the message is 36:
Maximum number of Data words
+ Maximum number of Command words
+ Maximum number of Status words
Maximum number of Words in the message
32
2
2
36
Refer to the hardware User’s Manual that came with your module for further explanation and examples of this mode.
Command Word Calculation
Some of the functions in BC/Concurrent-RT mode take the 1553 Command word as an argument. The structure of the Command word is:
5 bits 1 bit 5 bits 5 Bits
RT ADDRESS T/R SUBADDRESS WORD COUNT
Example:
RT5, Receive, Subaddress 6 and Word count 15 would be represented as 0010 1000 1100 1111 in binary or 28CF in hex.
The
Command_Word_Px
function, on page 5-12, is provided to carry out this
calculation.
Servicing the Service Request (SRQ) Bit
The SRQ bit is set for a Remote Terminal (RT) in the 1553 RT Status Word.
Setting the SRQ bit indicates to the Bus Controller (BC) that the RT/Subaddress requires service.
In response, the BC provides the following service: the module will send out a mode code 16 (transmit Vector Word) to get the Vector Word from the RT which contains more information about what needs service. The BC will then send out a transmit message to the Subaddress (provided that it is not set to 0) identified in the Vector Word.
page 5 - 2 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Functions by Category
The more frequently called functions are grouped according to use. Page references are given only if the functions do not appear in this chapter.
Sending out a fixed number of messages in a loop
To initialize the module/card (page 2-8)
Init_Module_Px for PCI boards and PCMCIA cards
Stop_Px
Release_Module_Px
To place the module in BC/Concurrent-
To create the messages to send
To select the order in which to transmit the messages
To determine the time between transmission of frames
To choose the frame to transmit
To start the module running
To Stop the RT
To release resources assigned to the module
Additional frame functions:
To designate a frame to be sent out by
Send_Async_Frame
To send the asynchronous frame that was setup by a call to
Select_Async_Frame
To set the minor frame time for a Minor frame type of message
Obtaining data and status information during transmission
To get data and 1553 status information
To get both data and 1553 status information AND status information for a particular message
To get module level status information
To clear the BC status
To read messages monitored on the bus by the
Internal Concurrent Monitor
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 3
Chapter 5 BC/Concurrent-RT Functions
Changing message parameters in real-time
To select how long to wait for an RT to respond
To stop transmission at a selected message
To resume transmission following a halt
To skip transmission of a specified message
To restore a skipped message
To cause the module to stop if it detects an error
To fully clear (entire module) in order to restart
To partially clear (only frame) in order to restart
Setting RTs
In BC/Concurrent-RT mode, the user can simulate an entire system by simulating one or more RTs in addition to simulating the Bus Controller. To simulate RTs, set up the Data and Status Words that the simulated RTs are expected to send in
.
The functions to simulate RTs are described in detail in
.
To select the RTs to be simulated
To turn off simulation of a RT
To select how long to wait before responding to a command
Note:
These RT functions are the only ones usable in BC/Concurrent-RT mode.
to start BC/Concurrent-RT module operation and not
Run_RT_Px
.
To send checksum values – for 1760 options modules
With the Excalibur Px modules which support the 1760 options in BC and
BC/Concurrent-RT modes, the user can send a checksum value in place of the last
Data Word in the message. In addition, an error may be injected into this checksum value. The following functions control these functions:
To select whether or not to place checksum as the last Data Word of a message
To select whether or not to use checksum error injection on the message
page 5 - 4 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
BC/Concurrent-RT Functions
Alter_Cmd_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Alter_Cmd_Px
changes the Command word of a previously defined message. The function takes an RT address and a SA as arguments and copies these into the original Command word. The number of Data words cannot be changed.
Alter_Cmd_Px
(int handle , int id, usint rt , usint sa) handle
The handle designated by
Init_Module_Px id rt sa
Message identifier returned from a prior call
The new RT number
Valid values: 0 – 31
or
SAME_RT Do not change the RT of the Command [0020 H]
The new Subaddress number
Valid values: 0 – 31
or
SAME_SA Do not change the SA of the Command [0020 H] none ebadhandle emode ebadid
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC mode
If id is not a valid message id
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 5
Chapter 5 BC/Concurrent-RT Functions
Alter_IMG_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Alter_IMG_Px
changes the intermessage gap time of a previously defined message.
Alter_IMG_Px
(int handle , int frameid, int msgentry , unsigned long img ) handle
The handle designated by
Init_Module_Px frameid msgentry
Frame identifier returned from a prior call to
Create_Frame_Px
Entry within the frame, i.e., 0 for the first message in the frame, 1 for the second message, etc.
New intermessage gap time in microseconds img none ebadhandle frm_erange
If an invalid handle was specified; should be value returned by
Init_Module_Px
If frameid is not a valid frame id frm_erangecnt
0
If msgentry is greater than the number of messages in the frame
If successful
page 5 - 6 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Alter_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Alter_Message_Px
changes the data of a previously defined message. The function receives as input a pointer to an array of Data words and copies these words into the original message. The Command word cannot be changed and therefore the number of Data words cannot be changed. Only the values of the Data words (and Status word(s) for simulated RTs in BC/Concurrent-RT mode) can be changed.
Note:
Appendix A: MIL-STD-1553 Formats
Alter_Message_Px
(int handle , int id , usint * data ) handle
The handle designated by
Init_Module_Px id data
Message identifier returned from a prior call
Pointer to an array of up to 34 words of new
Data words (plus Status word(s) for BC/
Concurrent-RT mode) for message
Note:
id.
Space must be left for the Status word, even if the RT is not simulated.
none ebadhandle ebadid emode
If an invalid handle was specified; should be value returned by
Init_Module_Px
If id is not a valid message id
If not in BC/Concurrent-RT mode eminorframe If message is Minor Frame type
0 If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 7
Chapter 5 BC/Concurrent-RT Functions
Alter_MsgSendTime_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Alter_MsgSendTime_Px
changes a message send time previously
. This is for use with the replay
on page 5-35) to specify exactly when a
message will be sent out.
Alter_MsgSendTime_Px
(int unsigned int mst ) handle , int frameid , int msgentry , handle
The handle designated by
Init_Module_Px frameid msgentry mst
Frame identifier returned from a prior call to
Create_Frame_Px
Entry within the frame, i.e. 0 for the first message in the frame, 1 for the second message, etc.
The Time tag value at which the message should be sent out in replay mode none ebadhandle emode frm_erange
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If frameid is not a valid frame id frm_erangecnt
If msgentry is greater than the number of messages in the frame
0 If successful
page 5 - 8 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
BC_Check_Alter_Msgentry_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
To insure data integrity, call
BC_Check_Alter_Msgentry_Px
before a
. The function verifies that a message that is to be altered is not in the process of being transmitted or received. Without this check, a message may be altered in the middle of its transmission.
After a successful call to this function the user has at least
20
or
Note: BC_Check_Alter_Msgentry_Px
replaces the obsolete function
BC_Check_Alter_Msg_Px
.
BC_Check_Alter_Msgentry_Px
is more accurate when multiple frames are used.
BC_Check_Alter_Msgentry_Px
(int msgentry ) handle,
int frameid , int handle
The handle designated by
Init_Module_Px frameid msgentry
Frame identifier returned from a prior call to
Create_Frame
Entry within the frame, i.e. 0 for the first message in the frame, 1 for the second message, etc.
none ebadhandle emode einval
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in BC/Concurrent-RT mode.
If an invalid parameter was used as an input frm_erange If frameid is not a valid frame id frm_erangecnt If msgentry is greater than the number of messages in the frame
Successful if:
ALTER_MSG If message is available to be altered [0001 H]
DO_NOT_ALTER_MSG If message is not available to be altered
[0000 H]
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 9
Chapter 5 BC/Concurrent-RT Functions
Clear_Card_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Clear_Card_Px
clears out all messages and message frames (and the Software Tools variables associated with them) from the memory of the current module. Use this function to delete old, unnecessary messages to make room for new messages. It may be called to undo calls to
Create_1553_Message_Px
and
Create_Frame_Px
.
Clear_Card_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
Clear_Frame_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Clear_Frame_Px
clears out all message frames previously created via
Create_Frame_Px
while leaving messages created
. May be used in situations when a
limited number of messages must be reformulated into different frames in realtime.
Note:
It is often more efficient to use the
and
Clear_Frame_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If successful
page 5 - 10 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Clear_Timetag_Sync_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Clear_Timetag_Sync_Px
resets the Time tag register to 0 when the BC sends out a Mode Code synchronize message. The function also operates in RT mode, when the RT receives the selected Mode
Code sychronize message.
Clear_Timetag_Sync_Px
(int handle , int modecode , int flag ) handle
The handle designated by
Init_Module_Px modecode
The selected Mode Code: 1 or 17 flag
ENABLE Reset Time tag at Mode Code ‘Sync’
[0001 H]
DISABLE Do not reset Time tag at Mode Code
‘Sync’ [0000 H] none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px emode If module is not in BC/Concurrent-RT or RT mode einval
0
If an invalid parameter was used as an input.
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 11
Chapter 5 BC/Concurrent-RT Functions
Command_Word_Px
-
Description
Syntax
Input Parameters
Output Parameters
Return Values
Command_Word_Px
is a utility function to help the user calculate the 1553 Command word value.
Command_Word_Px
(int rtnum , int
type,
int subaddr
, int wordcount, usint * commandword) rtnum
Address of the RT
Valid values: 0 – 31 type subaddr
TRANSMIT Indicates that the RT/SA should transmit Data words
[0001 H]
RECEIVE Indicates that the RT/SA should receive Data words
[0000 H]
Designated subaddress of the given RT
Valid values: 0 – 31 wordcount
The number of words to be received or transmitted in a message.
Valid values:0 – 31
Note:
For messages with at least one Data word, 0 indicates a word count of 32.
commandword
The calculated Command word ebadhandle einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If an invalid parameter was used as an input.
If successful
page 5 - 12 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Create_Frame_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Create_Frame_Px
creates a frame of previously defined messages to be sent by the BC. Each element in the frame structure consists of a message id (the value returned from a
), and a gap time indicating the
time between the transmission of the message and the following one. The frame structure must contain a final entry with id ‘0’, indicating the end of the frame.
Up to 20 frames may be defined by calls to
Create_Frame_Px
, each call returning a frame id which can be used as a parameter to
Start_Frame_Px
to specify which frame to send next.
Run_BC_P x then sends the messages in that frame.
Note:
When setting up a frame for use in Replay mode, indicate the required ‘message send time’ for each message, in place of the gap time. (See
Create_Frame_Px
(int handle , struct FRAME * framestruct) handle
The handle designated by
Init_Module_Px
FRAME framestruct [ ]; struct FRAME { short int id;
Message identifier returned by
Create_1553_Message_Px
or 0 for last message long gaptime;
Gap Time between this message and following message in microseconds
or
Message Send Time – Time tag at which this message should be sent on in replay mode.
}; none ebadhandle frm_badid
If an invalid handle was specified; should be value returned by
Init_Module_Px
If tried to place an undefined message into a message frame frm_nostack frm_maxframe If exceeded maximum number of frames permitted (20) frameid
If there is not enough space in frame stack for this frame
If successful. A frame identifier of a frame just created. The frameid is used in many of the functions in BC/Concurrent-RT mode.
Valid values 0 – 19
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 13
Chapter 5 BC/Concurrent-RT Functions
Create_1553_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Create_1553_Message_Px
creates the basic building block of the 1553 protocol – the message. A message contains a minimum of one, and a maximum of two (for RT-to-RT messages), Command words and 32
Data words, depending on the type of message. Each message created with this function returns a unique id which is used to set or read characteristics of the message or to build a frame (i.e., a collection of messages) for subsequent transmission. The message must define the Data and Status words to be sent by the RT that is being simulated.
Note:
Appendix A: MIL-STD-1553 Formats
Create_1553_Message_Px
(int handle , usint cmdtype , usint data[ ], short int * id) handle
The handle designated by
Init_Module_Px cmdtype
One of the following flags:
RT2BC
BC2RT
RT2RT
MODE
Send a transmit message
[0000 H]
Send a Receive message
[0001 H]
Send an RT to RT transfer message [0002 H]
Mode Command
[0003 H]
BRD_RCV
BRD_RT2RT Broadcast RT to RT transfer message
[0005 H]
BRD_MODE Broadcast Mode Command
[0006 H]
MINOR_FRAME Minor frame message - delay
[000F H] data[ ]
Note:
A pointer to an array of command + data + status
In BC/Concurrent-RT mode the user may create an RT-to-RT message with 32 data words, 2 Command words and 2 Status words for 2 simulated RTs.
id
Broadcast Receive message
[0004 H]
On success, returns a message id identifying the message just created, for use in other function calls.
page 5 - 14 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Create_1553_Message_Px (cont.)
Return Values
ebadhandle emode
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode ebadcommandword If the T/R bit in the Command word is set incorrectly for the given cmdtype parameter einval msgnospace msg2many
0
If an invalid parameter was used as an input
If there is not enough space in message stack for this message
If exceeded maximum number of messages permitted (1660)
If successful
Enable_Checksum_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Enable_Checksum_Px
specifies if the last word of a message should be a checksum word or a regular Data word. This function is used for BC-to-RT and RT-to-RT messages.
Note:
This function is applicable only to modules with 1760 options.
Enable_Checksum_Px
(int handle , int frameid , int msgentry , int enable ) handle
The handle designated by
Init_Module_Px frameid msgentry enable
Frame identifier returned from a prior call to
Create_Frame_Px
Entry within the frame, i.e. 0 for the first message in the frame, 1 for the second message, etc.
ENABLE Checksum is sent [0001 H]
DISABLE Checksum is not sent [0000 H] none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px emode frm_erange
If not in BC/Concurrent-RT mode
If frameid is not a valid frame id frm_erangecnt
If msgentry is greater than the number of messages in the frame
0 If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 15
Chapter 5 BC/Concurrent-RT Functions
Enable_Checksum_Error_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Enable_Checksum_Error_Px sets checksum error injection for the
must be called for the message, to
specify that checksum is sent.
This function is used for BC-to-RT and RT-to-RT messages.
Note:
This function is applicable only to modules with 1760 options.
Enable_Checksum_Error_Px
(int handle , int frameid , int msgentry , int enable ) handle
The handle designated by
Init_Module_Px frameid msgentry enable
Frame identifier returned from a prior call to
Create_Frame_Px
Entry within the frame, i.e. 0 for the first message in the frame, 1 for the second message, etc.
ENABLE Erroneous checksum is sent
[0001 H]
DISABLE Correct checksum is sent
[0000 H] none ebadhandle emode frm_erange
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If frameid
is not a valid frame id frm_erangecnt
If msgentry is greater than the number of messages in the frame
0 If successful
Enable_SRQ_Support_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Enable_SRQ_Support_Px
enables Service Request processing. See
Servicing the Service Request (SRQ) Bit
on page 5-2. If this function is
not called, SRQ processing is enable by default.
Enable_SRQ_Support_Px ( int handle
, int enableflag
) handle
The handle designated by
Init_Module_Px enableflag
ENABLE Enable SRQ processing [0001 H]
DISABLE Disable SRQ processing [0000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC mode
If an invalid parameter was used as an input
If successful
page 5 - 16 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Get_BC_Msgentry_Px
Description
Syntax
Input Parameters
Output Parameters
Get_BC_Msgentry_Px combines the status and the contents of a message in one structure, similar to the function of
(RT) and
(BC).
Get_BC_Msgentry_Px
replaces the obsolete function
Get_BC_Message_Px. Get_BC_Msgentry_Px is more accurate when multiple frames are used.
Get_BC_Msgentry_Px
( int handle, int frameid
, int msgentry
, struct BCMSG
* msgptr
) handle
The handle designated by
Init_Module_Px frameid msgentry msgptr
Frame identifier returned from a prior call to
Entry within the frame, i.e., 0 for the first message in the frame, 1 for the second message, etc.
Pointer to the structure defined below in which to return the data. Space should always be allocated for 36 words of data to accommodate the maximum case of RT-to-RT transmission of 32 Data words plus 2 Status words and 2 Command words.
struct BCMSG { unsigned int msgstatus
Status word containing the following words:
END_OF_MSG Indicates end of message
[8000 H]
BC_BAD_CHECKSUM Bad checksum on the transmit side
[4000 H]
BAD_BUS RT response received on non-active channel [2000
H]
ME_SET Message Error bit in the RT
Status word [1000 H]
BAD_STATUS Bit other than ME set in
1553 Status word [0800 H]
INVALID_MSG Word count or Sync error occurred [0400 H]
LATE_RESP RT responded late [0200 H]
BAD_HEADER_BC Error in Header Word
[0100 H] (for 1760 only)
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 17
Chapter 5 BC/Concurrent-RT Functions
Get_BC_Msgentry_Px (cont.)
Return Values
Note:
INVALID_WORD Bad bit count or Manchester error or parity error
[0080 H]
WD_CNT_HI
WD_CNT_LO
RT transmitted too many words [0040 H]
RT transmitted too few words [0020 H]
BAD_RT_ADDR 1553 Status word contained wrong RT address [0010 H]
BAD_SYNC Status or Data sync were wrong [0008 H]
BAD_GAP
MSG_ERROR
Invalid Gap time occurred between words [0004 H]
Error occurred; defined in other flags [0001 H]
A pointer to an array of 1553 words.
unsigned int words [36]
} ebadhandle emode
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode einval frm_erange
If an invalid parameter was used as an input
If frameid is not a valid frame id frm_erangecnt If msgentry is greater than the number of messages in the frame
0 If successful
The function can be used instead of separately calling
for the Status word, and then calling
that returns just the content of the message.
before calling this function.
An error message “enobcmsg” will be returned.
page 5 - 18 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Get_BC_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_BC_Status_Px
indicates what condition triggered an interrupt. The function returns status flags generated since the last call to
Reset_BC_Status_Px.
The function may be used for polling applications.
Note:
Reset this status with the
Reset_BC_Status_Px
command.
Get_BC_Status_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px emode If not in BC/Concurrent-RT mode
If successful 0 or more of the following flags:
MSG_ERR An error in some message
[0008 H]
END_OF_FRAME Complete frame of messages sent [0004 H]
MSG_CMPLT Message sent [0002 H]
WAIT_FOR_CONTINUE Message named by
[0001 H]
Get_Minor_Frame_Time_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Get_Minor_Frame_Time_Px
gets the previously stored minor frame time in microseconds. This value was set in a call to
Set_Minor_Frame_Time_Px
.
Note:
This function is valid only in BC/Concurrent-RT mode
Get_Minor_Frame_Time_Px
(int handle
, long
*frame_time ) handle
The handle designated by
Init_Module_Px frame_time ebadhandle
The minor frame time in microseconds emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 19
Chapter 5 BC/Concurrent-RT Functions
Get_Msgentry_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Get_Msgentry_Status_Px
returns a Status word recorded by the
Bus Controller associated with a selected message in a selected frame. If a valid message status is returned, the function clears the status.
Note: Get_Msgentry_Status_Px replaces the obsolete function
Get_Msg_Status_Px. Get_Msgentry_Status_Px is more accurate when multiple frames are used.
Get_Msgentry_Status_Px
(int handle, int frameid , int msgentry , usint * msgstatusword ) handle
The handle designated by
Init_Module_Px frameid
Frame identifier returned from a prior call
msgentry
Entry within the frame, i.e., 0 for the first message in the frame, 1 for the second message, etc.
msgstatusword
On success, 0 or more of the following flags
END_OF_MSG Complete 1553 message received [8000 H]
BC_BAD_CHECKSUM Bad checksum on the transmit side
[4000 H]
BAD_BUS
ME_SET
RT response received on non-active channel
[2000 H]
Message Error bit in the
RT Status word
[1000 H]
BAD_STATUS Bit other than ME set in
1553 Status word
[0800 H]
LATE_RESP RT responded late
[0200 H]
BAD_HEADER_BC Error in Header
Word [0100 H]
(for 1760 only)
INVALID_WORD
WD_CNT_HI
WD_CNT_LO
Bad bit count or
Manchester error or parity error [0080 H]
RT transmitted too many words [0040 H]
RT transmitted too few words [0020 H]
page 5 - 20 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Get_Msgentry_Status_Px (cont.)
Return Values
ebadhandle emode einval frm_erange
BAD_RT_ADDR 1553 Status word contained wrong RT address [0010 H]
BAD_SYNC Status or Data sync were wrong [0008 H]
BAD_GAP Invalid Gap time occurred between words
[0004 H]
MSG_ERROR Error occurred; defined in other flags [0001 H]
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If an invalid parameter was used as an input
If called this function with an undefined frame frm_erangecnt
If called to this function with a msgentry value greater than the number of messages in the frame
0 If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 21
Chapter 5 BC/Concurrent-RT Functions
Get_Next_Message_BCM_Px
Description
Syntax
Input Parameters
Output Parameters
Get_Next_Message_BCM_Px r elates to the
Internal Concurrent Monitor
available in the memory of the module. The
Internal Concurrent
Monitor
operates automatically when the module is started in
BC/Concurrent-RT mode. All bus traffic in BC/Concurrent-
RT mode is recorded in the
Internal Concurrent Monitor
memory.
The Concurrent Monitor operates in sequential fixed block mode which means that the 1553 Message blocks are stored in sequential locations in memory, beginning from block 0.
The first call to the function
Get_Next_Message_BCM_Px
returns the contents of block 0. If the next block does not contain a new message, an error value will be returned.
Note:
The structure returned by this function is similar to that returned by the Sequential Monitor mode function
Get_Next_Message_Px
. However, the bits used in the
Message Status word of the
Internal Concurrent Monitor
are unique to this function – they are similar but not identical to the bits set in the Message Status word of
Sequential Monitor mode and BC/Concurrent-RT mode and its Internal Concurrent Monitor.
For each mode verify the Message Status bits for the appropriate mode and function.
Get_Next_Message_BCM_Px
(int
* msgptr, usint * param3 ) handle, struct MONMSG handle
The handle designated by
Init_Module_Px msgptr
Pointer to the address in dual-port RAM at which the message is found struct MONMSG { int msgstatus
Status Word containing one or more of the following flags:
END_OF_MSG Indicates end of message [8000 H]
BUS_A
ME_SET
Indicates BUS A [4000 H]
BAD_CHECKSUM_CONCM Checksum error [2000 H]
(for 1760 only)
Message Error bit in the RT
Status word [1000 H]
BAD_STATUS Status Word bits set [0800 H]
INVALID_MSG Invalid message; perhaps RT-to-
RT with two receive Command words [0400 H]
page 5 - 22 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Get_Next_Message_BCM_Px (cont.)
Return Values
MON_LATE_RESP
BAD_HEADER_BCCM Bad Header Word [0100 H]
(for 1760 only)
INVALID_WORD At least one invalid 1553 Word received [0080 H]
WD_CNT_HI
Response time error occurred in the message, even if no RT active on the module [0200 H]
WD_CNT_LO
RT transmitted too many words
[0040 H]
RT transmitted too few words
[0020 H]
BAD_RT_ADDR
BAD_SYNC
Received 1553 Status word did not contain the correct RT address [0010 H]
Sync of either the Command or the Data word(s) is incorrect
[0008 H]
BAD_GAP Invalid gap received between
1553 Words [0004 H]
RT2RT_MSG_CONCM RT-to-RT message was received
[0002 H]
MSG_ERROR Error occurred; defined in other flags [0001 H] unsigned long elapsedtime unsigned int words [36];
Always a 32-bit-Time Tag; resolution is 4 microseconds
A pointer to an array of 1553 words in the sequence they were received over the bus.
} param3 ebadhandle emode enomsg block number
Reserved for future use
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module is not in RT mode
If there is no message to return
If successful. Valid values are 0 – 408
Note:
For M4K1553Px modules rev A and rev
A1 using firmware 1.6 or earlier: valid values are 0 – 127.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 23
Chapter 5 BC/Concurrent-RT Functions
Insert_Msg_Err_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Insert_Msg_Err_Px
selects various errors to inject into a previously defined message. This functions may also be
called in realtime after a call to
.
Insert_Msg_Err_Px
(int handle , int id , int flags ) handle
The handle designated by
Init_Module_Px id flags
Message identifier returned from a prior call to
Create_1553_Message_Px
PARITY_ERR Select parity error on 1553 words [4000 H]
WD_CNT_ERR Inserts bad word count based on
[1000 H]
BIT_CNT_ERR Inserts bad bit count based on
[0800 H]
SYNC_ERR Data type sync is inserted in Command word
[0400 H]
GAP_ERR
DATA_ERR
Invalid gap time between
Command and Data words
[0300 H]
For BC-to-RT commands the SYNC_ERR and
PARITY_ERR may be accompanied by this flag to cause the error to be inserted in the Data words rather than the Command word [0100 H] none ebadhandle emode ebadid
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id
If successful
page 5 - 24 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Re_Create_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Re_Create_Message_Px enables the user to alter all the parameters of a message for a particular message id that has already been allocated.
Re_Create_Message_Px
has the same parameters as
except that the id is an input instead of
an output.
To change a message, the user must give the message’s message id . The total message size must not exceed the message size of the one allocated for the original message that was created by
Note:
Appendix A: MIL-STD-1553 Formats
Re_Create_Message_Px
(int handle , usint cmdtype , usint data [], short int id ) handle
The handle designated by
Init_Module_Px cmdtype
One of the following flags: data [] id
RT2BC
BC2RT
RT2RT
MODE
BRD_RCV
Send a transmit message
[0000 H]
Send a Receive message
[0001 H]
Send an RT-to-RT transfer message
[0002 H]
Mode Command
[0003 H]
Broadcast Receive message [0004 H]
BRD_RT2RT Broadcast RT-to-RT transfer message
[0005 H]
BRD_MODE Broadcast Mode
Command [0006 H]
MINOR_FRAME Minor frame message - delay [000F H]
A pointer to an array of command + data
(and Status words if RT is simulated by this module)
Message identifier returned by
none
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 25
Chapter 5 BC/Concurrent-RT Functions
Re_Create_Message_Px (cont.)
Return Values
ebadhandle emode ebadid
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id einval If parameter is out of range ebadcommandword If the T/R bit in the Command word is set incorrectly for the given cmdtype parameter msg2big
0
If attempted to create a message with too many words
If successful
Read_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Read_Message_Px
allows the user to read back data associated with a given message. This is used for reading data returned from a Transmit command or for reading the 1553 Status word returned by an RT for all message types. The output consists of the entire message in the same sequence as it appeared on the bus including Command words, Status words and data.
Note:
Appendix A: MIL-STD-1553 Formats
Read_Message_Px
(int handle , int id , usint *words ) handle
The handle designated by
Init_Module_Px id words
Message identifier returned from a prior call to
Create_1553_Message_Px
An array of up to 36 words containing
Command, Status and Data words associated with the message id ebadhandle emode ebadid
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id eminorframe If message is a Minor Frame type
0 If successful
page 5 - 26 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Read_SRQ_Message_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Read_SRQ_Message_Px
allows the user to read back the
Command and Data Words associated with the last SRQ message
Read_SRQ_Message_Px (int handle , usint *vector_status , usint
*msg_status , usint *data , usint *srq_counter ) handle
The handle designated by
Init_Module_Px vector_status
Status word of the Mode code Get Vector
Command msg_status
Status of the BC-to-RT message data
Note:
For msg_status/vector_status flag values, see
Pointer to an array of up to 36 words associated with the SRQ message srq_counter
The number of times an SRQ message came in ebadhandle emode enosrq
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If SRQ was disabled by the user
See
If successful
Reset_BC_Status_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Reset_BC_Status_Px
clears the BC status so that the next call to
Reset_BC_Status_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 27
Chapter 5 BC/Concurrent-RT Functions
Run_BC_Px
Description
Syntax
Output Parameters
Return Values
Run_BC_Px
causes the Bus Controller to start transmitting messages. All data structures must be set up before calling this function.
Run_BC_Px
(int handle , int type ) handle
The handle designated by
Init_Module_Px type
0
1 – 255
Continuous operation
The number of times to execute the current frame none ebadhandle emode bcr_erange etimeout
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If called with type greater than 255
If module is currently running; module was not in halted state
If successful
Select_Async_Frame_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
the user can create multiple frames.
Select_Async_Frame_Px selects a frame to be set up for asynchronous transmission.
Note:
Select_Async_Frame_Px
(int handle , int frameid , int nummsgs ) handle
The handle designated by
Init_Module_Px frameid nummsgs
Frame identifier returned from a prior call to
Number of messages within the frame to execute
or
FULLFRAME Execute the entire frame
[0000 H] none ebadhandle frm_erange frm_erangecnt
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If called this function with an undefined frame
If called to this function with a in the frame
nummsgs value greater than the number of messages
If successful
page 5 - 28 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Send_Async_Frame_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Send_Async_Frame_Px
causes the asynchronous frame that was set up by a call to
current message has completed its transmission.
Note:
Send_Async_Frame_Px
(int handle ) handle
The handle designated by
Init_Module_Px none ebadhandle enoasync
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If there are not enough messages in async frame
If successful
Send_Timetag_Sync_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Send_Timetag_Sync_Px
sets the BC to send the current Time tag value as the Data word in a Mode Code Synchronize with
Data message (Mode code 17). The Time tag is sent out as a single 16-bit Data word, with a resolution of 64 µsec.
Note:
When this feature is disabled, the BC sends the Data word as defined in the message.
Send_Timetag_Sync_Px ( int handle
, int flag
) handle
The handle designated by
Init_Module_Px flag
ENABLE Send Time tag as data for
Mode code 17 [0001 H]
DISABLE Do not send Time tag as data for Mode code 17 [0000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 29
Chapter 5 BC/Concurrent-RT Functions
Set_BC_Resp_Px
Description
Syntax
Output Parameters
Return Values
Set_BC_Resp_Px
sets the amount of time the BC will wait for a response before declaring the RT late.
Set_BC_Resp_Px
(int handle , int time ) handle
The handle designated by
Init_Module_Px time
Time in nanoseconds
Valid range: 2000 – 32000 none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If an invalid parameter was used as an input
If successful
Set_Bit_Cnt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Bit_Cnt_Px
determines how many bits will be sent for messages that have requested a BIT_CNT_ERR error injection. The number sent will be the usual number of bits in a word (20) + offset.
Set_Bit_Cnt_Px
(int handle , int offset ) handle offset
The handle designated by
Init_Module_Px
Number of bits to add or subtract from the correct number of bits in a 1553 word (20).
Valid values:-3 to +3 none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If an invalid parameter was used as an input
If successful
page 5 - 30 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Set_Bus_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Bus_Px
sets the bus over which a particular message will be transmitted.
Set_Bus_Px
(int handle , int id , int bus ) handle
The handle designated by
Init_Module_Px id bus
Message identifier returned from a prior call
XMT_BUS_A Transmit message over
Bus A [0080 H]
XMT_BUS_B Transmit message over
Bus B [0000 H] none ebadhandle emode ebadid
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode ebadchan
0
If id is not a valid message id
If tried to set bus to illegal value
If successful
Set_Continue_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Continue_Px
restarts transmission that has been halted
.
Set_Continue_Px
(int handle , int id ) handle
The handle designated by
Init_Module_Px id
Message identifier returned from a prior call
none ebadhandle emode ebadid
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 31
Chapter 5 BC/Concurrent-RT Functions
Set_Error_Location_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Error_Location_Px
sets the location of errors injected into messages.
Set_Error_Location_Px
(int unsigned int handle , unsigned int errorWord, zcerrorBit ) handle
The handle returned by
Init_Module_Px errorWord zcerrorBit
The index of the data word into which to inject the error. This is used for data word errors only. 0 represents the first data word,
1 the second, etc.
The index of the bit into which to inject a zero crossing error. 0 represents the high bit, (i.e. the first bit to be transmitted after the sync) 1 the next, etc.
none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px func_invalid If the function is not supported by this version of the firmware (1.10 and up of the
M4K1553Px or the EXC-1553PCMCIA/
EPII) emode If the module is not in BC/Concurrent RT mode einval
If errorWord is greater than 31 or is greater than 15 zcerrorBit
0 If successful
Set_Frame_Time_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Frame_Time_Px
determines the time each frame will take when the frame is to be executed more than once. (See
Run_BC_Px on page 5-28). This value is the minimum time in
microseconds from the start of the frame to the start of the next repetition of the frame.
Set_Frame_Time_Px
(int handle , long time ) handle
The handle designated by
Init_Module_Px
Frame time in microseconds time none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If successful
page 5 - 32 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Set_Halt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Halt_Px
halts transmission upon reaching this message.
Transmission will begin again after
is called.
Set_Halt_Px
(int handle , int id) handle
The handle designated by
Init_Module_Px id
Message identifier returned from a prior call
none ebadhandle emode ebadid
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id
If successful
Set_Interrupt_On_Msg_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Interrupt_On_Msg_Px
causes an interrupt to be generated when a chosen message is generated.
Set_Interrupt_On_Msg_Px
(int handle , int frameid , int msgentry , int enable ) handle
The handle designated by
Init_Module_Px frameid msgentry frame_id returned from a call to
Create_Frame_Px
Message number within the frame enable
ENABLE Generate an interrupt [0001 H]
DISABLE Do not generate an interrupt
[0000 H] none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px frm_erange
If frameid is not a valid frame id frm_erangecnt If msgentry is greater than the number of messages in the frame emode If not in BC/Concurrent-RT mode
0 If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 33
Chapter 5 BC/Concurrent-RT Functions
Set_Jump_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Jump_Px
sets the module to jump to a new frame when the module gets to the selected message.
Note:
The original message denoted by the this function.
id is destroyed by
Set_Jump_Px
(int handle , int id , int frameid , int intcnt ) handle
The handle designated by
Init_Module_Px id frameid intcnt
Message identifier returned from a prior
message
Frame identifier returned from a prior call
for frame to jump to
Number of instructions in new frame to execute
or
0 Execute all instructions in frame none ebadhandle emode ebadid frm_erange frm_erangecnt
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id
If frameid is not a valid frame id
If intcnt is greater than the number of messages in the frame
If successful
Set_Minor_Frame_Time_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Minor_Frame_Time_Px
sets time for a Minor Frame message type. This message functions as a “delay time” message. The time given is from the beginning of a Minor Frame to the beginning of the next Minor Frame.
Set_Minor_Frame_Time_Px
( int handle
, long micro_second
) handle
The handle designated by
Init_Module_Px micro_second
Minor Frame time in microseconds; maximum value allowed is 800,000 microseconds (800 milliseconds) none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If successful
page 5 - 34 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Set_Replay_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Replay_Px
sets the module in replay mode. When replay mode is enabled, a message will be sent out when the Time tag equals the message send time (mst) as specified in that msgentry within the frame.
Set_Replay_Px
( int handle
, int flag
) handle
The handle designated by
Init_Module_Px flag
ENABLE Enable replay mode [0001 H]
DISABLE Disable replay mode [0000 H] none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If a parameter is out of range
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 35
Chapter 5 BC/Concurrent-RT Functions
Set_Restore_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Restore_Px restores a message, that was set to skip, to be sent as usual.
Set_Restore_Px
(int handle , int id , int msgtype ) handle
The handle designated by
Init_Module_Px id msgtype
Message identifier returned from a prior call to
Create_1553_Message_Px
One of the following:
Note:
RT2BC
BC2RT
RT2RT
MODE
Send a transmit message
[0000 H]
Send a Receive message
[0001 H]
Send an RT to RT transfer message [0002 H]
Mode Command
[0003 H]
BRD_RCV
BRD_RT2RT
Broadcast Receive message [0004 H]
Broadcast RT to RT transfer message [0005 H]
BRD_MODE Broadcast Mode
Command [0006 H]
MINOR_FRAME Minor frame message - delay [000F H]
The msgtype must be the same as was used in
this information, therefore
Set_Restore_Px must supply it again.
none ebadhandle emode ebadid einval enoskip
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id
is not a valid message id
If an invalid parameter was used as an input
If tried to restore a message that was not skipped
If successful
page 5 - 36 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Set_Retry_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Retry_Px
selects the number and type of retries to attempt in the event of an error.
Set_Retry_Px
(int handle , int id , int num, int altbus ) handle
The handle designated by
Init_Module_Px id num
Message identifier returned from a prior call to
Create_1553_Message_Px
Number of retries to attempt: altbus
1 – 3
0
Number of valid retries
No retries
Whether to retry on the initial bus or to alternate buses for each retry.
RETRY_SAME_BUS Retries should all be on the original bus
[0000 H]
RETRY_ALT_BUS Retries should alternate between buses [0040 H] none ebadhandle emode ebadid einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id
If an invalid parameter was used as an input
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 37
Chapter 5 BC/Concurrent-RT Functions
Set_RT_Active_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Active_Px
causes a particular RT to be simulated.
Note:
This function is for use in BC/Concurrent-RT mode.
Ignore this function if only a Bus Controller is simulated.
Set_RT_Active_Px ( int handle
, int rtnum
, int intrpt
) handle
The handle designated by
Init_Module_Px rtnum intrpt
Address of the RT
Valid values: 0 – 31
This parameter is not used in BC/
Concurrent-RT mode. It is used in RT mode.
none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module not in BC/Concurrent-RT mode
If an invalid parameter was used as an input
If successful
Set_RT_Nonactive_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Nonactive_Px
sets a particular RT address nonactive, thereby turning off simulation for the specified RT.This function may be called in BC/Concurrent-RT mode to turn off
Concurrent-RT simulation.
Set_RT_Nonactive_Px
(int handle , int rtnum ) handle
The handle designated by
Init_Module_Px rtnum
Address of the RT
Valid values: 0 – 31 none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module not in BC/Concurrent-RT mode
If successful
page 5 - 38 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Set_RT_Resp_Time_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_RT_Resp_Time_Px
sets response time for RTs. This is the time between receipt of the command (and data for
BC-to-RT messages) and the transmission of the 1553 Status word by the RT.
This function may be called in BC/Concurrent-RT mode to adjust the timing of simulated Concurrent-RTs.
Set_RT_Resp_Time_Px
(int handle
, int nsecs
) handle
The handle designated by
Init_Module_Px nsecs
Time in nanoseconds
Valid range: 4000 – 42000 none ebadhandle emode
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module not in BC/Concurrent-RT mode
If successful
Set_Skip_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Skip_Px
causes a message within a specified frame to be skipped. The message can be restored later by calling
Set_Restore_Px
.
Set_Skip_Px
(int handle , int id ) handle
The handle designated by
Init_Module_Px id
Message identifier returned from a prior call to
Create_1553_Message_Px none ebadhandle emode ebadid
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If not in BC/Concurrent-RT mode
If id is not a valid message id
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 39
Chapter 5 BC/Concurrent-RT Functions
Set_Stop_On_Error_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Stop_On_Error_Px
sets the module to halt transmission upon reaching a message for which this function has been called and which returns an error status after all retry attempts.
Set_Stop_On_Error_Px
(int handle , int id ) handle
The handle designated by
Init_Module_Px id
Message identifier returned from a prior call
none ebadhandle emode ebadid
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module not in BC/Concurrent-RT mode
If id is not a valid message id
If successful
Set_Sync_Pattern_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Sync_Pattern_Px sets the sync pattern to be used when a Sync error is injected into a message.
Set_Sync_Pattern_Px
(int handle , int pattern ) handle
The handle returned by
Init_Module_Px pattern
Six bits (in the low six bits of this register) each representing a half bit time of the desired register.
For example, a value 0023 H (100011 binary) would be sent as one bit times high, three bit times low and two bit times high
.
none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px func_invalid If the function is not supported by this version of the firmware (requires firmware version
1.10 and up of the M4K1553Px or the
EXC-1553PCMCIA/EPII) emode einval
0
If module is not in BC/Concurrent-RT mode
If pattern contains a set bit above the low six bits
If successful
page 5 - 40 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Set_Var_Amp_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
The
Set_Var_Amp_Px
function enables the user to set the amplitude of the 1553 output signal.
Set_Var_Amp_Px
(int handle
, int millivolts) handle
The handle designated by
Init_Module_Px millivolts
Amplitude in millivolts. Value will be rounded up to the nearest 30 millivolts.
Valid range: 0 – 7.5 volts.
none ebadhandle einvamp
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If tried to set invalid amplitude
If successful
Set_Word_Cnt_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Set_Word_Cnt_Px
sets the number of words to send for messages that have requested WD_CNT_ERR errors. The number sent will be the actual number of words in the message + offset.
Set_Word_Cnt_Px
(int handle
, int offset
) handle
The handle designated by
Init_Module_Px offset
Offset from correct word count
Valid values: -3 to +3 none ebadhandle emode einval
0
If an invalid handle was specified; should be value returned by
Init_Module_Px
If module not in BC/Concurrent-RT mode
If an invalid parameter was used as an input
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 41
Chapter 5 BC/Concurrent-RT Functions
Set_Zero_Cross_Px
Description
Syntax
Input parameters
Output parameters
Return values
Set_Zero_Cross_Px
sets the type of zero crossing to be used when a
Zero Crossing error is injected into a message.
Set_Zero_Cross_Px
(int handle , unsigned int zctype ) handle
The handle returned by
Init_Module_Px zctype
ZC_NO_ERROR No error [0000 H]
ZC_LATE100 Zero cross 100 nanoseconds late (legal) [0001 H]
ZC_LATE150
ZC_LATE200
Zero cross 150 nanoseconds late (illegal) [0002 H]
Zero cross 200 nanoseconds late (illegal) [0003 H]
ZC_EARLY100
ZC_EARLY150
ZC_EARLY200
ZC_STUCK_HI
Zero cross 100 nanoseconds early (legal) [0004 H]
Zero cross 150 nanoseconds early (illegal) [0005 H]
Zero cross 200 nanoseconds early (illegal) [0006 H]
No zero cross, full bit hi
[0008 H]
ZC_STUCK_LO No zero cross, full bit low
[0009 H]
ZC_STUCK_DEAD No zero cross, full bit dead
(center) [000A H] none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px func_invalid If the function is not supported by this version of the firmware (requires firmware version 1.10 and up of the M4K1553Px or the
EXC-1553PCMCIA/EPII) emode If the module is not in BC/Concurrent RT mode einval
If zctype is not one of the flags listed
0 If successful
page 5 - 42 Excalibur Systems
Chapter 5 BC/Concurrent-RT Functions
Start_Frame_Px
Description
Syntax
Input Parameters
Output Parameters
Return Values
Start_Frame_Px
selects which of the multiple frames created by
Note:
This function must be called prior to each call on
. If the module is stopped, either by calling
,
or because all requested messages have been transmitted, the module may be restarted by calling
Start_Frame_Px
(int handle , int frameid , int intcnt ) handle
The handle designated by
Init_Module_Px frameid intcnt
Frame identifier returned from a prior call to
Create_Frame_Px
Number of messages within the frame to execute
or
FULLFRAME Execute the entire frame
[0000 H] none ebadhandle If an invalid handle was specified; should be value returned by
Init_Module_Px frm_erange
If frameid is not a valid frame id frm_erangecnt
0
If intcnt is greater than the number of messages in the frame
If successful
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page 5 - 43
Chapter 5 BC/Concurrent-RT Functions page 5 - 44 Excalibur Systems
MIL-STD-1553 Formats
Appendix A MIL-STD-1553 Formats
Appendix A provides diagrams of MIL-STD-1553 Word and Message formats.
A-1 Word Formats
Word Formats
Register
Bits
1553 Bit
Times
Command
Word
Data
Word
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
5 1 5 5 1
RT T/R
Code
16 1
Sync P
Status
Word
5 1 1 1 3 1 1 1 1 1 1
Sync Reserved P
Message Error
Instrumentation
Service Request
Command
Busy
Subsystem
Dynamic Acceptance
Terminal
Figure A-1 MIL-STD-1553 Word Formats
Note:
T/R = Transmit/Receive
P = Parity
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page A - 1
MIL-STD-1553 Formats
A-2 Message Formats
Message Formats
BC to RT
RT to BC
RT to RT
Receive
Command
Data
Word
Data
Word
Data
Word
*
Status
Word
Transmit
Command
*
Status
Word
Data
Word
Data
Word
Data
Word
Next
Command
Next
Command
Receive
Command
Transmit
Command
*
Status
Word
Data
Word
Data
Word
Data
Word
*
Status
Word
Mode w/o
Data
Mode w/
Data)
(Transmit)
Mode
Command
Mode
Command
*
Status
Word
*
Status
Word
Data
Word
Next
Command
Next
Command
Mode w/
Data
(Receive)
Mode
Command
Data
Word
*
Status
Word
Next
Command
Broadcast
BC to RTs
Receive
Command
Data
Word
Data
Word
Data
Word
Next
Command
Broadcast
RT to RTs
Receive
Command
Transmit
Command
*
Status
Word
Data
Word
Data
Word
Data
Word
Next
Command
Next
Command
Broadcast
Mode w/o
Date
Mode
Command
Broadcast
Mode w/
Data
Mode
Command
Data
Word
Next
Command
Next
Command
Figure A-2 MIL-STD-1553B Message Formats
Note:
* =
Response time
=
Intermessage Gaptime
page A- 2 Excalibur Systems
Galahad Software Tools Installation Instructions EXC-4000PCI Boards
Appendix B Galahad Software Tools Installation Instructions
Appendix B provides installation instructions for addingM4K1553PxII &
EXC-1553PCMCIA/EPII Galahad Software Tools to the following boards:
Appendix B-1 EXC-4000PCI Boards
Appendix B-1 explains the procedure for installing an EXC-4000PCI or
EXC-4000cPCI board and adding M4K1553PxII & EXC-1553PCMCIA/EPII
Galahad Software Tools to run under the following operating systems:
• Windows 9x/ME
• Windows NT4
• Windows 2000/XP
Warning: Whenever you handle an EXC-4000PCI board, wear a suitably grounded electrostatic discharge wrist strap.
Windows 9x /ME Procedures
The Excalibur Installation CD contains the files for:
• PCI Hardware Installation for Windows 9x/ME
• M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools
To install an EXC-4000PCI board on a Windows 9x system:
1. Insert the board into an available PCI slot in your computer
2. Add Galahad Software Tools to your Windows 9x system.
To verify that the board was installed correctly, run the test programs included on the Excalibur Installation CD.
To install the Excalibur EXC-4000PCI board
1. Make sure the computer is turned off. Insert the board into one of the available slots. For more information see the Installation section in the hardware User’s Manual
.
2. Turn on the computer and wait several moments while Windows 9x/ME boots up.
3. The message
Building driver information data
may or may not appear. After several seconds, the message
New Hardware Found
is displayed. Next, the
Update Device
Driver Wizard
is displayed.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page B - 1
Galahad Software Tools Installation Instructions EXC-4000PCI Boards page B- 2
Note:
If the
Update Device Driver Wizard
is not displayed, and you are upgrading from a previous version of the PCI Win 9x/ME Hardware Installation, follow these steps to invoke the
Update Device Driver Wizard.
Right-click
My Computer,
then click
Properties | Device Manager | Excalibur PCI Cards | Excalibur 4000PCI Card |
Properties | Driver | Update Driver.
4. Insert the Excalibur Installation CD in the drive and follow the on-screen instructions.
5. When the following message appears:
Windows found the following updated driver for this device: Excalibur EXC-4000 card
, click
Finish
.
6. Board installation is completed. If prompted to reboot the computer, do so now. Next, continue with board verification below.
To verify board installation:
1. Make certain the Excalibur EXC-4000PCI board is in place in the computer.
2. Right-click
My Computer
. Select
Properties.
The
System Properties
dialog box appears.
3. In the
System Properties
dialog box, click the
Device Manager
tab.
4. Double-click
Excalibur PCI Card
. Verify that the Excalibur EXC-4000PCI board is listed next to a gray diamond-shaped icon.
Board installation verification is successful.
Note:
If you see an exclamation point (
!
) superimposed on the gray diamond, this indicates that the board is not properly installed. Check the following:
• There are not enough memory resources available in the system, free up more memory or IRQs.
• That the computer is Plug and Play compatible. Many computers claim to be “Plug and Play” but are not fully compatible with the Plug and Play specification.
To Add Galahad Software Tools to Windows 9x/ME Systems
Note:
If there is already a previous version of Galahad Software Tools for the same module installed on the computer, the new version will overwrite it.
We recommend that you first uninstall the previous version by selecting
Start | Settings | Control Panel | Add/Remove Programs.
If you want to save the earlier version, you can choose to install the new version to a different directory when the Install Wizard asks to which directory to install the software.
1. Insert the Excalibur Installation CD in the drive, click
Install Drivers,
Applications, Utilities
.
2. Follow the on-screen instructions to select the software that matches your product.
3. When the
Excalibur Configuration Utility
(ExcConfig) screen appears, double-click the
Type
field. Select
4000PCI
.
4. Leave the
Auto
values and click
Save
.
Note:
Remember the device number; it is the parameter for the
Init_Module_Px function.
The EXC-4000PCI board is now ready to run.
Excalibur Systems
Galahad Software Tools Installation Instructions EXC-4000PCI Boards
Running test programs
Excalibur provides test programs to verify that the board is operating properly.
The source code is provided with the test programs as a guide to develop your own applications.
To run the test programs in Galahad Software Tools, the EXC-4000PCI must be linked up to a loopback cable. For details refer to the section Mechanical and
Electrical Specification in your specific module User’s Manual.
Go to
Start | Programs | [Product Name]
, to run the test programs.
Windows NT4 Procedures
The Excalibur Installation CD contains the files for Galahad Software Tools.
To install an EXC-4000PCI board on a Windows NT4 system:
1. Insert the board into an available PCI slot in the computer.
2. Add Galahad Software Tools
3. Reboot the computer
4. To verify that the board was installed correctly, run the test programs that are included on the Excalibur Installation CD
To install the Excalibur EXC-4000PCI board
1. Make sure the computer is turned off.
2. Insert the board into one of the available slots.
For more information, see the section
Installation
in the hardware module User’s
Manual.
To add Galahad Software Tools to Windows NT4 systems
Note:
If there is already a previous version of Software Tools for the same module installed on the computer, the new version will overwrite it. We recommend that you first uninstall the previous version by selecting
Start | Settings |
Control Panel | Add/Remove Programs
. If you want to save the earlier version, you can choose to install the new version to a different directory when the
Install Wizard asks to which directory to install the software.
1. Insert the Excalibur Installation CD in the drive, click
Install Drivers,
Applications, Utilities
.
2. Follow the on-screen instructions to select the software that matches your product.
3. When the
Excalibur Configuration Utility
(ExcConfig) screen appears, double-click the Type field. Select
4000PCI
.
4. Leave the
Auto
values and click
Save
.
Note:
Remember the device number; it is the parameter for the
Init_Module_Px function.
5. Reboot the computer at the end of the installation procedure.
The EXC-4000PCI board is now ready to run.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page B - 3
Galahad Software Tools Installation Instructions EXC-4000PCI Boards
Running test programs
Excalibur provides test programs to verify that the board is operating properly.
The source code is provided with the test programs as a guide to develop your own applications.
To run the test programs in Galahad Software Tools, the EXC-4000PCI must be linked up to a loopback cable. For details refer to the section Mechanical and
Electrical Specification in your specific module’s User’s Manual.
Go to
Start | Programs | [Product Name]
, to run the test programs.
Windows 2000/XP Procedures
The Excalibur Installation CD contains the files for:
• PCI Hardware Installation for Windows 2000/XP
• M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools
To install an EXC-4000PCI board on a Windows 2000/XP system:
1. Insert the board into an available PCI slot in your computer
2. Add Galahad Software Tools to your Windows 2000/XP system.
To verify that the board was installed correctly, run the test programs included on the Excalibur Installation CD.
To install the Excalibur EXC-4000PCI Board:
1. Make sure the computer is turned off. Insert the board into one of the available slots. For more information see the Installation section in the module’s User’s Manual
.
2. Turn on the computer and wait several moments while Windows 2000/XP boots up.
3. The message
Building driver information data
may or may not appear. After several seconds, the message
New Hardware Found
is displayed. Next, the
Update Device
Driver Wizard
is displayed.
Note:
If the
Update Device Driver Wizard
is not displayed, and you are upgrading from a previous version of the PCI Windows Hardware Installation, follow these steps to invoke the
Update Device Driver Wizard.
Right-click
My Computer,
then click
Hardware | Device Manager | Excalibur PCI Cards | Excalibur 4000PCI card
.
Double-click and select
Driver | Update Drivers
.
4. Insert the Excalibur Installation CD in the drive and follow the on-screen instructions.
5. When the following message appears:
Windows found the following updated driver for this device: Excalibur EXC-4000 card
, click
Finish
.
6. Board installation is completed. If prompted to reboot the computer, do so now. Next, continue with board verification below.
page B- 4 Excalibur Systems
Galahad Software Tools Installation Instructions EXC-4000PCI Boards
To verify board installation:
1. Make certain the Excalibur EXC-4000PCI board is in place in the computer.
2. Right-click
My Computer | Properties
. The System Properties dialog box appears.
3. In the System Properties dialog box, click
Hardware | Device Manager.
4. Double-click
Excalibur PCI Board
. Verify that the Excalibur PCI Board is listed next to a gray diamond-shaped icon.
Note:
If an exclamation point (!) appears, superimposed on the gray diamond, this indicates that the board is not properly installed. Check that there are enough memory resources available in the system. Free up more memory or
IRQs.
The board installation verification is successful.
To add Galahad Software Tools under Windows 2000/XP
Note:
If there is already a previous version of Software Tools for the same module installed on the computer, the new version will overwrite it. We recommend that you first uninstall the previous version by selecting
Start | Settings |
Control Panel | Add/Remove Programs
. If you want to save the earlier version, you can choose to install the new version to a different directory when the
Install Wizard asks to which directory to install the software.
1. Insert the Excalibur Installation CD in the drive, click
Install Drivers, Applications, Utilities.
Follow the on-screen instructions to select the software that matches your product.
2. When the
Excalibur Configuration Utility
(ExcConfig) screen appears, double-click the
Type
field. Select
4000PCI
.
3. Leave the
Auto
values and click
Save
.
Note:
Remember the device number; it is the parameter for the
Init_Module_Px function.
The EXC-4000PCI board is now ready to run.
Running test programs
Excalibur provides test programs to verify that the board is operating properly.
The source code is provided with the test programs as a guide to develop your own applications.
To run the test programs in Galahad Software Tools, the EXC-4000PCI must be linked up to a loopback cable. For details refer to the section Mechanical and
Electrical Specification in your specific module’s User’s Manual.
Go to
Start | Programs | [Product Name]
, to run the test programs.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page B - 5
Galahad Software Tools Installation Instructions EXC-4000VME Boards
Appendix B-2 EXC-4000VME Boards
Installation Instructions for PCI-MXI-2 Systems
Appendix B-2 explains the procedure for installing the Galahad Software Tools
for the Excalibur EXC-4000VME and EXC-4000VXI boards under a Windows operating system.
Installation of the EXC-4000VME board on a Windows system is accomplished by determining the board’s logical address, setting the DIP switch on the board, and installing Galahad Software Tools
.
To verify board installation, run the testprograms that are included on the Excalibur Installation CD.
All the files needed to run Galahad Software Tools on Windows operating systems are on the Excalibur Installation CD.
Note:
Galahad Software Tools for VME boards were written for VISA standard.
To install the EXC-4000VME board:
1. Ensure the National Instruments PCI-MXI-2 system is installed correctly.
2. Before installing the Excalibur board, it is very important to determine the board’s logical address. The board requires a 1MB area of memory. Choose a logical address that does not conflict with any other devices in your system.
The board is set at default address 80H (128 Dec.).
Warning: If a logical address is already in use and it is also used for the
EXC-4000VME, the board will not function properly.
3. Set the Board Logical Address DIP switch (SW1) according to the logical address chosen. See the section on DIP Switch Settings in the EXC-4000VME hardware User’s Manual.
4. Turn on your VME and PC computers. Run the two programs that establish the connection to the VME (VXIINIT, the hardware initialization program, and Resman, the resources manager program).
Note:
Later versions of the National Instruments PCI-MXI-2 may not require running VXIINIT.
page B- 6 Excalibur Systems
Galahad Software Tools Installation Instructions PCMCIA/EPII Cards
Appendix B-3 PCMCIA/EPII Cards
Appendix B-3 explains the procedure for installing Galahad Software Tools for
the EXC-1553PCMCIA/EPII card.
Galahad Software Tools is for several different operating systems.
• Windows 9x/ME
• Windows NT4
• Windows 2000/XP
Warning: Whenever you handle an Excalibur card, wear a suitably grounded electrostatic discharge wriststrap.
Inserting a PCMCIA/EPII card:
Insert the Excalibur PCMCIA/EPII card. When the card is almost all the way in the slot, push firmly, but gently, to ensure a firm connection with the computer.
Do not force the card into position.
Note:
The adapter cables may be connected to the card either before or after the card is inserted into the PCMCIA slot on the computer. In addition, the cables may be connected to and disconnected from the card while power to the computer is turned on, but not while the card is transmitting over the bus.
Windows 9x/ME Procedures
To install the PMCIA card on a Windows 9x/ME system:
1. Turn on the computer.
2. Install the PCMCIA card in your computer
3. Verify the card installation
4. Add Galahad Software Tools to your hard disk.
5. Run the test programs included in Galahad Software Tools.
The Excalibur Installation CD contains the files for:
• Hardware Installation for PCMCIA cards for Windows 9x/ME
• Galahad Software Tools
To install the PMCIA card:
1. Turn on the computer and wait several moments while Windows 9x/ME boots up.
2. Insert the PCMCIA card into any PCMCIA slot. When the card is almost all the way in the slot, push firmly but gently, to ensure a firm connection with the computer. Do not force the card into position. The message
Building driver information data
may or may not appear. After several seconds, the message
New
Hardware Found
is displayed. Next, the
Update Device Driver Wizard
is displayed.
Note:
If you are upgrading from a previous version of the PCMCIA Hardware
Installation and the
Update Device Driver Wizard
is not displayed, right-click
My
Computer
, and then click
Properties > Device Manager > EXCALIBUR PCMCIA Cards > your PCMCIA Card > Properties > Drivers > Update Driver
.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page B - 7
Galahad Software Tools Installation Instructions PCMCIA/EPII Cards
3. Insert the Excalibur Installation CD in the CD drive and follow the on-screen instructions to select the software that matches your product.
4. When the message:
Windows found the following updated driver for this device: your
PCMCIA Card
appears, click
Finish
.
5. Card installation is completed. Reboot the computer.
To verify card installation
1. Make certain the PCMCIA card is in place in the computer.
2. Right-click
My Computer
, select
Properties
. The
System Properties
dialog box appears.
3. In the
System Properties
dialog box, click the
Device Manager
tab.
4. Double-click
Excalibur PCMCIA Cards
. Verify that the PMCIA is listed next to a gray diamond-shaped icon.
5. Card installation verification is successful.
Note:
If you see an exclamation point (!) superimposed on the gray diamond, this indicates that the card is not properly installed. Check the following:
• That there are enough memory resources available in your system. If not, free up more memory or IRQs.
• That the computer is Plug and Play compatible. Many computers claim to be “Plug and Play” but are not fully compatible with the Plug and Play specification.
To install Galahad Software Tools
Note:
If a previous version of this product is installed on the computer, the current installation will overwrite it. We recommend to uninstall the previous version by selecting
Start > Settings > Control Panel > Add/Remove Programs
. To save the previous version, install the new version to a different directory, when the Install Wizard asks to which directory to install the software.
1. Insert Excalibur Installation CD in the drive, click
Install Drivers, Applications,
Utilities
.
2. Follow the on-screen instructions to select the software that matches your product.
3. When the
Excalibur Configuration Utility
(ExcConfig) screen appears, double click the Type field. Select [your PCMCIA card].
Note:
Remember the device number; it is the parameter for the
Init_Module_Px function.
4. Leave the
Auto
values and click
Save
.
5. Reboot the computer at the end of the installation procedure.
page B- 8 Excalibur Systems
Galahad Software Tools Installation Instructions PCMCIA/EPII Cards
Windows NT4 Procedures
The Excalibur Installation CD contains the files for Galahad Software Tools.
To install Galahad Software Tools
Note:
If a previous version of this product is installed on the computer, the current installation will overwrite it. We recommend to uninstall the previous version by selecting
Start > Settings > Control Panel > Add/Remove Programs
. To save the previous version, install the new version to a different directory, when the Install Wizard asks to which directory to install the software.
1. Insert Excalibur Installation CD in the drive, click
Install Drivers, Applications,
Utilities
.
2. Follow the on-screen instructions to select the software that matches your product.
3. When the
Excalibur Configuration Utility
screen appears, double-click the
Type
field, select
PCMCIA
.
Note:
Remember the device number; it is the parameter for the
Init_Card
_Px function.
4. Enter the appropriate values in Wizard screen, as shown in Table B-1.
Name of Field Enter the value
Type
See step 2.
Memory base
A 72K area of memory
To determine which memory areas are available on your computer:
Click the START button on the Windows NT4 Taskbar
Select Programs > Administrative Tools > Windows NT Diagnostics > Memory.
The memory areas currently in use are displayed.
Find a 72K block of unused memory.
Type the starting address of the unused block in the Memory base field.
Interrupts
To determine which interrupts are available on your computer, click the START button on the Windows NT Taskbar, then select Programs > Administrative Tools >
Windows NT Diagnostics > Resources. You will see which Interrupt Numbers are currently in use. Find a number that is not in use (often 5 or 7), and type that number into the Interrupt field.
Sometimes an Interrupt (IRQ) is not listed as “in use”, but is in fact unavailable. You may need to try several IRQs before you find one that is available and allows you to continue working.
If you are not using interrupts, it is desirable to leave the Interrupt field undefined.
Table B-1: 1553PCMCIA Memory/IRQ Configuration under Windows NT4
5. Click
OK > Save
.
6. Insert the PCMCIA card and reboot the computer. The card must remain in the computer throughout the reboot operation.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page B - 9
Galahad Software Tools Installation Instructions PCMCIA/EPII Cards
To verify card installation
1. On the Windows NT Taskbar, click
Start > Settings > Control Panel
.
2. Double-click
PCMCIA
. The
PCMCIA Devices screen
appears.
3. On the
PCMCIA Devices screen
, check that
Excalibur Systems Inc.
and PCMCIA is displayed next to a gray diamond-shaped icon. This indicates that your card is properly installed.
4. Click the
Properties
button on the PC Card (PCMCIA) Devices screen, then select the
Card Info
tab. Check that this screen displays the message:
The device is working properly
. This indicates that the card is properly installed.
Procedure for Installing Multiple Cards
Due to the limitations of the Windows NT4 PCMCIA drivers, we cannot support multiple cards on Windows NT4 operating systems.
Running Test Programs
Excalibur provides test programs to verify that the card is operating properly.
The source code is provided with these test programs as a guide for you to develop your own applications.
To run a test program, click
Start > Programs > Excalibur > PCMCIA > [test program icon]
.
Windows 2000/XP Procedures
The Excalibur Installation CD contains the files for:
• Hardware Installation for PCMCIA cards for Windows 2000/XP
• M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools
To Install the Excalibur PCMCIA card
Turn on the computer and wait several minutes while Windows 2000 boots up.
1. Insert the card into one of the available slots. For more information see the
Installation section in the User's Manual available on the Excalibur Installa-
tion CD.
2. After several seconds, the
Found New Hardware Wizard: Welcome to the Found New
Hardware Wizard
dialog box is displayed. Click
Next
. The
Found New Hardware
Wizard: Install Hardware Device Drivers
dialog box is displayed.
3. Insert the Excalibur Installation CD in the drive and follow the on-screen instructions to select the software that matches your product.
4. When you get a message
The Wizard found a driver for the following device: [your
PCMCIA]
, click
Next
.
5. The Wizard copies the files on to your hard drive. When the Wizard finishes copying the files
Found New Hardware Wizard: Completing the Found New Hardware
Wizard PCMCIA card
is displayed.Windows has finished installing the software for this device. Click
Finish
.
The card installation is complete. If prompted to reboot the computer, do so now.
page B- 10 Excalibur Systems
Galahad Software Tools Installation Instructions PCMCIA/EPII Cards
To verify card installation
1. Make certain the PCMCIA card is in place in the computer.
2. Right-click
My Computer
, select
Properties > Hardware tab > Device Manager.
3. Double-click Excalibur PCMCIA Cards. Verify that the PCMCIA Card is listed next to a gray diamond-shaped icon.
Card installation verification is successful.
Note:
If you see an exclamation point (!) superimposed on the gray diamond, this indicates that the card is not properly installed. Check the following:
• That there are enough memory resources available in your system. If not, free up more memory or IRQs.
• That the computer is Plug and Play compatible. Many computers claim to be “Plug and Play” but are not fully compatible with the Plug and Play specification.
To Install Galahad Software Tools
Note:
If a previous version of this product is installed on the computer, the current installation will overwrite it. We recommend to uninstall the previous version by selecting
Start > Control Panel > Add/Remove Programs
. To save the previous version, install the new version to a different directory, when the
Install Wizard asks to which directory to install the software.
1. Insert Excalibur Installation CD in the CD drive, click
Install Drivers,
Applications, Utilities
.
2. Follow the on-screen instructions to select the software that matches your product.
3. When the
Excalibur Configuration Utility
(ExcConfig) screen appears, double-click the
Type
field, choose
[your PCMCIA]
.
4. leave the default
Auto
values and click
Save
.
Note:
Remember the device number; it is the parameter for the
Init_Module_Px function.
Running Test Programs
Excalibur provides test programs to verify that the card is operating properly.
The source code is provided with these test programs as a guide for you to develop your own applications.
To run a test program, click
Start > Programs > Excalibur > PCMCIA > [test program icon].
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page B - 11
Galahad Software Tools Installation Instructions PCMCIA/EPII Cards page B- 12 Excalibur Systems
Multiple Board Support
Appendix C Multiple Board Support
EXC-4000PCI and EXC-4000cPCI Boards
Appendix C-1 EXC-4000PCI and EXC-4000cPCI Boards
Galahad Software Tools
supports the use of up to four PCI boards simultaneously.
To use multiple boards:
1. Each board must be set for a unique ID. The ID of a board is set via the SW1
DIP switch. To set the ID of the board set the jumpers as follows:
0
1
Board ID SW1 Switch contact
1 2 3 4
0
0
0
0
0
0
0
1
2
0 0 1 0
3
0 0 1 1
Set DIP switch SW1 to a unique ID by setting the switch contacts open or off to represent logic ‘1’; and closed or on to represent logic ‘0’.
2. In the ExcConfig utility program, create a separate device number for each board. For each board enter the appropriate values in the Excalibur
Configuration Screen, as described in the table below.
Name of field
Type
Unique Identifier
Memory
Interrupt Setup
I/O ports
Enter this value
Select 4000PCI from the dropdown list
Set to the unique ID configured above in Step 1.
Set to automatic setting
Set to automatic setting
Set to automatic setting
Appendix C-2 EXC-1553PCMCIA/EPII Cards
Galahad Software Tools supports 2 PCMCIA cards.
1. In the
Excalibur Configuration Utility
program, go to the first empty device. Doubleclick to display the
Excalibur Configuration Wizard
.
2. In the
Select Card
field, select
[your PCMCIA]
.
3. In the
Unique Identifier/Socket Number
field, enter your socket number.
Repeat steps 1-3 for each PCMCIA card installed.
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page C - 1
Multiple Board Support EXC-4000VME and EXC-4000VXI Boards
Appendix C-3 EXC-4000VME and EXC-4000VXI Boards
Galahad Software Tools
supports the simultaneous use of up to eight modules on a VME or VXI Board. The number of boards supported depends on the users system.
A unique Logical Address must be set for each board. Use DIP switch SW1 to set the board’s Logical Address.
Examples of Logical Address Switch (SW1) Settings:
1
20
80
81
‘1’
A15
‘1’
A14
Logical Address
Hex Dec
C0
FF
192
255
1
32
128
129
MSB
1
A13
1
1
0
0
1
1
2
A12
Logical Address Switch (SW1
3
A11
4
A10
5
A9
6
A8
Switch Settings
0
0
0
0
1
1
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
7
A7
0
0
0
0
0
1
LSB
8
A6
0
1
1
0
0
1
Example:
For a logical address of C0 (H) [=A16 Address F000 (H)], set position 1 and 2 to OFF or Open and all other switches to 0N or Closed.
Switch ON or Closed = logic 0 at switch position
Switch OFF or Open = logic 1 at switch position
Note:
1. Numbers indicate switch positions.
2. Address lines A15 and A14 are always decoded as ‘1’.
3. Address lines A5 – A0 are always decoded as ‘0’.
page C- 2 Excalibur Systems
Appendix D
Application of External Loopback Test
Application of External Loopback Test
The external loopback test feature of Excalibur Systems’ EXC-4000 family of boards and the EXC-1553PCMCIA/EPII requires a particular Loopback cable configuration. The external Loopback test checks the 1553 transceivers, transformers and associated cables when the board is disconnected from the main
MIL-STD-1553 bus. With Bus A and Bus B outputs connected together, the
initiates a special hardware test that transmits
Command Sync and Data Sync messages between the two buses.
For proper functioning of the test, a correct stub-to-stub connection must be made. Two methods of properly connecting Bus A and Bus B stubs together are:
• Direct Coupled Stubs
• Transformer Coupled Stubs
Note:
The EXC-1553PCMCIA/EPII uses mode-specific connectors. Ignore the references to setting jumpers or DIP switches. For more information contact your Excalibur representative.
Direct Coupled Stubs
(Use Direct Coupled Loopback Test Cable, MC1003)
To use direct coupling, set the board’s jumpers or DIP switches to direct coupled mode. See the
Mechanical and Electrical
chapter of the User’s Manual for module’s hardware.
For stub lengths of less than one foot, the main MIL-STD-1553 bus can be directly coupled. If this coupling method is being employed, then the Direct Coupled
Loopback Test Cable, part number MC1003, must be utilized when running the
External Loopback Test. The cable provides one PL75 twinax connector on each end and an integrated 39-ohm termination resistor across the data high and data low lines. To perform the External Loopback Test, disconnect the board’s Bus A and Bus B stub connections to the main 1553 bus, connect the test cable to the
Bus A and Bus B connections coming from the board and then run the Loopback test. When the External Loopback Test is completed, disconnect the test cable and reconnect the board’s Bus A and Bus B stubs to the main MIL-STD-1553 bus.
Transformer Coupled Stubs
(Use Universal Test Adapter, ESI-235-1-176-X-XX-XX)
To use transformer coupling, set the board’s jumpers or DIP switches to transformer coupled mode. See the
Mechanical and Electrical
chapter of the User’s
Manual for your specific hardware.
This is the preferred method of coupling to the main MIL-STD-1553 bus and requires a bus coupler at the junction of the main bus and stub. If this coupling method is being employed, then the Transformer Coupled Loopback Test Cable, part number ESI-235-1-176-X-XX-XX, must be utilized for running the External
Loopback Test. The cable provides one PL75 twinax connector on each end and an integrated two stub internally terminated (39-ohms) in-line bus coupler. To perform the External Loopback Test, disconnect the board’s Bus A and Bus B stub connections to the bus couplers, connect the test cable to the Bus A and Bus B connections coming from the board and then run the Loopback test. When the
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page D - 1
Application of External Loopback Test
External Loopback Test is completed, disconnect the test cable and reconnect the board’s Bus A and Bus B stubs to the bus couplers.
Note:
The stub cables may be connected or disconnected with the board powered on but not while the board is transmitting over the bus.
page D- 2 Excalibur Systems
Source Code References
Appendix E Source Code References
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page E - 1
Source Code References Galahad Software Tools Library
Appendix E-1 Galahad Software Tools Library
Appendix E-1 includes a list of the files in the Excalibur Galahad Software Tools
needed to write user-defined applications. The files are divided into three categories:
Source code and Header files
for the Galahad Software Tools functions. Header files should be included in application programs as needed.
File Extension Description
*.c
*.h
source code header file
DLL and associated *.lib files
File Extension Description
*.dll
*MS.dll
Borland compiler DLL
Microsoft compiler DLL
*.lib
Index file used to create applications using Borland DLL functions
*MS.lib
Index file used to create applications using Microsoft DLL functions
Demo Programs
are examples of programs using Galahad Software Tools which can be used as a basis for user-defined programs. Demo programs include the following types of files:
File Extension Description
*.c, *.h
Demo source code
*.ide
Borland demo project files
Borland demo executable files
*.exe
*.dsp
*.dsw
*MS.exe
Microsoft demo project files
Microsoft demo executable files
page E- 2 Excalibur Systems
Source Code References Galahad Software Tools Library
Source Code files
File Name bcget bcrtmsg bcframe bcset deviceio_px deviceio error_px gget gset initcard mon mon_lkup monseq rtset
Source Header files bcrun deviceio error_px error_devio excsysio exdef exc4000 galahad flags_px instance_px monlkup monseq proto_px rtrun pxIncl
Description
Functions to retrieve information in BC mode
Functions for BC/Concurrent-RT mode
Functions to set up frame identifiers in BC mode
Functions for setting up the module in BC mode
Functions for interacting with the Excalibur kernel drivers for all
Windows operating systems
Functions relating to resources such as memory and interrupts – these files act on kernel drivers
Function for returning error messages
Functions for retrieving information from all modes
Functions for setting up the module for non mode-specific values
Initialization and Release resources functions
Functions for Monitor mode
Functions for Monitor Lookup mode
Functions for Monitor Sequential mode
Functions for RT mode
Header file for BC mode functions
Header file for interaction with kernel driver
Header file containing error message codes
Header file containing error codes for the Excalibur module kernel drivers
Header file which defines shared codes and structures between
DLL and kernel driver
Header file to differentiate between different Excalibur products.
Header file for EXC-4000 board level functions
Header file containing all other header files
Header file containing flags for all modes
Header file for global module structure
Header file for Monitor Lookup mode functions
Header file for Monitor Sequential mode functions
Header file containing prototypes of all functions
Header file for RT mode functions
Header file, include file for the Px DLL code, not for applications
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page E - 3
Source Code References Galahad Software Tools Library
Demo
Programs
File Name demo_async
Description
Demo program to test asynchronous functions
DLL and *.LIB files demo_bc1
Demo programs to test basic BC functions
demo_bc2
Demo program to test advanced BC functions
demo_2md
Multi-mode demo program to test Message contents and status
demo_2crd demo_bcmon
Demo program to test BC/ Internal Concurrent Monitor
demo_int
Demo program to test interrupts
demo_mon
Demo program to test Bus Monitor functions
demo_loopback
Demo program to test External and Internal Loopback functions
demo_rt
Demo program to test RT functions
demo_minor
Demo program to test the use of Minor Frames
The table below shows the name of the DLL file and its corresponding LIB file for each module under the Borland and Microsoft compilers
Module
PxII
Demo program runs a BC on one module which sends messages and monitors those messages on the second module.
Both modules can be on different EXC-4000 boards or on the same one.
Borland
px
Microsoft
pxms
MCH
RTx
Discrete
Serial
H009
CAN
708 mch rtx m4kdio excser m4h009 exccan exc708 mchms rtxms m4kdioms excserms m4h009ms exccanms exc708ms
page E- 4 Excalibur Systems
Source Code References Code Index
Appendix E-2 Code Index
Galahad Software Tools is a set of C language functions designed to aid programmers of the Px module to write test applications. Below is an alphabetical list of all the functions and the name of Galahad Software Tools file containing the programming code. The extension of all the files is *.c
Functions
Code File Name
BCFRAME
GSET
BCFRAME
BCFRAME
MONLKUP
BCSET
GGET
BCRTMSG
BCRTMSG
BCGET
RTSET
GGET
GGET
GGET
GGET
BCFRAME
MONSEQ
BCRTMSG
BCFRAME
BCRTMSG
BCFRAME
MONLKUP
RTSET
RTSET
BCRTMSG
BCSET
BCSET
MON
RTSET
BCSET
BCRTMSG
BCRTMSG
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page E - 5
Source Code References
Functions
Init_Module_Px
Init_Module_Px for VME and VXI boards
Code File Name
RTSET
RTSET
INITCARD
INITCARD
INITCARD
DEVICEIO
BCSET
GGET
RTSET
ERROR
BCRTMSG
RTSET
BCRTMSG
RTSET
RTSET
BCRTMSG
GGET
INITCARD
BCSET
RTSET
INITCARD
ERROR
GGET
GGET
GGET
DEVICEIO
MONLKUP
MON
BCGET
GGET
MON
BCGET
BCRTMSG
MONSEQ
RTSET
RTSET
GGET
page E- 6
Code Index
Excalibur Systems
Source Code References
Functions
Code File Name
BCSET
BCFRAME
MONSEQ
BCSET
BCSET
BCSET
BCSET
GSET
GSET
BCFRAME
BCSET
RTSET
BCSET
BCSET
RTSET
GSET
MON
MON
BCSET
BCSET
BCSET
GSET
RTSET
BCSET
MON
RTSET
RTSET
BCFRAME
GSET
GSET
BCFRAME
BCSET
BCSET
BCSET
RTSET
MON
RTSET
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools
Code Index page E - 7
Source Code References
Functions
Wait_For_Multiple_Interrupts_Px
Code File Name
RTSET
BCSET
RTSET
BCSET
BCSET
GSET
MONSEQ
MONSEQ
RTSET
RTSET
INITCARD
RTSET
RTSET
RTSET
RTSET
RTSET
MONSEQ
BCSET
RTSET
RTSET
BCSET
BCSET
BCFRAME
GSET
DEVICEIO
DEVICEIO
Code Index page E- 8 Excalibur Systems
Source Code References Error Messages
Error Code
ebadid einval emode ebadchan
Init_Card_Mal msg2big msgnospace msg2many frm_badid frm_nostacksp frm_erange bcr_erange frm_maxframe frm_erangecnt eintr etiming estackempty enomsg enoskip enoasync etimeout
Appendix E-3 Error Messages
All functions in the Galahad Software Tools are written as C functions, i.e they return values. A negative value signifies an error. Below is a list of the error codes, their corresponding negative value and a definition of each error.
Value Definition
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
Undefined message id used as input
Illegal value used as input
Mode specific command called when in the wrong mode
Tried to set channel to illegal value
Init failed in Simulate mode due to Malloc call failure
Attempted to create a message with too many words
Not enough space in message stack for this message
Exceeded maximum number of messages permitted (1660)
Attempted to place an undefined message into a message frame
Not enough space in frame stack for this frame
Frame id specified was not defined with
Create_Frame
Run_BC
called with type > 255
Exceeded maximum number of frames permitted
(20)
Message entry greater than number of messages in the frame
Attempt to set an undefined interrupt
Attempt to change a message while module is accessing that message
Attempt to read command stack before any messages have been received
Get_Next_Message_BCM
called when no new, unread messages have been received
Attempt to restore a message that was not skipped
The async frame contains fewer messages than the user wants to send asynchronously
Module is currently running; module was not in halted state
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page E - 9
Source Code References
Error Code
einvamp eboardnotfound eboardnotalloc
Init_Card_noid etimeoutreset frm_nostack eboardtoomany func_invalid noirqset ilbfailure elbfailure rterror ebadcommandword einit enoalter eopenkernelpci enobcmsg einbcmsg ertbusy econcurrmonmodule eoverrun eminorframe edbnotset ebadblknum exreset ercvfunc ebadttag
page E- 10
Error Messages
Value Definition
-22
-23
-24
-25
-26
-27
-36
-49
-53
-57
-58
-59
-60
-61
-62
-64
-65
-66
-67
-81
-82
-84
-85
-86
-87
-88
-89
Attempt to set invalid amplitude
Too many modules initialized
Attempt to switch to segment which was not allocated in
Init_Card
Init could not find a device/module at given segment or device number
Timed out waiting for reset
Start_Frame
was not yet called to set up the message stack
Too many modules initialized
Function invalid for this module
No interrupt allocated.
Internal loopback test failed
External loopback test failed
Illegal RT number selected
If the T/R bit in the Command word is set incorrectly for the given cmdtype parameter
The module was not initialized
This message is being transmitted; do not alter the data
Cannot open kernel device (with PCI and cPCI boards)
Attempted to read BC message when no new messages have been received
Error in specified BC message
Current entry in the RT message stack is being written to. Try again
PCI: Modules 1 or 3 must be selected
VME/VXI: Modules 1 or 3 or 5 or 7 must be selected
Cannot read monitored message, messages were overrun
The message specified is of the type Minor frame
Double buffering not set
Bad data block number assigned for double buffering
Xilinx failed to reset
This function valid for receive RTid only
Time tag not working
Excalibur Systems
Source Code References Error Messages
Error Code
ettagexternal enosrq
Value Definition
-90
-91
External Time tag clock is not 4 µsec.
SRQ was disabled by the user
For PCI carrier boards only
eopenkernel -1001 ekernelcantmap ereleventhandle egetintcount egetchintcount egetintchannels ewriteiobyte ereadiobyte egeteventhand1 egeteventhand2 eopenscmant eopenservicet estartservice eopenscmanp eopenservicep econtrolservice eunmapmem egetirq eallocresources egetramsize ekernelwriteattrib ekernelreadattrib ekernelfrontdesk ekernelOscheck ekernelfrontdeskload ekerneliswin2000compatible ekernelbankramsize ekernelgetcardtype emodum
-1002
-1003
-1004
-1005
-1006
-1007
-1008
-1009
-1010
-1011
-1012
-1013
-1014
-1015
-1016
-1017
-1018
-1019
-1020
-1021
-1022
-1023
-1024
-1025
-1026
-1027
-1028
-1029
Cannot open kernel device; check ExcConfig settings
Kernel driver cannot map memory
Error in kernel Release_Event_Handle
Error in kernel
Get_Interrupt_Count
Kernel error in
Get_Channel_Interrupt_Count
when attempting to retrieve interrupt count
Kernel error in
Get_Interrupt_Channels
when attempting to retrieve interrupt count
Error in kernel WriteIOByte
Error in kernel ReadIOByte
Error in kernel mGetEventHandle, first part
Error in kernel mGetEventHandle, second part
Error in openSCManager in startkerneldriver
Error in openservice in startkerneldriver
Error in startservice in startkerneldriver
Error in openSCManager in stopkerneldriver
Error in openservice in stopkerneldriver
Error in controlservice in stopkerneldriver
Error in kernel unmapmemory
Error in Get_IRQ_Number
Error allocating resources. See ReadMe.pdf for details on resource allocation problems.
Error in kernel GetRAMSize
Error in kernel WriteAttributeMemory
Error in kernel ReadAttributeMemoryr
Kernel frontdesk error
Kernel Oscheck error
Kernel frontdeskload error
Kernel is win2000 compatible error
Kernel banksize error
Error in kernel GetCardType
Invalid module number specified
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page E - 11
Source Code References
Error Code
regnotset ekernelbankphysaddr ekernelclosedevice ekerneldevicenotopen ekernelinitmodule ekernelbadparam ekernelbadpointer ekerneltimeout ekernelnotwin2000 erequestnotification ekernelnot4000card enotimersirig eclocksource eparmglobalreset etimernotrunning etimerrunning eparmreload eparminterrupt ebaddevhandle edevtoomany einvalidOS
Error Messages
Value Definition
-1030
-1031
-1032
-1034
-1035
-1036
-1037
-1038
-1039
-1040
-1041
-1042
Module not configured. Reboot after ExcConfig is run and board is in slot
Kernel GetBankPhysAddr error
Kernel CloseKernelDevice error
Kernel error: device not open
Kernel initialization error
Kernel error: bad input parameter
Kernel error: invalid pointer to output buffer
A Wait_For_Interrupt function returned with timeout
Operating System is not Windows 2000
Request_Interrupt_Notification error
Designated board is not a EXC-4000PCI
Timers and IrigB not supported on this version of
EXC-4000 board
-1059 If an invalid clock source was specified
-1062
Illegal parameter used for globalreset_flag in
StartTimer
-1063
-1064
Timer not running when ResetWatchdogTimer was called; did nothing
Timer already running when StartTimer was called; did nothing
-1065
-1066
-1067
-1068
Illegal parameter used for reload_flag in
StartTimer
Illegal parameter used for interrupt_flag in
StartTimer
Invalid handle specified. Use value returned by
Init_Timers
Init_Timers called for too many boards
-1069
If an invalid operating system is used
page E- 12 Excalibur Systems
Source Code References Error Messages
For VME/VXI boards only
Error Code
eviclosedev evicloserm eopendefaultrm eviopen evimapaddress evicommand einstallhandler eenableevent eunistallhandler edevnum einstr
Value Definitions
-1050
-1051
Error in ViClose device
Error in ViClose Default RM
-1052
-1053
-1054
-1055
Error in ViOpenDefault RM
Error in ViOpen
Error in viMapAddress
Error in VISA command
-1056
-1057
-1058
-1060
-1061
Error in VISA viInstallHandler
Error in VISA viEnableEvent
Error in VISA viUnistallHandler
If a device number greater than 255 was used
If a device was not successfully initialized by
Init_Module_Px
M4K1553PxII & EXC-1553PCMCIA/EPII Galahad Software Tools page E - 13
Source Code References Error Messages page E- 14 Excalibur Systems
Function Index
A
Alter_Cmd_Px
Alter_IMG_Px
Assign_Blk_Px
B
BC_Check_Alter_Msgentry_Px
C
Clear_Frame_Px
E
Enable_Checksum_Error_Px
Enable_SRQ_Support_Px
External_Loopback_Px
G
Get_BC_Status_Px
Get_Blknum_Px
Get_Card_Type_Px
Get_Counter_Px
, 4-10
Get_Header_Value_Px
Get_Id_Px
, 2-6
Get_Last_Blknum_Px
Get_Message_Px
Get_Mode_Px
, 2-7
Get_Next_Message_Px
Get_Next_RT_Message_Px
Get_Rev_Level_Px
, 2-7
Get_Time_Tag_Px
, 2-8
I
Init_Module_Px for PCI
, 2-8
InitializeInterrupt_Px
Insert_Msg_Err_Px
L
Load_Datablk_Px
, 3-13
P
Print_Error_Px
, 2-12
R
Re_Create_Message_Px
, 5-25
Read_Datablk_Px
, 3-14
Read_RTid_Px
Read_Start_Reg_Px
Reset_Time_Tag_Px
Restart_Px
, 2-13
RT_Id_Px
Run_RT_Px
S
Select_Async_Frame_Px
, 5-28
Send_Async_Frame_Px
Set_1553Status_Px
Set_BC_Resp_Px
Set_Bit_Cnt_Px
Set_Bit_Px
Set_Bus_Px
, 5-31
Set_Cnt_Trig_Px
, 4-12
Set_Frame_Time_Px
Set_Halt_Px
, 5-33
M4K1553Px Galahad Software Tools: Programmer’s Reference
Function Index
Index – 1
Function Index
Set_Interrupt_On_Msg_Px
Set_Jump_Px
Set_Minor_Frame_Time_Px
Set_Mode_Addr_Px
Set_Mode_Px
Set_MON_Concurrent_Px
Set_Mon_Response_Time_Px
Set_Replay_Px
Set_RT_Active_Bus_Px
Set_RT_Broadcast_Px
Set_RT_Interrupt_Px
Set_RTid_Status_Px
Set_Skip_Px
Set_Status_Px
Set_Timetag_Res_Px
Set_Trigger1_Px
Set_Trigger2_Px
Set_Var_Amp_Px
,
Set_Zero_Cross_Px
Start_Frame_Px
Set_Wd_Cnt_Err_Px
W
Wait_for_Multiple_Interrupts_Px
Index – 2 Excalibur Systems
The information contained in this document is believed to be accurate.
However, no responsibility is assumed by Excalibur Systems, Inc. for its use and no license or rights are granted by implication or otherwise in connection therewith. Specifications are subject to change without notice.
September 2004, Rev A-3
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Related manuals
advertisement
Table of contents
- 7 Getting Started
- 8 The Excalibur Systems Website
- 8 Installation
- 8 The Excalibur Configuration Utility Program
- 9 An Overview of the Data Communications Bus
- 10 The MIL-STD-1760 Options
- 10 Checksums
- 10 Header Word
- 11 Galahad Software Tools Functions
- 11 Software Tools for the Exc-4000 Carrier Board
- 12 Compiler Options
- 12 Conventions Used in Galahad Software Tools
- 14 Enable_1553A_Support_Px
- 15 External_Loopback_Px
- 16 Get_Board_Status_Px
- 16 Get_Card_Type_Px
- 17 Get_Error_String_Px
- 17 Get_Header_Exists_Px
- 18 Get_Header_Value_Px
- 18 Get_Id_Px
- 19 Get_Mode_Px
- 19 Get_Rev_Level_Px
- 20 Get_Time_Tag_Px
- 20 Init_Module_Px for PCI boards and PCMCIA cards
- 22 Init_Module_Px for VME and VXI boards
- 23 Internal_Loopback_Px
- 24 Print_Error_Px
- 24 Read_Start_Reg_Px
- 25 Release_Module_Px
- 25 Reset_Time_Tag_Px
- 25 Restart_Px
- 26 Set_Header_Exists_Px
- 27 Set_Header_Value_Px
- 28 Set_Interrupt_Px
- 29 Set_Mode_Px
- 30 Set_Timetag_Res_Px
- 30 Stop_Px
- 31 Using Interrupts in Windows
- 32 Get_Interrupt_Count_Px
- 33 InitializeInterrupt_Px
- 34 Wait_For_Interrupt_Px
- 36 Wait_For_Multiple_Interrupts_Px
- 37 Using Interrupts Under VISA for VME Boards
- 42 Assign_DB_Datablk_Px
- 43 Assign_RT_Data_Px
- 43 Clear_RT_Sync_Entry_Px
- 44 Get_Blknum_Px
- 44 Get_Checksum_Blocks_Px
- 45 Get_Next_Message_RTM_Px
- 47 Get_Next_RT_Message_Px
- 49 Get_RT_Message_Px
- 50 Get_RT_Sync_Entry_Px
- 51 Load_Datablk_Px
- 52 Read_Datablk_Px
- 52 Read_RT_Status_Px
- 53 Read_RTid_Px
- 53 Reset_RT_Interrupt_Px
- 54 RT_Id_Px
- 54 Run_RT_Px
- 55 Set_1553Status_Px
- 55 Set_Bit_Px
- 56 Set_Bit_Cnt_Px
- 56 Set_Broad_Interrupt_Px
- 57 Set_Checksum_Blocks_Px
- 57 Set_Invalid_Data_Res_Px
- 58 Set_Mode_Addr_Px
- 58 Set_RT_Active_Px
- 59 Set_RT_Active_Bus_Px
- 59 Set_RT_Broadcast_Px
- 60 Set_RT_Errors_Px
- 61 Set_RT_Interrupt_Px
- 61 Set_RT_Nonactive_Px
- 62 Set_RT_Resp_Time_Px
- 62 Set_RTid_Interrupt_Px
- 63 Set_RTid_Status_Px
- 64 Set_Status_Px
- 64 Set_Var_Amp_Px
- 65 Set_Vector_Px
- 65 Set_Wd_Cnt_Err_Px
- 68 All Submodes
- 68 Clear_Msg_Blks_Px
- 69 Get_MON_Status_Px
- 69 Run_MON_Px
- 70 Set_Broad_Ctl_Px
- 70 Set_Mode_Addr_Px
- 71 Set_MON_Concurrent_Px
- 72 Set_Mon_Response_Time_Px
- 73 Look Up Submode
- 73 Assign_Blk_Px
- 73 Enable_Lkup_Int_Px
- 74 Get_Last_Blknum_Px
- 74 Get_Message_Px
- 76 Sequential Submode
- 76 Get_Counter_Px
- 76 Get_Next_Message_Px
- 78 Set_Cnt_Trig_Px
- 79 Set_Trigger_Mode_Px
- 80 Set_Trigger1_Px
- 81 Set_Trigger2_Px
- 84 BC/Concurrent-RT Simulation
- 84 Command Word Calculation
- 84 Servicing the Service Request (SRQ) Bit
- 85 Functions by Category
- 87 BC/Concurrent-RT Functions
- 87 Alter_Cmd_Px
- 88 Alter_IMG_Px
- 89 Alter_Message_Px
- 90 Alter_MsgSendTime_Px
- 91 BC_Check_Alter_Msgentry_Px
- 92 Clear_Card_Px
- 92 Clear_Frame_Px
- 93 Clear_Timetag_Sync_Px
- 94 Command_Word_Px
- 95 Create_Frame_Px
- 96 Create_1553_Message_Px
- 97 Enable_Checksum_Px
- 98 Enable_Checksum_Error_Px
- 98 Enable_SRQ_Support_Px
- 99 Get_BC_Msgentry_Px
- 101 Get_BC_Status_Px
- 101 Get_Minor_Frame_Time_Px
- 102 Get_Msgentry_Status_Px
- 104 Get_Next_Message_BCM_Px
- 106 Insert_Msg_Err_Px
- 107 Re_Create_Message_Px
- 108 Read_Message_Px
- 109 Read_SRQ_Message_Px
- 109 Reset_BC_Status_Px
- 110 Run_BC_Px
- 110 Select_Async_Frame_Px
- 111 Send_Async_Frame_Px
- 111 Send_Timetag_Sync_Px
- 112 Set_BC_Resp_Px
- 112 Set_Bit_Cnt_Px
- 113 Set_Bus_Px
- 113 Set_Continue_Px
- 114 Set_Error_Location_Px
- 114 Set_Frame_Time_Px
- 115 Set_Halt_Px
- 115 Set_Interrupt_On_Msg_Px
- 116 Set_Jump_Px
- 116 Set_Minor_Frame_Time_Px
- 117 Set_Replay_Px
- 118 Set_Restore_Px
- 119 Set_Retry_Px
- 120 Set_RT_Active_Px
- 120 Set_RT_Nonactive_Px
- 121 Set_RT_Resp_Time_Px
- 121 Set_Skip_Px
- 122 Set_Stop_On_Error_Px
- 122 Set_Sync_Pattern_Px
- 123 Set_Var_Amp_Px
- 123 Set_Word_Cnt_Px
- 124 Set_Zero_Cross_Px
- 125 Start_Frame_Px
- 127 A-1 Word Formats
- 128 A-2 Message Formats
- 129 Appendix B-1 EXC-4000PCI Boards
- 129 Windows 9x /ME Procedures
- 131 Windows NT4 Procedures
- 132 Windows 2000/XP Procedures
- 134 Appendix B-2 EXC-4000VME Boards
- 134 Installation Instructions for PCI-MXI-2 Systems
- 135 Appendix B-3 PCMCIA/EPII Cards
- 135 Windows 9x/ME Procedures
- 137 Windows NT4 Procedures
- 138 Windows 2000/XP Procedures
- 141 Appendix C-1 EXC-4000PCI and EXC-4000cPCI Boards
- 141 Appendix C-2 EXC-1553PCMCIA/EPII Cards
- 142 Appendix C-3 EXC-4000VME and EXC-4000VXI Boards
- 146 Appendix E-1 Galahad Software Tools Library
- 149 Appendix E-2 Code Index
- 153 Appendix E-3 Error Messages