This example program demonstrates the use of a Conditional messages. It is a modification of sample program 'example_bc6.c' to use CONDITION2 to compare against a memory location.
This is a basic example program that sets up a simple BC message list. It creates a list of two messages, 1-R-1-32 and 2-T-2-32, in a 20ms Minor Frame. This BC list runs until stopped by user input. It can also set or clear the test location in memory for the conditional block. You can display the data (or errors) for the 2-T-2-32 message or quit.
A conditional block has been inserted after the 1-R-1-32 message. The conditional block checks a location in board memory. If this location is 0x0001, then the BC branches to send 1-T-0-16 (TX VECTOR WORD mode command) before going on with the 2-T-2-32 message.
In order to test this, you need a bus analyzer (BusTools/1553) simulating RTs 1 and 2.
Download this example by clicking the attachments link on the right.