InterframeDelay

This parameter allows the configuration of a delay, with microsecond resolution, between CAN frames being sent within a PCAN Channel. Other applications working with the same PCAN-Hardware (for instance, a PCAN-View) are not influenced when configuring this delay.

This parameter can be used by applications that want to increase the separation time of consecutive transmitted CAN frames.

  Important

This feature is only supported by FPGA based devices with a firmware version equal to or greater than 2.4.0.

Availability

It is available since PCAN-Basic version 4.2.0.

Supported By

Access Mode

This parameter is read/write. It can be configured and retrieved.

Possible Values

This is a numeric value in the range of [0...1023]) microseconds. If the value to be set is bigger than the resolution supported by the firmware, then the value is truncated.

Default Value

The default value of the delay is 0, which means that this feature is deactivated. After configuring a value bigger than 0, the delay will be used until it is expressly deactivated (set to 0), or the Channel is disconnected, i.e., using the Uninitialize method.

Initialization Status

Get: The PCAN Channel must be initialized before using this parameter.

Set: The PCAN Channel must be initialized before using this parameter.

Example

The following code shows how to set a 20 microseconds delay between CAN frames within a USB Channel:

C#
PcanChannel channelUsed = PcanChannel.Usb01;

if (Api.Initialize(channelUsed, Bitrate.Pcan500) == PcanStatus.OK)
{
    uint delay = 20;
    if (Api.SetValue(channelUsed, PcanParameter.InterframeDelay, delay) == PcanStatus.OK)
        Console.WriteLine($"A delay of {delay} microseconds between frames was configured for {channelUsed}.");
    else
        Console.WriteLine($"Error configuring a delay on channel {channelUsed}.");
    Api.Uninitialize(channelUsed);
}

See Also