canLoopBackMode (Function) |
Top Previous Next |
This activates loopback mode. This functions makes it possible to test the application configuration (send, receive, and filter) with or without a connection to a physical CAN network. The loopback mode loops all outgoing traffic back to the CAN receiver, and the transmitted message will be received if a receive filter is created with canFilterCreate, canFilterCreateOnce, or canFilterCreateX.
Input: port : SINT (1/2) (default 1) The port of the CAN bus.
enable : BOOL (default FALSE) If true, loopback is enabled.
Note: using loopback mode requires that canOpen() has been called with the "monitor" parameter set to FALSE.
Returns: INT
Declaration: FUNCTION canLoopBackMode : INT;
Example: INCLUDE rtcu.inc |