xPC Target    

Example

Let's consider an A/D converter module with a CANOpen interface. After the node has been powered up, the module is in pre-operational mode, which is common for CANOpen nodes. At least two initialization messages have to be sent to the node in order to get the module fully operational.

The first message puts the node from pre-operational into operational mode. The second message programs the module in such a sense, that each time the converted A/D value differs for more than 10 mVolts from the former conversion, a CAN-message is automatically sent out, with the converted value as the data frame.

After the target application has been started and the node is properly initialized, the node will automatically send out CAN message, which the xPC target application receives and then processes the contained frame data.

Before the target application execution is actually stopped, the module (node) has to be brought back into pre-operational mode. This is achieved by sending out one corresponding termination message.

The initialization and termination message struct for this example could look as follows.


  Defining Initialization and Termination CAN Messages CAN I/O Support for FIFO