User manual

CAN API reference
13 © 2007-2010 Analytica GmbH
CANSetGlobals
CANSetGlobals — Sets the global settings, which are to be used on the CAN bus
Syntax
#include <AnaGateDllCAN.h>
int CANSetGlobals(int hHandle, int nBaudrate, unsigned char
nOperatingMode, BOOL bTermination, BOOL bHighSpeedMode, BOOL
bTimeStampOn);
Parameter
hHandle Valid access handle.
nBaudrate The baud rate to be used. Following values are allowed:
10.000 für 10kBit
20.000 für 20kBit
50.000 für 50kBit
62.500 für 62,5kBit
100.000 für 100kBit
125.000 für 125kBit
250.000 für 250kBit
500.000 für 500kBit
800.000 für 800kBit (not AnaGate CAN)
1.000.000 für 1MBit
nOperatingMode The operating mode to be used. Following values are allowed.
0 = default mode.
1 = loop back mode: All telegrams sent by a connected partner is routed back
to all active connected partners.
2 = listen mode: Device operates as passive bus partner, this means no telegrams
are sent to the CAN bus (no ACKs for incoming telegrams too).
bTermination Use integrated CAN bus termination (TRUE= yes, FALSE = no). This setting is not
supported by all AnaGate CAN models.
bHighSpeedMode Use high speed mode (TRUE= yes, FALSE= no). This setting is not supported by
all AnaGate CAN models.
The high speed mode was created for large baud rates with continuously high bus
load. In this mode telegrams are not confirmed on procol layer and the software
filters defined via CANSetFilter are ignored.