Note
Trying to configure a trace process will fail if tracing is already active.
This parameter is used to configure the trace process and the file generated in a trace session.
It is available since PCAN-Basic version 1.3.0.
This parameter is read/write. It can be configured and retrieved.
The trace process is configured as a numeric “flag” value, that matches the fields defined within the type ParameterValueTrace.
The default value of this parameter is SingleFile, which means a single file is created and filled out until the maximum configured file size is reached.
Get: The PCAN Channel must be initialized before using this parameter.
Set: The PCAN Channel must be initialized before using this parameter.
The following code shows how to configure the tracing process for a USB Channel:
PcanChannel channelUsed = PcanChannel.Usb01;
if (Api.Initialize(channelUsed, Bitrate.Pcan500) == PcanStatus.OK)
{
if (Api.SetValue(channelUsed, PcanParameter.TraceConfigure, ParameterValue.Trace.MultiFiles) == PcanStatus.OK)
Console.WriteLine($"The tracing process was successfully configured for {channelUsed} to generate multiple files.");
else
Console.WriteLine($"Error configuring tracing for {channelUsed}.");
Api.Uninitialize(channelUsed);
}Dim channelUsed As PcanChannel = PcanChannel.Usb01
If Api.Initialize(channelUsed, Bitrate.Pcan500) = PcanStatus.OK Then
If Api.SetValue(channelUsed, PcanParameter.TraceConfigure, ParameterValue.Trace.MultiFiles) = PcanStatus.OK Then
Console.WriteLine($"The tracing process was successfully configured for {channelUsed} to generate multiple files.")
Else
Console.WriteLine($"Error configuring tracing for {channelUsed}.")
End If
Api.Uninitialize(channelUsed)
End IfPcanChannel channelUsed = PcanChannel::Usb01;
if (Api::Initialize(channelUsed, Bitrate::Pcan500) == PcanStatus::OK)
{
if (Api::SetValue(channelUsed, PcanParameter::TraceConfigure, ParameterValue::Trace::MultiFiles) == PcanStatus::OK)
Console::WriteLine("The tracing process was successfully configured for {0} to generate multiple files.", channelUsed);
else
Console::WriteLine("Error configuring tracing for {0}.", channelUsed);
Api::Uninitialize(channelUsed);
}