MX Foundation 4
Modes

The Bus Monitor is used to record bus traffic with choices to attach a time tag to each word (Word Mode), each string (String Mode) or each message (Message Mode).

Using Message Mode, the entire message (command-response, maximum of 36 16-bit words) will be time-tagged and stored in the acquisition queue and/or the sampling table. In this mode, the mxfMIL1553DataRecordDecompose() and mxfMIL1553SamplingRecordDecompose() functions may be used to decompose the received messages. With the MIL-STD-1760 option, the checksum detection must be enabled by the mxfMIL1553MsgChecksumEnableSet() function. When the checksum detection is enabled for a specific message type/address/subaddress, the result bit (MXF_MIL1553_RX_REC_CTRL_MSG_CHECKSUM_ERROR) will be relevant in the control word of corresponding messages.

Using String Mode, a string includes all consecutive words on the bus (command, command/data, status, status/data). With the MIL-STD-1760 option, the checksum will always be computed and the result bit (MXF_MIL1553_RX_REC_CTRL_STRING_CHECKSUM_ERROR) will be relevant in the control word of each string. Sampling is not available with this mode.

Using Word Mode, each 16-bit word will be time-tagged and stored in the acquisition queue. With the MIL-STD-1760 option, the checksum will be always computed and the result bit (MXF_MIL1553_RX_REC_CTRL_WORD_CHECKSUM_ERROR) will be significant in the control word of the last word of a string (MXF_MIL1553_RX_REC_CTRL_WORD_EOS bit set). Sampling is not available with this mode.

The Bus Monitor mode is selected using the mxfAttributeUint64Set() function with the KMXF_MIL1553_BM_MODE attribute key constant.

HMXF_SERVER server=0;
HMXF_DEVICE device=0;
HMXF_MODULE module=0;
HMXF_CHANNEL bm=0;
uint32 rc;
uint64 deviceCount=0;
uint64 deviceType = MXF_DEVICE_FLEX1553_PCIE; // Flex1553 device
uint64 moduleIndex = 0; // First module
uint64 channelIndex = 0; // First BM channel
rc = mxfServerConnect("0.0.0.0", "", "", FALSE, &server);
if(rc == MAXT_SUCCESS)
rc = mxfSystemDeviceAllGet(server, deviceType, 1, &deviceCount, &device);
if(rc == MAXT_SUCCESS && deviceCount == 1)
{
rc = mxfDeviceModuleGet(device, moduleIndex, &module);
if(rc == MAXT_SUCCESS)
rc = mxfModuleChannelGet(module, channelIndex, &bm);
if(rc == MAXT_SUCCESS)
{
rc = mxfAttributeUint64Set(bm, KMXF_MIL1553_BM_MODE, VMXF_MIL1553_BM_MODE_MESSAGE); // Configure BM MESSAGE MODE
if(rc == MAXT_SUCCESS)
printf("MIL-1553 Bus Monitor using MESSAGE MODE configured");
else
printf("Error code=0x%lX\n", rc);
}
}
Updated 10/23/2023