PCAN_ERROR_UNKNOWN
Posted: Mon 9. Oct 2023, 18:37
Hello,
I'm developing an interface to PCAN-Micro-FD (using Java 17), but I'm getting PCAN_ERROR_UNKNOWN and cannot find the problem.
1. Installed all dlls (for java) according to your documentation
2. Configured PCAN-Micro-FD (fig1 attached) with protocoll CAN FD
3. Connection with PCAN-View is fine (settings fig2 attached)
4. But Java
4.1 Settings of connection
PCANBasic can = null;
TPCANStatus status = null;
TPCANBitrateFD br = new TPCANBitrateFD("f_clock_mhz=80, nom_brp=5, nom_tseg1=2, nom_tseg2=1, nom_sjw=1, data_brp=2, data_tseg1=3, data_tseg2=1, data_sjw=1");
status = can.InitializeFD(TPCANHandle.PCAN_PCIBUS1, br);
-> Status: PCAN_ERROR_OK which should be fine, but
can.GetStatus(TPCANHandle.PCAN_PCIBUS1)
-> returns Status: PCAN_ERROR_UNKNOWN
I searched all documentations and this forum, but except of
"#define PCAN_BR_CLOCK __T("f_clock")
#define PCAN_BR_CLOCK_MHZ __T("f_clock_mhz")
#define PCAN_BR_NOM_BRP __T("nom_brp")
.
.
."
I found no explanation how to define TPCANBitrateFD according to the settings of the MicroMod FD?
Hopefully someone can help
best wishes Philipp
I'm developing an interface to PCAN-Micro-FD (using Java 17), but I'm getting PCAN_ERROR_UNKNOWN and cannot find the problem.
1. Installed all dlls (for java) according to your documentation
2. Configured PCAN-Micro-FD (fig1 attached) with protocoll CAN FD
3. Connection with PCAN-View is fine (settings fig2 attached)
4. But Java
4.1 Settings of connection
PCANBasic can = null;
TPCANStatus status = null;
TPCANBitrateFD br = new TPCANBitrateFD("f_clock_mhz=80, nom_brp=5, nom_tseg1=2, nom_tseg2=1, nom_sjw=1, data_brp=2, data_tseg1=3, data_tseg2=1, data_sjw=1");
status = can.InitializeFD(TPCANHandle.PCAN_PCIBUS1, br);
-> Status: PCAN_ERROR_OK which should be fine, but
can.GetStatus(TPCANHandle.PCAN_PCIBUS1)
-> returns Status: PCAN_ERROR_UNKNOWN
I searched all documentations and this forum, but except of
"#define PCAN_BR_CLOCK __T("f_clock")
#define PCAN_BR_CLOCK_MHZ __T("f_clock_mhz")
#define PCAN_BR_NOM_BRP __T("nom_brp")
.
.
."
I found no explanation how to define TPCANBitrateFD according to the settings of the MicroMod FD?
Hopefully someone can help
best wishes Philipp