MX Foundation 4
Acquisition Service

The RT channels on MIL-1553 modules support this service.

The acquisition service on a RT channel is useful to acquire the status and data that are sent from the BC and other RTs to the RT, but without resorting to the use of the BM channel.

With RT channels, this service will use the message mode. The monitor mode is an attribute changed on the BM channel, so in this case, the BM channel monitor mode must be set to either string or message mode (see KMXF_MIL1553_BM_MODE attribute). If the BM monitor mode is set to word mode, RT channels will receive nothing. Acquisition with RT channels work differently than with BM channels. The data transmitted by the RT is not received by this RT.

The following possibilities will be received by RT channel:

  • RXCmd/Data
  • TXCmd
  • RXCmd/TXCmd/TXStatus/Data (receiver side)
  • RXCmd/TXCmd/RXStatus (transmitter side)
  • ModeCode/Status
  • TXModeCode/Status/Data (Data is optional)
  • RXModeCode/Data/Status (Data is optional)
Note
No-response messages are not received by RT channels.
TX Periodic Update Message service must be active on the RT to receive with this RT channel.

Refer to the MXF_MIL1553_DATAREC structure for acquisition data reading.

The same options for acquisition filtering, acquisition with trigger and asynchronous events of BM channels apply to RT channels.

uint32 rc;
HMXF_CHANNEL rt;
HMXF_BUFFER rx=0;
uint32 rxBufferSize=0;
MXF_MIL1553_DATAREC* rxBuffer=NULL;
uint64 rxAcqStatus;
uint64 msgCount;
uint64 byteCount;
uint64 rxRec;
uint32 loop=0;
...
// Allocates buffer for Rx data
if(!rc)
{
rxBufferSize = 64*4096;
// Flex1553 allocation
rc = mxfRxAcqBufferAlloc(rt, rxBufferSize, &rx, NULL);
// Host allocation
if(!rc)
{
rxBuffer = (MXF_MIL1553_DATAREC*)malloc(rxBufferSize);
if(!rxBuffer)
rc = MAXT_ERROR_MEM;
}
}
// Starts RT acquisition
if(!rc)
rc = mxfRxAcqStart(rx, MXF_RXACQ_FLAG_DEFAULT, 0, 0);
// Read and display received messages
if(!rc)
{
do
{
rc = mxfMIL1553RxAcqRead(rx, 0, rxBufferSize, &rxAcqStatus, &msgCount, &byteCount, rxBuffer);
rxRec1553 = rxBuffer;
for(rxRec=0; rxRec<msgCount && !rc; rxRec++)
{
...
// Get next msg
rc = mxfMIL1553NextDataRecordPtrGet(rxRec1553, &rxRec1553);
}
mxfSleep(500);
loop++;
} while(loop < 200);
}
// Stops acquisition
if(!rc)
rc = mxfRxAcqStop(rx);
if (!rc)
rc = mxfRxAcqClear(rx);
...

mil1553_rt.c

Updated 10/23/2023