I have on same physical CAN bus(CAN wire) 3 PCAN channels initialized with :
1.PCANBasic - simulate Rest Bus fatsest message every 2 msec
2.PCAN-TP - Query diagnostic data
3.PCAN-XCP - Query measurements via XCP
Above 3 channels realized with 3 ports of an PCAN PCI-e 4 channel card connected on same CAN bus.
Randomly diagnostic querys return with timeout, tracing with a 4th PCAN-USB adapter, I can't see the Diagnostic data on the trace , however CanTpApi.Write returned with TPCANTPStatus.PCANTP_ERROR_OK. If once the diagnostic data is lost all following frames are lost.
Question: Is it necessary to synchronise the 3 channels transmition steps or this will be done on low level driver or by the PCANBacis API based on CAN arbitration?
Synchronize multiple CAN channel writing
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Synchronize multiple CAN channel writing
No, you could not "sync" the single channels. The driver itself do not care if you use 4x single channel or 2x dual channel or 1x quad channel. It makes no differnt. Also CAN Bus could not send 2 messages synchron on the Bus - the ID with the lowest value winns ! the other Frame come back after a random time and try again.
But please send an e-mail to our support@peak-system.com we will forward your specific question to our High Layer Automotiv API developers.
But please send an e-mail to our support@peak-system.com we will forward your specific question to our High Layer Automotiv API developers.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
Re: Synchronize multiple CAN channel writing
Thanks,
My question was if I need to lock example with mutex the writing steps CanTpApi.Write,PCANBasic.Write from multiple threads or this will be handled by APIs.
My question was if I need to lock example with mutex the writing steps CanTpApi.Write,PCANBasic.Write from multiple threads or this will be handled by APIs.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: Synchronize multiple CAN channel writing
no, our drivers API are multi thread save - you do not have to take care of that. But as i wrote - best is to contact the support directly, so that we could forward you to the API Developers.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------